answer stringlengths 15 1.25M |
|---|
package com.crumbpicker.client.css;
import com.google.gwt.core.client.GWT;
import com.google.gwt.resources.client.ClientBundle;
import com.google.gwt.resources.client.TextResource;
public interface AppBundle extends ClientBundle {
//This is a very nasty workaround because GWT CssResource does not support @media correctly!
@Source("app.css")
TextResource css();
public static final AppBundle INSTANCE = GWT.create(AppBundle.class);
} |
<!DOCTYPE html>
<html>
<head>
<title>API documentation</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link type='text/css' rel='stylesheet' href='../../apidoc/stylesheets/bundled/bootstrap.min.css'/>
<link type='text/css' rel='stylesheet' href='../../apidoc/stylesheets/bundled/prettify.css'/>
<link type='text/css' rel='stylesheet' href='../../apidoc/stylesheets/bundled/<API key>.min.css'/>
<link type='text/css' rel='stylesheet' href='../../apidoc/stylesheets/application.css'/>
<!-- IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]
</head>
<body>
<div class="container">
<div class="row">
<div id='container'>
<ul class='breadcrumb'>
<li>
<a href='../../apidoc.html'>DchqCore 1.0</a>
<span class='divider'>/</span>
</li>
<li>
<a href='../../apidoc/categories.html'>
Categories
</a>
<span class='divider'>/</span>
</li>
<li class='active'>index</li>
</ul>
<div class='page-header'>
<h1>
GET /api/v1/categories<br>
<small>Get all categories for store</small>
</h1>
</div>
<div>
<h2>Supported Formats</h2>
json
<h2>Examples</h2>
<pre class="prettyprint">
# URL
https://api.divecentrehq.com/api/v1/categories
# Request Body
{
user_token: <USER_TOKEN>,
store_api_key: <STORE_API_KEY>
}
{
"categories": [
{
"id": 73,
"name": "Masks",
"description": "",
"created_at": "2012-02-11T07:36:09Z",
"updated_at": "2012-02-11T07:36:09Z"
},
{
"id": 74,
"name": "BCDs",
"description": "",
"created_at": "2012-02-11T07:36:19Z",
"updated_at": "2012-02-11T07:36:19Z"
}
]
}
</pre>
<h2>Params</h2>
<table class='table'>
<thead>
<tr>
<th><span class="translation_missing" title="translation missing: en.aapipie.param_name">Param Name</span></th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr style='background-color:rgb(255,255,255);'>
<td>
<strong>user_token </strong><br>
<small>
required
</small>
</td>
<td>
<p>User Token</p>
<br>
Value: Must be String
</td>
</tr>
<tr style='background-color:rgb(255,255,255);'>
<td>
<strong>store_api_key </strong><br>
<small>
required
</small>
</td>
<td>
<p>Store API Key</p>
<br>
Value: Must be String
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<hr>
<footer>© 2014 Dive Centre HQ API</footer>
</div>
<script type='text/javascript' src='../../apidoc/javascripts/bundled/jquery-1.7.2.js'></script>
<script type='text/javascript' src='../../apidoc/javascripts/bundled/bootstrap-collapse.js'></script>
<script type='text/javascript' src='../../apidoc/javascripts/bundled/prettify.js'></script>
<script type='text/javascript' src='../../apidoc/javascripts/apipie.js'></script>
</body>
</html> |
using System;
using SpeedSlidingTrainer.Application.Infrastructure;
namespace SpeedSlidingTrainer.Desktop.Infrastructure
{
public sealed class WpfDispatcher : IDispatcher
{
public void BeginInvoke(Action action)
{
App.Current.Dispatcher.BeginInvoke(action);
}
}
} |
## Thu Feb 7 17:03:52 CST 2019
Had a go at using the Prolific Evaluator to allow for using JavaScript functions
in properties. This would make it simpler to specify functions to children that
are complete except for a little bit of customization. The selector function to
Inlet UDP and Inlet TCP are what got this started.
Right at the outset, though, I hit problems. Instead of providing JSON, you
create a builder function that generates JSON. We already do this for production
invocation and we're saying we want to do it for Mocks as well. It's just the
way things are done. It means we can send the source to the children and the
children can re-evaluate it.
But, the JSON describes all the children, and the properties of the process
itself like the socket path, so do we constantly regenerate the entirely? That
starts to sound like it has more side effects than it is worth, just to create a
copy of a function, for a single instance.
It's subtle though. We still have the evaluation like in Prolific, but we are
producing this different result. Prolific really wants to build a function,
something that will do work, whereas here we only really want a configuration.
Prolific is slightly more homogeneous. All the monitors are going to have the
same code, we're basically forking the code, and all the monitored are going to
have the same triage. Here we have a tree with bits for the root and different
configurations for different children.
Thus, it is similar but not quite worth it to add the evaluation. |
#include "<API key>.h"
#ifdef __APPLE__
#include <mach/mach.h>
#include <mach/task.h>
#include <mach/mach_init.h>
#include <mach/host_info.h>
#include <mach/mach_host.h>
#include <mach/mach_traps.h>
#include <mach/mach_vm.h>
#include <mach/shared_region.h>
#include <sys/sysctl.h>
#include <math.h>
#include <unistd.h>
#include <errno.h>
#elif defined __linux__
#include <sys/sysinfo.h>
#include <string.h>
#include <errno.h>
#elif defined _WIN32 || defined _WIN64
#else
#error "unknown platform"
#endif
VirtualMemoryWorker::VirtualMemoryWorker() {
}
VirtualMemoryWorker::~VirtualMemoryWorker() {
}
#ifdef __APPLE__
void VirtualMemoryWorker::execute()
{
int mib[2];
uint64_t total;
size_t len = sizeof(total);
<API key> vm;
int pagesize = getpagesize();
// physical mem
mib[0] = CTL_HW;
mib[1] = HW_MEMSIZE;
// Execute sys call
if(sysctl(mib, 2, &total, &len, NULL, 0)) {
if(errno != 0) {
this->error = true;
this->error_message = strerror(errno);
return;
} else {
this->error = true;
this->error_message = (char *)"sysctl(HW_MEMSIZE) failed";
return;
}
}
kern_return_t ret;
<API key> count = sizeof(vm) / sizeof(integer_t);
mach_port_t mport = mach_host_self();
ret = host_statistics(mport, HOST_VM_INFO, (host_info_t)&vm, &count);
if(ret != KERN_SUCCESS) {
// Contains the message
char message[256];
// Prepare the error message
sprintf(message, "host_statistics() failed: %s", mach_error_string(ret));
// Prepare error
this->error = true;
this->error_message = message;
return;
}
// Create result object
this->results = new VirtualMemory();
this->results->total = total;
this->results->active = vm.active_count * pagesize;
this->results->inactive = vm.inactive_count * pagesize;
this->results->wired = vm.wire_count * pagesize;
this->results->free = vm.free_count * pagesize;
this->results->available = this->results->inactive + this->results->free;
this->results->used = this->results->active + this->results->inactive + this->results->wired;
this->results->percent = ((double)(this->results->total - this->results->available) / this->results->total) * 100;
this->results->percent = ceilf(this->results->percent * 100.0) / 100.0;
}
v8::Handle<v8::Value> VirtualMemoryWorker::map()
{
// HandleScope scope;
v8::Local<v8::Object> resultsObject = v8::Object::New();
// Map the structure to the final object
resultsObject->Set(v8::String::New("total"), v8::Number::New(this->results->total));
resultsObject->Set(v8::String::New("active"), v8::Number::New(this->results->active));
resultsObject->Set(v8::String::New("inactive"), v8::Number::New(this->results->inactive));
resultsObject->Set(v8::String::New("wired"), v8::Number::New(this->results->wired));
resultsObject->Set(v8::String::New("free"), v8::Number::New(this->results->free));
resultsObject->Set(v8::String::New("available"), v8::Number::New(this->results->available));
resultsObject->Set(v8::String::New("used"), v8::Number::New(this->results->used));
resultsObject->Set(v8::String::New("percent"), v8::Number::New(this->results->percent));
// Cleanup memory
delete this->results;
// Return final object
return resultsObject;
}
#elif defined __linux__
void VirtualMemoryWorker::execute()
{
struct sysinfo info;
if(sysinfo(&info) != 0) {
this->error = true;
this->error_message = strerror(errno);
return;
}
this->results = new VirtualMemory();
this->results->total = (unsigned long long)info.totalram * info.mem_unit;
this->results->free = (unsigned long long)info.freeram * info.mem_unit;
this->results->buffer = (unsigned long long)info.bufferram * info.mem_unit;
this->results->shared = (unsigned long long)info.sharedram * info.mem_unit;
this->results->swap_total = (unsigned long long)info.totalswap * info.mem_unit;
this->results->swap_free = (unsigned long long)info.freeswap * info.mem_unit;
}
v8::Handle<v8::Value> VirtualMemoryWorker::map()
{
// HandleScope scope;
v8::Local<v8::Object> resultsObject = v8::Object::New();
// Map the structure to the final object
resultsObject->Set(v8::String::New("total"), v8::Number::New(this->results->total));
resultsObject->Set(v8::String::New("free"), v8::Number::New(this->results->free));
resultsObject->Set(v8::String::New("buffer"), v8::Number::New(this->results->buffer));
resultsObject->Set(v8::String::New("shared"), v8::Number::New(this->results->shared));
resultsObject->Set(v8::String::New("swap_total"), v8::Number::New(this->results->swap_total));
resultsObject->Set(v8::String::New("swap_free"), v8::Number::New(this->results->swap_free));
// Cleanup memory
delete this->results;
// Return final object
return resultsObject;
}
#else
#endif |
require_relative '../spec_helper'
describe <API key> do
describe 'check action' do
it 'should get performance stats from backend' do
PerformanceStats.any_instance.should_receive(:result)
get :check
end
end
end |
/* global describe it expect beforeEach afterEach */
var $ = window.jQuery
describe('<API key>', function () {
'use strict'
var GOVUK = window.GOVUK
var $stickyElement
var $stickyWrapper
beforeEach(function () {
$stickyElement = $('<div class="<API key>"></div>')
$stickyWrapper = $('<div>').append($stickyElement)
$('body').append($stickyWrapper)
})
afterEach(function () {
$stickyWrapper.remove()
})
describe('when stick is called', function () {
it('should add fixed class on stick', function () {
expect(!$stickyElement.hasClass('content-fixed')).toBe(true)
GOVUK.<API key>.stick($stickyElement)
expect($stickyElement.hasClass('content-fixed')).toBe(true)
})
it('should insert shim when sticking the element', function () {
expect($('.shim').length).toBe(0)
GOVUK.<API key>.stick($stickyElement)
expect($('.shim').length).toBe(1)
})
it('should insert shim with minimum height', function () {
GOVUK.<API key>.stick($stickyElement)
expect($('.shim').height()).toBe(1)
})
})
describe('when release is called', function () {
it('should remove fixed class', function () {
$stickyElement.addClass('content-fixed')
GOVUK.<API key>.release($stickyElement)
expect($stickyElement.hasClass('content-fixed')).toBe(false)
})
it('should remove the shim', function () {
$stickyElement = $('<div class="<API key> content-fixed"></div>')
GOVUK.<API key>.release($stickyElement)
expect($('.shim').length).toBe(0)
})
})
describe('for larger screens (>768px)', function () {
beforeEach(function () {
GOVUK.<API key>.getWindowPositions = function () {
return {
scrollTop: 300
}
}
GOVUK.<API key>.getElementOffset = function () {
return {
top: 300
}
}
GOVUK.<API key>.getWindowDimensions = function () {
return {
height: 768,
width: 769
}
}
GOVUK.<API key>.$els = $stickyElement
GOVUK.<API key>._hasScrolled = true
GOVUK.<API key>.checkScroll()
})
it('should stick, if the scroll position is past the element position', function () {
expect($stickyElement.hasClass('content-fixed')).toBe(true)
})
it('should check the width of the parent, and make the width of the element and the shim the same on resize', function () {
var $stickyResizeElement = $('<div class="<API key> js-sticky-resize"></div>')
var $stickyResizeWrapper = $('<div class="column-third" style="width:300px;">').append($stickyResizeElement)
$('body').append($stickyResizeWrapper)
GOVUK.<API key>.$els = $stickyResizeElement
GOVUK.<API key>._hasResized = true
GOVUK.<API key>.checkResize()
var <API key> = $stickyResizeElement.parent('div').width()
expect(<API key>).toBe(300)
var stickyElementWidth = $stickyResizeElement.width()
expect(stickyElementWidth).toBe(300)
var <API key> = $('.shim').width()
expect(<API key>).toBe(300)
})
it('should unstick, if the scroll position is less than the point at which scrolling started', function () {
GOVUK.<API key>.getWindowPositions = function () {
return {
scrollTop: 0
}
}
GOVUK.<API key>.$els = $stickyElement
GOVUK.<API key>._hasScrolled = true
GOVUK.<API key>.checkScroll()
expect($stickyElement.hasClass('content-fixed')).toBe(false)
})
})
describe('for smaller screens (<=768px)', function () {
beforeEach(function () {
GOVUK.<API key>.getWindowDimensions = function () {
return {
height: 768,
width: 767
}
}
GOVUK.<API key>.getElementOffset = function () {
return {
top: 300
}
}
GOVUK.<API key>.$els = $stickyElement
GOVUK.<API key>._hasScrolled = true
GOVUK.<API key>.checkScroll()
})
it('should unstick the element', function () {
expect($stickyElement.hasClass('content-fixed')).toBe(false)
})
})
}) |
package com.dak.duty.repository;
import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import com.dak.duty.model.Duty;
@Repository
public interface DutyRepository extends JpaRepository<Duty, Long> {
@Query("select d from Duty d where d.organisation = ?#{principal.person.organisation} and d.id = ?1")
Duty findOne(Long id);
@Query("select d from Duty d where d.organisation = ?#{principal.person.organisation} order by d.name asc")
List<Duty> <API key>();
@Query("select d from Duty d where d.organisation = ?#{principal.person.organisation} and d.active = true order by d.name asc")
List<Duty> <API key>();
@Query("select d from Duty d where d.organisation = ?#{principal.person.organisation} and d.active = true")
List<Duty> findByActiveTrue();
@Query("select d from Duty d where d.organisation = ?#{principal.person.organisation} and d.active = true order by d.sortOrder asc")
List<Duty> <API key>();
@Query("select d from Duty d where d.organisation = ?#{principal.person.organisation} and lower(d.name) like '%' || lower(:name) || '%' and d.active = true")
List<Duty> <API key>(@Param("name") String name);
@Modifying
@Query("update Duty d set d.sortOrder = d.sortOrder + 1 where d.organisation = ?#{principal.person.organisation} and d.sortOrder >= ?1 and d.active = true")
Integer <API key>(Integer sortOrder);
@Modifying
@Query("update Duty d set d.sortOrder = d.sortOrder + 1 where d.organisation = ?#{principal.person.organisation} and d.sortOrder >= ?1 and d.id != ?2 and d.active = true")
Integer <API key>(Integer sortOrder, Long dutyId);
@Modifying
@Query("update Duty d set d.sortOrder = d.sortOrder - 1 where d.organisation = ?#{principal.person.organisation} and d.sortOrder >= ?1 and d.id != ?2 and d.active = true")
Integer <API key>(Integer sortOrder, Long dutyId);
@Modifying
@Query("update Duty d set d.sortOrder = d.sortOrder + 1 where d.organisation = ?#{principal.person.organisation} and d.sortOrder > ?1 and d.active = true")
Integer <API key>(Integer sortOrder);
@Modifying
@Query("update Duty d set d.sortOrder = d.sortOrder + 1 where d.organisation = ?#{principal.person.organisation} and d.sortOrder > ?1 and d.id != ?2 and d.active = true")
Integer <API key>(Integer sortOrder, Long dutyId);
@Modifying
@Query("update Duty d set d.sortOrder = d.sortOrder - 1 where d.organisation = ?#{principal.person.organisation} and d.sortOrder > ?1 and d.active = true")
Integer <API key>(Integer sortOrder);
@Modifying
@Query("update Duty d set d.sortOrder = d.sortOrder - 1 where d.organisation = ?#{principal.person.organisation} and d.sortOrder > ?1 and d.id != ?2 and d.active = true")
Integer <API key>(Integer sortOrder, Long dutyId);
@Query("select max(d.sortOrder) from Duty d where d.organisation = ?#{principal.person.organisation} and d.active = true")
Integer findMaxSortOrder();
} |
#ifndef <API key>
#define <API key>
#include <assert.h>
#include <cstring>
#include <stdexcept>
#include <stdint.h>
#include <string>
#include <vector>
class uint256;
class uint_error : public std::runtime_error {
public:
explicit uint_error(const std::string& str) : std::runtime_error(str) {}
};
/** Template base class for unsigned big integers. */
template<unsigned int BITS>
class base_uint
{
protected:
enum { WIDTH=BITS/32 };
uint32_t pn[WIDTH];
public:
base_uint()
{
for (int i = 0; i < WIDTH; i++)
pn[i] = 0;
}
base_uint(const base_uint& b)
{
for (int i = 0; i < WIDTH; i++)
pn[i] = b.pn[i];
}
base_uint& operator=(const base_uint& b)
{
for (int i = 0; i < WIDTH; i++)
pn[i] = b.pn[i];
return *this;
}
base_uint(uint64_t b)
{
pn[0] = (unsigned int)b;
pn[1] = (unsigned int)(b >> 32);
for (int i = 2; i < WIDTH; i++)
pn[i] = 0;
}
explicit base_uint(const std::string& str);
bool operator!() const
{
for (int i = 0; i < WIDTH; i++)
if (pn[i] != 0)
return false;
return true;
}
const base_uint operator~() const
{
base_uint ret;
for (int i = 0; i < WIDTH; i++)
ret.pn[i] = ~pn[i];
return ret;
}
const base_uint operator-() const
{
base_uint ret;
for (int i = 0; i < WIDTH; i++)
ret.pn[i] = ~pn[i];
ret++;
return ret;
}
double getdouble() const;
base_uint& operator=(uint64_t b)
{
pn[0] = (unsigned int)b;
pn[1] = (unsigned int)(b >> 32);
for (int i = 2; i < WIDTH; i++)
pn[i] = 0;
return *this;
}
base_uint& operator^=(const base_uint& b)
{
for (int i = 0; i < WIDTH; i++)
pn[i] ^= b.pn[i];
return *this;
}
base_uint& operator&=(const base_uint& b)
{
for (int i = 0; i < WIDTH; i++)
pn[i] &= b.pn[i];
return *this;
}
base_uint& operator|=(const base_uint& b)
{
for (int i = 0; i < WIDTH; i++)
pn[i] |= b.pn[i];
return *this;
}
base_uint& operator^=(uint64_t b)
{
pn[0] ^= (unsigned int)b;
pn[1] ^= (unsigned int)(b >> 32);
return *this;
}
base_uint& operator|=(uint64_t b)
{
pn[0] |= (unsigned int)b;
pn[1] |= (unsigned int)(b >> 32);
return *this;
}
base_uint& operator<<=(unsigned int shift);
base_uint& operator>>=(unsigned int shift);
base_uint& operator+=(const base_uint& b)
{
uint64_t carry = 0;
for (int i = 0; i < WIDTH; i++)
{
uint64_t n = carry + pn[i] + b.pn[i];
pn[i] = n & 0xffffffff;
carry = n >> 32;
}
return *this;
}
base_uint& operator-=(const base_uint& b)
{
*this += -b;
return *this;
}
base_uint& operator+=(uint64_t b64)
{
base_uint b;
b = b64;
*this += b;
return *this;
}
base_uint& operator-=(uint64_t b64)
{
base_uint b;
b = b64;
*this += -b;
return *this;
}
base_uint& operator*=(uint32_t b32);
base_uint& operator*=(const base_uint& b);
base_uint& operator/=(const base_uint& b);
base_uint& operator++()
{
// prefix operator
int i = 0;
while (++pn[i] == 0 && i < WIDTH-1)
i++;
return *this;
}
const base_uint operator++(int)
{
// postfix operator
const base_uint ret = *this;
++(*this);
return ret;
}
base_uint& operator
{
// prefix operator
int i = 0;
while (--pn[i] == (uint32_t)-1 && i < WIDTH-1)
i++;
return *this;
}
const base_uint operator--(int)
{
// postfix operator
const base_uint ret = *this;
--(*this);
return ret;
}
int CompareTo(const base_uint& b) const;
bool EqualTo(uint64_t b) const;
friend inline const base_uint operator+(const base_uint& a, const base_uint& b) { return base_uint(a) += b; }
friend inline const base_uint operator-(const base_uint& a, const base_uint& b) { return base_uint(a) -= b; }
friend inline const base_uint operator*(const base_uint& a, const base_uint& b) { return base_uint(a) *= b; }
friend inline const base_uint operator/(const base_uint& a, const base_uint& b) { return base_uint(a) /= b; }
friend inline const base_uint operator|(const base_uint& a, const base_uint& b) { return base_uint(a) |= b; }
friend inline const base_uint operator&(const base_uint& a, const base_uint& b) { return base_uint(a) &= b; }
friend inline const base_uint operator^(const base_uint& a, const base_uint& b) { return base_uint(a) ^= b; }
friend inline const base_uint operator>>(const base_uint& a, int shift) { return base_uint(a) >>= shift; }
friend inline const base_uint operator<<(const base_uint& a, int shift) { return base_uint(a) <<= shift; }
friend inline const base_uint operator*(const base_uint& a, uint32_t b) { return base_uint(a) *= b; }
friend inline bool operator==(const base_uint& a, const base_uint& b) { return memcmp(a.pn, b.pn, sizeof(a.pn)) == 0; }
friend inline bool operator!=(const base_uint& a, const base_uint& b) { return memcmp(a.pn, b.pn, sizeof(a.pn)) != 0; }
friend inline bool operator>(const base_uint& a, const base_uint& b) { return a.CompareTo(b) > 0; }
friend inline bool operator<(const base_uint& a, const base_uint& b) { return a.CompareTo(b) < 0; }
friend inline bool operator>=(const base_uint& a, const base_uint& b) { return a.CompareTo(b) >= 0; }
friend inline bool operator<=(const base_uint& a, const base_uint& b) { return a.CompareTo(b) <= 0; }
friend inline bool operator==(const base_uint& a, uint64_t b) { return a.EqualTo(b); }
friend inline bool operator!=(const base_uint& a, uint64_t b) { return !a.EqualTo(b); }
std::string GetHex() const;
void SetHex(const char* psz);
void SetHex(const std::string& str);
std::string ToString() const;
unsigned int size() const
{
return sizeof(pn);
}
/**
* Returns the position of the highest bit set plus one, or zero if the
* value is zero.
*/
unsigned int bits() const;
uint64_t GetLow64() const
{
assert(WIDTH >= 2);
return pn[0] | (uint64_t)pn[1] << 32;
}
};
/** 256-bit unsigned big integer. */
class arith_uint256 : public base_uint<256> {
public:
arith_uint256() {}
arith_uint256(const base_uint<256>& b) : base_uint<256>(b) {}
arith_uint256(uint64_t b) : base_uint<256>(b) {}
explicit arith_uint256(const std::string& str) : base_uint<256>(str) {}
/**
* The "compact" format is a representation of a whole
* number N using an unsigned 32bit number similar to a
* floating point format.
* The most significant 8 bits are the unsigned exponent of base 256.
* This exponent can be thought of as "number of bytes of N".
* The lower 23 bits are the mantissa.
* Bit number 24 (0x800000) represents the sign of N.
* N = (-1^sign) * mantissa * 256^(exponent-3)
*
* Satoshi's original implementation used BN_bn2mpi() and BN_mpi2bn().
* MPI uses the most significant bit of the first byte as sign.
* Thus 0x1234560000 is compact (0x05123456)
* and 0xc0de000000 is compact (0x0600c0de)
*
* Bitcoin only uses this "compact" format for encoding difficulty
* targets, which are unsigned 256bit quantities. Thus, all the
* complexities of the sign bit and using base 256 are probably an
* implementation accident.
*/
arith_uint256& SetCompact(uint32_t nCompact, bool *pfNegative = NULL, bool *pfOverflow = NULL);
uint32_t GetCompact(bool fNegative = false) const;
friend uint256 ArithToUint256(const arith_uint256 &);
friend arith_uint256 UintToArith256(const uint256 &);
};
uint256 ArithToUint256(const arith_uint256 &);
arith_uint256 UintToArith256(const uint256 &);
#endif // <API key> |
package com.lynx.ui.textarea;
import android.content.Context;
import android.support.annotation.NonNull;
import android.view.Gravity;
import com.lynx.base.Style;
import com.lynx.core.impl.RenderObjectImpl;
import com.lynx.ui.input.AndroidInput;
import com.lynx.ui.input.LynxUIInput;
public class LynxUITextArea extends LynxUIInput {
public LynxUITextArea(Context context, RenderObjectImpl impl) {
super(context, impl);
}
@Override
protected AndroidInput createView(Context context) {
AndroidInput input = super.createView(context);
input.setMaxLines(Integer.MAX_VALUE);
input.setGravity(Gravity.TOP);
return input;
}
@Override
public void updateStyle(Style style) {
super.updateStyle(style);
if (style != null) {
setWhiteSpace(style);
}
}
public void setWhiteSpace(@NonNull Style style) {
if (style.mWhiteSpace == Style.<API key>) {
mView.setSingleLine();
} else {
mView.setSingleLine(false);
}
}
} |
<div class="logo">
<img id="logo_shapy" src="/img/logo.png"/>
<h1>Welcome to Shapy, the collaborative 3D modelling tool!</h1>
<p>To start with, register an account if you have not already, otherwise login to access your assets folder. Scenes can be exported to the 3D printable STL format or published using the context menu which allows other users to view and (optionally) modify scenes.</p>
</div> |
// helper function for Timeslider
function timestamp(str) {
return new Date(str).getTime();
}
// noUiSlider -> for selecting a timespan for displaying changes
var dateSlider = document.getElementById('slider-date');
noUiSlider.create(dateSlider, {
connect: true,
range: {
// Range is from where the project started to the current date
min: timestamp('2015-11-15'),
max: new Date().getTime()
},
// Steps of one month
// (365.25d/y ) / 12 = 30,4375
step: 30.4375 * 24 * 60 * 60 * 1000,
// Two more timestamps indicate the handle starting positions.
start: [timestamp('2015-11-15'), new Date().getTime()],
});
// Create a list of monthnames.
var months = [
"January", "February", "March",
"April", "May", "June", "July",
"August", "September", "October",
"November", "December"
];
// Create a string representation of the date.
function formatDate(date) {
return months[date.getMonth()] + " " +
date.getFullYear();
}
// Span Elements -> The start and end values are displayed there
var dateValues = [
document.getElementById('event-start'),
document.getElementById('event-end')
];
// Update Handler -> Updates the span elements
dateSlider.noUiSlider.on('update', function (values, handle) {
dateValues[handle].innerHTML = formatDate(new Date(+values[handle]));
}); |
// <API key>.h
// GeoMap
#import <Cocoa/Cocoa.h>
@class GeoMapDocument;
@interface <API key> : NSTableView
@property (strong) IBOutlet GeoMapDocument * document;
@end |
// there's no real io error on a byte slice
pub type Error = ();
pub type Result<T> = core::result::Result<T, Error>;
pub trait Write {
fn write(&mut self, buf: &[u8]) -> Result<usize>;
}
impl Write for &mut [u8] {
fn write(&mut self, data: &[u8]) -> Result<usize> {
let amt = core::cmp::min(data.len(), self.len());
let (a, b) = core::mem::replace(self, &mut []).split_at_mut(amt);
a.copy_from_slice(&data[..amt]);
*self = b;
Ok(amt)
}
}
pub enum SeekFrom {
Start(u64),
Current(i64),
}
pub trait Seek {
fn seek(&mut self, pos: SeekFrom) -> Result<u64>;
}
// Minimal re-implementation of std::io::Cursor so it
// also works in non-std environments
pub struct Cursor<T>(T, u64);
impl<'a> Cursor<&'a mut [u8]> {
pub fn new(inner: &'a mut [u8]) -> Self {
Self(inner, 0)
}
pub fn into_inner(self) -> &'a mut [u8] {
self.0
}
pub fn position(&self) -> u64 {
self.1 as u64
}
pub fn set_position(&mut self, pos: u64) {
self.1 = pos;
}
pub fn get_mut(&mut self) -> &mut [u8] {
self.0
}
pub fn get_ref(&self) -> &[u8] {
self.0
}
}
impl<'a> Write for Cursor<&'a mut [u8]> {
fn write(&mut self, data: &[u8]) -> Result<usize> {
let amt = (&mut self.0[(self.1 as usize)..]).write(data)?;
self.1 += amt as u64;
Ok(amt)
}
}
impl<'a> Seek for Cursor<&'a mut [u8]> {
fn seek(&mut self, pos: SeekFrom) -> Result<u64> {
let (start, offset) = match pos {
SeekFrom::Start(n) => {
self.1 = n;
return Ok(n);
}
SeekFrom::Current(n) => (self.1 as u64, n),
};
let new_pos = if offset >= 0 {
start.checked_add(offset as u64)
} else {
start.checked_sub((offset.wrapping_neg()) as u64)
};
match new_pos {
Some(n) => {
self.1 = n;
Ok(n)
}
None => panic!("invalid seek to a negative or overflowing position"),
}
}
} |
using System;
using OKHOSTING.UI.Controls;
using OKHOSTING.UI.Controls.Layout;
namespace OKHOSTING.UI.Test.Controls
{
<summary>
A multiline textbox
<para xml:lang="es">
Un cuadro de texto de multiples lineas.
</para>
</summary>
public class TextAreaController: Controller
{
//Declare an Label.
ILabel lblcoment;
//Declare an TextArea.
ITextArea txtTextarea;
<summary>
Start this instance.
<para xml:lang="es">
Inicia
</para>
</summary>
protected override void OnStart()
{
//Create an Stack
IStack stack = Core.BaitAndSwitch.Create<IStack>();
//Create the Label lblLabel with text an height specific and adds it to the Stack.
ILabel lblLabel = Core.BaitAndSwitch.Create<ILabel>();
lblLabel.Text = "Enter your comment";
lblLabel.Height = 30;
stack.Children.Add(lblLabel);
//Create an textArea with size specific and adds it to the Stack
txtTextarea = Core.BaitAndSwitch.Create<ITextArea>();
txtTextarea.Value = "";
txtTextarea.Width = 200;
txtTextarea.Height = 100;
stack.Children.Add(txtTextarea);
//Create the button cmdPrint with text specific with the event also click and adds it to the stack.
IButton cmdPrint = Core.BaitAndSwitch.Create<IButton>();
cmdPrint.Text = "Print your coment";
cmdPrint.Click += CmdOpen_Click;
stack.Children.Add(cmdPrint);
//Create the Label lblcoment not visible and with width specific and adds it to the Stack
lblcoment = Core.BaitAndSwitch.Create<ILabel>();
lblcoment.Visible = false;
lblcoment.Width = 200;
stack.Children.Add(lblcoment);
//Create the button cmdClose with specific text with the event also click and adds it to the stack.
IButton cmdClose = Core.BaitAndSwitch.Create<IButton>();
cmdClose.Text = "Close";
cmdClose.Click += CmdClose_Click;
stack.Children.Add(cmdClose);
// Establishes the content and title of the page.
Page.Title = "Test label";
Page.Content = stack;
}
<summary>
Cmds the open click.
<para xml:lang="es">
Es el evento clic del boton cmdPrint, lo que hace es hacer visible el Label lblcoment y cambiarle el texto al mismo label.
</para>
</summary>
<returns>The open click.</returns>
<param name="sender">Sender.</param>
<param name="e">E.</param>
private void CmdOpen_Click(object sender, EventArgs e)
{
lblcoment.Visible = true;
lblcoment.Text = txtTextarea.Value;
txtTextarea.Enabled = false;
}
<summary>
It is the button click event cmdClose, what it does is end this instance.
<para xml:lang="es">
Es el evento clic del boton cmdClose, lo que hace es finalizar esta instancia.
</para>
</summary>
<returns>The close click.</returns>
<param name="sender">Sender.</param>
<param name="e">E.</param>
private void CmdClose_Click(object sender, EventArgs e)
{
this.Finish();
}
}
} |
body {
background-image: url("http://chomsky.soc.cornell.edu/~marty/<API key>.jpg");
<API key>: fixed;
}
header {
text-align: right;
}
a {
text-decoration: none;
color: #0099FF;
}
a:hover {
color: #9966FF;
}
a:visited {
color: none;
}
.menu {
text-align: center;
list-style: none;
margin: 0;
padding: 0;
}
.menu li {
display: inline;
}
.menu a {
display: inline-block;
padding: 20px;
}
p {
text-align: center;
padding: 20px 50px 0 50px;
font-family: Papyrus;
color: #333333;
}
#name {
font-size: 75px;
font-family: Brush Script MT;
text-align: center;
color: #333333;
}
.profile {
border-radius: 50%;
height: 200px;
width: auto;
border: 2px solid white;
display: block;
margin-left: auto;
margin-right: auto;
}
#project {
text-align: center;
padding: 50px;
}
.blog {
padding: 0 10px 0 10px;
}
footer {
text-align: center;
font-size: 10px;
font-color: black;
}
color: #000000;
} |
// ANObject+Anima.h
// AnimaPainter
#import "ANObject.h"
//////////////////////////////////////////////////////////////// [ ANObject + Anima ]
@interface ANObject (Anima)
-(void)animaRotationSnow;
-(void)<API key>:(CGPoint)pSta endsAt:(CGPoint)pEnd;
// ... From Value, To Value... [NSNumber numberWithFloat:pFrom] ..
-(void)animaFloatKeypathOf:(NSString*)pKeyPath forKey:(NSString*)pKey
delegateObj:(id)pDelegate howMany:(int)pNum duration:(float)pDuration
fromVal:(float)pFrom toVal:(float)pTo
autoReverse:(bool)pAutoReverse;
-(void)animaValueKeypathOf:(NSString*)pKeyPath forKey:(NSString*)pKey
delegateObj:(id)pDelegate howMany:(int)pNum duration:(float)pDuration
fromVal:(id)pFrom toVal:(id)pTo
autoReverse:(bool)pAutoReverse;
-(void)animaRotation4key:(NSString*)pKey delegateObj:(id)pDelegate
howMany:(int)pNum duration:(float)pDuration
type:(NSString*)pType axis:(NSString*)pAxis
autoReverse:(bool)pAutoReverse ;
// Animation
// Position Anima.. // manPath ....
-(void)animaMoveOnPath4key:(NSString*)pKey delegateObj:(id)pDelegate duration:(float)pDuration
calcMode:(NSString*)pCalulationMode autoReverse:(bool)pAutoReverse;
// From Value ... See "ANObject#vanish"
-(void)<API key>:(float)pFrom toVal:(float)pTo withKey:(NSString*)pKey delegateObj:(id)pDelegate
howMany:(int)pNum duration:(float)pDuration
autoReverse:(bool)pAutoReverse;
-(void)vanishWithKey:(NSString*)pKey delegateObj:(id)pDelegate ;
@end
//3456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
//////////////////////////////////////////////////////////////// [ ANObject + Anima ] |
package redis.clients.jedis.exceptions;
import redis.clients.jedis.HostAndPort;
public class <API key> extends <API key> {
private static final long serialVersionUID = <API key>;
public <API key>(Throwable cause, HostAndPort targetHost, int slot) {
super(cause, targetHost, slot);
}
public <API key>(String message, Throwable cause, HostAndPort targetHost, int slot) {
super(message, cause, targetHost, slot);
}
public <API key>(String message, HostAndPort targetHost, int slot) {
super(message, targetHost, slot);
}
} |
{-|
Module: Flaw.UI.ScrollBox
Description: Scroll box.
License: MIT
-}
module Flaw.UI.ScrollBox
( ScrollBox(..)
, newScrollBox
, ScrollBar(..)
, newScrollBar
, <API key>
, <API key>
, <API key>
, <API key>
) where
import Control.Concurrent.STM
import Control.Monad
import Data.Maybe
import Flaw.Graphics
import Flaw.Graphics.Canvas
import Flaw.Input.Mouse
import Flaw.Math
import Flaw.UI
import Flaw.UI.Drawer
data ScrollBox = ScrollBox
{ scrollBoxElement :: !SomeScrollable
-- | Position of left-top corner of child element
-- relative to scroll box' left-top corner, i.e. <= 0.
, scrollBoxScrollVar :: {-# UNPACK #-} !(TVar Position)
, scrollBoxSizeVar :: {-# UNPACK #-} !(TVar Size)
}
newScrollBox :: Scrollable e => e -> STM ScrollBox
newScrollBox element = do
scrollVar <- newTVar $ Vec2 0 0
sizeVar <- newTVar $ Vec2 0 0
return ScrollBox
{ scrollBoxElement = SomeScrollable element
, scrollBoxScrollVar = scrollVar
, scrollBoxSizeVar = sizeVar
}
instance Element ScrollBox where
layoutElement ScrollBox
{ scrollBoxElement = SomeScrollable element
, scrollBoxSizeVar = sizeVar
} size = do
writeTVar sizeVar size
layoutElement element size
dabElement ScrollBox
{ scrollBoxElement = SomeScrollable element
, scrollBoxScrollVar = scrollVar
, scrollBoxSizeVar = sizeVar
} (Vec2 x y) = if x < 0 || y < 0 then return False else do
size <- readTVar sizeVar
let Vec2 sx sy = size
if x < sx && y < sy then do
scroll <- readTVar scrollVar
let Vec2 ox oy = scroll
dabElement element $ Vec2 (x - ox) (y - oy)
else return False
elementMouseCursor ScrollBox
{ scrollBoxElement = SomeScrollable element
} = elementMouseCursor element
renderElement ScrollBox
{ scrollBoxElement = SomeScrollable element
, scrollBoxScrollVar = scrollVar
, scrollBoxSizeVar = sizeVar
} drawer position@(Vec2 px py) = do
scroll <- readTVar scrollVar
size <- readTVar sizeVar
ssize <- <API key> element
-- correct scroll if needed
let
Vec2 ox oy = scroll
Vec2 sx sy = size
Vec2 ssx ssy = ssize
newScroll@(Vec2 nox noy) = Vec2
(min 0 $ max ox $ sx - ssx)
(min 0 $ max oy $ sy - ssy)
when (scroll /= newScroll) $ writeTVar scrollVar newScroll
r <- <API key> element drawer (position + newScroll) (Vec4 (-nox) (-noy) (sx - nox) (sy - noy))
return $ do
<API key> $ Vec4 px py (px + sx) (py + sy)
r
processInputEvent ScrollBox
{ scrollBoxElement = SomeScrollable element
, scrollBoxScrollVar = scrollVar
} inputEvent inputState = case inputEvent of
MouseInputEvent mouseEvent -> case mouseEvent of
CursorMoveEvent x y -> do
scroll <- readTVar scrollVar
let Vec2 ox oy = scroll
processInputEvent element (MouseInputEvent (CursorMoveEvent (x - ox) (y - oy))) inputState
_ -> processInputEvent element inputEvent inputState
_ -> processInputEvent element inputEvent inputState
focusElement ScrollBox
{ scrollBoxElement = SomeScrollable element
} = focusElement element
unfocusElement ScrollBox
{ scrollBoxElement = SomeScrollable element
} = unfocusElement element
data ScrollBar = ScrollBar
{ scrollBarScrollBox :: !ScrollBox
, scrollBarDirection :: {-# UNPACK #-} !(Vec2 Metric)
, scrollBarSizeVar :: {-# UNPACK #-} !(TVar Size)
, <API key> :: {-# UNPACK #-} !(TVar (Maybe Position))
, scrollBarPressedVar :: {-# UNPACK #-} !(TVar Bool)
}
newScrollBar :: Vec2 Metric -> ScrollBox -> STM ScrollBar
newScrollBar direction scrollBox = do
sizeVar <- newTVar $ Vec2 0 0
<API key> <- newTVar Nothing
pressedVar <- newTVar False
return ScrollBar
{ scrollBarScrollBox = scrollBox
, scrollBarDirection = direction
, scrollBarSizeVar = sizeVar
, <API key> = <API key>
, scrollBarPressedVar = pressedVar
}
<API key> :: ScrollBox -> STM ScrollBar
<API key> = newScrollBar $ Vec2 0 1
<API key> :: ScrollBox -> STM ScrollBar
<API key> = newScrollBar $ Vec2 1 0
instance Element ScrollBar where
layoutElement ScrollBar
{ scrollBarSizeVar = sizeVar
} = writeTVar sizeVar
dabElement ScrollBar
{ scrollBarSizeVar = sizeVar
} (Vec2 x y) = if x < 0 || y < 0 then return False else do
size <- readTVar sizeVar
let Vec2 sx sy = size
return $ x < sx && y < sy
renderElement scrollBar@ScrollBar
{ scrollBarSizeVar = barSizeVar
, <API key> = <API key>
, scrollBarPressedVar = pressedVar
} Drawer
{ drawerCanvas = canvas
, drawerStyles = DrawerStyles
{ <API key> = StyleVariant
{ <API key> = flatNormalStyle
}
, <API key> = StyleVariant
{ <API key> = raisedNormalStyle
, <API key> = raisedMousedStyle
, <API key> = raisedPressedStyle
}
}
} (Vec2 px py) = do
barSize <- readTVar barSizeVar
let Vec2 sx sy = barSize
piece <- scrollBarPiece scrollBar
moused <- isJust <$> readTVar <API key>
pressed <- readTVar pressedVar
let
pieceStyle
| pressed = raisedPressedStyle
| moused = raisedMousedStyle
| otherwise = raisedNormalStyle
return $ do
-- render border
<API key> canvas
(Vec4 px (px + 1) (px + sx - 1) (px + sx))
(Vec4 py (py + 1) (py + sy - 1) (py + sy))
(styleFillColor flatNormalStyle) (styleBorderColor flatNormalStyle)
case piece of
Just ScrollBarPiece
{ scrollBarPieceRect = pieceRect
} -> let Vec4 ppx ppy pqx pqy = pieceRect + Vec4 px py px py in
-- render piece
<API key> canvas
(Vec4 ppx (ppx + 1) (pqx - 1) pqx)
(Vec4 ppy (ppy + 1) (pqy - 1) pqy)
(styleFillColor pieceStyle) (styleBorderColor pieceStyle)
Nothing -> return ()
processInputEvent scrollBar@ScrollBar
{ scrollBarScrollBox = ScrollBox
{ scrollBoxScrollVar = scrollVar
}
, <API key> = <API key>
, scrollBarPressedVar = pressedVar
} inputEvent _inputState = case inputEvent of
MouseInputEvent mouseEvent -> case mouseEvent of
MouseDownEvent LeftMouseButton -> do
writeTVar pressedVar True
return True
MouseUpEvent LeftMouseButton -> do
writeTVar pressedVar False
return True
RawMouseMoveEvent _x _y z -> do
piece <- scrollBarPiece scrollBar
case piece of
Just ScrollBarPiece
{ <API key> = offsetMultiplier
} -> do
modifyTVar' scrollVar (+ signum offsetMultiplier * vecFromScalar (floor (z * (-15))))
return True
Nothing -> return False
CursorMoveEvent x y -> do
pressed <- readTVar pressedVar
when pressed $ do
<API key> <- readTVar <API key>
case <API key> of
Just lastMousePosition -> do
piece <- scrollBarPiece scrollBar
case piece of
Just ScrollBarPiece
{ <API key> = offsetMultiplier
} -> modifyTVar' scrollVar (+ (Vec2 x y - lastMousePosition) * offsetMultiplier)
Nothing -> return ()
Nothing -> return ()
writeTVar <API key> $ Just $ Vec2 x y
return True
_ -> return False
MouseLeaveEvent -> do
writeTVar <API key> Nothing
writeTVar pressedVar False
return True
_ -> return False
-- | Internal information about piece.
data ScrollBarPiece = ScrollBarPiece
{ scrollBarPieceRect :: {-# UNPACK #-} !Rect
, <API key> :: {-# UNPACK #-} !(Vec2 Metric)
}
-- | Get scroll bar piece rect and piece offset multiplier.
scrollBarPiece :: ScrollBar -> STM (Maybe ScrollBarPiece)
scrollBarPiece ScrollBar
{ scrollBarScrollBox = ScrollBox
{ scrollBoxElement = SomeScrollable element
, scrollBoxScrollVar = scrollVar
, scrollBoxSizeVar = boxSizeVar
}
, scrollBarDirection = direction
, scrollBarSizeVar = barSizeVar
} = do
barSize <- readTVar barSizeVar
let Vec2 sx sy = barSize
boxSize <- readTVar boxSizeVar
scrollableSize <- <API key> element
scroll <- readTVar scrollVar
let
padding = 2
contentOffset = dot scroll direction
boxLength = dot boxSize direction
contentLength = dot scrollableSize direction
barLength = dot barSize direction - padding * 2
minPieceLength = min sx sy - padding * 2
pieceLength = max minPieceLength $ (barLength * boxLength) `quot` max 1 contentLength
pieceOffset = (negate contentOffset * (barLength - pieceLength)) `quot` max 1 (contentLength - boxLength)
Vec2 ppx ppy = vecFromScalar padding + direction * vecFromScalar pieceOffset
Vec2 psx psy = vecfmap (max minPieceLength) $ direction * vecFromScalar pieceLength
piece = if contentLength > boxLength then
Just ScrollBarPiece
{ scrollBarPieceRect = Vec4 ppx ppy (ppx + psx) (ppy + psy)
, <API key> = direction * vecFromScalar (negate $ (contentLength - boxLength) `quot` max 1 (barLength - pieceLength))
}
else Nothing
return piece
-- | Process possibly scroll bar event.
-- Could be used for passing scrolling events from other elements.
<API key> :: ScrollBar -> InputEvent -> InputState -> STM Bool
<API key> scrollBar inputEvent inputState = case inputEvent of
MouseInputEvent RawMouseMoveEvent {} -> processInputEvent scrollBar inputEvent inputState
_ -> return False
-- | Adjust scrolling so the specified area (in content coords) is visible.
<API key> :: ScrollBox -> Rect -> STM ()
<API key> ScrollBox
{ scrollBoxScrollVar = scrollVar
, scrollBoxSizeVar = sizeVar
} (Vec4 left top right bottom) = do
scroll <- readTVar scrollVar
let Vec2 ox oy = scroll
size <- readTVar sizeVar
let Vec2 sx sy = size
-- dimensions are to be adjusted independently
-- function to adjust one dimension
let
adjust o s a b =
if a + o >= 0 then
if b + o <= s then o
else s - b
else -a
newScroll = Vec2 (adjust ox sx left right) (adjust oy sy top bottom)
unless (scroll == newScroll) $ writeTVar scrollVar newScroll |
#import "<API key>.h"
<API key>
@protocol <API key>;
@protocol <API key>;
@class <API key>;
<API key>("This protocol has been deprecated and will no longer be called "
"except for legacy Aviary IAP integrations.")
@protocol <API key> <NSObject>
@optional
/**
Deprecated.
If implemented by the photo editor's delegate, this method will be called
just before requesting information about products available through in-app
purchase via the StoreKit API. If you wish to provide a custom product identifier,
then this method should return the product identifier registered in iTunes
Connect for the provided product.
@param manager The in app purchase manager.
@param product The product for which to return the product identifier
registered in iTunes Connect.
@return The product identifier registered in iTunes Connect.
@see <API key>
*/
- (NSString *)<API key>:(id<<API key>>)manager
<API key>:(<API key> *)product <API key>;
@end
/**
This protocol is implemented by the object returned by
[<API key> <API key>]. You should
call these methods to activate and deactivate in-app purchase.
@see <API key> (InAppPurchase)
*/
@protocol <API key> <NSObject>
/**
Deprecated.
A delegate for handling in-app purchase-related callbacks, including mapping
internal product identifiers to developer-provided identifiers registered in
iTunes Connect.
@see <API key>
*/
@property (nonatomic, weak, nullable) id<<API key>> delegate <API key>;
/**
Indicates whether manager is observing transactions.
@return YES if the in-app purchase manager is observing transactions (in-app
purchase is enabled), NO otherwise.
*/
@property (nonatomic, assign, readonly, getter=<API key>) BOOL <API key>;
/**
Call this method to start observing transactions. After calling this method,
<API key> will return YES.
*/
- (void)<API key>;
/**
Call this method to stop observing transactions. After calling this method,
<API key> will return NO.
*/
- (void)<API key>;
@end
@interface <API key> (InAppPurchase)
/**
The handler object for purchasing consumable content. In order for in-app
purchase to function correctly, you must add the object returned by this method
as an observer of the default SKPaymentQueue. In your app delegate's
-<API key>: method, you should call <API key>
on the in app purchase manager.
Please see the iOS SDK In-App Purchase Guide for more information about
in-app purchases.
@see <API key>
@see <API key>
@see [<API key> <API key>] and
[<API key> <API key>]
@return The manager.
*/
+ (id<<API key>>)<API key>;
@end
<API key> |
// Environment setup code
var ENVIRONMENT_IS_NODE = typeof process === 'object' && typeof require === 'function';
var ENVIRONMENT_IS_WEB = typeof window === 'object';
var <API key> = typeof importScripts === 'function';
var <API key> = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !<API key>;
var <API key> = '\\(';
var <API key> = '\\)';
var <API key> = '\\,';
var <API key> = '\\"';
var leftDelimiter = '(';
var rightDelimiter = ')';
var listSeparator = ',';
var quoteSeparator = '"';
var delimiters_regExp = ['\\<\\=', '\\>\\=', '\\<\\>', '\\<', '\\>', '\\:\\=', '\\!\\=', '\\=', '\\+', '\\-', '\\*', '\\/', '\\,'];
var delimiters = ['<=', '>=', '<>', '<', '>', ':=', '!=', '=', '+', '-', '*', '/', ','];
var structuralFunctions = ['if', 'ifelse', 'block', 'while', 'for', 'set'];
var locale = 'fi-FI';
var root = null;
var cellTypes = [
'var',
'real',
'string',
'function'
];
var translations = {
'en-US': {},
'en-AU': {},
'en-GB': {},
'fi-FI': {
'summa': 'sum',
'erotus': 'sub',
'tulo': 'mul',
'jaa': 'div',
'vastaluku': 'neg',
'e': 'exp',
'neliö': 'sqr',
'neliöjuuri': 'sqrt',
'itseisarvo': 'abs',
'kirjoita': 'print',
'lohko': 'block',
'kun': 'while',
'toista': 'for',
'jos': 'if',
'jokotai': 'ifelse',
'aseta': 'set',
'satunnainen': 'random',
'pyöristä': 'round'
}
};
var fn = {
sum: function(arr) {
//console.log('sum(): ', arr);
var result = (typeof(arr[0]) === 'number' ? 0 : '');
for (var item in arr) result += arr[item];
return result;
},
sub: function(arr) {
var result = (typeof(arr[0]) === 'number' ? arr[0] : '');
for (var item = 1; item < arr.length; ++item) result -= arr[item];
return result;
},
mul: function(arr) {
var result = (typeof(arr[0]) === 'number' ? 1 : '');
for (var item in arr) result *= arr[item];
return result;
},
div: function(arr) {
var result = (typeof(arr[0]) === 'number' ? arr[0] : '');
for (var item = 1; item < arr.length; ++item) result /= arr[item];
return result;
},
neg: function(arr) {
if (typeof(arr[0]) === 'boolean') return !arr[0];
else if (typeof(arr[0]) === 'number') return -arr[0];
else throw('Negation is only possible on numbers and booleans.');
},
sin : function() { return Math.sin(arguments[0]); },
cos : function() { return Math.cos(arguments[0]); },
tan : function() { return Math.tan(arguments[0]); },
cot : function() { return Math.tan(Math.PI / 2 - arguments[0]); },
arctan : function() { return Math.atan(arguments[0]); },
arccos : function() { return Math.acos(arguments[0]); },
arcsin : function() { return Math.asin(arguments[0]); },
sinh : function() { return Math.sinh(arguments[0]); },
cosh : function() { return Math.coshh(arguments[0]); },
tanh : function() { return Math.tanh(arguments[0]); },
arcsinh : function() { return Math.asinh(arguments[0]); },
arccosh : function() { return Math.acosh(arguments[0]); },
arctanh : function() { return Math.atanh(arguments[0]); },
exp : function() { return Math.exp(arguments[0]); },
ln : function() { return Math.ln(arguments[0]); },
sqr : function() { return Math.sqr(arguments[0]); },
sqrt : function() { return Math.sqrt(arguments[0]); },
abs : function() { return Math.abs(arguments[0]); },
print : function() {
if (!<API key>) {
if (
(typeof($) === 'function') &&
($('#output1').length > 0)
) $('#output1').append('<div class="print">' + arguments[0][0] + '</div>');
else console.log(arguments[0][0]);
return 0;
}
else {
self.postMessage(
{
type: 'print',
stream: 'stdout',
str: arguments[0][0]
}
);
}
},
block : function(args, vars) {
var lastLine = null;
//console.log(args, vars);
for (var i = 0; i < args.length; ++i) lastLine = valueOf(args[i], vars);
// Return the last item's result.
return lastLine;
},
while: function(args, vars) {
var lastLine = null;
while (valueOf(args[0], vars)) lastLine = valueOf(args[1], vars);
return lastLine;
},
for: function(args, vars) {
var lastLine = null;
valueOf(args[0], vars); // Initialize
while (valueOf(args[1], vars)) { // Stop condition
lastLine = valueOf(args[3], vars); // Iteration step.
valueOf(args[2], vars); // Update iterator
}
return lastLine;
},
if: function(args, vars) {
var lastLine = null;
if (valueOf(args[0], vars)) lastLine = valueOf(args[1], vars);
return lastLine;
},
ifelse: function(args, vars) {
var lastLine;
if (valueOf(args[0], vars)) lastLine = valueOf(args[1], vars);
else lastLine = valueOf(args[2], vars);
return lastLine;
},
set: function(args, vars) {
vars[args[0].name] = valueOf(args[1], vars);
return vars[args[0].name];
},
random: function(args, vars) {
return Math.random();
},
geq: function() {
return (arguments[0][0] >= arguments[0][1]) | 0;
},
leq: function() {
return (arguments[0][0] <= arguments[0][1]) | 0;
},
neq: function() {
return (arguments[0][0] != arguments[0][1]) | 0;
},
less: function() {
return (arguments[0][0] < arguments[0][1]) | 0;
},
greater: function() {
return (arguments[0][0] > arguments[0][1]) | 0;
},
equal: function() {
return (arguments[0][0] == arguments[0][1]) | 0;
},
round: function() {
return Math.round(arguments[0]);
}
};
var precedence = [
{
':=': 'set'
},
{
'>=': 'geq',
'<=': 'leq',
'<>': 'neq',
'!=': 'neq',
'<': 'less',
'>': 'greater',
'=': 'equal',
},
{
'+': 'sum',
'-': 'sub'
},
{
'*': 'mul',
'/': 'div'
},
];
var binaryOperators = [];
var binOpFunctions = [];
for (var level = 0; level < precedence.length; ++level)
for (var item in precedence[level]) {
binaryOperators.push(item);
binOpFunctions.push(precedence[level][item]);
}
function <API key>(s, level) {
var operators = precedence[level];
for (var op in operators) if (s === op) return true;
/* else */ return false;
}
function <API key>(s) {
return structuralFunctions.indexOf(deLocalize(s)) >= 0;
}
function deLocalize(fnName) {
if (typeof(translations[locale][fnName]) === 'undefined') return fnName /* no translation exists in current locale. */;
else return translations[locale][fnName];
}
function isFunctionName(s) {
return typeof(fn[deLocalize(s)]) === 'function';
}
function isVariableName(s) {
return s.search(/^[a-zA-Z_][a-zA-Z_0-9]*$/) === 0;
}
function isBinaryOperator(s) {
return ['sum', 'sub', 'mul', 'div'].indexOf(deLocalize(s)) >= 0;
}
function parseString(s) {
var newTemp = s.substr(quoteSeparator.length, s.length - quoteSeparator.length - 1); // Remove quotes.
var temp;
do {
temp = newTemp;
newTemp = temp.replace('\\' + quoteSymbol, quoteSymbol)
} while (newTemp !== temp);
return temp;
}
function asBinaryOperator(s) {
var index = binOpFunctions.indexOf(deLocalize(s));
if ((index >= 0) && (index < binaryOperators.length)) return binaryOperators[index];
/* else */ return null;
}
// Exists to allow default regex escaping of operators in the future.
function regexEscape(s) {
var result = "";
for (var i = 0; i < s.length; ++i) result += '\\' + s[i];
return result;
}
Cell = function(params) {
// Each cell must have a string field called 'type'.
// Type must have one of the values defined in cellTypes.
if (
params &&
(typeof(params.type) === 'string') &&
cellTypes.indexOf(params.type) >= 0
) {
for (var item in params) {
this[item] = params[item];
}
}
else throw('Invalid cell type, or cell type missing.');
}
Cell.prototype.isValid = function() {
switch(this.type) {
case 'var' : return true; break;
case 'real' : return typeof(this.value) === 'number' ? true : false; break;
case 'string' : return typeof(this.value) === 'string' ? true : false; break;
case 'function' : return this.name && this.args && Array.isArray(this.args); break;
default: return false; break;
}
}
function interpret(input) {
var items = input.split(new RegExp('(' + <API key> + '|' + <API key> + '|' + delimiters_regExp.join('|') + '|' + <API key> + ')', 'g')).filter(function(item) {return item !== ''});
//console.log('interpret(), input: ', input, items);
// Search for additions and substractions.
for (var level = 0; level < precedence.length; ++level) {
var delimDepth = 0;
var i = items.length - 1;
do {
var current = items[i].trim(); // Remove surrounding whitespaces.
if (current === leftDelimiter) {
--delimDepth;
if (delimDepth < 0) throw('Unpaired delimiter found.');
}
else if (current === rightDelimiter) ++delimDepth;
else if (delimDepth === 0) {
if ( (i > 0) && <API key>(current, level) ) {
var left = items.slice(0, i).join('');
var right = items.slice(i + 1).join('');
return new Cell(
{
type: 'function',
name: precedence[level][current],
args: [
interpret(left),
interpret(right)
]
}
);
}
}
--i;
} while (i >= 0);
}
if (i < 0) { // No multiplications or divisions were found.
var delimDepth = 0;
var current = items[0].trim();
if (current === '-') {
var arg = items.slice(1).join('');
return new Cell(
{
type: 'function',
name: 'neg',
args: [
interpret(arg)
]
}
);
}
else if (isFunctionName(current)) {
if (items.length === 1) { // The element is a function without parameters or parenthesis.
return new Cell(
{
type: 'function',
name: current,
args: []
/*
args: [
interpret(arg)
]
*/
}
);
}
//console.log(current, 'is a function name.')
i = 1;
do { // TODO This could be solved while going from right to left earlier.
var trimmed = items[i].trim();
if (trimmed === leftDelimiter) {
++delimDepth;
if (delimDepth < 0) throw('Unpaired delimiter found.');
}
else if (trimmed === rightDelimiter) --delimDepth;
++i
} while (delimDepth > 0);
var level = 0;
var currentTemp = "";
var parameters = [];
for (var ind = 2; ind < i - 1; ++ind) {
//console.log(ind);
if (items[ind] === leftDelimiter) ++level;
else if (items[ind] === rightDelimiter) --level;
if ((level === 0) && (items[ind] === listSeparator)) { // non-terminal parameter
//console.log('\tNew parameter1: ', currentTemp);
parameters.push(interpret(currentTemp));
currentTemp = "";
}
else {
currentTemp += items[ind];
if (ind === i - 2) { // terminal parameter
//console.log('\tNew parameter2: ', currentTemp);
parameters.push(interpret(currentTemp));
}
}
}
//var arg = items.slice(2, i - 1).join('');
//console.log('arg = ', arg, items);
return new Cell(
{
type: 'function',
name: current,
args: parameters
/*
args: [
interpret(arg)
]
*/
}
);
}
else if (!isNaN(parseFloat(current))) {
return new Cell(
{
type: 'real',
value: parseFloat(current)
}
);
}
else if (isVariableName(current)) {
return new Cell(
{
type: 'var',
name: current
}
);
}
else if (isFunctionName(current)) {
return new Cell(
{
type: 'function',
name: current,
args: []
}
);
}
else if ((current === leftDelimiter) && (items[items.length - 1].trim() === rightDelimiter)) {
return interpret(items.slice(1, items.length - 1).join(''));
}
else {
//console.log(items);
throw('Malformed input "' + input + '".')
};
}
}
function toString(input) {
//console.log("toString(): ", input);
if (input.type === 'function') {
var result = "";
// The function is a binary operator with two arguments.
if ((isBinaryOperator(input.name) === true) && (input.args.length === 2)) {
var lhs = toString(input.args[0]);
var rhs = toString(input.args[1]);
{ // Checks if parenthesis should be added.
// a - (b +- c)
if (
(input.name === 'sub') &&
(input.args[1].type === 'function') &&
(['sum', 'sub'].indexOf(input.args[1].name) >= 0)
) rhs = '(' + rhs + ')';
else if (['mul', 'div'].indexOf(input.name) >= 0) {
// (a +- b) */ c
if (
(input.args[0].type === 'function') &&
(['sum', 'sub'].indexOf(input.args[0].name) >= 0)
) lhs = '(' + lhs + ')';
// a */ (b +- c)
if (
(input.args[1].type === 'function') &&
(['sum', 'sub'].indexOf(input.args[1].name) >= 0)
) rhs = '(' + rhs + ')';
// a / (b */ c)
if (
(input.name === 'div') &&
(input.args[1].type === 'function') &&
(['mul', 'div'].indexOf(input.args[1].name) >= 0)
) rhs = '(' + rhs + ')';
}
}
result = lhs + asBinaryOperator(input.name) + rhs;
}
else { // The function is not a binary operator with two arguments.
if ((input.name === 'neg') && (input.args.length === 1)) {
var argString = toString(input.args[0]);
// -(b +- c)
if (
(input.args[0].type === 'function') &&
(['sum', 'sub'].indexOf(input.args[0].name) >= 0)
) argString = '(' + argString + ')';
result = '-' + argString;
}
else { // A regular function, formatted to fname(arg0, arg1, arg2, ..., argn)
result = input.name + '(';
for (var i = 0; i < input.args.length; ++i) {
result += toString(input.args[i]);
result += i < input.args.length - 1 ? ', ' : ')';
}
}
}
return result;
}
else if (input.type === 'real') return input.value;
else if (input.type === 'var') return input.name;
else return input;
}
function valueOf(input, vars) {
if (input.type === 'function') {
if (<API key>(input.name)) {
return fn[deLocalize(input.name)](input.args, vars);
}
else {
var args = [];
for (var i = 0; i < input.args.length; ++i) args[i] = valueOf(input.args[i], vars);
return fn[deLocalize(input.name)](args);
}
}
else if (input.type === 'real') return input.value;
else if (input.type === 'string') return input.value;
else if (input.type === 'var') return vars[input.name];
//throw('Unexpected input type.');
}
function hasValidParenthesis(s, leftParen, rightParen) {
var leftP = typeof(leftParen) === 'string' ? leftParen : leftDelimiter;
var rightP = typeof(rightParen) === 'string' ? rightParen : rightDelimiter;
var temp = s;
var balance = 0;
var lpi, rpi;
do {
lpi = temp.indexOf(leftP);
rpi = temp.indexOf(rightP);
lpi = lpi === -1 ? temp.length : lpi;
rpi = rpi === -1 ? temp.length : rpi;
var min = Math.min(lpi, rpi) + 1;
if (rpi < lpi) --balance;
else if (rpi > lpi) ++balance;
if (balance < 0) return false;
temp = temp.substr(min);
} while (temp !== "");
return balance === 0;
}
if (<API key>) {
var self = this;
// Each call must have a type or this will not work.
self.addEventListener(
'message',
function(e) {
var input = e.data;
if ((input['type'] !== 'undefined')) {
switch (input.type) {
case 'interpret':
self.postMessage(
{
type: 'cb_interpret',
parseTree: interpret(input['program']),
data: input['data'] // Passthrough
}
);
break;
case 'value':
self.postMessage(
{
type: 'cb_value',
output: typeof(input['program']) === 'string' ? valueOf(interpret(input['program']), input['vars']) : valueOf(input['program'], input['vars']),
vars: input['vars'],
data: input['data'] // Passthrough
}
);
break;
case 'setlocale':
self['locale'] = input['locale'];
self.postMessage(
{
type: 'cb_setlocale',
locale: self['locale'],
data: input['data'] // Passthrough
}
);
break;
// No default case.
}
}
},
false
);
} |
topic: Windows
desc: "Setting up an environment to do CS56 work on your own Windows machine (not ssh'ing into CSIL)"
For certain kinds of programs, i.e. graphics, and especially sound,
it may be more convenient to work directly on your Window machine rather than
ssh'ing into CSIL.
For audio or sound programs, this is especially true.
What do you need to install on your Windows to be able to do this?
# Install the JDK
TODO: instructions here
# Install Apache Ant
TODO: instructions here
# Install git for Windows
* Download link: <https://git-scm.com/download/win>
TODO: instructions here
(Note: I recommend git for windows, not "github for windows"). |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Dashboard for /usr/local/bin/phpunit/php-token-stream/Token/Stream</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="../../../css/bootstrap.min.css" rel="stylesheet">
<link href="../../../css/nv.d3.min.css" rel="stylesheet">
<link href="../../../css/style.css" rel="stylesheet">
<!--[if lt IE 9]>
<script src="../../../js/html5shiv.min.js"></script>
<script src="../../../js/respond.min.js"></script>
<![endif]
</head>
<body>
<header>
<div class="container">
<div class="row">
<div class="col-md-12">
<ol class="breadcrumb">
<li><a href="../../../index.html">/usr/local/bin/phpunit</a></li>
<li><a href="../../index.html">php-token-stream</a></li>
<li><a href="../index.html">Token</a></li>
<li><a href="index.html">Stream</a></li>
<li class="active">(Dashboard)</li>
</ol>
</div>
</div>
</div>
</header>
<div class="container">
<div class="row">
<div class="col-md-12">
<h2>Classes</h2>
</div>
</div>
<div class="row">
<div class="col-md-6">
<h3>Coverage Distribution</h3>
<div id="<API key>" style="height: 300px;">
<svg></svg>
</div>
</div>
<div class="col-md-6">
<h3>Complexity</h3>
<div id="classComplexity" style="height: 300px;">
<svg></svg>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<h3>Insufficient Coverage</h3>
<div class="scrollbox">
<table class="table">
<thead>
<tr>
<th>Class</th>
<th class="text-right">Coverage</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
<div class="col-md-6">
<h3>Project Risks</h3>
<div class="scrollbox">
<table class="table">
<thead>
<tr>
<th>Class</th>
<th class="text-right"><abbr title="Change Risk Anti-Patterns (CRAP) Index">CRAP</abbr></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h2>Methods</h2>
</div>
</div>
<div class="row">
<div class="col-md-6">
<h3>Coverage Distribution</h3>
<div id="<API key>" style="height: 300px;">
<svg></svg>
</div>
</div>
<div class="col-md-6">
<h3>Complexity</h3>
<div id="methodComplexity" style="height: 300px;">
<svg></svg>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<h3>Insufficient Coverage</h3>
<div class="scrollbox">
<table class="table">
<thead>
<tr>
<th>Method</th>
<th class="text-right">Coverage</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
<div class="col-md-6">
<h3>Project Risks</h3>
<div class="scrollbox">
<table class="table">
<thead>
<tr>
<th>Method</th>
<th class="text-right"><abbr title="Change Risk Anti-Patterns (CRAP) Index">CRAP</abbr></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
<footer>
<hr/>
<p>
<small>Generated by <a href="http:
</p>
</footer>
</div>
<script src="../../../js/jquery.min.js" type="text/javascript"></script>
<script src="../../../js/bootstrap.min.js" type="text/javascript"></script>
<script src="../../../js/holder.min.js" type="text/javascript"></script>
<script src="../../../js/d3.min.js" type="text/javascript"></script>
<script src="../../../js/nv.d3.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
nv.addGraph(function() {
var chart = nv.models.multiBarChart();
chart.tooltips(false)
.showControls(false)
.showLegend(false)
.reduceXTicks(false)
.staggerLabels(true)
.yAxis.tickFormat(d3.format('d'));
d3.select('#<API key> svg')
.datum(<API key>([0,0,0,0,0,0,0,0,0,0,0,0], "Class Coverage"))
.transition().duration(500).call(chart);
nv.utils.windowResize(chart.update);
return chart;
});
nv.addGraph(function() {
var chart = nv.models.multiBarChart();
chart.tooltips(false)
.showControls(false)
.showLegend(false)
.reduceXTicks(false)
.staggerLabels(true)
.yAxis.tickFormat(d3.format('d'));
d3.select('#<API key> svg')
.datum(<API key>([0,0,0,0,0,0,0,0,0,0,0,0], "Method Coverage"))
.transition().duration(500).call(chart);
nv.utils.windowResize(chart.update);
return chart;
});
function <API key>(data, label) {
var labels = [
'0%',
'0-10%',
'10-20%',
'20-30%',
'30-40%',
'40-50%',
'50-60%',
'60-70%',
'70-80%',
'80-90%',
'90-100%',
'100%'
];
var values = [];
$.each(labels, function(key) {
values.push({x: labels[key], y: data[key]});
});
return [
{
key: label,
values: values,
color: "#4572A7"
}
];
}
nv.addGraph(function() {
var chart = nv.models.scatterChart()
.showDistX(true)
.showDistY(true)
.showLegend(false)
.forceX([0, 100]);
chart.tooltipContent(function(key, y, e, graph) {
return '<p>' + graph.point.class + '</p>';
});
chart.xAxis.axisLabel('Code Coverage (in percent)');
chart.yAxis.axisLabel('Cyclomatic Complexity');
d3.select('#classComplexity svg')
.datum(getComplexityData([], 'Class Complexity'))
.transition()
.duration(500)
.call(chart);
nv.utils.windowResize(chart.update);
return chart;
});
nv.addGraph(function() {
var chart = nv.models.scatterChart()
.showDistX(true)
.showDistY(true)
.showLegend(false)
.forceX([0, 100]);
chart.tooltipContent(function(key, y, e, graph) {
return '<p>' + graph.point.class + '</p>';
});
chart.xAxis.axisLabel('Code Coverage (in percent)');
chart.yAxis.axisLabel('Method Complexity');
d3.select('#methodComplexity svg')
.datum(getComplexityData([], 'Method Complexity'))
.transition()
.duration(500)
.call(chart);
nv.utils.windowResize(chart.update);
return chart;
});
function getComplexityData(data, label) {
var values = [];
$.each(data, function(key) {
var value = Math.round(data[key][0]*100) / 100;
values.push({
x: value,
y: data[key][1],
class: data[key][2],
size: 0.05,
shape: 'diamond'
});
});
return [
{
key: label,
values: values,
color: "#4572A7"
}
];
}
});
</script>
</body>
</html> |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ace;
using Pelmanism.Model;
namespace Pelmanism.Ace.UI
{
class CardObject : TextureObject2D
{
public CardObject( CardStatus cardStatus )
{
this.CardStatus = cardStatus;
cardStatus.PropertyChanged += <API key>;
}
void <API key>( object sender, System.ComponentModel.<API key> e )
{
if( e.PropertyName == CardStatus.IsOpenName )
{
Texture = CardStatus.IsOpen ? FrontTexture : BackTexture;
}
}
protected override void OnStart()
{
Texture = CardStatus.IsOpen ? FrontTexture : BackTexture;
}
public Texture2D BackTexture { get; set; }
public Texture2D FrontTexture { get; set; }
public CardStatus CardStatus { get; set; }
internal bool IsHit( Vector2DF mouse )
{
var size = new Vector2DF( Texture.Size.X, Texture.Size.Y ) * Scale;
return mouse.X >= Position.X
&& mouse.X <= Position.X + size.X
&& mouse.Y >= Position.Y
&& mouse.Y <= Position.Y + size.Y;
}
}
} |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import json
from pony.orm.core import Entity, SetInstance, Required, Optional
import suapp.orm
__all__ = ["to_json", "dumps"]
def to_json(object_to_serialize):
"""
Adding simple serialization for objects.
If standard json.dumps fails and it is a real object it will try to call
toJSON() on it. If that fails it will return a TypeError.
"""
result = {}
if isinstance(object_to_serialize, Entity):
for attr in object_to_serialize._attrs_:
column = attr.name
result[column] = getattr(object_to_serialize, column)
elif isinstance(object_to_serialize, suapp.orm.UiOrmObject):
for column in object_to_serialize.ui_attributes:
result[column] = getattr(object_to_serialize, column)
else:
try:
return json.dumps(object_to_serialize)
except TypeError as te:
if isinstance(object_to_serialize, object):
try:
return getattr(object_to_serialize, "toJSON")()
except AttributeError:
raise TypeError(
repr(object_to_serialize) + " is not JSON serializable"
)
# Re-raising the TypeError
raise
return result
# Also putting out the primary key
result["_pk_"] = object_to_serialize._pk_
# result['__str__'] = "%s" % (object_to_serialize)
# Checking for foreign keys
for column, value in result.items():
if isinstance(value, Entity):
value = value._pk_
# Setting it
# If is a Set or tuple it will be set again below.
result[column] = value
if isinstance(value, SetInstance):
# An empty dictonary signals a Set.
result[column] = {}
elif isinstance(value, tuple):
# On json a tuple = list, so might as well use a list.
converted_tuple = []
for subvalue in value:
# Finding out the references to variables.
if isinstance(subvalue, Required) or isinstance(subvalue, Optional):
cur_obj = object_to_serialize
path = str(subvalue).split(".")[1:]
while len(path) > 0:
subvalue = getattr(cur_obj, path.pop(0))
cur_obj = subvalue
if isinstance(subvalue, Entity):
subvalue = subvalue._pk_
converted_tuple.append(subvalue)
result[column] = converted_tuple
return result
def dumps(object_to_serialize, **kwargs):
kwargs["default"] = to_json
return json.dumps(object_to_serialize, **kwargs) |
namespace EstanciaGanadera.Desktop.Views.Main
{
partial class MainForm
{
<summary>
Required designer variable.
</summary>
private System.ComponentModel.IContainer components = null;
<summary>
Clean up any resources being used.
</summary>
<param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
<summary>
Required method for Designer support - do not modify
the contents of this method with the code editor.
</summary>
private void InitializeComponent()
{
System.ComponentModel.<API key> resources = new System.ComponentModel.<API key>(typeof(MainForm));
this.mainPanel = new System.Windows.Forms.Panel();
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
this.toolStrip1.SuspendLayout();
this.SuspendLayout();
// mainPanel
this.mainPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.mainPanel.BackColor = System.Drawing.SystemColors.Control;
this.mainPanel.Location = new System.Drawing.Point(0, 28);
this.mainPanel.Name = "mainPanel";
this.mainPanel.Size = new System.Drawing.Size(522, 332);
this.mainPanel.TabIndex = 0;
// toolStrip1
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripButton1});
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(522, 25);
this.toolStrip1.TabIndex = 1;
this.toolStrip1.Text = "toolStrip1";
// toolStripButton1
this.toolStripButton1.DisplayStyle = System.Windows.Forms.<API key>.Image;
this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
this.toolStripButton1.<API key> = System.Drawing.Color.Magenta;
this.toolStripButton1.Name = "toolStripButton1";
this.toolStripButton1.Size = new System.Drawing.Size(23, 22);
this.toolStripButton1.Text = "toolStripButton1";
// MainForm
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(522, 359);
this.Controls.Add(this.toolStrip1);
this.Controls.Add(this.mainPanel);
this.Name = "MainForm";
this.Text = "MainForm";
this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Panel mainPanel;
private System.Windows.Forms.ToolStrip toolStrip1;
private System.Windows.Forms.ToolStripButton toolStripButton1;
}
} |
package com.autelhome.multiroom.playlist;
import com.autelhome.multiroom.song.Song;
import org.bff.javampd.Playlist;
import org.bff.javampd.objects.MPDSong;
import org.junit.Test;
import org.mockito.Mockito;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertNotEquals;
import static org.mockito.Mockito.mock;
public class ZonePlaylistTest {
private static final PlaylistSong SONG_A = new PlaylistSong(new Song("Song A"), 1);
private static final PlaylistSong SONG_B = new PlaylistSong(new Song("Song B"), 2);
private static final PlaylistSong SONG_C = new PlaylistSong(new Song("Song C"), 2);
@Test
public void getPlaylistSongs() throws Exception {
final List<PlaylistSong> expected = Arrays.asList(SONG_A, SONG_B);
final ZonePlaylist testSubject = new ZonePlaylist(expected);
final Collection<PlaylistSong> actual = testSubject.getPlaylistSongs();
assertThat(actual).isEqualTo(expected);
}
@Test
public void getSongAtPosition() throws Exception {
final List<PlaylistSong> playlistSongs = Arrays.asList(SONG_A, SONG_B);
final ZonePlaylist testSubject = new ZonePlaylist(playlistSongs);
final PlaylistSong actual = testSubject.getSongAtPosition(2);
assertThat(actual).isEqualTo(SONG_B);
}
@Test
public void fromMPDPlaylist() throws Exception {
final Playlist mpdPlaylist = mock(Playlist.class);
final MPDSong mpdSong1 = new MPDSong();
mpdSong1.setTitle("Song 1");
mpdSong1.setPosition(0);
final MPDSong mpdSong2 = new MPDSong();
mpdSong2.setTitle("Song 2");
mpdSong2.setPosition(1);
Mockito.when(mpdPlaylist.getSongList()).thenReturn(Arrays.asList(mpdSong1, mpdSong2));
final ZonePlaylist actual = ZonePlaylist.fromMPDPlaylist(mpdPlaylist);
final ZonePlaylist expected = new ZonePlaylist(Arrays.asList(new PlaylistSong(new Song("Song 1"), 1), new PlaylistSong(new Song("Song 2"), 2)));
assertThat(actual).isEqualTo(expected);
}
@Test
public void shouldBeEqual() throws Exception {
final ZonePlaylist zonePlaylist1 = new ZonePlaylist(Arrays.asList(SONG_A, SONG_B));
final ZonePlaylist zonePlaylist2 = new ZonePlaylist(Arrays.asList(SONG_A, SONG_B));
assertThat(zonePlaylist1).isEqualTo(zonePlaylist1);
assertThat(zonePlaylist1).isEqualTo(zonePlaylist2);
}
@Test
public void shouldNotBeEqual() throws Exception {
final ZonePlaylist zonePlaylist1 = new ZonePlaylist(Arrays.asList(SONG_A, SONG_B));
final ZonePlaylist zonePlaylist2 = new ZonePlaylist(Arrays.asList(SONG_A, SONG_C));
assertNotEquals(zonePlaylist1, " ");
assertNotEquals(zonePlaylist1, null);
assertThat(zonePlaylist1).isNotEqualTo(zonePlaylist2);
}
@Test
public void <API key>() throws Exception {
final int hashCode1 = new ZonePlaylist(Arrays.asList(SONG_A, SONG_B)).hashCode();
final int hashCode2 = new ZonePlaylist(Arrays.asList(SONG_A, SONG_B)).hashCode();
assertThat(hashCode1).isEqualTo(hashCode2);
}
@Test
public void <API key>() throws Exception {
final int hashCode1 = new ZonePlaylist(Arrays.asList(SONG_A, SONG_B)).hashCode();
final int hashCode2 = new ZonePlaylist(Arrays.asList(SONG_A, SONG_C)).hashCode();
assertThat(hashCode1).isNotEqualTo(hashCode2);
}
} |
#region MIT
// Gorgon.
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// all copies or substantial portions of the Software.
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// Created: September 4, 2018 9:49:20 AM
#endregion
using System;
namespace Gorgon.Core
{
<summary>
Extension methods for null checking on reference types and nullable types.
</summary>
public static class <API key>
{
<summary>
Determines whether the specified value is null.
</summary>
<param name="value">The value to check.</param>
<returns><c>true</c> if the specified value is null; otherwise, <c>false</c>.</returns>
<remarks>
<para>
This will check an object for <b>null</b> and <see cref="DBNull"/>.
</para>
</remarks>
public static bool IsNull(this object value) => (value is null) || (value == DBNull.Value);
<summary>
Function to check an object for <b>null</b> or <see cref="DBNull"/> and return a substitute value.
</summary>
<typeparam name="T">The type of value.</typeparam>
<param name="value">The value to check.</param>
<param name="substitutionValue">The value used to replace the return value if the original value is <b>null</b> or <see cref="DBNull"/>.</param>
<returns>The original <paramref name="value"/> if not <b>null</b> (or <see cref="DBNull"/>), or the <paramref name="substitutionValue"/> otherwise.</returns>
public static T IfNull<T>(this object value, T substitutionValue) => !IsNull(value) ? (T)value : substitutionValue;
<summary>
Function to return the value as a nullable type.
</summary>
<typeparam name="T">The type of value to convert to, must be a value type.</typeparam>
<param name="value">The value to convert.</param>
<returns>The value as a nullable value type.</returns>
public static T? AsNullable<T>(this object value)
where T : struct => (T?)Convert.ChangeType(value, typeof(T));
}
} |
<!DOCTYPE html PUBLIC "-
<html xmlns="http:
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>V8 API Reference Guide for node.js v4.5.0 - v4.6.1: v8::Map Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">V8 API Reference Guide for node.js v4.5.0 - v4.6.1
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="classes.html"><span>Class Index</span></a></li>
<li><a href="inherits.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="<API key>">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespacev8.html">v8</a></li><li class="navelem"><a class="el" href="classv8_1_1Map.html">Map</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pub-static-methods">Static Public Member Functions</a> |
<a href="<API key>.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">v8::Map Class Reference</div> </div>
</div><!--header
<div class="contents">
<p><code>#include <<a class="el" href="v8_8h_source.html">v8.h</a>></code></p>
<div class="dynheader">
Inheritance diagram for v8::Map:</div>
<div class="dyncontent">
<div class="center"><img src="<API key>.png" border="0" usemap="#<API key>" alt="Inheritance graph"/></div>
<map name="<API key>" id="<API key>">
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for v8::Map:</div>
<div class="dyncontent">
<div class="center"><img src="<API key>.png" border="0" usemap="#v8_1_1Map_coll__map" alt="Collaboration graph"/></div>
<map name="v8_1_1Map_coll__map" id="v8_1_1Map_coll__map">
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
size_t </td><td class="memItemRight" valign="bottom"><b>Size</b> () const </td></tr>
<tr class="separator:<API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
void </td><td class="memItemRight" valign="bottom"><b>Clear</b> ()</td></tr>
<tr class="separator:<API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="<API key>.html">MaybeLocal</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > </td><td class="memItemRight" valign="bottom"><b>Get</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > key)</td></tr>
<tr class="separator:<API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="<API key>.html">MaybeLocal</a>< <a class="el" href="classv8_1_1Map.html">Map</a> > </td><td class="memItemRight" valign="bottom"><b>Set</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > key, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > value)</td></tr>
<tr class="separator:<API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="classv8_1_1Maybe.html">Maybe</a>< bool > </td><td class="memItemRight" valign="bottom"><b>Has</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > key)</td></tr>
<tr class="separator:<API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="classv8_1_1Maybe.html">Maybe</a>< bool > </td><td class="memItemRight" valign="bottom"><b>Delete</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > key)</td></tr>
<tr class="separator:<API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Array.html">Array</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Map.html#<API key>">AsArray</a> () const </td></tr>
<tr class="separator:<API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header <API key>"><td colspan="2" onclick="javascript:toggleInherit('<API key>')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="classv8_1_1Object.html">v8::Object</a></td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
 </td><td class="memItemRight" valign="bottom"><b>V8_DEPRECATE_SOON</b> ("Use maybe version", bool <a class="el" href="classv8_1_1Set.html">Set</a>(<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > key, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > value))</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="classv8_1_1Maybe.html">Maybe</a>< bool > </td><td class="memItemRight" valign="bottom"><b>Set</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > key, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > value)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
 </td><td class="memItemRight" valign="bottom"><b>V8_DEPRECATE_SOON</b> ("Use maybe version", bool <a class="el" href="classv8_1_1Set.html">Set</a>(uint32_t index, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > value))</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="classv8_1_1Maybe.html">Maybe</a>< bool > </td><td class="memItemRight" valign="bottom"><b>Set</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context, uint32_t index, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > value)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="classv8_1_1Maybe.html">Maybe</a>< bool > </td><td class="memItemRight" valign="bottom"><b>CreateDataProperty</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Name.html">Name</a> > key, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > value)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="classv8_1_1Maybe.html">Maybe</a>< bool > </td><td class="memItemRight" valign="bottom"><b>CreateDataProperty</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context, uint32_t index, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > value)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="classv8_1_1Maybe.html">Maybe</a>< bool > </td><td class="memItemRight" valign="bottom"><b>DefineOwnProperty</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Name.html">Name</a> > key, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > value, PropertyAttribute attributes=None)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
 </td><td class="memItemRight" valign="bottom"><b>V8_DEPRECATE_SOON</b> ("Use CreateDataProperty", bool ForceSet(<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > key, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > value, PropertyAttribute attribs=None))</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
 </td><td class="memItemRight" valign="bottom"><b>V8_DEPRECATE_SOON</b> ("Use CreateDataProperty", Maybe< bool > ForceSet(<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > key, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > value, PropertyAttribute attribs=None))</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
 </td><td class="memItemRight" valign="bottom"><b>V8_DEPRECATE_SOON</b> ("Use maybe version", Local< <a class="el" href="classv8_1_1Value.html">Value</a> > Get(<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > key))</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="<API key>.html">MaybeLocal</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > </td><td class="memItemRight" valign="bottom"><b>Get</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > key)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
 </td><td class="memItemRight" valign="bottom"><b>V8_DEPRECATE_SOON</b> ("Use maybe version", Local< <a class="el" href="classv8_1_1Value.html">Value</a> > Get(uint32_t index))</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="<API key>.html">MaybeLocal</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > </td><td class="memItemRight" valign="bottom"><b>Get</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context, uint32_t index)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Object.html#<API key>">V8_DEPRECATE_SOON</a> ("Use maybe version", PropertyAttribute <API key>(<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > key))</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="classv8_1_1Maybe.html">Maybe</a>< PropertyAttribute > </td><td class="memItemRight" valign="bottom"><b><API key></b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > key)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Object.html#<API key>">V8_DEPRECATE_SOON</a> ("Use maybe version", Local< <a class="el" href="classv8_1_1Value.html">Value</a> > <API key>(<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1String.html">String</a> > key))</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="<API key>.html">MaybeLocal</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > </td><td class="memItemRight" valign="bottom"><b><API key></b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1String.html">String</a> > key)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
 </td><td class="memItemRight" valign="bottom"><b>V8_DEPRECATE_SOON</b> ("Use maybe version", bool Has(<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > key))</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="classv8_1_1Maybe.html">Maybe</a>< bool > </td><td class="memItemRight" valign="bottom"><b>Has</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > key)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
 </td><td class="memItemRight" valign="bottom"><b>V8_DEPRECATE_SOON</b> ("Use maybe version", bool Delete(<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > key))</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<a class="el" href="classv8_1_1Maybe.html">Maybe</a>< bool > </td><td class="memItemRight" valign="bottom"><b>Delete</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > key)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
 </td><td class="memItemRight" valign="bottom"><b>V8_DEPRECATE_SOON</b> ("Use maybe version", bool Has(uint32_t index))</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="classv8_1_1Maybe.html">Maybe</a>< bool > </td><td class="memItemRight" valign="bottom"><b>Has</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context, uint32_t index)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
 </td><td class="memItemRight" valign="bottom"><b>V8_DEPRECATE_SOON</b> ("Use maybe version", bool Delete(uint32_t index))</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<a class="el" href="classv8_1_1Maybe.html">Maybe</a>< bool > </td><td class="memItemRight" valign="bottom"><b>Delete</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context, uint32_t index)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
 </td><td class="memItemRight" valign="bottom"><b>V8_DEPRECATE_SOON</b> ("Use maybe version", bool SetAccessor(<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1String.html">String</a> > name, <a class="el" href="namespacev8.html#<API key>"><API key></a> getter, <API key> setter=0, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > data=<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> >(), <a class="el" href="namespacev8.html#<API key>">AccessControl</a> settings=DEFAULT, PropertyAttribute attribute=None))</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
 </td><td class="memItemRight" valign="bottom"><b>V8_DEPRECATE_SOON</b> ("Use maybe version", bool SetAccessor(<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Name.html">Name</a> > name, <API key> getter, <API key> setter=0, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > data=<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> >(), <a class="el" href="namespacev8.html#<API key>">AccessControl</a> settings=DEFAULT, PropertyAttribute attribute=None))</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<a class="el" href="classv8_1_1Maybe.html">Maybe</a>< bool > </td><td class="memItemRight" valign="bottom"><b>SetAccessor</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Name.html">Name</a> > name, <API key> getter, <API key> setter=0, <a class="el" href="<API key>.html">MaybeLocal</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > data=<a class="el" href="<API key>.html">MaybeLocal</a>< <a class="el" href="classv8_1_1Value.html">Value</a> >(), <a class="el" href="namespacev8.html#<API key>">AccessControl</a> settings=DEFAULT, PropertyAttribute attribute=None)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
void </td><td class="memItemRight" valign="bottom"><b>SetAccessorProperty</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Name.html">Name</a> > name, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Function.html">Function</a> > getter, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Function.html">Function</a> > setter=<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Function.html">Function</a> >(), PropertyAttribute attribute=None, <a class="el" href="namespacev8.html#<API key>">AccessControl</a> settings=DEFAULT)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Object.html#<API key>">V8_DEPRECATE_SOON</a> ("Use maybe version", Local< <a class="el" href="classv8_1_1Array.html">Array</a> > GetPropertyNames())</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="<API key>.html">MaybeLocal</a>< <a class="el" href="classv8_1_1Array.html">Array</a> > </td><td class="memItemRight" valign="bottom"><b>GetPropertyNames</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Object.html#<API key>">V8_DEPRECATE_SOON</a> ("Use maybe version", Local< <a class="el" href="classv8_1_1Array.html">Array</a> > GetOwnPropertyNames())</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="<API key>.html">MaybeLocal</a>< <a class="el" href="classv8_1_1Array.html">Array</a> > </td><td class="memItemRight" valign="bottom"><b>GetOwnPropertyNames</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Object.html#<API key>">GetPrototype</a> ()</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Object.html#<API key>">V8_DEPRECATE_SOON</a> ("Use maybe version", bool SetPrototype(<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > prototype))</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="classv8_1_1Maybe.html">Maybe</a>< bool > </td><td class="memItemRight" valign="bottom"><b>SetPrototype</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > prototype)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Object.html">Object</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Object.html#<API key>"><API key></a> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="<API key>.html">FunctionTemplate</a> > tmpl)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Object.html#<API key>">V8_DEPRECATE_SOON</a> ("Use maybe version", Local< <a class="el" href="classv8_1_1String.html">String</a> > ObjectProtoToString())</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="<API key>.html">MaybeLocal</a>< <a class="el" href="classv8_1_1String.html">String</a> > </td><td class="memItemRight" valign="bottom"><b>ObjectProtoToString</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1String.html">String</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Object.html#<API key>">GetConstructorName</a> ()</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Object.html#<API key>">InternalFieldCount</a> ()</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">V8_INLINE <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Object.html#<API key>">GetInternalField</a> (int index)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Object.html#<API key>">SetInternalField</a> (int index, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > value)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">V8_INLINE void * </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Object.html#<API key>"><API key></a> (int index)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Object.html#<API key>"><API key></a> (int index, void *value)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
 </td><td class="memItemRight" valign="bottom"><b>V8_DEPRECATE_SOON</b> ("Use maybe version", bool HasOwnProperty(<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1String.html">String</a> > key))</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="classv8_1_1Maybe.html">Maybe</a>< bool > </td><td class="memItemRight" valign="bottom"><b>HasOwnProperty</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Name.html">Name</a> > key)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
 </td><td class="memItemRight" valign="bottom"><b>V8_DEPRECATE_SOON</b> ("Use maybe version", bool <API key>(<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1String.html">String</a> > key))</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="classv8_1_1Maybe.html">Maybe</a>< bool > </td><td class="memItemRight" valign="bottom"><b><API key></b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Name.html">Name</a> > key)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
 </td><td class="memItemRight" valign="bottom"><b>V8_DEPRECATE_SOON</b> ("Use maybe version", bool <API key>(uint32_t index))</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="classv8_1_1Maybe.html">Maybe</a>< bool > </td><td class="memItemRight" valign="bottom"><b><API key></b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context, uint32_t index)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
 </td><td class="memItemRight" valign="bottom"><b>V8_DEPRECATE_SOON</b> ("Use maybe version", bool <API key>(<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1String.html">String</a> > key))</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="classv8_1_1Maybe.html">Maybe</a>< bool > </td><td class="memItemRight" valign="bottom"><b><API key></b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Name.html">Name</a> > key)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Object.html#<API key>">V8_DEPRECATE_SOON</a> ("Use maybe version", Local< <a class="el" href="classv8_1_1Value.html">Value</a> > <API key>(<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1String.html">String</a> > key))</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="<API key>.html">MaybeLocal</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > </td><td class="memItemRight" valign="bottom"><b><API key></b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Name.html">Name</a> > key)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Object.html#<API key>">V8_DEPRECATE_SOON</a> ("Use maybe version", Maybe< PropertyAttribute > <API key>(<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1String.html">String</a> > key))</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="classv8_1_1Maybe.html">Maybe</a>< PropertyAttribute > </td><td class="memItemRight" valign="bottom"><b><API key></b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Name.html">Name</a> > key)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Object.html#<API key>">V8_DEPRECATE_SOON</a> ("Use maybe version", Local< <a class="el" href="classv8_1_1Value.html">Value</a> > <API key>(<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1String.html">String</a> > key))</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="<API key>.html">MaybeLocal</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > </td><td class="memItemRight" valign="bottom"><b><API key></b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Name.html">Name</a> > key)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Object.html#<API key>">V8_DEPRECATE_SOON</a> ("Use maybe version", Maybe< PropertyAttribute > <API key>(<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1String.html">String</a> > key))</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="classv8_1_1Maybe.html">Maybe</a>< PropertyAttribute > </td><td class="memItemRight" valign="bottom"><b><API key></b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Name.html">Name</a> > key)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Object.html#<API key>"><API key></a> ()</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Object.html#<API key>"><API key></a> ()</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Object.html#<API key>">GetIdentityHash</a> ()</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Object.html#<API key>">SetHiddenValue</a> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1String.html">String</a> > key, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > value)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > </td><td class="memItemRight" valign="bottom"><b>GetHiddenValue</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1String.html">String</a> > key)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
bool </td><td class="memItemRight" valign="bottom"><b>DeleteHiddenValue</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1String.html">String</a> > key)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Object.html">Object</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Object.html#<API key>">Clone</a> ()</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Object.html#<API key>">CreationContext</a> ()</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Object.html#<API key>">IsCallable</a> ()</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Object.html#<API key>">V8_DEPRECATE_SOON</a> ("Use maybe version", Local< <a class="el" href="classv8_1_1Value.html">Value</a> > CallAsFunction(<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > recv, int argc, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > argv[]))</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="<API key>.html">MaybeLocal</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > </td><td class="memItemRight" valign="bottom"><b>CallAsFunction</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > recv, int argc, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > argv[])</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Object.html#<API key>">V8_DEPRECATE_SOON</a> ("Use maybe version", Local< <a class="el" href="classv8_1_1Value.html">Value</a> > CallAsConstructor(int argc, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > argv[]))</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="<API key>.html">MaybeLocal</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > </td><td class="memItemRight" valign="bottom"><b>CallAsConstructor</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context, int argc, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > argv[])</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Object.html#<API key>">V8_DEPRECATE_SOON</a> ("Keep track of isolate correctly", Isolate *GetIsolate())</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header <API key>"><td colspan="2" onclick="javascript:toggleInherit('<API key>')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="classv8_1_1Value.html">v8::Value</a></td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">V8_INLINE bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsUndefined</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">V8_INLINE bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsNull</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsTrue</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsFalse</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsName</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">V8_INLINE bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsString</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsSymbol</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsFunction</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsArray</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsObject</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsBoolean</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsNumber</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsExternal</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsInt32</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsUint32</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsDate</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsArgumentsObject</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsBooleanObject</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsNumberObject</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsStringObject</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsSymbolObject</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsNativeError</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsRegExp</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsGeneratorFunction</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsGeneratorObject</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsPromise</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsMap</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsSet</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsMapIterator</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsSetIterator</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsWeakMap</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsWeakSet</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsArrayBuffer</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsArrayBufferView</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsTypedArray</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsUint8Array</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsUint8ClampedArray</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsInt8Array</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsUint16Array</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsInt16Array</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsUint32Array</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsInt32Array</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsFloat32Array</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsFloat64Array</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsFloat32x4</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsDataView</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">IsSharedArrayBuffer</a> () const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="<API key>.html">MaybeLocal</a>< <a class="el" href="classv8_1_1Boolean.html">Boolean</a> > </td><td class="memItemRight" valign="bottom"><b>ToBoolean</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context) const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="<API key>.html">MaybeLocal</a>< <a class="el" href="classv8_1_1Number.html">Number</a> > </td><td class="memItemRight" valign="bottom"><b>ToNumber</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context) const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="<API key>.html">MaybeLocal</a>< <a class="el" href="classv8_1_1String.html">String</a> > </td><td class="memItemRight" valign="bottom"><b>ToString</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context) const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="<API key>.html">MaybeLocal</a>< <a class="el" href="classv8_1_1String.html">String</a> > </td><td class="memItemRight" valign="bottom"><b>ToDetailString</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context) const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="<API key>.html">MaybeLocal</a>< <a class="el" href="classv8_1_1Object.html">Object</a> > </td><td class="memItemRight" valign="bottom"><b>ToObject</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context) const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="<API key>.html">MaybeLocal</a>< <a class="el" href="classv8_1_1Integer.html">Integer</a> > </td><td class="memItemRight" valign="bottom"><b>ToInteger</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context) const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="<API key>.html">MaybeLocal</a>< <a class="el" href="classv8_1_1Uint32.html">Uint32</a> > </td><td class="memItemRight" valign="bottom"><b>ToUint32</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context) const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="<API key>.html">MaybeLocal</a>< <a class="el" href="classv8_1_1Int32.html">Int32</a> > </td><td class="memItemRight" valign="bottom"><b>ToInt32</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context) const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
 </td><td class="memItemRight" valign="bottom"><b>V8_DEPRECATE_SOON</b> ("Use maybe version", Local< <a class="el" href="classv8_1_1Boolean.html">Boolean</a> > ToBoolean(<a class="el" href="classv8_1_1Isolate.html">Isolate</a> *isolate) const)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
 </td><td class="memItemRight" valign="bottom"><b>V8_DEPRECATE_SOON</b> ("Use maybe version", Local< <a class="el" href="classv8_1_1Number.html">Number</a> > ToNumber(<a class="el" href="classv8_1_1Isolate.html">Isolate</a> *isolate) const)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
 </td><td class="memItemRight" valign="bottom"><b>V8_DEPRECATE_SOON</b> ("Use maybe version", Local< <a class="el" href="classv8_1_1String.html">String</a> > ToString(<a class="el" href="classv8_1_1Isolate.html">Isolate</a> *isolate) const)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
 </td><td class="memItemRight" valign="bottom"><b>V8_DEPRECATE_SOON</b> ("Use maybe version", Local< <a class="el" href="classv8_1_1String.html">String</a> > ToDetailString(<a class="el" href="classv8_1_1Isolate.html">Isolate</a> *isolate) const)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
 </td><td class="memItemRight" valign="bottom"><b>V8_DEPRECATE_SOON</b> ("Use maybe version", Local< <a class="el" href="classv8_1_1Object.html">Object</a> > ToObject(<a class="el" href="classv8_1_1Isolate.html">Isolate</a> *isolate) const)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
 </td><td class="memItemRight" valign="bottom"><b>V8_DEPRECATE_SOON</b> ("Use maybe version", Local< <a class="el" href="classv8_1_1Integer.html">Integer</a> > ToInteger(<a class="el" href="classv8_1_1Isolate.html">Isolate</a> *isolate) const)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
 </td><td class="memItemRight" valign="bottom"><b>V8_DEPRECATE_SOON</b> ("Use maybe version", Local< <a class="el" href="classv8_1_1Uint32.html">Uint32</a> > ToUint32(<a class="el" href="classv8_1_1Isolate.html">Isolate</a> *isolate) const)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
 </td><td class="memItemRight" valign="bottom"><b>V8_DEPRECATE_SOON</b> ("Use maybe version", Local< <a class="el" href="classv8_1_1Int32.html">Int32</a> > ToInt32(<a class="el" href="classv8_1_1Isolate.html">Isolate</a> *isolate) const)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
 </td><td class="memItemRight" valign="bottom"><b>V8_DEPRECATE_SOON</b> ("Use maybe version", Local< <a class="el" href="classv8_1_1Boolean.html">Boolean</a> > ToBoolean() const)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
 </td><td class="memItemRight" valign="bottom"><b>V8_DEPRECATE_SOON</b> ("Use maybe version", Local< <a class="el" href="classv8_1_1Number.html">Number</a> > ToNumber() const)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
 </td><td class="memItemRight" valign="bottom"><b>V8_DEPRECATE_SOON</b> ("Use maybe version", Local< <a class="el" href="classv8_1_1String.html">String</a> > ToString() const)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
 </td><td class="memItemRight" valign="bottom"><b>V8_DEPRECATE_SOON</b> ("Use maybe version", Local< <a class="el" href="classv8_1_1String.html">String</a> > ToDetailString() const)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
 </td><td class="memItemRight" valign="bottom"><b>V8_DEPRECATE_SOON</b> ("Use maybe version", Local< <a class="el" href="classv8_1_1Object.html">Object</a> > ToObject() const)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
 </td><td class="memItemRight" valign="bottom"><b>V8_DEPRECATE_SOON</b> ("Use maybe version", Local< <a class="el" href="classv8_1_1Integer.html">Integer</a> > ToInteger() const)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
 </td><td class="memItemRight" valign="bottom"><b>V8_DEPRECATE_SOON</b> ("Use maybe version", Local< <a class="el" href="classv8_1_1Uint32.html">Uint32</a> > ToUint32() const)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
 </td><td class="memItemRight" valign="bottom"><b>V8_DEPRECATE_SOON</b> ("Use maybe version", Local< <a class="el" href="classv8_1_1Int32.html">Int32</a> > ToInt32() const)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">V8_DEPRECATE_SOON</a> ("Use maybe version", Local< <a class="el" href="classv8_1_1Uint32.html">Uint32</a> > ToArrayIndex() const)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="<API key>.html">MaybeLocal</a>< <a class="el" href="classv8_1_1Uint32.html">Uint32</a> > </td><td class="memItemRight" valign="bottom"><b>ToArrayIndex</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context) const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="classv8_1_1Maybe.html">Maybe</a>< bool > </td><td class="memItemRight" valign="bottom"><b>BooleanValue</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context) const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="classv8_1_1Maybe.html">Maybe</a>< double > </td><td class="memItemRight" valign="bottom"><b>NumberValue</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context) const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="classv8_1_1Maybe.html">Maybe</a>< int64_t > </td><td class="memItemRight" valign="bottom"><b>IntegerValue</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context) const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="classv8_1_1Maybe.html">Maybe</a>< uint32_t > </td><td class="memItemRight" valign="bottom"><b>Uint32Value</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context) const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="classv8_1_1Maybe.html">Maybe</a>< int32_t > </td><td class="memItemRight" valign="bottom"><b>Int32Value</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context) const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
 </td><td class="memItemRight" valign="bottom"><b>V8_DEPRECATE_SOON</b> ("Use maybe version", bool BooleanValue() const)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
 </td><td class="memItemRight" valign="bottom"><b>V8_DEPRECATE_SOON</b> ("Use maybe version", double NumberValue() const)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
 </td><td class="memItemRight" valign="bottom"><b>V8_DEPRECATE_SOON</b> ("Use maybe version", int64_t IntegerValue() const)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
 </td><td class="memItemRight" valign="bottom"><b>V8_DEPRECATE_SOON</b> ("Use maybe version", uint32_t Uint32Value() const)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
 </td><td class="memItemRight" valign="bottom"><b>V8_DEPRECATE_SOON</b> ("Use maybe version", int32_t Int32Value() const)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Value.html#<API key>">V8_DEPRECATE_SOON</a> ("Use maybe version", bool Equals(<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > that) const)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
<API key> <a class="el" href="classv8_1_1Maybe.html">Maybe</a>< bool > </td><td class="memItemRight" valign="bottom"><b>Equals</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > that) const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
bool </td><td class="memItemRight" valign="bottom"><b>StrictEquals</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > that) const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
bool </td><td class="memItemRight" valign="bottom"><b>SameValue</b> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Value.html">Value</a> > that) const </td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memTemplParams" colspan="2"><a class="anchor" id="<API key>"></a>
template<class T > </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classv8_1_1Value.html">Value</a> * </td><td class="memTemplItemRight" valign="bottom"><b>Cast</b> (T *value)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Map.html">Map</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Map.html#<API key>">New</a> (<a class="el" href="classv8_1_1Isolate.html">Isolate</a> *isolate)</td></tr>
<tr class="separator:<API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">static <API key> <a class="el" href="<API key>.html">MaybeLocal</a>< <a class="el" href="classv8_1_1Map.html">Map</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Map.html#<API key>">FromArray</a> (<a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > context, <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Array.html">Array</a> > array)</td></tr>
<tr class="separator:<API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
static V8_INLINE <a class="el" href="classv8_1_1Map.html">Map</a> * </td><td class="memItemRight" valign="bottom"><b>Cast</b> (<a class="el" href="classv8_1_1Value.html">Value</a> *obj)</td></tr>
<tr class="separator:<API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header <API key>"><td colspan="2" onclick="javascript:toggleInherit('<API key>')"><img src="closed.png" alt="-"/> Static Public Member Functions inherited from <a class="el" href="classv8_1_1Object.html">v8::Object</a></td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">static V8_INLINE int </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Object.html#<API key>">InternalFieldCount</a> (const <a class="el" href="<API key>.html">PersistentBase</a>< <a class="el" href="classv8_1_1Object.html">Object</a> > &object)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top">static V8_INLINE void * </td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1Object.html#<API key>"><API key></a> (const <a class="el" href="<API key>.html">PersistentBase</a>< <a class="el" href="classv8_1_1Object.html">Object</a> > &object, int index)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
static <a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Object.html">Object</a> > </td><td class="memItemRight" valign="bottom"><b>New</b> (<a class="el" href="classv8_1_1Isolate.html">Isolate</a> *isolate)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a>
static V8_INLINE <a class="el" href="classv8_1_1Object.html">Object</a> * </td><td class="memItemRight" valign="bottom"><b>Cast</b> (<a class="el" href="classv8_1_1Value.html">Value</a> *obj)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header <API key>"><td colspan="2" onclick="javascript:toggleInherit('<API key>')"><img src="closed.png" alt="-"/> Static Public Member Functions inherited from <a class="el" href="classv8_1_1Value.html">v8::Value</a></td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memTemplParams" colspan="2"><a class="anchor" id="<API key>"></a>
template<class T > </td></tr>
<tr class="memitem:<API key> inherit <API key>"><td class="memTemplItemLeft" align="right" valign="top">static V8_INLINE <a class="el" href="classv8_1_1Value.html">Value</a> * </td><td class="memTemplItemRight" valign="bottom"><b>Cast</b> (T *value)</td></tr>
<tr class="separator:<API key> inherit <API key>"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>An instance of the built-in <a class="el" href="classv8_1_1Map.html">Map</a> constructor (ECMA-262, 6th Edition, 23.1.1). </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="<API key>"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classv8_1_1Local.html">Local</a><<a class="el" href="classv8_1_1Array.html">Array</a>> v8::Map::AsArray </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns an array of length Size() * 2, where index N is the Nth key and index N + 1 is the Nth value. </p>
</div>
</div>
<a class="anchor" id="<API key>"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static <API key> <a class="el" href="<API key>.html">MaybeLocal</a><<a class="el" href="classv8_1_1Map.html">Map</a>> v8::Map::FromArray </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Context.html">Context</a> > </td>
<td class="paramname"><em>context</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classv8_1_1Local.html">Local</a>< <a class="el" href="classv8_1_1Array.html">Array</a> > </td>
<td class="paramname"><em>array</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a new <a class="el" href="classv8_1_1Map.html">Map</a> containing the elements of array, which must be formatted in the same manner as the array returned from <a class="el" href="classv8_1_1Map.html#<API key>">AsArray()</a>. Guaranteed to be side-effect free if the array contains no holes. </p>
</div>
</div>
<a class="anchor" id="<API key>"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="classv8_1_1Local.html">Local</a><<a class="el" href="classv8_1_1Map.html">Map</a>> v8::Map::New </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classv8_1_1Isolate.html">Isolate</a> * </td>
<td class="paramname"><em>isolate</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a new empty <a class="el" href="classv8_1_1Map.html">Map</a>. </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>deps/v8/include/<a class="el" href="v8_8h_source.html">v8.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html> |
<?php
function __autoload($class_name) {
$filename = str_replace('_', DIRECTORY_SEPARATOR, $class_name).'.php';
$novaPath = 'lib/Nova/'.$filename;
$controllerPath = 'app/controllers/'.$filename;
$modelPath = 'app/models/'.$filename;
if(file_exists($novaPath)) {
require_once($novaPath);
} else if (file_exists($controllerPath)) {
require_once($controllerPath);
} else if (file_exists($modelPath)) {
require_once($modelPath);
} else {
throw new Exception("Unable to load $class_name.");
}
}
require '/app/config/routes.php';
require '/app/config/constants.php'; |
layout: post
title: '2014-07-07JS: Dart 1st EditionIntern 2.07 Patterns to Refactor'
date: '2014-07-07T21:24:00+09:00'
tags:
- Dart
- JavaScript
- testing
permalink: /post/91041422669/<API key>
<p>JSer.info
<p>DartECMAScript(JavaScript)Ecma
<a href="http:
(ECMAScript <a href="http:
<p>Ecma</p>
<ul><li><a href="http:
</ul><p>Info Q<a href="http:
<hr><p>JavaScript<a href="http://theintern.io/" title="Intern" target="_blank">Intern</a> 2.0</p>
<ul><li><a href="http:
<li><a href="https:
</ul><p>Selenium</p>
<ul><li>WebDriver<a href="https:
<li>SaourceLab<a href="https:
<li><a href="http:
<li><a href="http://testingbot.com/" title="Selenium Testing in the cloud - Run your cross browser tests in our online Selenium Grid" target="_blank">TestingBot</a></li>
<li>CommonJS code coverage</li>
</ul><hr><p><a href="http:
<p></p>
<hr><h3 class="site-genre"></h3>
<blockquote cite="http://news.dartlang.org/2014/07/<API key>.html" title="Dart News & Updates: Ecma approves the 1st edition of the Dart language specification">
<p class="jser-sitelink"><strong>Dart News & Updates: Ecma approves the 1st edition of the Dart language specification</strong></p><footer><cite><a href="http://news.dartlang.org/2014/07/<API key>.html" title="Dart News & Updates: Ecma approves the 1st edition of the Dart language specification" target="_blank">news.dartlang.org/2014/07/<API key>.html</a></cite></footer></blockquote>
<p class="jser-tags jser-tag-icon"><span class="jser-tag">dart</span><span class="jser-tag">spec</span></p>
<p>ECMA-408 DartECMA 1st edition</p>
<ul><li><a href="http:
<li><a href="http:
</ul><blockquote cite="http:
<p class="jser-sitelink"><strong>Intern 2.0 released | Blog | SitePen</strong></p><footer><cite><a href="http:
<p class="jser-tags jser-tag-icon"><span class="jser-tag">JavaScript</span><span class="jser-tag">testing</span><span class="jser-tag">ReleaseNote</span><span class="jser-tag">library</span></p>
<p>JavaScript Intern 2.0</p>
<p>CommonJS
BrowserStack/TestingBotWD.jsLeadfoot</p>
<ul><li><a href="https:
<li><a href="https://theintern.github.io/leadfoot/" target="_blank">Leadfoot docs: Index</a></li>
<li><a href="http://theintern.github.io/digdug/" target="_blank">Dig Dug docs: Index</a></li>
</ul><h3 class="site-genre"></h3>
<blockquote cite="http:
<p class="jser-sitelink"><strong>Don’t Use jquery-latest.js | Official jQuery Blog</strong></p><footer><cite><a href="http:
<p class="jser-tags jser-tag-icon"><span class="jser-tag">jQuery</span></p>
<p>CDNjquery-latest.jsjquery-latest.jsjQuery 1.11.1<strong>latest</strong></p>
<ul><li><a href="http://hyper-text.org/archives/2014/07/<API key>.shtml" target="_blank">jQuery Blog jquery-latest.js | WWW WATCH</a></li>
</ul><blockquote cite="http:
<p class="jser-sitelink"><strong>Crush & Lovely — 7 Patterns to Refactor JavaScript Applications: Value Objects</strong></p><footer><cite><a href="http:
<p class="jser-tags jser-tag-icon"><span class="jser-tag">JavaScript</span><span class="jser-tag">API</span><span class="jser-tag">design</span><span class="jser-tag">Promises</span><span class="jser-tag">testing</span></p>
<p>JavaScriptAPI</p>
<p>"7 Patterns to Refactor Fat ActiveRecord Models" </p>
<ul><li><a href="http://blog.codeclimate.com/blog/2012/10/17/<API key>/" target="_blank">7 Patterns to Refactor Fat ActiveRecord Models - Code Climate Blog</a></li>
</ul><blockquote cite="http://postd.cc/<API key>/" title="CSS will-change | POSTD">
<p class="jser-sitelink"><strong>CSS will-change | POSTD</strong></p><footer><cite><a href="http://postd.cc/<API key>/" title="CSS will-change | POSTD" target="_blank">postd.cc/<API key>/</a></cite></footer></blockquote>
<p class="jser-tags jser-tag-icon"><span class="jser-tag">JavaScript</span><span class="jser-tag">CSS</span><span class="jser-tag">animation</span></p>
<p>GPUtranslate3dwill-change</p>
<p>
</p>
<p>CSS animation</p>
<blockquote cite="http:
<p class="jser-sitelink"><strong>DevTools Digest - Chrome 35: Updates to the Developer Tools in Chrome 35 - HTML5 Rocks</strong></p><footer><cite><a href="http:
<p class="jser-tags jser-tag-icon"><span class="jser-tag">Chrome</span><span class="jser-tag">debug</span><span class="jser-tag">Tools</span></p>
<p>Chrome35DevTools</p>
<p>Shadow DOMCodeMirror 4.0</p>
<blockquote cite="http://sadah.hatenablog.com/entry/2014/06/30/211944" title="CSS Font Loading Module Level 3 - console.blog(self);">
<p class="jser-sitelink"><strong>CSS Font Loading Module Level 3 - console.blog(self);</strong></p><footer><cite><a href="http://sadah.hatenablog.com/entry/2014/06/30/211944" title="CSS Font Loading Module Level 3 - console.blog(self);" target="_blank">sadah.hatenablog.com/entry/2014/06/30/211944</a></cite></footer></blockquote>
<p class="jser-tags jser-tag-icon"><span class="jser-tag">CSS</span><span class="jser-tag">fonts</span></p>
<p>CSS Font loading</p>
<p>FOUTAPIWeb FontCanvas</p>
<blockquote cite="http://toddmotto.com/<API key>/" title="Web Components and concepts, ShadowDOM, imports, templates, custom elements">
<p class="jser-sitelink"><strong>Web Components and concepts, ShadowDOM, imports, templates, custom elements</strong></p><footer><cite><a href="http://toddmotto.com/<API key>/" title="Web Components and concepts, ShadowDOM, imports, templates, custom elements" target="_blank">toddmotto.com/<API key>/</a></cite></footer></blockquote>
<p class="jser-tags jser-tag-icon"><span class="jser-tag">WebComponents</span></p>
<p>WebComponents</p>
<h3 class="site-genre"></h3>
<blockquote cite="https://speakerdeck.com/mizchi/<API key>" title="UI // Speaker Deck">
<p class="jser-sitelink"><strong>UI
<p class="jser-tags jser-tag-icon"><span class="jser-tag">JavaScript</span><span class="jser-tag">DOM</span><span class="jser-tag">performance</span><span class="jser-tag"></span></p>
<p>DOM</p>
<p></p>
<h3 class="site-genre"></h3>
<blockquote cite="http://jsmodules.io/" title="JavaScript Modules">
<p class="jser-sitelink"><strong>JavaScript Modules</strong></p><footer><cite><a href="http://jsmodules.io/" title="JavaScript Modules" target="_blank">jsmodules.io/</a></cite></footer></blockquote>
<p class="jser-tags jser-tag-icon"><span class="jser-tag">JavaScript</span><span class="jser-tag">ECMAScript</span><span class="jser-tag">module</span></p>
<p>ES6 module</p>
<p>Node/CommonJS</p>
<ul><li><a href="http://jsmodules.io/cjs.html" target="_blank">Porting from CommonJS</a></li>
</ul><h3 class="site-genre"></h3>
<blockquote cite="https://github.com/krasimir/deb.js" title="krasimir/deb.js">
<p class="jser-sitelink"><strong>krasimir/deb.js</strong></p><footer><cite><a href="https://github.com/krasimir/deb.js" title="krasimir/deb.js" target="_blank">github.com/krasimir/deb.js</a></cite></footer></blockquote>
<p class="jser-tags jser-tag-icon"><span class="jser-tag">JavaScript</span><span class="jser-tag">debug</span><span class="jser-tag">library</span></p>
<p><code>Function.prototype</code> Chrome</p>
<blockquote cite="https://theintern.github.io/leadfoot/" title="Leadfoot docs: Index">
<p class="jser-sitelink"><strong>Leadfoot docs: Index</strong></p><footer><cite><a href="https://theintern.github.io/leadfoot/" title="Leadfoot docs: Index" target="_blank">theintern.github.io/leadfoot/</a></cite></footer></blockquote>
<p class="jser-tags jser-tag-icon"><span class="jser-tag">webdriver</span><span class="jser-tag">library</span></p>
<p>WebDriver API</p>
<p>WD.jsAPI</p>
<blockquote cite="https://github.com/bahmutov/next-update" title="bahmutov/next-update">
<p class="jser-sitelink"><strong>bahmutov/next-update</strong></p><footer><cite><a href="https://github.com/bahmutov/next-update" title="bahmutov/next-update" target="_blank">github.com/bahmutov/next-update</a></cite></footer></blockquote>
<p class="jser-tags jser-tag-icon"><span class="jser-tag">node.js</span><span class="jser-tag">console</span><span class="jser-tag">Tools</span></p>
<p>node moduledependencies</p>
<ul><li><a href="http://hail2u.net/blog/software/node-next-update.html" target="_blank">Node.js: next-update - Weblog - Hail2u.net</a></li>
</ul><h3 class="site-genre"></h3>
<blockquote cite="http://eloquentjavascript.net/2nd_edition/preview/" title="Eloquent JavaScript">
<p class="jser-sitelink"><strong>Eloquent JavaScript</strong></p><footer><cite><a href="http://eloquentjavascript.net/2nd_edition/preview/" title="Eloquent JavaScript" target="_blank">eloquentjavascript.net/2nd_edition/preview/</a></cite></footer></blockquote>
<p class="jser-tags jser-tag-icon"><span class="jser-tag">JavaScript</span><span class="jser-tag">book</span></p>
<p>Eloquent JavaScript</p>
<blockquote cite="http://shop.oreilly.com/product/9780992279455.do" title="AngularJS: Novice to Ninja - O'Reilly Media">
<p class="jser-sitelink"><strong>AngularJS: Novice to Ninja - O&
<p class="jser-tags jser-tag-icon"><span class="jser-tag">AngularJS</span><span class="jser-tag">book</span></p>
<p>20149</p>
<p>Angular</p>
<p>TDDSPA</p>
<blockquote cite="http:
<p class="jser-sitelink"><strong>O&
<p class="jser-tags jser-tag-icon"><span class="jser-tag">canvas</span><span class="jser-tag">book</span></p>
<p>20140719 </p>
<p>Core HTML5 Canvas</p> |
let Marionette = require('backbone.marionette');
let View = Marionette.View.extend({
tagName: 'div',
template: require('../../main/templates/contextmenu.html'),
className: "context establishment-list",
templateContext: function () {
return {
actions: this.getOption('actions'),
options: {
'add': {className: 'btn-default', label: _t('Add establishment')}
}
}
},
ui: {
'add': 'button[name="add"]'
},
triggers: {
"click @ui.add": "establishment:add"
},
initialize: function(options) {
options || (options = {actions: []});
}
});
module.exports = View; |
using System.Collections;
namespace MEventSystem{
public interface IEventDispatcher {
void AddListener<E>(EventDelegate<E> del) where E:Event;
void RemoveListener<E>(EventDelegate<E> del) where E:Event;
}
} |
require 'spec_helper'
describe 'Clusters Applications', :js do
include GoogleApi::<API key>
let(:project) { create(:project) }
let(:user) { create(:user) }
before do
project.add_maintainer(user)
sign_in(user)
end
describe 'Installing applications' do
before do
visit <API key>(project, cluster)
end
context 'when cluster is being created' do
let(:cluster) { create(:cluster, :providing_by_gcp, projects: [project]) }
it 'user is unable to install applications' do
page.within('.<API key>') do
expect(page.find(:css, '.<API key>')['disabled']).to eq('true')
expect(page).to have_css('.<API key>', exact_text: 'Install')
end
end
end
context 'when cluster is created' do
let(:cluster) { create(:cluster, :provided_by_gcp, projects: [project]) }
it 'user can install applications' do
wait_for_requests
page.within('.<API key>') do
expect(page.find(:css, '.<API key>')['disabled']).to be_nil
expect(page).to have_css('.<API key>', exact_text: 'Install')
end
end
context 'when user installs Helm' do
before do
allow(<API key>).to receive(:perform_async)
page.within('.<API key>') do
page.find(:css, '.<API key>').click
end
wait_for_requests
end
it 'they see status transition' do
page.within('.<API key>') do
# FE sends request and gets the response, then the buttons is "Installing"
expect(page.find(:css, '.<API key>')['disabled']).to eq('true')
expect(page).to have_css('.<API key>', exact_text: 'Installing')
Clusters::Cluster.last.application_helm.make_installing!
# FE starts polling and update the buttons to "Installing"
expect(page.find(:css, '.<API key>')['disabled']).to eq('true')
expect(page).to have_css('.<API key>', exact_text: 'Installing')
Clusters::Cluster.last.application_helm.make_installed!
expect(page.find(:css, '.<API key>')['disabled']).to eq('true')
expect(page).to have_css('.<API key>', exact_text: 'Installed')
end
expect(page).to have_content('Helm Tiller was successfully installed on your Kubernetes cluster')
end
end
context 'when user installs Knative' do
before do
create(:<API key>, :installed, cluster: cluster)
end
context 'on an abac cluster' do
let(:cluster) { create(:cluster, :provided_by_gcp, :rbac_disabled, projects: [project]) }
it 'shows info block and not be installable' do
page.within('.<API key>') do
expect(page).to have_css('.rbac-notice')
expect(page.find(:css, '.<API key>')['disabled']).to eq('true')
end
end
end
context 'on an rbac cluster' do
let(:cluster) { create(:cluster, :provided_by_gcp, projects: [project]) }
it 'does not show callout block and be installable' do
page.within('.<API key>') do
expect(page).not_to have_css('.rbac-notice')
expect(page).to have_css('.<API key>:not([disabled])')
end
end
describe 'when user clicks install button' do
def <API key>
page.find('.<API key>').value
end
before do
allow(<API key>).to receive(:perform_async)
allow(<API key>).to receive(:perform_in)
allow(<API key>).to receive(:perform_async)
page.within('.<API key>') do
expect(page).to have_css('.<API key>:not([disabled])')
page.find('.<API key>').set("domain.example.org")
click_button 'Install'
wait_for_requests
expect(page).to have_css('.<API key>', exact_text: 'Installing')
Clusters::Cluster.last.application_knative.make_installing!
Clusters::Cluster.last.application_knative.make_installed!
Clusters::Cluster.last.application_knative.update_attribute(:external_ip, '127.0.0.1')
end
end
it 'shows status transition' do
page.within('.<API key>') do
expect(<API key>).to eq('domain.example.org')
expect(page).to have_css('.<API key>', exact_text: 'Installed')
end
expect(page).to have_content('Knative was successfully installed on your Kubernetes cluster')
expect(page).to have_css('.<API key>'), exact_text: 'Save changes'
end
it 'can then update the domain' do
page.within('.<API key>') do
expect(<API key>).to receive(:perform_async)
expect(<API key>).to eq('domain.example.org')
page.find('.<API key>').set("new.domain.example.org")
click_button 'Save changes'
wait_for_requests
expect(<API key>).to eq('new.domain.example.org')
end
end
end
end
end
context 'when user installs Cert Manager' do
before do
allow(<API key>).to receive(:perform_async)
allow(<API key>).to receive(:perform_in)
allow(<API key>).to receive(:perform_async)
create(:<API key>, :installed, cluster: cluster)
page.within('.<API key>') do
click_button 'Install'
end
end
it 'shows status transition' do
def email_form_value
page.find('.js-email').value
end
page.within('.<API key>') do
expect(email_form_value).to eq(cluster.user.email)
expect(page).to have_css('.<API key>', exact_text: 'Installing')
page.find('.js-email').set("new_email@example.org")
Clusters::Cluster.last.<API key>.make_installing!
expect(email_form_value).to eq('new_email@example.org')
expect(page).to have_css('.<API key>', exact_text: 'Installing')
Clusters::Cluster.last.<API key>.make_installed!
expect(email_form_value).to eq('new_email@example.org')
expect(page).to have_css('.<API key>', exact_text: 'Installed')
end
expect(page).to have_content('Cert-Manager was successfully installed on your Kubernetes cluster')
end
end
context 'when user installs Ingress' do
context 'when user installs application: Ingress' do
before do
allow(<API key>).to receive(:perform_async)
allow(<API key>).to receive(:perform_in)
allow(<API key>).to receive(:perform_async)
create(:<API key>, :installed, cluster: cluster)
page.within('.<API key>') do
expect(page).to have_css('.<API key>:not([disabled])')
page.find(:css, '.<API key>').click
wait_for_requests
end
end
it 'they see status transition' do
page.within('.<API key>') do
# FE sends request and gets the response, then the buttons is "Installing"
expect(page).to have_css('.<API key>[disabled]')
expect(page).to have_css('.<API key>', exact_text: 'Installing')
Clusters::Cluster.last.application_ingress.make_installing!
# FE starts polling and update the buttons to "Installing"
expect(page).to have_css('.<API key>', exact_text: 'Installing')
expect(page).to have_css('.<API key>[disabled]')
# The application becomes installed but we keep waiting for external IP address
Clusters::Cluster.last.application_ingress.make_installed!
expect(page).to have_css('.<API key>', exact_text: 'Installed')
expect(page).to have_css('.<API key>[disabled]')
expect(page).to have_selector('.<API key>')
expect(page).to have_selector('.<API key>')
# We receive the external IP address and display
Clusters::Cluster.last.application_ingress.update!(external_ip: '192.168.1.100')
expect(page).not_to have_selector('.<API key>')
expect(page.find('.js-endpoint').value).to eq('192.168.1.100')
end
expect(page).to have_content('Ingress was successfully installed on your Kubernetes cluster')
end
end
end
end
end
end |
// Use of this source code is governed by a zlib-style
package service
import (
"bufio"
"fmt"
"io/ioutil"
"os"
"strings"
)
var cgroupFile = "/proc/1/cgroup"
type linuxSystemService struct {
name string
detect func() bool
interactive func() bool
new func(i Interface, platform string, c *Config) (Service, error)
}
func (sc linuxSystemService) String() string {
return sc.name
}
func (sc linuxSystemService) Detect() bool {
return sc.detect()
}
func (sc linuxSystemService) Interactive() bool {
return sc.interactive()
}
func (sc linuxSystemService) New(i Interface, c *Config) (Service, error) {
return sc.new(i, sc.String(), c)
}
func init() {
ChooseSystem(linuxSystemService{
name: "linux-systemd",
detect: isSystemd,
interactive: func() bool {
is, _ := isInteractive()
return is
},
new: newSystemdService,
},
linuxSystemService{
name: "linux-upstart",
detect: isUpstart,
interactive: func() bool {
is, _ := isInteractive()
return is
},
new: newUpstartService,
},
linuxSystemService{
name: "unix-systemv",
detect: func() bool { return true },
interactive: func() bool {
is, _ := isInteractive()
return is
},
new: newSystemVService,
},
)
}
func binaryName(pid int) (string, error) {
statPath := fmt.Sprintf("/proc/%d/stat", pid)
dataBytes, err := ioutil.ReadFile(statPath)
if err != nil {
return "", err
}
// First, parse out the image name
data := string(dataBytes)
binStart := strings.IndexRune(data, '(') + 1
binEnd := strings.IndexRune(data[binStart:], ')')
return data[binStart : binStart+binEnd], nil
}
func isInteractive() (bool, error) {
inContainer, err := isInContainer(cgroupFile)
if err != nil {
return false, err
}
if inContainer {
return true, nil
}
ppid := os.Getppid()
if ppid == 1 {
return false, nil
}
binary, _ := binaryName(ppid)
return binary != "systemd", nil
}
// isInContainer checks if the service is being executed in docker or lxc
// container.
func isInContainer(cgroupPath string) (bool, error) {
const maxlines = 5 // maximum lines to scan
f, err := os.Open(cgroupPath)
if err != nil {
return false, err
}
defer f.Close()
scan := bufio.NewScanner(f)
lines := 0
for scan.Scan() && !(lines > maxlines) {
if strings.Contains(scan.Text(), "docker") || strings.Contains(scan.Text(), "lxc") {
return true, nil
}
lines++
}
if err := scan.Err(); err != nil {
return false, err
}
return false, nil
}
var tf = map[string]interface{}{
"cmd": func(s string) string {
return `"` + strings.Replace(s, `"`, `\"`, -1) + `"`
},
"cmdEscape": func(s string) string {
return strings.Replace(s, " ", `\x20`, -1)
},
} |
.img-flex{
display:block;
width:100%;
}
.product{
background-color:#c7c0ae;
border-radius:8px;
border: 8px #9C3 solid;
padding:1.5em;
}
.product:hover,
.product:focus,
.product:active{
background-color: #9C3;
transition:250ms linear;
} |
package com.swfarm.biz.chain.web;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.validation.BindException;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.<API key>;
import org.springframework.web.servlet.view.RedirectView;
import com.swfarm.biz.chain.bo.ShippingCompany;
import com.swfarm.biz.chain.bo.<API key>;
import com.swfarm.biz.chain.bo.<API key>;
import com.swfarm.biz.chain.bo.ShippingMethod;
import com.swfarm.biz.chain.srv.ChainService;
import com.swfarm.biz.warehouse.bo.Warehouse;
import com.swfarm.biz.warehouse.srv.WarehouseService;
public class <API key> extends <API key> {
private ChainService chainService;
private WarehouseService warehouseService;
public void setChainService(ChainService chainService) {
this.chainService = chainService;
}
public void setWarehouseService(WarehouseService warehouseService) {
this.warehouseService = warehouseService;
}
protected Object formBackingObject(HttpServletRequest request)
throws Exception {
String idStr = request.getParameter("id");
<API key> <API key> = null;
if (StringUtils.isNotEmpty(idStr)) {
<API key> = this.chainService
.<API key>(new Long(idStr));
<API key> <API key> = <API key>
.<API key>();
if (<API key> != null) {
<API key>
.<API key>(<API key>
.getId());
}
ShippingCompany shippingCompany = <API key>
.getShippingCompany();
if (shippingCompany != null) {
<API key>.<API key>(shippingCompany
.getId());
}
ShippingMethod shippingMethod = <API key>
.getShippingMethod();
if (shippingMethod != null) {
<API key>.setShippingMethodId(shippingMethod
.getId());
}
Set warehouses = <API key>.getWarehouses();
if (CollectionUtils.isNotEmpty(warehouses)) {
Long[] warehouseIds = new Long[warehouses.size()];
int index = 0;
for (Iterator iter = warehouses.iterator(); iter.hasNext();) {
Warehouse warehouse = (Warehouse) iter.next();
warehouseIds[index++] = warehouse.getId();
}
<API key>.setWarehouseIds(warehouseIds);
}
} else {
<API key> = new <API key>();
String <API key> = request
.getParameter("company");
if (StringUtils.isNotEmpty(<API key>)) {
<API key>.<API key>(new Long(
<API key>));
}
}
return <API key>;
}
protected Map referenceData(HttpServletRequest request) throws Exception {
Map dataMap = new HashMap();
List <API key> = this.chainService
.<API key>();
dataMap.put("<API key>", <API key>);
List shippingCompanies = this.chainService.<API key>();
dataMap.put("shippingCompanies", shippingCompanies);
<API key> <API key> = (<API key>) this
.getCommand(request);
Long <API key> = <API key>
.<API key>();
if (<API key> != null) {
<API key> <API key> = this.chainService
.<API key>(<API key>);
List warehouses = <API key>.getWarehouseList();
dataMap.put("warehouses", warehouses);
}
return dataMap;
}
protected void onBindAndValidate(HttpServletRequest request,
Object command, BindException errors) throws Exception {
<API key> <API key> = (<API key>) command;
}
protected ModelAndView onSubmit(HttpServletRequest request,
HttpServletResponse response, Object command, BindException errors)
throws Exception {
<API key> <API key> = (<API key>) command;
this.chainService.<API key>(<API key>);
if (<API key>.<API key>() != null) {
return new ModelAndView(new RedirectView(getSuccessView(), true),
"company", <API key>
.<API key>().getId());
} else {
return new ModelAndView(new RedirectView(getSuccessView(), true));
}
}
} |
App.Views.NotebookShow = Support.CompositeView.extend({
template: JST["notebooks/notebook_show"],
render: function() {
var content = this.template({ notebook: this.model });
this.$el.html(content);
this.addNotes();
return this;
},
addNotes : function() {
this.appendChild(new App.Views.NotesIndex({ model: this.model }));
}
}) |
<?php
/**
* @file
* Contains \FastFrame\Utility\PriorityListTest
*/
namespace FastFrame\Utility;
use PHPUnit\Framework\TestCase;
/**
* Tests of the PriorityList
*
* @package FastFrame\Event
*/
class PriorityListTest
extends TestCase
{
private $sampleCount0 = 2;
private $sampleCount = 4;
private $samplePayload = [
['1', 0],
['2', 2],
[3, 1],
['test', 0]
];
public function <API key>()
{
return [
[PriorityList::EXTR_DATA, ['2', 3, '1', 'test']],
[PriorityList::EXTR_PRIORITY, [2, 1, 0, 0]],
[
PriorityList::EXTR_BOTH,
[
['data' => '2', 'priority' => 2],
['data' => 3, 'priority' => 1],
['data' => '1', 'priority' => 0],
['data' => 'test', 'priority' => 0]
]
],
];
}
public function <API key>()
{
return [
[1],
['super'],
[
function () {
return 'woot';
}
],
[[$this, 'nothing']],
[new \stdClass()]
];
}
private function buildSampleList($flags = PriorityList::EXTR_DATA)
{
$pl = new PriorityList($flags);
foreach ($this->samplePayload as $data) {
$pl->insert($data[0], $data[1]);
}
return $pl;
}
private function fetchList(PriorityList $list)
{
$values = [];
foreach ($list as $key => $value) {
$values[] = $value;
}
return $values;
}
/**
* @dataProvider <API key>
*/
public function <API key>($value)
{
$pl = new PriorityList();
$pl->insert($value, 0);
self::assertEquals($value, $pl->current());
}
public function <API key>()
{
$this->expectException(\<API key>::class);
$this-><API key>("Priority argument must be an integer");
(new PriorityList())->insert('a', 'bad');
}
public function <API key>()
{
$pl = new PriorityList();
$pl->insert(1, 0);
$pl->insert(2, -2);
$pl->insert(3, 1);
self::assertEquals([3, 1, 2], $this->fetchList($pl));
}
public function <API key>()
{
self::assertEquals(0, (new PriorityList())->count());
}
public function <API key>()
{
self::assertEquals(count($this->samplePayload), $this->buildSampleList()->count());
}
public function <API key>()
{
self::assertEquals($this->sampleCount0, $this->buildSampleList()->count(0));
}
/**
* @dataProvider <API key>
*/
public function testCurrent($type, $expected)
{
self::assertSame(
$expected,
$this->fetchList($this->buildSampleList($type))
);
}
public function testRemove()
{
$pl = $this->buildSampleList();
self::assertTrue($pl->remove('2'));
self::assertEquals($this->sampleCount - 1, $pl->count());
self::assertSame([3, '1', 'test'], $this->fetchList($pl));
}
public function <API key>()
{
$pl = $this->buildSampleList();
$pl->insert('2', 2);
self::assertTrue($pl->remove('2'));
self::assertEquals(4, $pl->count());
self::assertSame(['2', 3, '1', 'test'], $this->fetchList($pl));
}
public function <API key>()
{
$pl = $this->buildSampleList();
$pl->insert('test', 100);
self::assertFalse($pl->remove('test', 50));
self::assertSame(['test', '2', 3, '1', 'test'], $this->fetchList($pl));
}
public function <API key>()
{
$pl= $this->buildSampleList();
self::assertFalse($pl->remove('tester'));
}
public function <API key>()
{
$pl= $this->buildSampleList();
self::assertFalse($pl->remove('tester', 100));
}
} |
'use strict';
define(['app'], function (app) {
var AboutController = function ($scope) {
};
AboutController.$inject = ['$scope'];
app.register.controller('AboutController', AboutController);
}); |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
// Pertemuan 03: Pewarisan
namespace Pewarisan
{
class Program
{
static void Main(string[] args)
{
Square s = new Square { Length = 4 };
Console.WriteLine("Square area: " + s.ComputeArea());
Console.WriteLine("Square circ: " + s.<API key>());
Console.WriteLine();
Rectangle r = new Rectangle { Length = 4, Width = 5 };
Console.WriteLine("Rect area: " + r.ComputeArea());
Console.WriteLine("Rect circ: " + r.<API key>());
Console.WriteLine();
// Cast rectangle to square
Square sr = r as Square;
Console.WriteLine("area: " + sr.ComputeArea());
Console.WriteLine("circ: " + sr.<API key>());
}
}
} |
namespace Microsoft.Xbox.Services.Leaderboard
{
using Newtonsoft.Json;
public class LeaderboardColumn
{
[JsonProperty("type")]
public LeaderboardStatType StatisticType { get; set; }
[JsonProperty("statName")]
public string StatisticName { get; set; }
}
} |
<?php
namespace Demo\Application;
/**
* Class description
*
* @package Demo\Application
* @author Nigel Greenway <nigel.greenway@prestoclassical.co.uk>
*/
interface <API key>
{
/**
* Handle the query
*
* @param QueryInterface $query
*
* @return mixed
*/
public function handle(QueryInterface $query);
} |
class <API key> < ActiveJob::Base
queue_as :default
def perform(user)
user.destroy if user.guest
end
end |
using MonoCross.Utilities;
using System;
using System.Collections.Generic;
namespace MonoCross.Navigation
{
<summary>
Extension methods for <see cref="IMXView"/> that add navigation.
</summary>
public static class <API key>
{
<summary>
Initiates a navigation to the specified URL.
</summary>
<param name="view">The <see cref="IMXView"/> that kicked off the navigation.</param>
<param name="url">A <see cref="String"/> representing the URL to navigate to.</param>
public static void Navigate(this IMXView view, string url)
{
MXContainer.Navigate(view, url);
}
<summary>
Initiates a navigation to the specified URL.
</summary>
<param name="view">The <see cref="IMXView"/> that kicked off the navigation.</param>
<param name="url">A <see cref="String"/> representing the URL to navigate to.</param>
<param name="parameters">A <see cref="Dictionary<TKey,TValue>"/> representing any parameters such as submitted values.</param>
public static void Navigate(this IMXView view, string url, Dictionary<string, string> parameters)
{
MXContainer.Navigate(view, url, parameters);
}
}
<summary>
Represents the platform-specific instance of the MonoCross container.
</summary>
public abstract class MXContainer
{
<summary>
Gets the date and time of the last navigation that occurred.
</summary>
<value>The last navigation date.</value>
public DateTime LastNavigationDate { get; set; }
<summary>
Gets or sets the URL of last navigation that occurred.
</summary>
<value>The last navigation URL.</value>
public string LastNavigationUrl { get; set; }
<summary>
The cancel load.
</summary>
protected bool CancelLoad = false;
<summary>
Load containers on a separate thread.
</summary>
public bool ThreadedLoad = true;
<summary>
Raises the controller load begin event.
</summary>
[Obsolete("Use <API key>(IMXController, IMXView) instead")]
protected virtual void <API key>(IMXController controller)
{
}
<summary>
Called when a controller is about to be loaded.
</summary>
<param name="controller">The controller to be loaded.</param>
<param name="fromView">The view that initiated the navigation that resulted in the controller being loaded.</param>
protected virtual void <API key>(IMXController controller, IMXView fromView)
{
#pragma warning disable 618
<API key>(controller);
#pragma warning restore 618
}
<summary>
Raises the controller load failed event.
</summary>
<param name="controller">The controller that failed to load.</param>
<param name="ex">The exception that caused the load to fail.</param>
protected virtual void <API key>(IMXController controller, Exception ex)
{
}
<summary>
Called when the IoC container is ready to be populated with its default entries.
</summary>
protected internal abstract void OnSetDefinitions();
<summary>
Raises the load complete event after the Controller has completed loading its Model. The View may be populated,
and the derived class should check if it exists and do something with it if needed for the platform: either free it,
pop off the views in a stack above it or whatever makes sense to the platform.
</summary>
<param name="fromView">
The view that raised the navigation.
</param>
<param name='controller'>
The newly loaded controller.
</param>
<param name='perspective'>
The view perspective returned by the controller load.
</param>
<param name="navigatedUri">
A <see cref="String"/> that represents the uri used to navigate to the controller.
</param>
protected abstract void <API key>(IMXView fromView, IMXController controller, string perspective, string navigatedUri);
<summary>
Gets the view map.
</summary>
public virtual MXViewMap Views
{
get
{
object sess = null;
MXViewMap map = null;
if (Session.TryGetValue(SessionDictionary.ViewsKey, out sess))
{
map = sess as MXViewMap;
}
if (map == null)
{
map = new MXViewMap();
Session[SessionDictionary.ViewsKey] = map;
}
return map;
}
}
<summary>
Initializes a new instance of the <see cref="MXContainer"/> class.
</summary>
<param name="theApp">The application to contain.</param>
protected MXContainer(MXApplication theApp)
{
App = theApp;
}
<summary>
Gets the MonoCross application in the container.
</summary>
<value>The application as a <see cref="MXApplication"/> instance.</value>
public MXApplication App { get; private set; }
<summary>
Sets the MonoCross application in the container.
</summary>
protected static void SetApp(MXApplication app)
{
Instance.App = app;
Instance.App.OnAppLoad();
Instance.App.OnAppLoadComplete();
}
<summary>
A delegate for retrieving a container session identifier.
</summary>
<returns>A <see cref="string"/> that uniquely identifies the container's session.</returns>
public delegate string SessionIdDelegate();
<summary>
Gets the container session identifier
</summary>
static public SessionIdDelegate GetSessionId;
<summary>
Initializes the <see cref="Instance"/>.
</summary>
<param name="theContainer">The container instance.</param>
<exception cref="<API key>">Thrown if <paramref name="theContainer"/> is <c>null</c>.</exception>
protected static void InitializeContainer(MXContainer theContainer)
{
Instance = theContainer;
}
private static MXContainer _instance;
<summary>
Gets or sets the application instance.
</summary>
<value>The application instance.</value>
public static MXContainer Instance
{
get
{
return _instance;
}
protected set
{
if (value == null)
{
throw new <API key>("value", "Cannot have a null MXContainer instance.");
}
_instance = value;
Instance.OnSetDefinitions();
if (value.App == null) return;
Instance.App.OnAppLoad();
Instance.App.OnAppLoadComplete();
}
}
<summary>
Gets the current session settings.
</summary>
public static ISession Session
{
get { return _session ?? (_session = new SessionDictionary()); }
set { _session = value; }
}
static ISession _session;
// Model to View associations
<summary>
Adds the specified view to the view map.
</summary>
<param name="view">The initialized view value.</param>
public static void AddView<TModel>(IMXView view)
{
Instance.AddView(typeof(TModel), view.GetType(), ViewPerspective.Default, view);
}
<summary>
Adds the specified view to the view map.
</summary>
<param name="perspective">The view's perspective.</param>
<param name="view">The initialized view value.</param>
public static void AddView<TModel>(IMXView view, string perspective)
{
Instance.AddView(typeof(TModel), view.GetType(), perspective, view);
}
<summary>
Adds the specified view to the view map.
</summary>
<param name="viewType">The view's type.</param>
public static void AddView<TModel>(Type viewType)
{
Instance.AddView(typeof(TModel), viewType, ViewPerspective.Default, null);
}
<summary>
Adds the specified view to the view map.
</summary>
<param name="viewType">The view's type.</param>
<param name="perspective">The view's perspective.</param>
public static void AddView<TModel>(Type viewType, string perspective)
{
Instance.AddView(typeof(TModel), viewType, perspective, null);
}
<summary>
Adds the specified view to the view map.
</summary>
<param name="modelType">The type of the view's model.</param>
<param name="viewType">The view's type.</param>
<param name="perspective">The view's perspective.</param>
protected virtual void AddView(Type modelType, Type viewType, string perspective)
{
Instance.AddView(modelType, viewType, perspective, null);
}
<summary>
Adds the specified view to the view map.
</summary>
<param name="modelType">The type of the view's model.</param>
<param name="viewType">The view's type.</param>
<param name="perspective">The view perspective.</param>
<param name="view">The initialized view value.</param>
protected virtual void AddView(Type modelType, Type viewType, string perspective, IMXView view)
{
if (view == null)
Views.Add(perspective, modelType, viewType);
else
Views.Add(perspective, view);
}
<summary>
Initiates a navigation to the specified URL.
</summary>
<param name="url">A <see cref="String"/> representing the URL to navigate to.</param>
public static void Navigate(string url)
{
InternalNavigate(null, url, new Dictionary<string, string>());
}
<summary>
Initiates a navigation to the specified URL.
</summary>
<param name="view">The <see cref="IMXView"/> that kicked off the navigation.</param>
<param name="url">A <see cref="String"/> representing the URL to navigate to.</param>
public static void Navigate(IMXView view, string url)
{
InternalNavigate(view, url, new Dictionary<string, string>());
}
<summary>
Initiates a navigation to the specified URL.
</summary>
<param name="view">The <see cref="IMXView"/> that kicked off the navigation.</param>
<param name="url">A <see cref="String"/> representing the URL to navigate to.</param>
<param name="parameters">A <see cref="Dictionary<TKey,TValue>"/> representing any parameters such as submitted values.</param>
public static void Navigate(IMXView view, string url, Dictionary<string, string> parameters)
{
InternalNavigate(view, url, parameters);
}
private static void InternalNavigate(IMXView fromView, string url, Dictionary<string, string> parameters)
{
MXContainer container = Instance; // optimization for the server side; property reference is a hashed lookup
// fetch and allocate a viable controller
var controller = container.GetController(url, ref parameters);
if (controller != null)
{
// Initiate load for the associated controller passing all parameters
TryLoadController(container, fromView, controller, url, parameters);
}
}
<summary>
Tries to execute the Load method of the specified controller using eventing.
</summary>
<param name="container">The container that loads the controller.</param>
<param name="fromView">The view that activated the navigation.</param>
<param name="controller">The controller to load.</param>
<param name="navigatedUri">A <see cref="String"/> that represents the uri used to navigate to the controller.</param>
<param name="parameters">The parameters to use with the controller's Load method.</param>
protected static void TryLoadController(MXContainer container, IMXView fromView, IMXController controller, string navigatedUri, Dictionary<string, string> parameters)
{
// set last navigation
container.LastNavigationDate = DateTime.Now;
container.LastNavigationUrl = navigatedUri;
container.<API key>(controller, fromView);
container.CancelLoad = false;
// synchronize load layer to prevent collisions on web-based targets.
lock (container)
{
// Console.WriteLine("InternalNavigate: Locked");
Action load = () =>
{
try
{
container.LoadController(fromView, controller, navigatedUri, parameters);
}
catch (Exception ex)
{
container.<API key>(controller, ex);
}
};
// if there is no synchronization, don't launch a new thread
if (container.ThreadedLoad)
{
// new thread to execute the Load() method for the layer
Device.Thread.QueueWorker(a => load());
}
else
{
load();
}
// Console.WriteLine("InternalNavigate: Unlocking");
}
}
private void LoadController(IMXView fromView, IMXController controller, string uri, Dictionary<string, string> parameters)
{
string perspective = controller.Load(uri, parameters);
// give the derived container the ability to do something
// with the fromView if it exists or to create it if it doesn't
<API key>(fromView, controller, CancelLoad ? null : perspective, uri);
// clear CancelLoad, we're done
CancelLoad = false;
}
<summary>
Cancels loading of the current controller and navigates to the specified url.
</summary>
<param name="url">The url of the controller to navigate to.</param>
public abstract void Redirect(string url);
<summary>
Gets the controller.
</summary>
<param name="url">The URL pattern of the controller.</param>
<param name="parameters">The parameters to load into the controller.</param>
<returns></returns>
<exception cref="System.<API key>">url</exception>
public virtual IMXController GetController(string url, ref Dictionary<string, string> parameters)
{
IMXController controller = null;
// return if no url provided
if (url == null)
throw new <API key>("url");
// initialize parameter dictionary if not provided
parameters = parameters ?? new Dictionary<string, string>();
// for debug
// Console.WriteLine("Navigating to: " + url);
// get map object
MXNavigation navigation = App.NavigationMap.MatchUrl(url);
// If there is no result, assume the URL is external and create a new Browser View
if (navigation != null)
{
controller = navigation.Controller;
navigation.ExtractParameters(url, parameters);
//Add default view parameters without overwriting current ones
if (navigation.Parameters != null)
{
foreach (var param in navigation.Parameters)
{
if (!parameters.ContainsKey(param.Key))
{
parameters.Add(param.Key, param.Value);
}
}
}
}
else
{
System.Diagnostics.Debug.WriteLine("No controller loaded for URI: " + url);
}
return controller;
}
<summary>
Renders the view described by the perspective.
</summary>
<param name="controller">The controller requesting the view.</param>
<param name="perspective">The perspective describing the view.</param>
public IMXView <API key>(IMXController controller, string perspective)
{
return <API key>(controller.ModelType, perspective, controller.GetModel());
}
<summary>
Renders the view described by the perspective.
</summary>
<param name="modelType">The type of the view's model.</param>
<param name="perspective">The perspective describing the view.</param>
<param name="model">The model for the view.</param>
public IMXView <API key>(Type modelType, string perspective, object model)
{
IMXView view = Views.GetOrCreateView(modelType, perspective);
if (view == null)
{
// No view perspective found for model
throw new ArgumentException("No View found for: " + perspective, "perspective");
}
view.SetModel(model);
view.Render();
return view;
}
#region Register/resolve
private static readonly NamedTypeMap TypeMap = new NamedTypeMap();
<summary>
Registers the specified abstract type and class type for <see cref="Resolve"/>.
</summary>
<typeparam name="T">The abstract type to associate with the class type.</typeparam>
<param name="nativeType">The type of the class to associate with the abstract type.</param>
public static void Register<T>(Type nativeType)
{
Register<T>(nativeType, null, (Func<object[], object>)null);
}
<summary>
Registers the specified abstract type and class type for <see cref="Resolve"/>.
</summary>
<typeparam name="T">The abstract type to associate with the class type.</typeparam>
<param name="namedInstance">An optional unique identifier for the abstract type.</param>
<param name="nativeType">The type of the class to associate with the abstract type.</param>
public static void Register<T>(Type nativeType, string namedInstance)
{
Register<T>(nativeType, namedInstance, (Func<object[], object>)null);
}
<summary>
Registers the specified abstract type and class type for <see cref="Resolve"/>.
</summary>
<typeparam name="T">The abstract type to associate with the class type.</typeparam>
<param name="nativeType">The type of the class to associate with the abstract type.</param>
<param name="initialization">A method that initializes the object.</param>
public static void Register<T>(Type nativeType, Func<object> initialization)
{
Register<T>(nativeType, null, initialization);
}
<summary>
Registers the specified abstract type and class type for <see cref="Resolve"/>.
</summary>
<typeparam name="T">The abstract type to associate with the class type.</typeparam>
<param name="namedInstance">An optional unique identifier for the abstract type.</param>
<param name="nativeType">The type of the class to associate with the abstract type.</param>
<param name="initialization">A method that initializes the object.</param>
public static void Register<T>(Type nativeType, string namedInstance, Func<object> initialization)
{
TypeMap.Register(typeof(T), nativeType, namedInstance, initialization, false);
}
<summary>
Registers the specified abstract type and class type for <see cref="Resolve"/>.
</summary>
<typeparam name="T">The abstract type to associate with the class type.</typeparam>
<param name="nativeType">The type of the class to associate with the abstract type.</param>
<param name="initialization">A method that initializes the object.</param>
public static void Register<T>(Type nativeType, Func<object[], object> initialization)
{
Register<T>(nativeType, null, initialization);
}
<summary>
Registers the specified abstract type and class type for <see cref="Resolve"/>.
</summary>
<typeparam name="T">The abstract type to associate with the class type.</typeparam>
<param name="namedInstance">An optional unique identifier for the abstract type.</param>
<param name="nativeType">The type of the class to associate with the abstract type.</param>
<param name="initialization">A method that initializes the object.</param>
public static void Register<T>(Type nativeType, string namedInstance, Func<object[], object> initialization)
{
TypeMap.Register(typeof(T), nativeType, namedInstance, initialization, false);
}
<summary>
Registers the specified abstract type and class type for <see cref="Resolve"/>.
</summary>
<param name="keyType">The key type to associate with the value type.</param>
<param name="nativeType">The type of the class to associate with the abstract type.</param>
public static void Register(Type keyType, Type nativeType)
{
Register(keyType, nativeType, null, (Func<object[], object>)null, false);
}
<summary>
Registers the specified abstract type and class type for <see cref="Resolve"/>.
</summary>
<param name="keyType">The key type to associate with the value type.</param>
<param name="nativeType">The type of the class to associate with the abstract type.</param>
<param name="namedInstance">An optional unique identifier for the abstract type.</param>
public static void Register(Type keyType, Type nativeType, string namedInstance)
{
Register(keyType, nativeType, namedInstance, (Func<object[], object>)null, false);
}
<summary>
Registers the specified abstract type and class type for <see cref="Resolve"/>.
</summary>
<param name="keyType">The key type to associate with the value type.</param>
<param name="nativeType">The type of the class to associate with the abstract type.</param>
<param name="initialization">A method that initializes the object.</param>
public static void Register(Type keyType, Type nativeType, Func<object> initialization)
{
Register(keyType, nativeType, null, initialization, false);
}
<summary>
Registers the specified abstract type and class type for <see cref="Resolve"/>.
</summary>
<param name="keyType">The key type to associate with the value type.</param>
<param name="nativeType">The type of the class to associate with the abstract type.</param>
<param name="namedInstance">An optional unique identifier for the abstract type.</param>
<param name="initialization">A method that initializes the object.</param>
public static void Register(Type keyType, Type nativeType, string namedInstance, Func<object> initialization)
{
Register(keyType, nativeType, namedInstance, initialization, false);
}
<summary>
Registers the specified key type and class type for <see cref="Resolve"/>.
</summary>
<param name="keyType">The key type to associate with the value type.</param>
<param name="namedInstance">An optional unique identifier for the key type.</param>
<param name="nativeType">The type of the class to associate with the key type.</param>
<param name="initialization">A method that initializes the object.</param>
<param name="singletonInstance"><c>true</c> to create and cache the instance; otherwise <c>false</c> to create every time.</param>
public static void Register(Type keyType, Type nativeType, string namedInstance, Func<object> initialization, bool singletonInstance)
{
TypeMap.Register(keyType, nativeType, namedInstance, initialization, singletonInstance);
}
<summary>
Registers the specified abstract type and class type for <see cref="Resolve"/>.
</summary>
<param name="keyType">The key type to associate with the value type.</param>
<param name="nativeType">The type of the class to associate with the abstract type.</param>
<param name="initialization">A method that initializes the object.</param>
public static void Register(Type keyType, Type nativeType, Func<object[], object> initialization)
{
Register(keyType, nativeType, null, initialization, false);
}
<summary>
Registers the specified abstract type and class type for <see cref="Resolve"/>.
</summary>
<param name="keyType">The key type to associate with the value type.</param>
<param name="nativeType">The type of the class to associate with the abstract type.</param>
<param name="namedInstance">An optional unique identifier for the abstract type.</param>
<param name="initialization">A method that initializes the object.</param>
public static void Register(Type keyType, Type nativeType, string namedInstance, Func<object[], object> initialization)
{
Register(keyType, nativeType, namedInstance, initialization, false);
}
<summary>
Registers the specified key type and class type for <see cref="Resolve"/>.
</summary>
<param name="keyType">The key type to associate with the value type.</param>
<param name="namedInstance">An optional unique identifier for the key type.</param>
<param name="nativeType">The type of the class to associate with the key type.</param>
<param name="initialization">A method that initializes the object.</param>
<param name="singletonInstance"><c>true</c> to create and cache the instance; otherwise <c>false</c> to create every time.</param>
public static void Register(Type keyType, Type nativeType, string namedInstance, Func<object[], object> initialization, bool singletonInstance)
{
TypeMap.Register(keyType, nativeType, namedInstance, initialization, singletonInstance);
}
<summary>
Registers the specified abstract type and class type for a singleton <see cref="Resolve"/>.
</summary>
<typeparam name="T">The abstract type to associate with the class type.</typeparam>
<param name="nativeType">The type of the class to associate with the abstract type.</param>
public static void RegisterSingleton<T>(Type nativeType)
{
RegisterSingleton<T>(nativeType, null, (Func<object[], object>)null);
}
<summary>
Registers the specified abstract type and class type for a singleton <see cref="Resolve"/>.
</summary>
<typeparam name="T">The abstract type to associate with the class type.</typeparam>
<param name="namedInstance">An optional unique identifier for the abstract type.</param>
<param name="nativeType">The type of the class to associate with the abstract type.</param>
public static void RegisterSingleton<T>(Type nativeType, string namedInstance)
{
RegisterSingleton<T>(nativeType, namedInstance, (Func<object[], object>)null);
}
<summary>
Registers the specified abstract type and class type for a singleton <see cref="Resolve"/>.
</summary>
<typeparam name="T">The abstract type to associate with the class type.</typeparam>
<param name="nativeType">The type of the class to associate with the abstract type.</param>
<param name="initialization">A method that initializes the object.</param>
public static void RegisterSingleton<T>(Type nativeType, Func<object> initialization)
{
RegisterSingleton<T>(nativeType, null, initialization);
}
<summary>
Registers the specified abstract type and class type for a singleton <see cref="Resolve"/>.
</summary>
<typeparam name="T">The abstract type to associate with the class type.</typeparam>
<param name="namedInstance">An optional unique identifier for the abstract type.</param>
<param name="nativeType">The type of the class to associate with the abstract type.</param>
<param name="initialization">A method that initializes the object.</param>
public static void RegisterSingleton<T>(Type nativeType, string namedInstance, Func<object> initialization)
{
TypeMap.Register(typeof(T), nativeType, namedInstance, initialization, true);
}
<summary>
Registers the specified abstract type and class type for a singleton <see cref="Resolve"/>.
</summary>
<typeparam name="T">The abstract type to associate with the class type.</typeparam>
<param name="nativeType">The type of the class to associate with the abstract type.</param>
<param name="initialization">A method that initializes the object.</param>
public static void RegisterSingleton<T>(Type nativeType, Func<object[], object> initialization)
{
RegisterSingleton<T>(nativeType, null, initialization);
}
<summary>
Registers the specified abstract type and class type for a singleton <see cref="Resolve"/>.
</summary>
<typeparam name="T">The abstract type to associate with the class type.</typeparam>
<param name="namedInstance">An optional unique identifier for the abstract type.</param>
<param name="nativeType">The type of the class to associate with the abstract type.</param>
<param name="initialization">A method that initializes the object.</param>
public static void RegisterSingleton<T>(Type nativeType, string namedInstance, Func<object[], object> initialization)
{
TypeMap.Register(typeof(T), nativeType, namedInstance, initialization, true);
}
<summary>
Registers the specified abstract type and class type for a singleton <see cref="Resolve"/>.
</summary>
<typeparam name="T">The abstract type to associate with the class type.</typeparam>
<param name="instance">The object to associate with the abstract type.</param>
public static void RegisterSingleton<T>(object instance)
{
RegisterSingleton<T>(instance, null);
}
<summary>
Registers the specified abstract type and class type for a singleton <see cref="Resolve"/>.
</summary>
<typeparam name="T">The abstract type to associate with the class type.</typeparam>
<param name="instance">The object to associate with the abstract type.</param>
<param name="namedInstance">An optional unique identifier for the abstract type.</param>
public static void RegisterSingleton<T>(object instance, string namedInstance)
{
TypeMap.Register(typeof(T), instance, namedInstance);
}
<summary>
Resolves the specified abstract type as a concrete instance.
</summary>
<param name="parameters">An array of constructor parameters for initialization.</param>
public static T Resolve<T>(params object[] parameters)
{
return Resolve<T>(null, parameters);
}
<summary>
Resolves the specified abstract type as a concrete instance.
</summary>
<param name="name">An optional unique identifier for the abstract type.</param>
<param name="parameters">An array of constructor parameters for initialization.</param>
public static T Resolve<T>(string name, params object[] parameters)
{
return (T)Resolve(typeof(T), name, parameters);
}
<summary>
Resolves the specified abstract type as a concrete instance.
</summary>
<param name="type">The abstract type to resolve.</param>
<param name="name">An optional unique identifier for the abstract type.</param>
<param name="parameters">An array of constructor parameters for initialization.</param>
public static object Resolve(Type type, string name, params object[] parameters)
{
return TypeMap.Resolve(type, name, parameters);
}
#endregion
}
} |
namespace System.Management.Instrumentation
{
using System;
using System.Reflection;
using System.Collections;
using System.Text.RegularExpressions;
using System.Management;
using System.Globalization;
<summary>
<para>Specifies that this assembly provides management instrumentation. This attribute should appear one time per assembly.</para>
</summary>
<remarks>
<para>For more information about using attributes, see <see topic="<API key>" title="Extending Metadata Using Attributes"/> .</para>
</remarks>
[AttributeUsage(AttributeTargets.Assembly)]
public class <API key> : Attribute
{
string namespaceName;
string securityDescriptor;
<overload>
Initializes a new instance
of the <see cref='System.Management.Instrumentation.<API key>'/> class.
</overload>
<summary>
<para>Initializes a new instance of the <see cref='System.Management.Instrumentation.<API key>'/>
class that is set for the root\default namespace. This is the default constructor.</para>
</summary>
public <API key>() : this(null, null) {}
<summary>
<para>Initializes a new instance of the <see cref='System.Management.Instrumentation.<API key>'/> class that is set to the specified namespace for instrumentation within this assembly.</para>
</summary>
<param name='namespaceName'>The namespace for instrumentation instances and events.</param>
public <API key>(string namespaceName) : this(namespaceName, null) {}
<summary>
<para>Initializes a new instance of the <see cref='System.Management.Instrumentation.<API key>'/> class that is set to the specified namespace and security settings for instrumentation within this assembly.</para>
</summary>
<param name='namespaceName'>The namespace for instrumentation instances and events.</param>
<param name='securityDescriptor'> A security descriptor that allows only the specified users or groups to run applications that provide the instrumentation supported by this assembly.</param>
public <API key>(string namespaceName, string securityDescriptor)
{
if(namespaceName != null)
namespaceName = namespaceName.Replace('/', '\\');
if(namespaceName == null || namespaceName.Length == 0)
namespaceName = "root\\default"; // bug#60933 Use a default namespace if null
bool once = true;
foreach(string namespacePart in namespaceName.Split('\\'))
{
if( namespacePart.Length == 0
|| (once && String.Compare(namespacePart, "root", StringComparison.OrdinalIgnoreCase) != 0) // Must start with 'root'
|| !Regex.Match(namespacePart, @"^[a-z,A-Z]").Success // All parts must start with letter
|| Regex.Match(namespacePart, @"_$").Success // Must not end with an underscore
|| Regex.Match(namespacePart, @"[^a-z,A-Z,0-9,_,\u0080-\uFFFF]").Success) // Only letters, digits, or underscores
{
ManagementException.<API key>(ManagementStatus.InvalidNamespace);
}
once = false;
}
this.namespaceName = namespaceName;
this.securityDescriptor = securityDescriptor;
}
<summary>
<para>Gets or sets the namespace for instrumentation instances and events in this assembly.</para>
</summary>
<value>
<para>If not specified, the default namespace will be set as "\\.\root\default".
Otherwise, a string indicating the name of the namespace for instrumentation
instances and events in this assembly.</para>
</value>
<remarks>
It is highly recommended that the namespace name be specified by the
assembly, and that it should be a unique namespace per assembly, or per
application. Having a specific namespace for each assembly or
application instrumentation allows more granularity for securing access to
instrumentation provided by different assemblies or applications.
</remarks>
public string NamespaceName
{
get { return namespaceName == null ? string.Empty : namespaceName; }
}
<summary>
<para> Gets or sets a security descriptor that allows only the specified users or groups to run
applications that provide the instrumentation supported by this assembly.</para>
</summary>
<value>
<para>
If null, the default value is defined to include the
following security groups : <see langword='Local Administrators'/>, <see langword='Local System'/>, <see langword='Local Service'/>, <see langword='Network Service'/> and <see langword='Batch Logon'/>. This will only allow
members of these security groups
to publish data and fire events from this assembly.</para>
<para>Otherwise, this is a string in SDDL format representing the security
descriptor that defines which users and groups can provide instrumentation data
and events from this application.</para>
</value>
<remarks>
<para>Users or groups not specified in this
security descriptor may still run the application, but cannot provide
instrumentation from this assembly.</para>
</remarks>
<example>
<para>The SDDL representing the default set of security groups defined above is as
follows :</para>
<para>O:BAG:BAD:(A;;0x10000001;;;BA)(A;;0x10000001;;;SY)(A;;0x10000001;;;LA)(A;;0x10000001;;;S-1-5-20)(A;;0x10000001;;;S-1-5-19)</para>
<para>To add the <see langword='Power Users'/> group to the users allowed to fire events or publish
instances from this assembly, the attribute should be specificed as
follows :</para>
<para>[Instrumented("root\\MyApplication", "O:BAG:BAD:(A;;0x10000001;;;BA)(A;;0x10000001;;;SY)(A;;0x10000001;;;LA)(A;;0x10000001;;;S-1-5-20)(A;;0x10000001;;;S-1-5-19)(A;;0x10000001;;;PU)")]</para>
</example>
public string SecurityDescriptor
{
get
{
// This will never return an empty string. Instead, it will
// return null, or a non-zero length string
if(null == securityDescriptor || securityDescriptor.Length == 0)
return null;
return securityDescriptor;
}
}
internal static <API key> GetAttribute(Assembly assembly)
{
Object [] rg = assembly.GetCustomAttributes(typeof(<API key>), false);
if(rg.Length > 0)
return ((<API key>)rg[0]);
return new <API key>();
}
internal static Type[] <API key>(Assembly assembly)
{
ArrayList types = new ArrayList();
// The recursion has been moved to the parent level to avoid ineffiency of wading through all types
// at each stage of recursion. Also, the recursive method has been replaced with the more correct:
// <API key> method (see comments on header).
foreach (Type type in assembly.GetTypes())
{
if (<API key>(type))
{
<API key>(types, type);
}
}
return (Type[])types.ToArray(typeof(Type));
}
// Recursive function that adds the type to the array and recurses on the parent type. The end condition
// is either no parent type or a parent type which is not marked as instrumented.
static void <API key>(ArrayList types, Type childType)
{
if (types.Contains(childType) == false)
{
Type parentType = <API key>.<API key>(childType) ;
// If we have a instrumented base type and it has not already
// been included in the list of instrumented types
// traverse the inheritance hierarchy.
if (parentType != null)
{
<API key>(types, parentType);
}
types.Add(childType);
}
}
static bool <API key>(Type type)
{
return (null != <API key>.GetAttribute(type));
}
}
<summary>
<para>Specifies the type of instrumentation provided by a class.</para>
</summary>
<example>
<code lang='C#'>using System;
using System.Management;
using System.Configuration.Install;
using System.Management.Instrumentation;
// This example demonstrates how to create a Management Event class by using
// the <API key> attribute and to fire a Management Event from
// managed code.
// Specify which namespace the Management Event class is created in
[assembly:Instrumented("Root/Default")]
// Let the system know you will run InstallUtil.exe utility against
// this assembly
[System.ComponentModel.RunInstaller(true)]
public class MyInstaller : <API key> {}
// Create a Management Instrumentation Event class
[<API key>(InstrumentationType.Event)]
public class MyEvent
{
public string EventName;
}
public class <API key>
{
public static void Main() {
MyEvent e = new MyEvent();
e.EventName = "Hello";
// Fire a Management Event
Instrumentation.Fire(e);
return;
}
}
</code>
<code lang='VB'>Imports System
Imports System.Management
Imports System.Configuration.Install
Imports System.Management.Instrumentation
' This sample demonstrates how to create a Management Event class by using
' the <API key> attribute and to fire a Management Event from
' managed code.
' Specify which namespace the Manaegment Event class is created in
<assembly: Instrumented("Root/Default")>
' Let the system know InstallUtil.exe utility will be run against
' this assembly
<System.ComponentModel.RunInstaller(True)> _
Public Class MyInstaller
Inherits <API key>
End Class 'MyInstaller
' Create a Management Instrumentation Event class
<<API key>(InstrumentationType.Event)> _
Public Class MyEvent
Public EventName As String
End Class
Public Class <API key>
Public Shared Function Main(args() As String) As Integer
Dim e As New MyEvent()
e.EventName = "Hello"
' Fire a Management Event
Instrumentation.Fire(e)
Return 0
End Function
End Class
</code>
</example>
public enum InstrumentationType
{
<summary>
<para>Specifies that the class provides instances for management instrumentation.</para>
</summary>
Instance,
<summary>
<para>Specifies that the class provides events for management instrumentation.</para>
</summary>
Event,
<summary>
<para>Specifies that the class defines an abstract class for management instrumentation.</para>
</summary>
Abstract
}
<summary>
Specifies that a class provides event or instance instrumentation.
</summary>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct)]
public class <API key> : Attribute
{
InstrumentationType instrumentationType;
string <API key>;
<overload>
Initializes a new instance
of the <see cref='System.Management.Instrumentation.<API key>'/> class.
</overload>
<summary>
<para>Initializes a new instance of the <see cref='System.Management.Instrumentation.<API key>'/> class that is used if this type is derived from another type that has the <see cref='System.Management.Instrumentation.<API key>'/> attribute, or if this is a
top-level instrumentation class (for example, an instance or abstract class
without a base class, or an event derived from <see langword='__ExtrinsicEvent'/>).</para>
</summary>
<param name='instrumentationType'>The type of instrumentation provided by this class.</param>
public <API key>(InstrumentationType instrumentationType)
{
this.instrumentationType = instrumentationType;
}
<summary>
<para>Initializes a new instance of the <see cref='System.Management.Instrumentation.<API key>'/> class that
has schema for an existing base class. The class must contain
proper member definitions for the properties of the existing
WMI base class.</para>
</summary>
<param name='instrumentationType'>The type of instrumentation provided by this class.</param>
<param name='<API key>'>The name of the base class.</param>
public <API key>(InstrumentationType instrumentationType, string <API key>)
{
this.instrumentationType = instrumentationType;
this.<API key> = <API key>;
}
<summary>
<para>Gets or sets the type of instrumentation provided by this class.</para>
</summary>
<value>
Contains an <see cref='System.Management.Instrumentation.InstrumentationType'/> value that
indicates whether this is an instrumented event, instance or abstract class.
</value>
public InstrumentationType InstrumentationType
{
get { return instrumentationType; }
}
<summary>
<para>Gets or sets the name of the base class of this instrumentation class.</para>
</summary>
<value>
<para>If not null, this string indicates the WMI baseclass that this class inherits
from in the CIM schema.</para>
</value>
public string <API key>
{
get
{
// This will never return an empty string. Instead, it will
// return null, or a non-zero length string
if(null == <API key> || <API key>.Length == 0)
return null;
return <API key>;
}
}
internal static <API key> GetAttribute(Type type)
{
// We don't want BaseEvent or Instance to look like that have an 'InstrumentedClass' attribute
if(type == typeof(BaseEvent) || type == typeof(Instance))
return null;
// We will inherit the 'InstrumentedClass' attribute from a base class
Object [] rg = type.GetCustomAttributes(typeof(<API key>), true);
if(rg.Length > 0)
return ((<API key>)rg[0]);
return null;
}
<summary>
<para>Displays the <see langword='Type'/> of the base class.</para>
</summary>
<param name='type'></param>
<returns>
<para>The <see langword='Type'/> of the base class, if this class is derived from another
instrumentation class; otherwise, null.</para>
</returns>
internal static Type <API key>(Type type)
{
// If the BaseType has a <API key> attribute,
// we return the BaseType
if(GetAttribute(type.BaseType) != null)
return type.BaseType;
return null;
}
}
<summary>
<para>Allows an instrumented class, or member of an instrumented class,
to present an alternate name through management instrumentation.</para>
</summary>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method)]
public class <API key> : Attribute
{
string name;
<summary>
<para>Gets the name of the managed entity.</para>
</summary>
<value>
Contains the name of the managed entity.
</value>
public string Name
{
get { return name ; }
}
<summary>
<para>Initializes a new instance of the <see cref='System.Management.Instrumentation.<API key>'/> class that allows the alternate name to be specified
for the type, field, property, method, or parameter to which this attribute is applied.</para>
</summary>
<param name='name'>The alternate name for the type, field, property, method, or parameter to which this attribute is applied.</param>
public <API key>(string name)
{
this.name = name;
}
internal static string GetMemberName(MemberInfo member)
{
// This works for all sorts of things: Type, MethodInfo, PropertyInfo, FieldInfo
Object [] rg = member.GetCustomAttributes(typeof(<API key>), false);
if(rg.Length > 0)
{
// bug#69115 - if null or empty string are passed, we just ignore this attribute
<API key> attr = (<API key>)rg[0];
if(attr.name != null && attr.name.Length != 0)
return attr.name;
}
return member.Name;
}
internal static string GetBaseClassName(Type type)
{
<API key> attr = <API key>.GetAttribute(type);
string name = attr.<API key>;
if(name != null)
return name;
// Get managed base type's attribute
<API key> attrParent = <API key>.GetAttribute(type.BaseType);
// If the base type does not have a <API key> attribute,
// return a base type based on the InstrumentationType
if(null == attrParent)
{
switch(attr.InstrumentationType)
{
case InstrumentationType.Abstract:
return null;
case InstrumentationType.Instance:
return null;
case InstrumentationType.Event:
return "__ExtrinsicEvent";
default:
break;
}
}
// Our parent was also a managed provider type. Use it's managed name.
return GetMemberName(type.BaseType);
}
}
<summary>
<para>Allows a particular member of an instrumented class to be ignored
by management instrumentation</para>
</summary>
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Method)]
public class <API key> : Attribute
{
}
#if <API key>
<summary>
<para>[To be supplied.]</para>
</summary>
[AttributeUsage(AttributeTargets.Field)]
public class <API key> : Attribute
{
internal static <API key> GetAttribute(FieldInfo field)
{
Object [] rg = field.GetCustomAttributes(typeof(<API key>), false);
if(rg.Length > 0)
return ((<API key>)rg[0]);
return null;
}
}
#endif
#if <API key>
[AttributeUsage(AttributeTargets.Field)]
internal class <API key> : Attribute
{
Object defaultValue;
public <API key>(Object defaultValue)
{
this.defaultValue = defaultValue;
}
public static Object <API key>(FieldInfo field)
{
Object [] rg = field.GetCustomAttributes(typeof(<API key>), false);
if(rg.Length > 0)
return ((<API key>)rg[0]).defaultValue;
return null;
}
}
#endif
#if <API key>
[AttributeUsage(AttributeTargets.Field)]
internal class <API key> : Attribute
{
Type type;
public <API key>(Type type)
{
this.type = type;
}
public static Type GetManagedType(FieldInfo field)
{
Object [] rg = field.GetCustomAttributes(typeof(<API key>), false);
if(rg.Length > 0)
return ((<API key>)rg[0]).type;
return field.FieldType;
}
}
#endif
} |
/**
* `Polymer.IronMenuBehavior` implements accessible menu behavior.
*
* @demo demo/index.html
* @polymerBehavior Polymer.IronMenuBehavior
*/
Polymer.<API key> = {
properties: {
/**
* Returns the currently focused item.
* @type {?Object}
*/
focusedItem: {
observer: '_focusedItemChanged',
readOnly: true,
type: Object
},
/**
* The attribute to use on menu items to look up the item title. Typing the first
* letter of an item when the menu is open focuses that item. If unset, `textContent`
* will be used.
*/
attrForItemTitle: {
type: String
}
},
hostAttributes: {
'role': 'menu',
'tabindex': '0'
},
observers: [
'<API key>(multi)'
],
listeners: {
'focus': '_onFocus',
'keydown': '_onKeydown',
'iron-items-changed': '_onIronItemsChanged'
},
keyBindings: {
'up': '_onUpKey',
'down': '_onDownKey',
'esc': '_onEscKey',
'shift+tab:keydown': '_onShiftTabDown'
},
attached: function() {
this._resetTabindices();
},
/**
* Selects the given value. If the `multi` property is true, then the selected state of the
* `value` will be toggled; otherwise the `value` will be selected.
*
* @param {string} value the value to select.
*/
select: function(value) {
if (this._defaultFocusAsync) {
this.cancelAsync(this._defaultFocusAsync);
this._defaultFocusAsync = null;
}
var item = this._valueToItem(value);
if (item && item.hasAttribute('disabled')) return;
this._setFocusedItem(item);
Polymer.<API key>.select.apply(this, arguments);
},
/**
* Resets all tabindex attributes to the appropriate value based on the
* current selection state. The appropriate value is `0` (focusable) for
* the default selected item, and `-1` (not keyboard focusable) for all
* other items.
*/
_resetTabindices: function() {
var selectedItem = this.multi ? (this.selectedItems && this.selectedItems[0]) : this.selectedItem;
this.items.forEach(function(item) {
item.setAttribute('tabindex', item === selectedItem ? '0' : '-1');
}, this);
},
/**
* Sets appropriate ARIA based on whether or not the menu is meant to be
* multi-selectable.
*
* @param {boolean} multi True if the menu should be multi-selectable.
*/
<API key>: function(multi) {
if (multi) {
this.setAttribute('<API key>', 'true');
} else {
this.removeAttribute('<API key>');
}
},
/**
* Given a KeyboardEvent, this method will focus the appropriate item in the
* menu (if there is a relevant item, and it is possible to focus it).
*
* @param {KeyboardEvent} event A KeyboardEvent.
*/
<API key>: function(event) {
for (var i = 0, item; item = this.items[i]; i++) {
var attr = this.attrForItemTitle || 'textContent';
var title = item[attr] || item.getAttribute(attr);
if (title && title.trim().charAt(0).toLowerCase() === String.fromCharCode(event.keyCode).toLowerCase()) {
this._setFocusedItem(item);
break;
}
}
},
/**
* Focuses the previous item (relative to the currently focused item) in the
* menu.
*/
_focusPrevious: function() {
var length = this.items.length;
var index = (Number(this.indexOf(this.focusedItem)) - 1 + length) % length;
this._setFocusedItem(this.items[index]);
},
/**
* Focuses the next item (relative to the currently focused item) in the
* menu.
*/
_focusNext: function() {
var index = (Number(this.indexOf(this.focusedItem)) + 1) % this.items.length;
this._setFocusedItem(this.items[index]);
},
/**
* Mutates items in the menu based on provided selection details, so that
* all items correctly reflect selection state.
*
* @param {Element} item An item in the menu.
* @param {boolean} isSelected True if the item should be shown in a
* selected state, otherwise false.
*/
_applySelection: function(item, isSelected) {
if (isSelected) {
item.setAttribute('aria-selected', 'true');
} else {
item.removeAttribute('aria-selected');
}
Polymer.<API key>._applySelection.apply(this, arguments);
},
/**
* Discretely updates tabindex values among menu items as the focused item
* changes.
*
* @param {Element} focusedItem The element that is currently focused.
* @param {?Element} old The last element that was considered focused, if
* applicable.
*/
_focusedItemChanged: function(focusedItem, old) {
old && old.setAttribute('tabindex', '-1');
if (focusedItem) {
focusedItem.setAttribute('tabindex', '0');
focusedItem.focus();
}
},
/**
* A handler that responds to mutation changes related to the list of items
* in the menu.
*
* @param {CustomEvent} event An event containing mutation records as its
* detail.
*/
_onIronItemsChanged: function(event) {
var mutations = event.detail;
var mutation;
var index;
for (index = 0; index < mutations.length; ++index) {
mutation = mutations[index];
if (mutation.addedNodes.length) {
this._resetTabindices();
break;
}
}
},
/**
* Handler that is called when a shift+tab keypress is detected by the menu.
*
* @param {CustomEvent} event A key combination event.
*/
_onShiftTabDown: function(event) {
var oldTabIndex;
Polymer.<API key>._shiftTabPressed = true;
oldTabIndex = this.getAttribute('tabindex');
this.setAttribute('tabindex', '-1');
this.async(function() {
this.setAttribute('tabindex', oldTabIndex);
Polymer.<API key>._shiftTabPressed = false;
// NOTE(cdata): polymer/polymer#1305
}, 1);
},
/**
* Handler that is called when the menu receives focus.
*
* @param {FocusEvent} event A focus event.
*/
_onFocus: function(event) {
if (Polymer.<API key>._shiftTabPressed) {
return;
}
// do not focus the menu itself
this.blur();
// clear the cached focus item
this._setFocusedItem(null);
this._defaultFocusAsync = this.async(function() {
// focus the selected item when the menu receives focus, or the first item
// if no item is selected
var selectedItem = this.multi ? (this.selectedItems && this.selectedItems[0]) : this.selectedItem;
if (selectedItem) {
this._setFocusedItem(selectedItem);
} else {
this._setFocusedItem(this.items[0]);
}
// async 100ms to wait for `select` to get called from `_itemActivate`
}, 100);
},
/**
* Handler that is called when the up key is pressed.
*
* @param {CustomEvent} event A key combination event.
*/
_onUpKey: function(event) {
// up and down arrows moves the focus
this._focusPrevious();
},
/**
* Handler that is called when the down key is pressed.
*
* @param {CustomEvent} event A key combination event.
*/
_onDownKey: function(event) {
this._focusNext();
},
/**
* Handler that is called when the esc key is pressed.
*
* @param {CustomEvent} event A key combination event.
*/
_onEscKey: function(event) {
// esc blurs the control
this.focusedItem.blur();
},
/**
* Handler that is called when a keydown event is detected.
*
* @param {KeyboardEvent} event A keyboard event.
*/
_onKeydown: function(event) {
if (this.<API key>(event, 'up down esc')) {
return;
}
// all other keys focus the menu item starting with that character
this.<API key>(event);
}
};
Polymer.<API key>._shiftTabPressed = false;
/** @polymerBehavior Polymer.IronMenuBehavior */
Polymer.IronMenuBehavior = [
Polymer.<API key>,
Polymer.<API key>,
Polymer.<API key>
]; |
import {_XPathResult} from './index'
function isWordHtml(html) {
return /(class="?Mso|style=(?:"|')[^"]*?\bmso-|w:WordDocument|<o:\w+>|<\/font>)/.test(
html
)
}
export default (html, doc) => {
if (!isWordHtml(html)) {
return doc
}
// xPaths for elements that will be removed from the document |
title: UVA
date: 2011-04-27 07:17:00 +0800
layout: post
published: true
comments: true
category:
moveForm: baidu_qing
<div> <p><a target="_blank" rel="nofollow" href="http: |
/**
* Class for Sign Dump
*
* @author sanjay nair (sanjaysn@usc.edu)
* @version
* 03/12/2006 - Created
*/
#ifndef __SIGNDUMP_H__
#define __SIGNDUMP_H__
#include "basedump.h"
class SignDump : public BaseDump {
public:
/**
* C'tor.
*
* @param filePath File path
*/
SignDump( const std::string filePath, const std::string soPath );
/**
* Virtual D'tor.
*/
virtual ~SignDump();
/**
* Dumps the output (based on input file or stdin)
*/
virtual int dump();
private:
/**
* Gets the signed SHA-1 signature for the file.
*
* @param strSign Signed string
*/
int getSignedStr( std::string & strSign ) const;
};
#endif //__SIGNDUMP_H__ |
package au.id.cxd.math.model.network.activation
import breeze.linalg.DenseMatrix
class Identity() extends Activation {
/**
* the activation function applies to the input matrix.
*
* @param h
* @return
*/
override def apply(h: DenseMatrix[Double]): DenseMatrix[Double] = h
/**
* derivative of the activation function
*
* @param h
* @return
*/
override def derivative(h: DenseMatrix[Double]): DenseMatrix[Double] =
DenseMatrix.tabulate(h.rows, h.cols) {
case (i, j) =>
if (h(i, j) > 0) 1.0
else -1.0
}
}
object Identity {
def apply() = new Identity()
} |
#ifndef nealcoin_NOUI_H
#define nealcoin_NOUI_H
extern void noui_connect();
#endif // nealcoin_NOUI_H |
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Source Themes Academia 4.3.1">
<meta name="generator" content="Hugo 0.74.0" />
<meta name="author" content="Athanassios I. Hatzis, PhD">
<meta name="description" content="Healthy Information Systems/Services">
<link rel="alternate" hreflang="en-us" href="https://healis.eu/en/tags/<API key>/">
<meta name="theme-color" content="hsl(339, 90%, 68%)">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/academicons/1.8.6/css/academicons.min.css" integrity="<API key>+<API key>=" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.0/css/all.css" integrity="<API key>+h" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.2.5/jquery.fancybox.min.css" integrity="<API key>+U5S2idbLtxs=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.6/styles/gruvbox-dark.min.css" crossorigin="anonymous" title="hl-light">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.6/styles/gruvbox-dark.min.css" crossorigin="anonymous" title="hl-dark" disabled>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700|Open+Sans|Roboto+Mono&display=swap">
<link rel="stylesheet" href="/css/academia.min.<API key>.css">
<script>
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', 'UA-24920503-2', 'auto');
ga('require', 'eventTracker');
ga('require', 'outboundLinkTracker');
ga('require', 'urlChangeTracker');
ga('send', 'pageview');
</script>
<script async src="
<script async src="https://cdnjs.cloudflare.com/ajax/libs/autotrack/2.4.1/autotrack.js" integrity="<API key>+QuFYy/k7eLI5jdeEy/<API key>+g==" crossorigin="anonymous"></script>
<link rel="alternate" href="/en/tags/<API key>/index.xml" type="application/rss+xml" title="HEALIS">
<link rel="feed" href="/en/tags/<API key>/index.xml" type="application/rss+xml" title="HEALIS">
<link rel="manifest" href="/site.webmanifest">
<link rel="icon" type="image/png" href="/img/icon.png">
<link rel="apple-touch-icon" type="image/png" href="/img/icon-192.png">
<link rel="canonical" href="https://healis.eu/en/tags/<API key>/">
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:site" content="@healiseu">
<meta property="twitter:creator" content="@healiseu">
<meta property="og:site_name" content="HEALIS">
<meta property="og:url" content="https://healis.eu/en/tags/<API key>/">
<meta property="og:title" content="<API key> | HEALIS">
<meta property="og:description" content="Healthy Information Systems/Services"><meta property="og:image" content="https://healis.eu/img/<API key>.png">
<meta property="twitter:image" content="https://healis.eu/img/<API key>.png"><meta property="og:locale" content="en-us">
<meta property="og:updated_time" content="2004-01-01T00:00:00+00:00">
<title><API key> | HEALIS</title>
</head>
<body id="top" data-spy="scroll" data-target="#TableOfContents" data-offset="71" class="dark">
<aside class="search-results" id="search">
<div class="container">
<section class="search-header">
<div class="row no-gutters <API key> mb-3">
<div class="col-6">
<h1>Search</h1>
</div>
<div class="col-6 col-search-close">
<a class="js-search" href="#"><i class="fas fa-times-circle text-muted" aria-hidden="true"></i></a>
</div>
</div>
<div id="search-box">
<input name="q" id="search-query" placeholder="Search..." autocapitalize="off"
autocomplete="off" autocorrect="off" role="textbox" spellcheck="false" type="search">
</div>
</section>
<section class="<API key>">
<div id="search-hits">
</div>
</section>
</div>
</aside>
<nav class="navbar navbar-light fixed-top navbar-expand-lg py-0" id="navbar-main">
<div class="container">
<a class="navbar-brand" href="/en/"><img src="/img/<API key>.png" alt="HEALIS"></a>
<button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation"><span><i class="fas fa-bars"></i></span>
</button>
<div class="collapse navbar-collapse" id="navbar">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link " href="/en/#home"><span>Home</span></a>
</li>
<li class="nav-item">
<a class="nav-link " href="/en/about/"><span>About</span></a>
</li>
<li class="nav-item">
<a class="nav-link " href="/en/hmorph/"><span>HyperMorph</span></a>
</li>
<li class="nav-item">
<a class="nav-link " href="/en/s3dm/"><span>S3DM</span></a>
</li>
<li class="nav-item">
<a class="nav-link " href="/en/#projects"><span>Projects</span></a>
</li>
<li class="nav-item">
<a class="nav-link " href="/en/post/"><span>Posts</span></a>
</li>
<li class="nav-item">
<a class="nav-link " href="/en/talk/"><span>Talks</span></a>
</li>
<li class="nav-item">
<a class="nav-link " href="/en/terms/"><span>Terms</span></a>
</li>
<li class="nav-item">
<a class="nav-link " href="/en/contact/"><span>Contact</span></a>
</li>
<li class="nav-item">
<a class="nav-link js-search" href="#"><i class="fas fa-search" aria-hidden="true"></i></a>
</li>
<li class="nav-item">
<a class="nav-link js-dark-toggle" href="#"><i class="fas fa-moon" aria-hidden="true"></i></a>
</li>
</ul>
</div>
</div>
</nav>
<div class="universal-wrapper py-3">
<h1 itemprop="name"><API key></h1>
</div>
</div>
</div>
<div class="universal-wrapper">
<div>
<h2><a href="/en/project/staptk/">STAPTK</a></h2>
<div class="article-style">
Computer-based speech training system for improving articulation based on real-time audio-visual feedback and utterances evaluation.
</div>
</div>
<div>
<h2><a href="/en/project/stardust/">STARDUST</a></h2>
<div class="article-style">
NHS project assists dysarthric speakers to improve the consistency of their spoken commands in order to control a speech driven environmental device.
</div>
</div>
<div>
<h2><a href="/en/project/oltk/">OLT</a></h2>
<div class="article-style">
PhD project, real-time, computer-based, audio-visual feedback training method for articulation
</div>
</div>
<div>
<h2><a href="/en/project/vahisom/">VAHISOM</a></h2>
<div class="article-style">
MSc dissertation project exploring the use of Kohonen’s <API key> in visualising the phonemic trajectory
</div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="<API key>=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.imagesloaded/4.1.4/imagesloaded.pkgd.min.js" integrity="<API key>/<API key>=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.isotope/3.0.6/isotope.pkgd.min.js" integrity="<API key>/iI=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.2.5/jquery.fancybox.min.js" integrity="sha256-X5PoE3KU5l+JcX+w09p/<API key>=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.6/highlight.min.js" integrity="<API key>/1c8s1dgkYPQ8=" crossorigin="anonymous"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.6/languages/r.min.js"></script>
<script id="dsq-count-scr" src="//healiseu.disqus.com/count.js" async></script>
<script>hljs.<API key>();</script>
<script>
const <API key> = "/en/index.json";
const i18n = {
'placeholder': "Search...",
'results': "results found",
'no_results': "No results found"
};
const content_type = {
'post': "Posts",
'project': "Projects",
'publication' : "Publications",
'talk' : "Talks"
};
</script>
<script id="<API key>" type="text/x-template">
<div class="search-hit" id="summary-{{key}}">
<div class="search-hit-content">
<div class="search-hit-name">
<a href="{{relpermalink}}">{{title}}</a>
<div class="article-metadata search-hit-type">{{type}}</div>
<p class="<API key>">{{snippet}}</p>
</div>
</div>
</div>
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js" integrity="<API key>+<API key>=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/jquery.mark.min.js" integrity="<API key>=" crossorigin="anonymous"></script>
<script src="/js/academia.min.<API key>.js"></script>
<div class="container">
<footer class="site-footer">
<div class="container">
<div class="row">
<div class="col-md-6">
<p>
© HEALIS - Athanassios I. Hatzis, 2020 ·
Powered by
<a href="https://themefisher.com" target="_blank" rel="noopener">themefisher</a> for
<a href="https://gohugo.io" target="_blank" rel="noopener">Hugo</a>.
</p>
</div>
<div class="col-md-6">
<ul class="list-inline network-icon text-right">
<li class="list-inline-item">
<a href="https://github.com/healiseu/" target="_blank" rel="noopener" title="Star Me"><i class="fab fa-github" aria-hidden="true"></i></a>
</li>
<li class="list-inline-item">
<a href="https://twitter.com/healiseu" target="_blank" rel="noopener" title="DM Me"><i class="fab fa-<TwitterConsumerkey>="true"></i></a>
</li>
<li class="list-inline-item">
<a href="https:
</li>
<li class="list-inline-item">
<a href="https://linkedin.com/in/athanassios" target="_blank" rel="noopener" title="Connect with Me"><i class="fab fa-linkedin" aria-hidden="true"></i></a>
</li>
<li class="list-inline-item">
<a href="https:
</li>
<li class="list-inline-item">
<a href="skype:athanassios.hatzis?call" title="Skype Me"><i class="fab fa-skype" aria-hidden="true"></i></a>
</li>
<li class="list-inline-item">
<a href="https:
</li>
<li class="list-inline-item">
<a href="https://disqus.com/home/forums/healiseu/" target="_blank" rel="noopener" title="Discuss on Disqus"><i class="fas fa-comments" aria-hidden="true"></i></a>
</li>
</ul>
</div>
</div>
</div>
</footer>
</div>
<div id="modal" class="modal fade" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Cite</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<pre><code class="tex hljs"></code></pre>
</div>
<div class="modal-footer">
<a class="btn btn-outline-primary my-1 js-copy-cite" href="#" target="_blank">
<i class="fas fa-copy"></i> Copy
</a>
<a class="btn btn-outline-primary my-1 js-download-cite" href="#" target="_blank">
<i class="fas fa-download"></i> Download
</a>
<div id="modal-error"></div>
</div>
</div>
</div>
</div>
</body>
</html> |
package ru.otus.korneev.hmw04.util;
import com.sun.management.<API key>;
import javax.management.NotificationEmitter;
import javax.management.<API key>;
import javax.management.openmbean.CompositeData;
import java.lang.management.*;
import java.util.HashMap;
import java.util.Map;
public class MemoryUtil {
private static Map<String, InfoAboutGC> info;
static {
info = new HashMap<>();
info.put("Young GC", new InfoAboutGC());
info.put("Old GC", new InfoAboutGC());
}
private static <API key> gcHandler = (notification, handback) -> {
if (notification.getType().equals(<API key>.<API key>)) {
<API key> gcInfo = <API key>.from((CompositeData) notification.getUserData());
if (gcInfo.getGcAction().equals("end of minor GC")) {
InfoAboutGC inf = info.get("Young GC");
inf.incrementCount();
inf.sumTime(gcInfo.getGcInfo().getDuration());
} else if (gcInfo.getGcAction().equals("end of major GC")) {
InfoAboutGC inf = info.get("Old GC");
inf.incrementCount();
inf.sumTime(gcInfo.getGcInfo().getDuration());
}
}
};
public static void startGCMonitor() {
for (<API key> mBean : ManagementFactory.<API key>()) {
switch (mBean.getName()) {
case "Copy":
case "PS Scavenge":
case "ParNew":
case "G1 Young Generation":
info.get("Young GC").setNameGC(mBean.getName());
break;
case "MarkSweepCompact":
case "PS MarkSweep":
case "ConcurrentMarkSweep":
case "G1 Old Generation":
info.get("Old GC").setNameGC(mBean.getName());
break;
}
((NotificationEmitter) mBean).<API key>(gcHandler, null, null);
}
}
public static void printResult() {
System.out.println(info.get("Young GC"));
System.out.println(info.get("Old GC"));
}
} |
/* global describe, it */
const { PassThrough } = require('stream')
const { strictEqual } = require('assert')
const irc = require('slate-irc')
const twitch = require('../src/twitch')
describe('User colour', function () {
describe('color', () => {
it('sends a .color privmsg to Twitch', done => {
let stream = PassThrough()
let client = irc(stream)
client.use(twitch())
stream.on('data', line => {
strictEqual(line, 'PRIVMSG #channel :.color #ff00ff\r\n')
done()
})
client.color('#channel', '#ff00ff')
})
})
}) |
package com.onemightyroar.campfire.api;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.List;
import org.apache.http.client.methods.HttpRequestBase;
import org.apache.http.params.BasicHttpParams;
import org.apache.http.params.HttpParams;
import org.json.JSONException;
import org.json.JSONObject;
import com.onemightyroar.campfire.api.factory.ResourceFactory;
import com.onemightyroar.campfire.api.http.HttpConnection;
import com.onemightyroar.campfire.api.http.URLBuilder;
import com.onemightyroar.campfire.api.models.Account;
import com.onemightyroar.campfire.api.models.Message;
import com.onemightyroar.campfire.api.models.Room;
import com.onemightyroar.campfire.api.models.Upload;
import com.onemightyroar.campfire.api.models.User;
import com.onemightyroar.campfire.api.stream.MessageStream;
import com.onemightyroar.campfire.api.stream.<API key>;
public class CampfireApi {
private final String host;
private HttpConnection httpConnection;
private final ResourceFactory resourceFactory;
/**
* Constructor.
* @param accountName (required) your Campfire account name.
*/
public CampfireApi(String accountName) {
this.host = accountName + ".campfirenow.com";
if(accountName.equals("")) {
throw new RuntimeException();
}
this.httpConnection = new HttpConnection("X", "X");
this.resourceFactory = new ResourceFactory(this);
}
/**
* Constructor.
* @param accountName (required) your Campfire account name.
* @param authToken (required)
*/
public CampfireApi(String accountName, String authToken) {
this.host = accountName + ".campfirenow.com";
if(accountName.equals("")) {
throw new RuntimeException();
}
this.httpConnection = new HttpConnection(authToken, "X");
this.resourceFactory = new ResourceFactory(this);
}
/**
* Constructor for use with getMe(). This method is deprecated.<br><br>
* Instead you should use the {@link com.onemightyroar.campfire.api.CampfireApi#CampfireApi(String) Basic Constructor}
* and {@link com.onemightyroar.campfire.api.CampfireApi#getMe(String, String) getMe}. You can use the response
* with {@link com.onemightyroar.campfire.api.CampfireApi#setAuthToken(String) setAuthToken} to make additional calls.
* @param accountName (required) your Campfire account name.
* @param username (required)
* @param password (required)
*/
@Deprecated
public CampfireApi(String accountName, String username, String password) {
this.host = accountName + ".campfirenow.com";
if(accountName.equals("")) {
throw new RuntimeException();
}
this.httpConnection = new HttpConnection(username, password);
this.resourceFactory = new ResourceFactory(this);
}
public HttpConnection getConnection() {
return this.httpConnection;
}
/**
* Sets the auth token to be used to authenticate http requests
* @param authToken
*/
public void setAuthToken(String authToken) {
this.httpConnection = new HttpConnection(authToken, "X");
}
/**
* Get the user's account
*
* @return the room
*/
public Account getAccount() {
URLBuilder url = new URLBuilder(host, "/account.json");
String httpResult = httpConnection.doGet(url.toURL());
return resourceFactory.buildAccount(httpResult);
}
/**
* Begin a stream of messages.
*
* @param room
* @param handler
*
* @return the room
*/
public MessageStream messages(Long roomId, <API key> handler)
throws IOException {
//build get params
HttpParams getParams = new BasicHttpParams();
//send request
HttpRequestBase conn = httpConnection.buildConnection("https://streaming.campfirenow.com/room/" + Long.toString(roomId) + "/live.json", getParams);
return new MessageStream(conn, handler, this);
}
/**
* Begin a stream of messages.
*
* This method accepts a room object. It will maintain the room object's list
* of active and inactive users. The <API key>'s "enter" and "leave"
* methods will be used to let you know when users enter and leave.
*
* @param room
* @param handler
*
* @return the room
*/
public MessageStream messages(Room room, <API key> handler)
throws IOException {
//build get params
HttpParams getParams = new BasicHttpParams();
//send request
HttpRequestBase conn = httpConnection.buildConnection("https://streaming.campfirenow.com/room/" + room.getId() + "/live.json", getParams);
return new MessageStream(conn, handler, this, room);
}
/**
* Get a room and its users details
* @param roomId
* @return the room
*/
public Room getRoom(Long roomId) {
URLBuilder url = new URLBuilder(host, "/room/" + Long.toString(roomId) + ".json");
String httpResult = httpConnection.doGet(url.toURL());
return resourceFactory.buildRoom(httpResult);
}
/**
* Get all the rooms for the user
* @return a list of rooms
*/
public List<Room> getRooms() {
URLBuilder url = new URLBuilder(host, "/rooms.json");
String httpResult = httpConnection.doGet(url.toURL());
return resourceFactory.buildRooms(httpResult);
}
/**
* Get all the rooms that the user is currently in
* @return a list of rooms
*/
public List<Room> getPresence() {
URLBuilder url = new URLBuilder(host, "/presence.json");
String httpResult = httpConnection.doGet(url.toURL());
return resourceFactory.buildRooms(httpResult);
}
/**
* posts an upload to a room
* @param roomId
* @return the upload
*/
public Upload postUpload(Long roomId, InputStream fileInputStream, String fileName, String mimeType) {
URLBuilder url = new URLBuilder(host, "/room/" + Long.toString(roomId) + "/uploads.json");
String httpResult = httpConnection.doPostUpload(url.toURL(), fileInputStream, fileName, mimeType);
return resourceFactory.buildUpload(httpResult);
}
/**
* gets recently uploads files by room id
* @param roomId
* @return the list of uploads
*/
public List<Upload> getUploads(Long roomId) {
URLBuilder url = new URLBuilder(host, "/room/" + Long.toString(roomId) + "/uploads.json");
String httpResult = httpConnection.doGet(url.toURL());
return resourceFactory.buildUploads(httpResult);
}
/**
* Update the name or topic of a toom
* @param roomId
* @param name The name of the room
* @param topic The room's topic
* @return success
*/
public boolean updateRoom(Long roomId, String name, String topic) {
URLBuilder url = new URLBuilder(host, "/room/" + Long.toString(roomId) + ".json");
JSONObject roomDetails = new JSONObject();
JSONObject request = new JSONObject();
try {
roomDetails.put("name", name);
roomDetails.put("topic", topic);
request.put("room", roomDetails);
} catch (JSONException e) {
e.printStackTrace();
return false;
}
boolean success = true;
try{
httpConnection.doPut(url.toURL(), request.toString());
}catch(ApiException e) {
success = false;
}
return success;
}
/**
* Get the recent messages from a room
* @param roomId
* @return a list of rooms
*/
public List<Message> getRecentMessages(Long roomId) {
URLBuilder url = new URLBuilder(host, "/room/" + Long.toString(roomId) + "/recent.json");
String httpResult = httpConnection.doGet(url.toURL());
return resourceFactory.buildMessages(httpResult);
}
/**
* Get the recent messages from a room
*
* This method takes a room object. If a message object contains a user ID that is not within the room's
* active or inactive user list, it will get that user and add them to the room.
*
* @param room
* @return a list of rooms
*/
public List<Message> getRecentMessages(Room room) {
URLBuilder url = new URLBuilder(host, "/room/" + Long.toString(room.getId()) + "/recent.json");
String httpResult = httpConnection.doGet(url.toURL());
return resourceFactory.buildMessages(httpResult, room);
}
/**
* Gets the upload from an upload message
* @param roomId
* @param messageId
* @return a list of rooms
*/
public Upload getMessageUpload(Long roomId, Long messageId) {
URLBuilder url = new URLBuilder(host, "/room/" + Long.toString(roomId) + "/messages/" + messageId + "/upload.json");
String httpResult = httpConnection.doGet(url.toURL());
return resourceFactory.buildUpload(httpResult);
}
/**
* Joins a room
* @param roomId
* @return success
*/
public boolean joinRoom(Long roomId) {
URLBuilder url = new URLBuilder(host, "/room/" + Long.toString(roomId) + "/join.json");
return emptyPost(url.toURL());
}
/**
* Leaves a room
* @param roomId
* @return success
*/
public boolean leaveRoom(Long roomId) {
URLBuilder url = new URLBuilder(host, "/room/" + Long.toString(roomId) + "/leave.json");
return emptyPost(url.toURL());
}
/**
* Locks a room
* @param roomId
* @return success
*/
public boolean lockRoom(Long roomId) {
URLBuilder url = new URLBuilder(host, "/room/" + Long.toString(roomId) + "/lock.json");
return emptyPost(url.toURL());
}
/**
* Unlocks a room
* @param roomId
* @return success
*/
public boolean unlockRoom(Long roomId) {
URLBuilder url = new URLBuilder(host, "/room/" + Long.toString(roomId) + "/unlock.json");
return emptyPost(url.toURL());
}
/**
* Searches for messages
* @param term The search term
* @return success
*/
public List<Message> searchMessages(String term) {
URLBuilder url = new URLBuilder(host, "/search/" + term + ".json");
String httpResult = httpConnection.doGet(url.toURL());
return resourceFactory.buildMessages(httpResult);
}
/**
* Posts a message
* @param messageId
* @return success
*/
public Message postMessage(Long roomId, String type, String message) {
URLBuilder url = new URLBuilder(host, "/room/" + Long.toString(roomId) + "/speak.json");
JSONObject messageDetails = new JSONObject();
JSONObject request = new JSONObject();
try {
messageDetails.put("type", type);
messageDetails.put("body", message);
request.put("message", messageDetails);
} catch (JSONException e) {
e.printStackTrace();
return null;
}
try{
String httpResult = httpConnection.doPost(url.toURL(), request.toString());
return resourceFactory.buildMessage(httpResult);
}catch(ApiException e) {
return null;
}
}
/**
* Stars a message
* @param messageId
* @return success
*/
public boolean addMessageStar(Long messageId) {
URLBuilder url = new URLBuilder(host, "/messages/" + Long.toString(messageId) + "/star.json");
return emptyPost(url.toURL());
}
/**
* Unstars a message
* @param messageId
* @return success
*/
public boolean deleteMessageStar(Long messageId) {
URLBuilder url = new URLBuilder(host, "/messages/" + Long.toString(messageId) + "/star.json");
return emptyDelete(url.toURL());
}
/**
* Gets the days full transcript for a room
* @param roomId
* @return success
*/
public List<Message> getTodaysTranscript(Long roomId) {
URLBuilder url = new URLBuilder(host, "/room/" + Long.toString(roomId) + "/transcript.json");
String httpResult = httpConnection.doGet(url.toURL());
return resourceFactory.buildMessages(httpResult);
}
/**
* Searches for messages
* @param roomId
* @param year
* @param month
* @param day
* @return success
*/
public List<Message> getTranscript(Long roomId, int year, int month, int day) {
URLBuilder url = new URLBuilder(host, "/room/" + Long.toString(roomId) + "/transcript/"+Integer.toString(year) +"/"+Integer.toString(month)+"/"+Integer.toString(day)+".json");
String httpResult = httpConnection.doGet(url.toURL());
return resourceFactory.buildMessages(httpResult, null);
}
/**
* Searches for messages (manages users for you)
* @param room
* @param year
* @param month
* @param day
* @return success
*/
public List<Message> getTranscript(Room room, int year, int month, int day) {
URLBuilder url = new URLBuilder(host, "/room/" + Long.toString(room.getId()) + "/transcript/"+Integer.toString(year) +"/"+Integer.toString(month)+"/"+Integer.toString(day)+".json");
String httpResult = httpConnection.doGet(url.toURL());
return resourceFactory.buildMessages(httpResult, room);
}
/**
* Gets a user
* @param userId
* @return success
*/
public User getUser(Long userId) {
URLBuilder url = new URLBuilder(host, "/users/" + Long.toString(userId) +".json");
String httpResult = httpConnection.doGet(url.toURL());
return resourceFactory.buildUser(httpResult);
}
/**
* Gets the current user. If the AuthToken hasn't been set yet, you should use
* {@link com.onemightyroar.campfire.api.CampfireApi#getMe(String, String) getMe(String, String)}
* @return success
*/
public User getMe() {
URLBuilder url = new URLBuilder(host, "/users/me.json");
String httpResult = httpConnection.doGet(url.toURL());
return resourceFactory.buildUser(httpResult);
}
/**
* Gets the current user with the provided username and password.
* @return success
*/
public User getMe(String username, String password) {
this.httpConnection = new HttpConnection(username, password);
URLBuilder url = new URLBuilder(host, "/users/me.json");
String httpResult = httpConnection.doGet(url.toURL());
return resourceFactory.buildUser(httpResult);
}
/**
* performs an empty post to a specified URL
* @return success
*/
private boolean emptyPost(URL url) {
boolean success = true;
try{
httpConnection.doPost(url, "-");
}catch(ApiException e) {
success = false;
}
return success;
}
/**
* performs an empty delete to a specified URL
* @return success
*/
private boolean emptyDelete(URL url) {
boolean success = true;
try{
httpConnection.doDelete(url);
}catch(ApiException e) {
success = false;
}
return success;
}
/**
* pings the room to keep the user active
* @return success
*/
public void pingRoom(Long roomId) {
URLBuilder url = new URLBuilder(host, "/room/" + Long.toString(roomId) + "/ping");
emptyPost(url.toURL());
//httpConnection.doGet(url.toURL());
}
} |
package x7c1.linen.database.mixin
import org.junit.Assert.assertEquals
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.annotation.Config
import org.robolectric.{<API key>, RuntimeEnvironment}
import org.scalatest.junit.JUnitSuiteLike
import x7c1.linen.database.control.DatabaseHelper
import x7c1.linen.database.struct.PresetLabel
import x7c1.wheat.modern.database.QueryExplainer
@Config(manifest=Config.NONE)
@RunWith(classOf[<API key>])
class <API key> extends JUnitSuiteLike {
@Test
def testPlan() = {
val context = RuntimeEnvironment.application
val helper = new DatabaseHelper(context)
val db = helper.getReadableDatabase
val query = TaggedAccountRecord select PresetLabel
val plans = QueryExplainer(db).explain(query)
// plans foreach println
assertEquals("USE TEMP B-TREE",
false, plans.exists(_.useTempBtree))
}
} |
package uk.co.ticklethepanda.genetic_algorithms.binary_functions.n5;
import uk.co.ticklethepanda.genetic_algorithms.genetics.GeneticAlgorithm;
import uk.co.ticklethepanda.genetic_algorithms.genetics.SimulationVariables;
public class <API key> {
public static final int GENERATIONS = 1000;
public static final int POOL_SIZE = 10;
public static final int ELITE_SAVE = 1;
public static final int NUMBER_OF_PARENTS = 2;
public static final float REPLACE_RATE = 0.1f;
public static final float MUTATION_RATE = 0.5f;
public static final int <API key> = 100;
public static void main(String args[]) {
SimulationVariables sv = new SimulationVariables(ELITE_SAVE,
MUTATION_RATE, REPLACE_RATE, GENERATIONS, NUMBER_OF_PARENTS,
<API key>);
<API key> bsf = new <API key>(POOL_SIZE);
<API key> bff = new <API key>();
GeneticAlgorithm<N5BinarySolution> ga = new GeneticAlgorithm<N5BinarySolution>(
bsf, bff, sv);
ga.runAlgorithm();
ga.getBest().printSolution();
}
} |
(function() {
var http;
http = require("http");
exports.importFeeds = function(options, cb) {
var parse_api;
parse_api = require("./parse-api")(options);
return http.get(options.feed_url, function(res) {
var body;
body = "";
res.on("data", function(chunk) {
body += chunk;
});
return res.on("end", function() {
var feeds, handleFeed;
feeds = JSON.parse(body).sets;
handleFeed = function(index) {
return parse_api.insertCard(feeds[index], function(err, data) {
if (err) {
return cb(err);
} else {
console.log(index);
if (index < feeds.length - 1) {
return handleFeed(index + 1);
} else {
return cb(null, data);
}
}
});
};
return handleFeed(0);
});
}).on("error", function(e) {
return cb(e);
});
};
}).call(this); |
# Subreddit Monitor
This is just a really simple script that I was testing. It will be used in a larger project.
It simply:
1) Gets the RSS feed of multiple subreddits eg [https:
3) Grabs the ID of the newest thread
4) Prints a message and performs an action when a newer thread appears
5) Sleeps 5 seconds
6) Repeats
This project is not pip installable
## Configure
One or more subreddits can be monitored.
This is controlled via `reddit_data.json`. It maps a name of a subreddit to the last id that was recorded.
By default the file should be named `reddit_data.json` and be in the cwd.
This will be automatically rewritten when new data is found.
json
[
{
"last_id": null,
"name": "news"
},
{
"last_id": null,
"name": "aww"
}
]
Environment Variables
- `<API key>` controls logging level eg `DEBUG`, `INFO`, `ERROR`
- `<API key>` seconds to sleep before checking next subreddit eg `5`, `120`
- Warning: Anything less than `5` may cause errors
- `<API key>` absolute path to reddit data file eg `/Users/foo.bar/Documents/reddit_data.json`
## Using this project
This is just a sample project, so you should download the source code and modify it to fit your needs.
Logic is in `subreddit_monitor/__main__.py` and you can simply modify `_on_new_entry()` to get started.
## Requirements
Python 3.5 or 2.7
requests |
$message = Get-NewResource message
[System.Web.HttpUtility]::UrlEncode($message) |
// reviews reducer
import { combineReducers } from 'redux'
import { <API key>, <API key> } from '../actions/iceCreams'
import { ADD_REVIEW, ADD_REVIEW_SUCCESS, ADD_REVIEW_ERROR } from '../actions/reviews'
import { ADD_COMMENT_SUCCESS } from '../actions/comments'
export function byId(state={}, action) {
switch (action.type) {
case <API key>:
let reviews = action.data.reviews
let nextState = Object.assign({}, state)
reviews.forEach((review) => {
nextState[review.id] = review
})
return nextState
case ADD_REVIEW_SUCCESS:
return {
state,
[action.data.id]: action.data
}
case ADD_COMMENT_SUCCESS:
var review = state[action.data.review_id]
var updatedReview = Object.assign({}, review)
updatedReview.comments.push(action.data)
// TODO: Refactor this
return {
state,
[action.data.review_id]: updatedReview
}
default:
return state
}
}
function allIds(state=[], action) {
switch (action.type) {
case <API key>:
let reviews = action.data.reviews
let reviewIds = reviews.map((review) => review.id)
return [...state, reviewIds]
case ADD_REVIEW_SUCCESS:
return [...state, action.data.id]
default:
return state
}
}
function isLoading(state=true, action) {
switch (action.type) {
case ADD_REVIEW:
return true
case ADD_REVIEW_SUCCESS:
return false
case ADD_REVIEW_ERROR:
return false
default:
return state
}
}
function errors(state=[], action) {
switch (action.type) {
case ADD_REVIEW_ERROR:
return action.errors
default:
return []
}
}
export const reviews = combineReducers({
byId,
allIds,
isLoading,
errors
}) |
.panel-heading a {
text-decoration: none;
cursor: pointer;
}
.panel-heading a.adf-handle-outer {
cursor: move;
cursor: grab;
cursor: -moz-grab;
cursor: -webkit-grab;
} |
function bubbleSort(arr) {
var len = arr.length;
for(var i=0; i<len-1; i++) {
for(var j=0; j<len-i-1; j++) {
if (arr[j] > arr[j+1]) {
var temp;
temp = arr[j];
arr[j] = arr[j+1];
arr[j+1] = temp;
}
}
}
return arr;
}
module.exports = bubbleSort; |
A chain of navigation items represented as links.
## Features
## Usage
The items are made up of a label (`<API key>`) and
divider (`<API key>`). The label can be an anchor element
or a span.
[basic example](/demo/example.html)
## Classes
- `vclBreadcrumbNav`
- `<API key>`
- `<API key>`
## Modifiers
- `vclSelected`: To be used on the selected list item.
## Variables
- `--<API key>`
- `--<API key>`
- `--<API key>`
- `--<API key>`
## Demo
[example.html](/demo/example.html) on GH-pages. |
using Microsoft.Graphics.Canvas.Effects;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Composition;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Media;
namespace UWPBank.UI
{
public sealed class BackdropBlurBrush : <API key>
{
public static readonly DependencyProperty BlurAmountProperty = DependencyProperty.Register(
"BlurAmount",
typeof(double),
typeof(BackdropBlurBrush),
new PropertyMetadata(0.0, new <API key>(OnBlurAmountChanged)
)
);
public double BlurAmount
{
get { return (double)GetValue(BlurAmountProperty); }
set { SetValue(BlurAmountProperty, value); }
}
private static void OnBlurAmountChanged(DependencyObject d, <API key> e)
{
var brush = (BackdropBlurBrush)d;
// Unbox and set a new blur amount if the CompositionBrush exists.
brush.CompositionBrush?.Properties.InsertScalar("Blur.BlurAmount", (float)(double)e.NewValue);
}
public BackdropBlurBrush()
{
}
protected override void OnConnected()
{
// Delay creating composition resources until they're required.
if (CompositionBrush == null)
{
var backdrop = Window.Current.Compositor.CreateBackdropBrush();
// Use a Win2D blur affect applied to a <API key>.
var graphicsEffect = new GaussianBlurEffect
{
Name = "Blur",
BlurAmount = (float)this.BlurAmount,
Source = new <API key>("backdrop")
};
var effectFactory = Window.Current.Compositor.CreateEffectFactory(graphicsEffect, new[] { "Blur.BlurAmount" });
var effectBrush = effectFactory.CreateBrush();
effectBrush.SetSourceParameter("backdrop", backdrop);
CompositionBrush = effectBrush;
}
}
protected override void OnDisconnected()
{
// Dispose of composition resources when no longer in use.
if (CompositionBrush != null)
{
CompositionBrush.Dispose();
CompositionBrush = null;
}
}
}
} |
using System;
using Figlotech.Core.I18n;
namespace Figlotech.Core {
public class <API key> : <API key> {
public string <API key> => "Tentativas de login excedidas, aguarde {0} minutos(s).";
public string AUTH_USER_NOT_FOUND => "Usuário e/ou senha incorreto(s)";
public string <API key> => "Usuário e/ou senha incorreto(s)";
public string AUTH_USER_BLOCKED => "Usuário bloqueado";
public string <API key> => "Senha e confirmação precisam ser idênticas.";
public string <API key> => "Usuário já existe";
public string <API key> => "Não foi possível resolver o tipo '{0}'";
public string <API key> => "SmartCopy não pode copiar de um repositório para ele mesmo.";
public string <API key> => "Erro ao verificar a estrutura.";
public string <API key> => "Não foi possivel conectar ao RDBMS: {0}";
}
} |
<<<< HEAD
Create a tag [Wordle](http:
**Visit [the web app](http://timc.idv.tw/wordcloud/).**
Copyright 2011, 2013 [Timothy Guan-tin Chien](http://timdream.org/) and other contributors.
Released under [the MIT license](./MIT-LICENSE.txt).
## Libraries used
Understand more on how this web application works by following the links below:
* [wordcloud2.js](https://github.com/timdream/wordcloud2.js) - standalone library for the "word cloud" on canvas.
* [wordfreq](https://github.com/timdream/wordfreq) - text corpus calculation in Javascript (with Web Workers)
* [<API key>](https://github.com/timdream/<API key>) - Login with Google using OAuth2 for client-side web app
## Acknowledgement
* Christopher McKenzie for Javascript implementation of [Porter Stemming Algorithm](http://tartarus.org/~martin/PorterStemmer/) (used in wordfreq)
* [Bootstrap UI framework](http://twitter.github.io/bootstrap/) (CSS only)
* [Google Feed API](https://developers.google.com/feed/)
* [MediaWiki API](https://en.wikipedia.org/w/api.php) running on Wikipedia
* [Facebook Javascript SDK](https:
* [Google+ API](https://developers.google.com/+/api/) available in JSON-P
* [Imgur API](https://api.imgur.com/) with free anonymous CORS image sharing
## Contributors
Understand how to contribute by reading [./CONTRIBUTE.md](CONTRIBUTE.md).
* [Grassboy Wu](https://github.com/Grassboy) for helping some of the work in the rewrite version
* [Yuren Ju](https://github.com/yurenju) for initial version of Facebook status fetching support
## Build
See [./PRODUCTION.md](PRODUCTION.md) for instructions.
====
# production
a
>>>> <SHA1-like> |
<div class="bs-docs-section">
<h1 id="scrollspy" class="page-header">ScrollSpy <small>scrollspy.js</small></h1>
<h2 id="scrollspy-examples">Example in navbar</h2>
<p>The ScrollSpy plugin is for automatically updating nav targets based on scroll position. Scroll the area below the navbar and watch the active class change. The dropdown sub items will be highlighted as well.</p>
<div class="bs-example" data-example-id="embedded-scrollspy">
<nav id="navbar-example2" class="navbar navbar-default navbar-static">
<div class="container-fluid">
<div class="navbar-header">
<button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target=".<API key>">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Project Name</a>
</div>
<div class="collapse navbar-collapse <API key>">
<ul class="nav navbar-nav">
<li><a href="#fat">@fat</a></li>
<li><a href="#mdo">@mdo</a></li>
<li class="dropdown">
<a href="#" id="navbarDrop1" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a>
<ul class="dropdown-menu" aria-labelledby="navbarDrop1">
<li><a href="#one">one</a></li>
<li><a href="#two">two</a></li>
<li role="separator" class="divider"></li>
<li><a href="#three">three</a></li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<div data-spy="scroll" data-target="#navbar-example2" data-offset="0" class="scrollspy-example">
<h4 id="fat">@fat</h4>
<p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p>
<h4 id="mdo">@mdo</h4>
<p>Veniam marfa mustache skateboard, adipisicing fugiat velit pitchfork beard. Freegan beard aliqua cupidatat mcsweeney's vero. Cupidatat four loko nisi, ea helvetica nulla carles. Tattooed cosby sweater food truck, mcsweeney's quis non freegan vinyl. Lo-fi wes anderson +1 sartorial. Carles non aesthetic exercitation quis gentrify. Brooklyn adipisicing craft beer vice keytar deserunt.</p>
<h4 id="one">one</h4>
<p>Occaecat commodo aliqua delectus. Fap craft beer deserunt skateboard ea. Lomo bicycle rights adipisicing banh mi, velit ea sunt next level locavore single-origin coffee in magna veniam. High life id vinyl, echo park consequat quis aliquip banh mi pitchfork. Vero VHS est adipisicing. Consectetur nisi DIY minim messenger bag. Cred ex in, sustainable delectus consectetur fanny pack iphone.</p>
<h4 id="two">two</h4>
<p>In incididunt echo park, officia deserunt mcsweeney's proident master cleanse thundercats sapiente veniam. Excepteur VHS elit, proident shoreditch +1 biodiesel laborum craft beer. Single-origin coffee wayfarers irure four loko, cupidatat terry richardson master cleanse. Assumenda you probably haven't heard of them art party fanny pack, tattooed nulla cardigan tempor ad. Proident wolf nesciunt sartorial keffiyeh eu banh mi sustainable. Elit wolf voluptate, lo-fi ea portland before they sold out four loko. Locavore enim nostrud mlkshk brooklyn nesciunt.</p>
<h4 id="three">three</h4>
<p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p>
<p>Keytar twee blog, culpa messenger bag marfa whatever delectus food truck. Sapiente synth id assumenda. Locavore sed helvetica cliche irony, thundercats you probably haven't heard of them consequat hoodie gluten-free lo-fi fap aliquip. Labore elit placeat before they sold out, terry richardson proident brunch nesciunt quis cosby sweater pariatur keffiyeh ut helvetica artisan. Cardigan craft beer seitan readymade velit. VHS chambray laboris tempor veniam. Anim mollit minim commodo ullamco thundercats.
</p>
</div>
</div><!-- /example -->
<h2 id="scrollspy-usage">Usage</h2>
<div class="bs-callout bs-callout-warning" id="<API key>">
<h4>Requires OU ICE nav</h4>
<p>Scrollspy currently requires the use of a <a href="../components/#nav">OU ICE nav component</a> for proper highlighting of active links.</p>
</div>
<div class="bs-callout bs-callout-danger" id="<API key>">
<h4>Resolvable ID targets required</h4>
<p>Navbar links must have resolvable id targets. For example, a <code><a href="#home">home</a></code> must correspond to something in the DOM like <code><div id="home"></div></code>.</p>
</div>
<div class="bs-callout bs-callout-info" id="<API key>">
<h4>Non-<code>:visible</code> target elements ignored</h4>
<p>Target elements that are not <a href="http://api.jquery.com/visible-selector/"><code>:visible</code> according to jQuery</a> will be ignored and their corresponding nav items will never be highlighted.</p>
</div>
<h3>Requires relative positioning</h3>
<p>No matter the implementation method, scrollspy requires the use of <code>position: relative;</code> on the element you're spying on. In most cases this is the <code><body></code>. When scrollspying on elements other than the <code><body></code>, be sure to have a <code>height</code> set and <code>overflow-y: scroll;</code> applied.</p>
<h3>Via data attributes</h3>
<p>To easily add scrollspy behavior to your topbar navigation, add <code>data-spy="scroll"</code> to the element you want to spy on (most typically this would be the <code><body></code>). Then add the <code>data-target</code> attribute with the ID or class of the parent element of any OU ICE <code>.nav</code> component.</p>
{% highlight css %}
body {
position: relative;
}
{% endhighlight %}
{% highlight html %}
<body data-spy="scroll" data-target="#navbar-example">
<div id="navbar-example">
<ul class="nav nav-tabs" role="tablist">
</ul>
</div>
</body>
{% endhighlight %}
<h3>Via JavaScript</h3>
<p>After adding <code>position: relative;</code> in your CSS, call the scrollspy via JavaScript:</p>
{% highlight js %}
$('body').scrollspy({ target: '#navbar-example' })
{% endhighlight %}
<h3 id="scrollspy-methods">Methods</h3>
<h4><code>.scrollspy('refresh')</code></h4>
<p>When using scrollspy in conjunction with adding or removing of elements from the DOM, you'll need to call the refresh method like so:</p>
{% highlight js %}
$('[data-spy="scroll"]').each(function () {
var $spy = $(this).scrollspy('refresh')
})
{% endhighlight %}
<h3 id="scrollspy-options">Options</h3>
<p>Options can be passed via data attributes or JavaScript. For data attributes, append the option name to <code>data-</code>, as in <code>data-offset=""</code>.</p>
<div class="table-responsive">
<table class="table table-bordered table-striped js-options-table">
<thead>
<tr>
<th>Name</th>
<th>type</th>
<th>default</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>offset</td>
<td>number</td>
<td>10</td>
<td>Pixels to offset from top when calculating position of scroll.</td>
</tr>
</tbody>
</table>
</div><!-- ./bs-table-responsive -->
<h3 id="scrollspy-events">Events</h3>
<div class="table-responsive">
<table class="table table-bordered table-striped bs-events-table">
<thead>
<tr>
<th>Event Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>activate.bs.scrollspy</td>
<td>This event fires whenever a new item becomes activated by the scrollspy.</td>
</tr>
</tbody>
</table>
</div><!-- ./bs-table-responsive -->
{% highlight js %}
$('#myScrollspy').on('activate.bs.scrollspy', function () {
})
{% endhighlight %}
</div> |
<div class="cp-header-display">
<div class="close-button" ng-click="mainCtrl.closePane()">
<img src="../../../app/icons/arrow-25-16.png" >
</div>
<div uib-dropdown is-open="homeCtrl.dropDownStatus.isopen">
<div class="cp-greeting" type="button" uib-dropdown-toggle ng-disabled="disabled">
Hi, {{homeCtrl.authentication.user.username}} <span class="caret"></span>
</div>
<ul class="dropdown-menu right" uib-dropdown-menu role="menu" aria-labelledby="single-button">
<li role="menuitem" ng-click="homeCtrl.goToPage(homeCtrl.apiEndPoint)" ><a href="#">Open Clipto.co</a></li>
<li class="divider"></li>
<li role="menuitem" ng-click="homeCtrl.goToPage(homeCtrl.apiEndPoint+'/auth/signout')"><a href="#">Log Out</a></li>
</ul>
</div>
</div> |
#ifndef A4988_H
#define A4988_H
#include <Arduino.h>
#include "BasicStepperDriver.h"
class A4988 : public BasicStepperDriver {
protected:
static const uint8_t ms_table[];
int ms1_pin = PIN_UNCONNECTED;
int ms2_pin = PIN_UNCONNECTED;
int ms3_pin = PIN_UNCONNECTED;
void init(void);
// tA STEP minimum, HIGH pulse width (1us)
static const int step_high_min = 1;
// tB STEP minimum, LOW pulse width (1us)
static const int step_low_min = 1;
// wakeup time, nSLEEP inactive to STEP (1000us)
static const int wakeup_time = 1000;
// also 200ns between ENBL/DIR/MSx changes and STEP HIGH
public:
// microstep range (1, 16, 32 etc)
static const unsigned max_microstep = 16;
/*
* Basic connection: only DIR, STEP are connected.
* Microstepping controls should be hardwired.
*/
A4988(int steps, int dir_pin, int step_pin);
/*
* Fully wired. All the necessary control pins for A4988 are connected.
*/
A4988(int steps, int dir_pin, int step_pin, int ms1_pin, int ms2_pin, int ms3_pin);
unsigned setMicrostep(unsigned microsteps);
};
#endif A4988_H |
FROM osixia/tinc:0.2.3
ARG ETCD_VERSION=3.3.10
# Install multiple process stack from baseimage
RUN apt-get -y update \
&& /container/tool/<API key> \
&& LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -y --<API key> \
ca-certificates \
curl \
&& /container/tool/<API key> :ssl-tools \
&& curl -o etcd.tar.gz -SL https://github.com/coreos/etcd/releases/download/v${ETCD_VERSION}/etcd-v${ETCD_VERSION}-linux-amd64.tar.gz \
&& tar -zxvf etcd.tar.gz etcd-v${ETCD_VERSION}-linux-amd64/etcdctl \
&& mv etcd-v${ETCD_VERSION}-linux-amd64/etcdctl /usr/sbin/etcdctl \
&& chmod +x /usr/sbin/etcdctl \
&& rm -rf etcd-v${ETCD_VERSION}-linux-amd64 etcd.tar.gz \
&& apt-get remove -y --purge --auto-remove curl ca-certificates \
&& apt-get clean \ |
# GUI
# python for tkinter nature
from tkinter import *
class Application(Frame):
def __init__(self,master=None):
Frame.__init__(self,master)
self.pack()
self.createWidgets()
def createWidgets(self):
self.helloLabel=Label(self,text='Hello World')
self.helloLabel.pack()
self.quitButton = Button(self,text='Quit app')
self.quitButton.pack()
app = Application()
app.master.title('Hello world gui')
app.mainloop() |
const requireDir = require('require-dir');
requireDir('./tasks'); |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>mathcomp-algebra: Not compatible </title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="stylesheet">
<link href="../../../../../bootstrap-custom.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<script src="../../../../../moment.min.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]
</head>
<body>
<div class="container">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="../..">clean / released</a></li>
<li class="active"><a href="">8.7.2 / mathcomp-algebra - 1.12.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
mathcomp-algebra
<small>
1.12.0
<span class="label label-info">Not compatible </span>
</small>
</h1>
<p> <em><script>document.write(moment("2022-03-08 19:39:34 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-03-08 19:39:34 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-num base Num library distributed with the OCaml compiler
base-threads base
base-unix base
camlp5 7.14 <API key> of OCaml
conf-findutils 1 Virtual package relying on findutils
conf-perl 2 Virtual package relying on perl
coq 8.7.2 Formal proof management system
num 0 The Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.03.0 The OCaml compiler (virtual package)
ocaml-base-compiler 4.03.0 Official 4.03.0 release
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.3 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "Mathematical Components <mathcomp-dev@sympa.inria.fr>"
homepage: "https://math-comp.github.io/"
bug-reports: "https://github.com/math-comp/math-comp/issues"
dev-repo: "git+https://github.com/math-comp/math-comp.git"
license: "CECILL-B"
build: [ make "-C" "mathcomp/algebra" "-j" "%{jobs}%" "COQEXTRAFLAGS+=-native-compiler yes" {coq-native:installed & coq:version < "8.13~" } ]
install: [ make "-C" "mathcomp/algebra" "install" ]
depends: [ "<API key>" { = version } ]
tags: [ "keyword:algebra" "keyword:small scale reflection" "keyword:mathematical components" "keyword:odd order theorem" "logpath:mathcomp.algebra" ]
authors: [ "Jeremy Avigad <>" "Andrea Asperti <>" "Stephane Le Roux <>" "Yves Bertot <>" "Laurence Rideau <>" "Enrico Tassi <>" "Ioana Pasca <>" "Georges Gonthier <>" "Sidi Ould Biha <>" "Cyril Cohen <>" "Francois Garillot <>" "Alexey Solovyev <>" "Russell O&
synopsis: "Mathematical Components Library on Algebra"
description: """
This library contains definitions and theorems about discrete
(i.e. with decidable equality) algebraic structures : ring, fields,
ordered fields, real fields, modules, algebras, integers, rational
numbers, polynomials, matrices, vector spaces...
"""
url {
src: "https://github.com/math-comp/math-comp/archive/mathcomp-1.12.0.tar.gz"
checksum: "sha256=<SHA256-like>"
}
</pre>
<h2>Lint</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Dry install </h2>
<p>Dry install with the current Coq version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam install -y --show-action <API key>.1.12.0 coq.8.7.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.7.2).
The following dependencies couldn't be met:
- <API key> -> <API key> = 1.12.0 -> <API key> = 1.12.0 -> coq >= 8.10 -> ocaml >= 4.05.0
base of this switch (use `--unlock-base' to force)
No solution found, exiting
</pre></dd>
</dl>
<p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam remove -y coq; opam install -y --show-action --unlock-base <API key>.1.12.0</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install </h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Missing removes</dt>
<dd>
none
</dd>
<dt>Wrong removes</dt>
<dd>
none
</dd>
</dl>
</div>
</div>
</div>
<hr/>
<div class="footer">
<p class="text-center">
Sources are on <a href="https:
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html> |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>paco: 2 m 11 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.6.1 / paco - 2.0.3</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
paco
<small>
2.0.3
<span class="label label-success">2 m 11 s</span>
</small>
</h1>
<p><em><script>document.write(moment("2020-06-28 21:12:27 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2020-06-28 21:12:27 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.12 <API key> of OCaml
conf-findutils 1 Virtual package relying on findutils
conf-m4 1 Virtual package relying on m4
coq 8.6.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.8.1 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "paco@sf.snu.ac.kr"
version: "2.0.3"
homepage: "https://github.com/snu-sf/paco/"
dev-repo: "git+https://github.com/snu-sf/paco.git"
bug-reports: "https://github.com/snu-sf/paco/issues/"
authors: [
"Chung-Kil Hur <gil.hur@sf.snu.ac.kr>"
"Georg Neis <neis@mpi-sws.org>"
"Derek Dreyer <dreyer@mpi-sws.org>"
"Viktor Vafeiadis <viktor@mpi-sws.org>"
]
license: "BSD-3"
build: [
[make "-C" "src" "all" "-j%{jobs}%"]
]
install: [
[make "-C" "src" "-f" "Makefile.coq" "install"]
]
remove: ["rm" "-r" "-f" "%{lib}%/coq/user-contrib/Paco"]
depends: [
"ocaml"
"coq" {>= "8.6" & < "8.10"}
]
synopsis: "Coq library implementing parameterized coinduction"
tags: [
"date:2018-02-11"
"category:Programming Languages/Formal Definitions and Theory"
"category:Mathematical Logic and Foramal Languages/Mathematical Logic"
"keyword:coinduction"
"keyword:simulation"
"keyword:parameterized greatest fixed point"
]
flags: light-uninstall
url {
src: "https://github.com/snu-sf/paco/archive/v2.0.3.tar.gz"
checksum: "md5=<API key>"
}
</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-paco.2.0.3 coq.8.6.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 2h opam install -y --deps-only coq-paco.2.0.3 coq.8.6.1</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>5 s</dd>
</dl>
<h2>Install</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam list; echo; ulimit -Sv 16000000; timeout 2h opam install -y -v coq-paco.2.0.3 coq.8.6.1</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>2 m 11 s</dd>
</dl>
<h2>Installation size</h2>
<p>Total: 13 M</p>
<ul>
<li>1 M <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco18_upto.vo</code></li>
<li>1 M <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco17_upto.vo</code></li>
<li>966 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco16_upto.vo</code></li>
<li>819 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco15_upto.vo</code></li>
<li>711 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco14_upto.vo</code></li>
<li>613 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco13_upto.vo</code></li>
<li>529 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco12_upto.vo</code></li>
<li>458 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco11_upto.vo</code></li>
<li>394 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco10_upto.vo</code></li>
<li>335 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco9_upto.vo</code></li>
<li>299 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/pacotac.vo</code></li>
<li>282 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco8_upto.vo</code></li>
<li>235 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco7_upto.vo</code></li>
<li>234 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco18.vo</code></li>
<li>216 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/<API key>.vo</code></li>
<li>215 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco17.vo</code></li>
<li>196 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco16.vo</code></li>
<li>192 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco6_upto.vo</code></li>
<li>179 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco15.vo</code></li>
<li>162 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco14.vo</code></li>
<li>156 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco5_upto.vo</code></li>
<li>146 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco13.vo</code></li>
<li>132 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco12.vo</code></li>
<li>124 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco4_upto.vo</code></li>
<li>118 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco11.vo</code></li>
<li>115 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/examples.vo</code></li>
<li>113 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paconotation.vo</code></li>
<li>105 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco10.vo</code></li>
<li>105 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paconotation.glob</code></li>
<li>97 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco3_upto.vo</code></li>
<li>93 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco9.vo</code></li>
<li>92 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco18.glob</code></li>
<li>84 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco17.glob</code></li>
<li>82 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco8.vo</code></li>
<li>78 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco18_upto.glob</code></li>
<li>77 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco16.glob</code></li>
<li>74 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco2_upto.vo</code></li>
<li>73 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/tutorial.vo</code></li>
<li>72 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco7.vo</code></li>
<li>70 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco17_upto.glob</code></li>
<li>70 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco15.glob</code></li>
<li>64 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco14.glob</code></li>
<li>64 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco16_upto.glob</code></li>
<li>62 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco6.vo</code></li>
<li>61 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/<API key>.glob</code></li>
<li>59 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco13.glob</code></li>
<li>58 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco15_upto.glob</code></li>
<li>57 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/pacotac.v</code></li>
<li>55 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco1_upto.vo</code></li>
<li>54 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco12.glob</code></li>
<li>53 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco5.vo</code></li>
<li>53 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco14_upto.glob</code></li>
<li>50 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco11.glob</code></li>
<li>49 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco13_upto.glob</code></li>
<li>45 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco10.glob</code></li>
<li>45 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco4.vo</code></li>
<li>44 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco12_upto.glob</code></li>
<li>41 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/pacotac.glob</code></li>
<li>41 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco11_upto.glob</code></li>
<li>40 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco9.glob</code></li>
<li>40 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco0_upto.vo</code></li>
<li>38 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco3.vo</code></li>
<li>37 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco10_upto.glob</code></li>
<li>37 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco8.glob</code></li>
<li>34 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco7.glob</code></li>
<li>34 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco9_upto.glob</code></li>
<li>32 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco6.glob</code></li>
<li>32 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco2.vo</code></li>
<li>31 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco8_upto.glob</code></li>
<li>30 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco5.glob</code></li>
<li>29 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco7_upto.glob</code></li>
<li>28 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco4.glob</code></li>
<li>27 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco6_upto.glob</code></li>
<li>26 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco1.vo</code></li>
<li>26 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco5_upto.glob</code></li>
<li>26 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco3.glob</code></li>
<li>25 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/tutorial.glob</code></li>
<li>24 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco4_upto.glob</code></li>
<li>24 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/tutorial.v</code></li>
<li>24 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco2.glob</code></li>
<li>23 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco3_upto.glob</code></li>
<li>22 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco1.glob</code></li>
<li>22 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco2_upto.glob</code></li>
<li>21 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco1_upto.glob</code></li>
<li>21 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco0.glob</code></li>
<li>20 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco0.vo</code></li>
<li>20 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco0_upto.glob</code></li>
<li>19 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/pacon.vo</code></li>
<li>19 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paconotation.v</code></li>
<li>18 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/examples.glob</code></li>
<li>17 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco18_upto.v</code></li>
<li>16 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco18.v</code></li>
<li>16 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco17_upto.v</code></li>
<li>15 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco16_upto.v</code></li>
<li>15 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco17.v</code></li>
<li>15 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco15_upto.v</code></li>
<li>14 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco16.v</code></li>
<li>14 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco14_upto.v</code></li>
<li>14 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/pacotacuser.vo</code></li>
<li>14 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco13_upto.v</code></li>
<li>13 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco15.v</code></li>
<li>13 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/<API key>.v</code></li>
<li>13 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco12_upto.v</code></li>
<li>13 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/hpattern.vo</code></li>
<li>13 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco14.v</code></li>
<li>13 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco11_upto.v</code></li>
<li>12 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco10_upto.v</code></li>
<li>12 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco13.v</code></li>
<li>12 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco9_upto.v</code></li>
<li>11 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco8_upto.v</code></li>
<li>11 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco12.v</code></li>
<li>11 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco7_upto.v</code></li>
<li>11 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco6_upto.v</code></li>
<li>11 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco11.v</code></li>
<li>10 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco5_upto.v</code></li>
<li>10 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/pacon.glob</code></li>
<li>10 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco4_upto.v</code></li>
<li>10 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco3_upto.v</code></li>
<li>10 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco10.v</code></li>
<li>10 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco2_upto.v</code></li>
<li>10 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco1_upto.v</code></li>
<li>10 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco0_upto.v</code></li>
<li>9 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco9.v</code></li>
<li>9 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco8.v</code></li>
<li>8 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/examples.v</code></li>
<li>8 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco7.v</code></li>
<li>8 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco6.v</code></li>
<li>8 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco5.v</code></li>
<li>7 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco4.v</code></li>
<li>7 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco3.v</code></li>
<li>7 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco2.v</code></li>
<li>7 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco1.v</code></li>
<li>7 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco0.v</code></li>
<li>5 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco.vo</code></li>
<li>4 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/hpattern.v</code></li>
<li>4 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/pacon.v</code></li>
<li>3 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/pacotacuser.v</code></li>
<li>2 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/pacotacuser.glob</code></li>
<li>1 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco.glob</code></li>
<li>1 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/paco.v</code></li>
<li>1 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Paco/hpattern.glob</code></li>
</ul>
<h2>Uninstall</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam remove -y coq-paco.2.0.3</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">
<small>Sources are on <a href="https:
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html> |
package checkpoint.andela.model;
public enum FileDelimeters {
KEY_VALUE_SEPARATOR(" - "),
COMMENT("
END_OF_DATA("
private FileDelimeters(String realName){
this.realName = realName;
}
public String getRealName(){
return realName;
}
private final String realName;
} |
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import withStyles from '../styles/withStyles';
import Typography from '../Typography';
export const styles = {
/* Styles applied to the root element. */
root: {
margin: 0,
padding: '24px 24px 20px',
flex: '0 0 auto',
},
};
function DialogTitle(props) {
const { children, classes, className, disableTypography, ...other } = props;
return (
<div className={classNames(classes.root, className)} {...other}>
{disableTypography ? (
children
) : (
<Typography variant="title" <API key>>
{children}
</Typography>
)}
</div>
);
}
DialogTitle.propTypes = {
/**
* The content of the component.
*/
children: PropTypes.node.isRequired,
/**
* Override or extend the styles applied to the component.
* See [CSS API](#css-api) below for more details.
*/
classes: PropTypes.object.isRequired,
/**
* @ignore
*/
className: PropTypes.string,
/**
* If `true`, the children won't be wrapped by a typography component.
* For instance, this can be useful to render an h4 instead of the default h2.
*/
disableTypography: PropTypes.bool,
};
DialogTitle.defaultProps = {
disableTypography: false,
};
export default withStyles(styles, { name: 'MuiDialogTitle' })(DialogTitle); |
describe Haml::Template do
# Simple imitation of Sinatra::Templates#compila_template
def compile_template(engine, data, options = {})
template = Tilt[engine]
template.new(nil, 1, options) { data }
end
specify 'Tilt returns Haml::Template for haml engine' do
assert_equal Haml::Template, Tilt[:haml]
end
it 'renders properly via tilt' do
result = compile_template(:haml, %q|%p hello world|).render(Object.new, {})
assert_equal %Q|<p>hello world</p>\n|, result
end
it 'has preserve method' do
result = compile_template(:haml, %q|= preserve "hello\nworld"|).render(Object.new, {})
assert_equal %Q|hello&#x000A;world\n|, result
end
describe 'escape_attrs' do
it 'escapes attrs by default' do
result = compile_template(:haml, %q|%div{ data: '<script>' }|).render(Object.new, {})
assert_equal %Q|<div data='<script>'></div>\n|, result
end
it 'can be configured not to escape attrs' do
result = compile_template(:haml, %q|%div{ data: '<script>' }|, escape_attrs: false).render(Object.new, {})
assert_equal %Q|<div data='<script>'></div>\n|, result
end
end
describe 'escape_html' do
it 'escapes html' do
result = compile_template(:haml, %q|= '<script>' |).render(Object.new, {})
assert_equal %Q|<script>\n|, result
end
it 'can be configured not to escape attrs' do
result = compile_template(:haml, %q|= '<script>' |, escape_html: false).render(Object.new, {})
assert_equal %Q|<script>\n|, result
end
end
end |
<!DOCTYPE html PUBLIC "-
<html><head><title></title>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="generator" content="Doxygen 1.8.10"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="all_6.js"></script>
<script type="text/javascript" src="search.js"></script>
</head>
<body class="SRPage">
<div id="SRIndex">
<div class="SRStatus" id="Loading">Caricamento in corso...</div>
<div id="SRResults"></div>
<script type="text/javascript"><!
createResults();
--></script>
<div class="SRStatus" id="Searching">Ricerca in corso...</div>
<div class="SRStatus" id="NoMatches">Nessun risultato</div>
<script type="text/javascript"><!
document.getElementById("Loading").style.display="none";
document.getElementById("NoMatches").style.display="none";
var searchResults = new SearchResults("searchResults");
searchResults.Search();
--></script>
</div>
</body>
</html> |
import { CoreTypes } from '@nativescript/core';
import * as pageModule from '@nativescript/core/ui/page';
import * as model from './myview';
export function onLoaded(args: { eventName: string; object: any }) {
var page = <pageModule.Page>args.object;
page.bindingContext = new model.ViewModel();
}
export function onOrientation(args: { eventName: string; object: any }) {
var layout = args.object.parent;
if (layout.orientation === CoreTypes.Orientation.vertical) {
layout.orientation = CoreTypes.Orientation.horizontal;
} else {
layout.orientation = CoreTypes.Orientation.vertical;
}
} |
<?php
namespace Podlove\Modules\Contributors\Settings\Tab;
use \Podlove\Settings\Settings;
use \Podlove\Settings\Expert\Tab;
class Groups extends Tab {
private $page = NULL;
public function init() {
$this->page_type = 'custom';
add_action( '<API key>', array( $this, 'register_page' ) );
}
public function register_page() {
$this->page = $this->getObject();
$this->page->page();
}
public function getObject() {
if (!$this->page)
$this->createObject();
return $this->page;
}
public function createObject() {
$this->page = new \Podlove\Modules\Contributors\Settings\<API key>(
'group',
'\Podlove\Modules\Contributors\Model\ContributorGroup'
);
$this->page->set_form(function($form_args, $group, $action) {
\Podlove\Form\build_for( $group, $form_args, function ( $form ) {
$wrapper = new \Podlove\Form\Input\TableWrapper( $form );
$wrapper->string( 'title', array(
'label' => __( 'Group Title', '<API key>' ),
'html' => array( 'class' => 'required' )
) );
$wrapper->string( 'slug', array(
'label' => __( 'Group Slug', '<API key>' ),
'html' => array( 'class' => 'required' )
) );
} );
});
$this->page->enable_tabs('groups');
$this->page->set_labels(array(
'delete_confirm' => __( 'You selected to delete the group "%s". Please confirm this action.', '<API key>' ),
'add_new' => __( 'Add new group', '<API key>' ),
'edit' => __( 'Edit group', '<API key>' )
));
add_action('<API key>', function() {
echo sprintf(
__('Use groups to divide contributors by type of participation. Create a group for teams working together or for a supporting community. Team members can be displayed separately by using the %sappropriate option%s to select a group.', '<API key>'),
'<a href="http://docs.podlove.org/ref/template-tags.html#contributors" target="_blank">',
'</a>'
);
$table = new \Podlove\Modules\Contributors\<API key>();
$table->prepare_items();
$table->display();
});
}
} |
module Sluginator
class Generator
def before_validation (record)
record.slug = sanitize(record.name)
end
private
def sanitize(text)
text.to_ascii.downcase.gsub(' ', '-').gsub(/\(|\)/, '')
end
end
end |
#!/usr/bin/python2.4
# pylint: disable-msg=C6310
"""WebRTC Demo
This module demonstrates the WebRTC API by implementing a simple video chat app.
"""
import datetime
import logging
import os
import random
import re
from google.appengine.api import channel
from google.appengine.ext import db
from google.appengine.ext import webapp
from google.appengine.ext.webapp import template
from google.appengine.ext.webapp.util import run_wsgi_app
def generate_random(len):
word = ''
for i in range(len):
word += random.choice('0123456789')
return word
def sanitize(key):
return re.sub("[^a-zA-Z0-9\-]", "-", key);
def make_token(room, user):
return room.key().id_or_name() + '/' + user
def make_pc_config(stun_server):
if stun_server:
return "STUN " + stun_server
else:
return "STUN stun.l.google.com:19302"
class Room(db.Model):
"""All the data we store for a room"""
user1 = db.StringProperty()
user2 = db.StringProperty()
def __str__(self):
str = "["
if self.user1:
str += self.user1
if self.user2:
str += ", " + self.user2
str += "]"
return str
def get_occupancy(self):
occupancy = 0
if self.user1:
occupancy += 1
if self.user2:
occupancy += 1
return occupancy
def get_other_user(self, user):
if user == self.user1:
return self.user2
elif user == self.user2:
return self.user1
else:
return None
def has_user(self, user):
return (user and (user == self.user1 or user == self.user2))
def add_user(self, user):
if not self.user1:
self.user1 = user
elif not self.user2:
self.user2 = user
else:
raise RuntimeError('room is full')
self.put()
def remove_user(self, user):
if user == self.user2:
self.user2 = None
if user == self.user1:
if self.user2:
self.user1 = self.user2
self.user2 = None
else:
self.user1 = None
if self.get_occupancy() > 0:
self.put()
else:
self.delete()
class ConnectPage(webapp.RequestHandler):
def post(self):
key = self.request.get('from')
room_key, user = key.split('/');
logging.info('User ' + user + ' connected to room ' + room_key)
class DisconnectPage(webapp.RequestHandler):
def post(self):
key = self.request.get('from')
room_key, user = key.split('/');
logging.info('Removing user ' + user + ' from room ' + room_key)
room = Room.get_by_key_name(room_key)
if room and room.has_user(user):
other_user = room.get_other_user(user)
room.remove_user(user)
logging.info('Room ' + room_key + ' has state ' + str(room))
if other_user:
channel.send_message(make_token(room, other_user), 'BYE')
logging.info('Sent BYE to ' + other_user)
else:
logging.warning('Unknown room ' + room_key)
class MessagePage(webapp.RequestHandler):
def post(self):
message = self.request.body
room_key = self.request.get('r')
room = Room.get_by_key_name(room_key)
if room:
user = self.request.get('u')
other_user = room.get_other_user(user)
if other_user:
# special case the loopback scenario
if other_user == user:
message = message.replace("\"OFFER\"",
"\"ANSWER\",\n \"answererSessionId\" : \"1\"")
message = message.replace("a=crypto:0 <API key>",
"a=xrypto:0 <API key>")
channel.send_message(make_token(room, other_user), message)
logging.info('Delivered message to user ' + other_user);
else:
logging.warning('Unknown room ' + room_key)
class MainPage(webapp.RequestHandler):
"""The main UI page, renders the 'index.html' template."""
def get(self):
"""Renders the main page. When this page is shown, we create a new
channel to push asynchronous updates to the client."""
room_key = sanitize(self.request.get('r'));
debug = self.request.get('debug')
stun_server = self.request.get('ss');
if not room_key:
room_key = generate_random(8)
redirect = '/?r=' + room_key
if debug:
redirect += ('&debug=' + debug)
if stun_server:
redirect += ('&ss=' + stun_server)
self.redirect(redirect)
logging.info('Redirecting visitor to base URL to ' + redirect)
return
user = None
initiator = 0
room = Room.get_by_key_name(room_key)
if not room and debug != "full":
# New room.
user = generate_random(8)
room = Room(key_name = room_key)
room.add_user(user)
if debug != "loopback":
initiator = 0
else:
room.add_user(user)
initiator = 1
elif room and room.get_occupancy() == 1 and debug != "full":
# 1 occupant.
user = generate_random(8)
room.add_user(user)
initiator = 1
else:
# 2 occupants (full).
path = os.path.join(os.path.dirname(__file__), 'full.html')
self.response.out.write(template.render(path, { 'room_key': room_key }));
logging.info('Room ' + room_key + ' is full');
return
room_link = 'https://webglmeeting.appspot.com/?r=' + room_key
if debug:
room_link += ('&debug=' + debug)
if stun_server:
room_link += ('&ss=' + stun_server)
token = channel.create_channel(room_key + '/' + user)
pc_config = make_pc_config(stun_server)
template_values = {'token': token,
'me': user,
'room_key': room_key,
'room_link': room_link,
'initiator': initiator,
'pc_config': pc_config
}
path = os.path.join(os.path.dirname(__file__), 'index.html')
self.response.out.write(template.render(path, template_values))
logging.info('User ' + user + ' added to room ' + room_key);
logging.info('Room ' + room_key + ' has state ' + str(room))
application = webapp.WSGIApplication([
('/', MainPage),
('/message', MessagePage),
('/_ah/channel/connected/', ConnectPage),
('/_ah/channel/disconnected/', DisconnectPage)
], debug=True)
def main():
run_wsgi_app(application)
if __name__ == "__main__":
main() |
{% extends 'CashCity/base.html' %}
{% load staticfiles %}
{% load cropping %}
{% block css_block %}
<link rel="stylesheet" type="text/css" href="{% static 'CashCity/css/bootstrap-select.min.css' %}">
<!-- style embedded in django template for static file usage -->
<style type="text/css">
a > .edit-button {
display: inline-block;
margin-left: 5px;
width: 22px;
height: 17px;
background-image: url({% static 'CashCity/img/edit_gray.png' %})
}
a > .trash-button {
display: inline-block;
width: 22px;
height: 17px;
background-image: url({% static 'CashCity/img/trash.png' %})
}
.audio_green {
display: inline-block;
width: 42px;
height: 50px;
background-image: url({% static 'CashCity/img/audio_green.png' %})
}
.audio_orange {
display: inline-block;
width: 42px;
height: 50px;
background-image: url({% static 'CashCity/img/audio_orange.png' %})
}
.audio_pink {
display: inline-block;
width: 42px;
height: 50px;
background-image: url({% static 'CashCity/img/audio_pink.png' %})
}
.audio_purple {
display: inline-block;
width: 42px;
height: 50px;
background-image: url({% static 'CashCity/img/audio_purple.png' %})
}
.audio_red {
display: inline-block;
width: 42px;
height: 50px;
background-image: url({% static 'CashCity/img/audio_red.png' %})
}
.audio_yellow {
display: inline-block;
width: 42px;
height: 50px;
background-image: url({% static 'CashCity/img/audio_yellow.png' %})
}
.image_green {
display: inline-block;
width: 42px;
height: 50px;
background-image: url({% static 'CashCity/img/image_green.png' %})
}
.image_orange {
display: inline-block;
width: 42px;
height: 50px;
background-image: url({% static 'CashCity/img/image_orange.png' %})
}
.image_pink {
display: inline-block;
width: 42px;
height: 50px;
background-image: url({% static 'CashCity/img/image_pink.png' %})
}
.image_purple {
display: inline-block;
width: 42px;
height: 50px;
background-image: url({% static 'CashCity/img/image_purple.png' %})
}
.image_red {
display: inline-block;
width: 42px;
height: 50px;
background-image: url({% static 'CashCity/img/image_red.png' %})
}
.image_yellow {
display: inline-block;
width: 42px;
height: 50px;
background-image: url({% static 'CashCity/img/image_yellow.png' %})
}
.interview_green {
display: inline-block;
width: 42px;
height: 50px;
background-image: url({% static 'CashCity/img/interview_green.png' %})
}
.interview_orange {
display: inline-block;
width: 42px;
height: 50px;
background-image: url({% static 'CashCity/img/interview_orange.png' %})
}
.interview_pink {
display: inline-block;
width: 42px;
height: 50px;
background-image: url({% static 'CashCity/img/interview_pink.png' %})
}
.interview_purple {
display: inline-block;
width: 42px;
height: 50px;
background-image: url({% static 'CashCity/img/interview_purple.png' %})
}
.interview_red {
display: inline-block;
width: 42px;
height: 50px;
background-image: url({% static 'CashCity/img/interview_red.png' %})
}
.interview_yellow {
display: inline-block;
width: 42px;
height: 50px;
background-image: url({% static 'CashCity/img/interview_yellow.png' %})
}
.note_green {
display: inline-block;
width: 42px;
height: 50px;
background-image: url({% static 'CashCity/img/note_green.png' %})
}
.note_orange {
display: inline-block;
width: 42px;
height: 50px;
background-image: url({% static 'CashCity/img/note_orange.png' %})
}
.note_pink {
display: inline-block;
width: 42px;
height: 50px;
background-image: url({% static 'CashCity/img/note_pink.png' %})
}
.note_purple {
display: inline-block;
width: 42px;
height: 50px;
background-image: url({% static 'CashCity/img/note_purple.png' %})
}
.note_red {
display: inline-block;
width: 42px;
height: 50px;
background-image: url({% static 'CashCity/img/note_red.png' %})
}
.note_yellow {
display: inline-block;
width: 42px;
height: 50px;
background-image: url({% static 'CashCity/img/note_yellow.png' %})
}
</style>
{% endblock %}
{% block body_block %}
<div class="full-container">
<h3 class="account-header">Teacher Account</h3>
<div class="account-menu">
<div class="container-fluid media_search_header">
<div class='col-xs-12 col-sm-6 col-md-3 col-lg-3 <API key>'>
<a href="{% url 'accountProfile' %}"><button type="button" class="btn btn-default btn-block">Account</button></a>
</div>
<div class='col-xs-12 col-sm-6 col-md-3 col-lg-3 <API key>'>
<a href="{% url 'teams' %}"><button href="{% url 'teams' %}" type="button" class="btn btn-default btn-block">Teams</button></a>
</div>
<div class='col-xs-12 col-sm-6 col-md-3 col-lg-3 <API key>'>
<a href="{% url 'accountMedia' %}"><button type="button" class="btn btn-default btn-block active">Media</button></a>
</div>
<div class='col-xs-12 col-sm-6 col-md-3 col-lg-3 <API key>'>
<a href="{% url 'accountOpinion' %}"><button type="button" class="btn btn-default btn-block">Opinions</button></a>
</div>
<!-- <div class="col-xs-12 col-sm-6 col-md-2 col-lg-2 <API key>">
<a href="{% url 'createTeam' %}"><button type="button" class="btn btn-default pull-right"><span class="glyphicon glyphicon-plus" style="padding-right:5px;"></span>Add Team</button></a>
</div>
</div>
</div>
<br />
<div class="row">
<div class="col-xs-12">
<div class="<API key>">
{% include 'registration/filterMedia.html' %}
</div>
</div>
</div>
</div>
{% endblock %}
{% block js_block %}
<script type="text/javascript" src="{% static 'CashCity/js/bootstrap-select.min.js' %}"></script>
<script type="text/javascript" src="{% static 'CashCity/js/mediaFilter.js' %}"></script>
{% endblock %} |
from test_base import BaseTestCase
from search_rex.recommendations.data_model.case_based import\
<API key>
from search_rex.recommendations.data_model.case_based import\
<API key>
from search_rex.recommendations.neighbourhood.case_based import\
<API key>
from search_rex.recommendations.similarity.case_based import\
<API key>
from search_rex.recommendations.recommenders.case_based import\
<API key>
from search_rex.recommendations.recommenders.case_based import\
WeightedSumScorer, Frequency
from search_rex.recommendations import <API key>
from search_rex.recommendations import <API key>
import os
from tests.resource.case_based_data import *
from collections import namedtuple
_cwd = os.path.dirname(os.path.abspath(__file__))
class QuerySimilarity(<API key>):
def __init__(self, query_sims):
self.query_sims = query_sims
def get_similarity(self, from_query, to_query):
if from_query in query_sims:
if to_query in self.query_sims[from_query]:
return self.query_sims[from_query][to_query]
return float('NaN')
def refresh(self, <API key>):
<API key>.add(self)
def <API key>(<API key>):
data_model = <API key>(
<API key>)
in_mem_dm = <API key>(data_model)
query_sim = QuerySimilarity(query_sims)
query_nhood = <API key>(in_mem_dm, query_sim, 0.00001)
query_based_recsys = <API key>(
in_mem_dm, query_nhood, query_sim,
WeightedSumScorer(Frequency()))
return query_based_recsys
base_url = '/api'
def create_request(route, parameters):
return '{}?{}'.format(
route,
'&'.join(['{}={}'.format(k, v) for k, v in parameters.items()])
)
class <API key>(BaseTestCase):
def setUp(self):
super(<API key>, self).setUp()
<API key>(
self.app, <API key>=<API key>)
def <API key>(
self, query_string, <API key>,
max_num_recs=10):
client, app = self.client, self.app
url = base_url + '/<API key>'
request = create_request(url, dict(
query_string=query_string,
<API key>=<API key>,
api_key=app.config['API_KEY'],
max_num_recs=max_num_recs)
)
rv = client.get(request)
print(rv.json)
Recommendation = namedtuple('Recommendation', ['record_id'])
return [Recommendation(e['record_id']) for e in rv.json['results']]
def <API key>(self):
views = view_matrix
copies = copy_matrix
<API key> = False
def <API key>(query_string, max_num_recs=10):
return self.<API key>(
query_string, <API key>, max_num_recs)
import_test_data(views=views, copies=copies)
# Not Refreshed -> No recommendations
recs = <API key>(query_caesar)
records = [rec.record_id for rec in recs]
assert records == []
<API key>()
recs = <API key>(query_caesar)
records = [rec.record_id for rec in recs]
assert records == [record_caesar, record_brutus, record_cleopatra]
recs = <API key>(query_brutus)
records = [rec.record_id for rec in recs]
assert records == [record_brutus, record_caesar]
recs = <API key>(query_brutus_caesar)
records = [rec.record_id for rec in recs]
assert records == [record_caesar, record_brutus, record_cleopatra]
recs = <API key>(<API key>)
records = [rec.record_id for rec in recs]
assert records == [record_caesar, record_brutus, record_cleopatra]
recs = <API key>(query_napoleon)
records = [rec.record_id for rec in recs]
assert records == [record_napoleon]
# No similar query -> No recommendation
recs = <API key>('unknown')
records = [rec.record_id for rec in recs]
assert records == []
# Restrict to 2 recommendations
recs = <API key>(query_caesar, max_num_recs=2)
records = [rec.record_id for rec in recs]
assert records == [record_caesar, record_brutus]
def <API key>(self):
views = view_matrix
copies = copy_matrix
<API key> = True
def <API key>(query_string, max_num_recs=10):
return self.<API key>(
query_string, <API key>, max_num_recs)
import_test_data(views=views, copies=copies)
# Not Refreshed -> No recommendations
recs = <API key>(query_caesar)
records = [rec.record_id for rec in recs]
assert records == []
<API key>()
recs = <API key>(query_caesar)
records = [rec.record_id for rec in recs]
assert records == [
<API key>, record_caesar, record_brutus,
record_cleopatra]
recs = <API key>(query_brutus)
records = [rec.record_id for rec in recs]
assert records == [record_brutus, record_caesar]
recs = <API key>(query_brutus_caesar)
records = [rec.record_id for rec in recs]
assert records == [
record_caesar, record_brutus, <API key>,
record_cleopatra]
recs = <API key>(<API key>)
records = [rec.record_id for rec in recs]
assert records == [
<API key>, record_caesar, record_brutus,
record_cleopatra]
recs = <API key>(query_napoleon)
records = [rec.record_id for rec in recs]
assert records == [record_napoleon]
# No similar query -> No recommendation
recs = <API key>('unknown')
records = [rec.record_id for rec in recs]
assert records == []
# Restrict to 2 recommendations
recs = <API key>(query_caesar, max_num_recs=2)
records = [rec.record_id for rec in recs]
assert records == [<API key>, record_caesar] |
require 'rails_helper'
require 'cancan/matchers'
RSpec.describe User, type: :model do
let!(:english_traveler) { create(:english_speaker, :eligible, :not_a_veteran, :needs_accommodation) }
let!(:traveler) { create(:user) }
let(:guest) { create(:guest) }
it { should have_many :trips }
it { should <API key> :accommodations }
it { should respond_to :roles }
it { should have_many(:user_eligibilities) }
it { should have_many(:eligibilities).through(:user_eligibilities) }
it { should have_many(:feedbacks) }
it { should have_many(:alerts) }
it_behaves_like "contactable", { email: :email }
it 'returns a locale for a user' do
expect(english_traveler.locale).to eq(english_traveler.preferred_locale) #This user has a preferred locale, so that one should be found
expect(traveler.locale).to eq(Locale.find_by(name: "en")) #This user does not have a preferred locale, so English should be returned.
end
it 'returns the preferred trip types array' do
expect(english_traveler.<API key>).to eq(['transit', 'unicycle'])
end
it 'updates basic attributes' do
params = {first_name: "George", last_name: "Burdell", email: "gpburdell@email.com", lang: "en", <API key>: ['recumbent_bicycle', 'roller_blades']}
traveler.<API key> params
expect(traveler.email).to eq('gpburdell@email.com')
expect(traveler.first_name).to eq('George')
expect(traveler.last_name).to eq('Burdell')
expect(traveler.locale).to eq(Locale.find_by(name: "en"))
expect(traveler.<API key>).to eq(['recumbent_bicycle', 'roller_blades'])
end
it 'ensures email is always lowercase' do
params = {first_name: "George", last_name: "Burdell", email: "gpbURdell@email.com", lang: "en", <API key>: ['recumbent_bicycle', 'roller_blades']}
traveler.<API key> params
expect(traveler.email).to eq('gpburdell@email.com')
end
it 'updates the password' do
old_password_token = traveler.encrypted_password
params = {<API key>, <API key>: "welcome_test_test1"}
traveler.<API key> params
expect(traveler.encrypted_password).not_to eq(old_password_token)
end
it 'will not update the password if the <API key> does not match' do
params = {<API key>, <API key>: "blahblah3"}
expect{traveler.<API key> params}.to raise_error(ActiveRecord::RecordInvalid)
end
it 'updates eligibilities' do
params = {over_65: false, veteran: true}
traveler.<API key> params
expect(traveler.eligibilities.count).to eq(2)
veteran = Eligibility.find_by(code: "veteran")
over_65 = Eligibility.find_by(code: "over_65")
expect(traveler.user_eligibilities.find_by(eligibility: veteran).value).to eq(true)
expect(traveler.user_eligibilities.find_by(eligibility: over_65).value).to eq(false)
end
it 'updates accommodations' do
params = {wheelchair: true, jacuzzi: false}
traveler.<API key> params
expect(traveler.accommodations.count).to eq(1)
expect(traveler.accommodations.where(code: "wheelchair").count).to eq(1)
expect(traveler.accommodations.where(code: "jacuzzi").count).to eq(0)
end
#Depracated after api/v1
it '<API key>' do
params = {attributes: {first_name: "George", last_name: "Burdell", email: "gpburdell@email.com", lang: "en"}, preferred_modes: ['recumbent_bicycle', 'roller_blades']}
traveler.update_profile params
expect(traveler.email).to eq('gpburdell@email.com')
expect(traveler.first_name).to eq('George')
expect(traveler.last_name).to eq('Burdell')
expect(traveler.locale).to eq(Locale.find_by(name: "en"))
expect(traveler.<API key>).to eq(['recumbent_bicycle', 'roller_blades'])
end
BOOKING
describe 'booking' do
let(:booking_user) { create(:user, :<API key>) }
it { should have_many(:booking_profiles).dependent(:destroy) }
it { should have_many(:bookings).through(:itineraries) }
it "has booking_profile helper methods" do
expect(booking_user.booking_profiles.count).to be > 1
expect(booking_user.booking_profile).to eq(booking_user.booking_profiles.first)
svc = booking_user.booking_profiles.last.service
expect(booking_user.booking_profile_for(svc)).to eq(booking_user.booking_profiles.last)
end
end
ROLES & CANCAN ABILITIES
describe 'abilities & roles' do
it "generates an auth token automatically on save" do
expect(traveler.<API key>).to be
old_auth_token = traveler.<API key>
traveler.update_attributes(<API key>: nil)
traveler.reload
expect(traveler.<API key>).to be
expect(traveler.<API key>).not_to eq(old_auth_token)
end
describe "admin users" do
let(:admin) { create(:admin) }
subject(:ability) { Ability.new(admin) }
it "is an admin but not a staff, traveler, or guest" do
expect(admin.admin?).to be true
expect(admin.staff?).to be false
expect(admin.traveler?).to be false
expect(admin.guest?).to be false
end
it{ should be_able_to(:manage, :all) }
end
describe "staff users" do
let(:agency) { create(:<API key>, :with_services)}
let(:staff) { create(:user, :staff, staff_agency: agency)}
subject(:ability) { Ability.new(staff) }
let(:other_agency) { create(:partner_agency) }
let(:fellow_staff) { create(:user, :staff, staff_agency: agency)}
let(:other_staff) { create(:user, :staff, staff_agency: other_agency)}
let(:other_service) { create(:service) }
# General
it "is a staff but not an admin, traveler, or guest" do
expect(staff.staff?).to be true
expect(staff.admin?).to be false
expect(staff.guest?).to be false
expect(staff.traveler?).to be false
end
it{ should_not be_able_to( :manage, :all) }
# Agencies
it{ should be_able_to( [:read, :update], Agency) }
it{ should_not be_able_to( :manage, Agency) }
it{ should be_able_to( [:read, :update], agency) }
it{ should_not be_able_to( [:read, :update], other_agency) }
# Staff
it{ should be_able_to( :manage, User) }
it{ should be_able_to( :manage, fellow_staff) }
it{ should_not be_able_to( :manage, other_staff) }
# Services
it{ should be_able_to( :manage, Service) }
it{ should be_able_to( :manage, agency.services.take) }
it{ should_not be_able_to( :manage, other_service) }
it "staff user should have many services" do
expect(staff.services.count).to be > 0
expect(staff.services.all?{|s| s.is_a?(Service)}).to be true
end
# Alerts
it{ should be_able_to( :manage, Alert) }
describe "transportation staff users" do
let(:<API key>) { create(:<API key>, :with_services) }
let(:<API key>) { create(:user, :staff, staff_agency: <API key>)}
subject(:ability) { Ability.new(<API key>) }
let(:feedback) { create(:feedback, feedbackable: <API key>.services.take) }
let(:other_feedback) { create(:service_feedback) }
it "is a <API key> but not a partner_staff" do
expect(<API key>.<API key>?).to be true
expect(<API key>.partner_staff?).to be false
end
# Feedbacks
it{ should be_able_to( [:read, :update], Feedback) }
it{ should be_able_to( [:read, :update], feedback) }
it{ should_not be_able_to( [:read, :update], other_feedback) }
# Reports
it{ should_not be_able_to( :read, :report) }
end
describe "partner agency staff users" do
let(:partner_agency) { create(:partner_agency, :with_services) }
let(:partner_staff) { create(:user, :staff, staff_agency: partner_agency)}
subject(:ability) { Ability.new(partner_staff) }
let(:feedback) { create(:feedback, feedbackable: partner_agency.services.take) }
let(:other_feedback) { create(:service_feedback) }
it "is a partner_staff but not a <API key>" do
expect(partner_staff.partner_staff?).to be true
expect(partner_staff.<API key>?).to be false
end
# Feedbacks
it{ should be_able_to( [:read, :update], Feedback) }
it{ should be_able_to( [:read, :update], feedback) }
it{ should be_able_to( [:read, :update], other_feedback) }
# Reports
it{ should be_able_to( :read, :report) }
end
end
describe "traveler users" do
subject(:ability) { Ability.new(traveler) }
it "is a traveler but not an admin, staff, or guest" do
expect(traveler.traveler?).to be true
expect(traveler.staff?).to be false
expect(traveler.admin?).to be false
expect(traveler.guest?).to be false
end
# shouldn't be able to do anything, this is just a test example
it{ should_not be_able_to(:read, Service) }
end
describe "guest users" do
subject(:ability) { Ability.new(guest) }
it "is a guest and a traveler but not an admin or staff" do
expect(guest.traveler?).to be true
expect(guest.staff?).to be false
expect(guest.admin?).to be false
expect(guest.guest?).to be true
end
# shouldn't be able to do anything, this is just a test example
it{ should_not be_able_to(:read, Service) }
it "does NOT automatically generate an auth token" do
expect(guest.<API key>).to be_nil
guest.save
guest.reload
expect(guest.<API key>).to be_nil
end
end
end
end |
import React from 'react'
import { Sigma, <API key>, RelativeSize, EdgeShapes, ForceAtlas2 } from '../src/index';
class EdgeLabelSample extends React.Component {
render() {
let graph = {
nodes: [
{id: 'a', label: 'A'},
{id: 'b', label: 'B'},
{id: 'c', label: 'C'}
],
edges: [
{id: 'a_to_b', source: 'a', target: 'b', label: 'A -> B' },
{id: 'b_to_c', source: 'b', target: 'c', label: 'B -> C' },
{id: 'c_to_a', source: 'c', target: 'a', label: 'C -> A' },
{id: 'b_to_a', source: 'b', target: 'a', label: 'B -> A' }
]
};
return <div>
<Sigma renderer="canvas" graph={graph} settings={{ drawEdges: true, drawEdgeLabels: true}}>
<EdgeShapes default="curvedArrow"/>
<<API key>>
<ForceAtlas2 iterationsPerRender={1} timeout={10000}/>
<RelativeSize initialSize={15}/>
</<API key>>
</Sigma>
</div>
}
}
export default EdgeLabelSample; |
package org.woofenterprise.dogs.service;
import java.math.BigInteger;
import java.security.SecureRandom;
import java.util.Collection;
import org.springframework.stereotype.Service;
import org.woofenterprise.dogs.dao.CustomerDAO;
import org.woofenterprise.dogs.entity.Customer;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.PBEKeySpec;
import javax.inject.Inject;
/**
* @author Silvia Vigasova
*/
@Service
public class CustomerServiceImpl implements CustomerService {
@Inject
private CustomerDAO customerDAO;
@Override
public Customer findCustomerById(Long customerId) {
return customerDAO.findById(customerId);
}
@Override
public Customer findCustomerByEmail(String email) {
return customerDAO.findByEmail(email);
}
@Override
public Customer createCustomer(Customer customer) {
return customerDAO.create(customer);
}
@Override
public void deleteCustomer(Customer customer) {
customerDAO.delete(customer);
}
@Override
public Collection<Customer> getAllCustomers() {
return customerDAO.findAll();
}
@Override
public void update(Customer customer) {
customerDAO.update(customer);
}
} |
#!/bin/bash
# test-simple.sh: simple sanity checks
REALPATH=$(cd $(dirname "$0") && pwd)
. "${REALPATH}/lib.sh"
TEST_PORT=8000
tests_use_port $TEST_PORT
begin_test "server binds and accepts through multibinder"
(
setup
launch_service "http" bundle exec env MULTIBINDER_SOCK=${TEMPDIR}/multibinder.sock ruby test/httpbinder.rb $(offset_port $TEST_PORT)
wait_for_port "binder" $(offset_port $TEST_PORT)
curl --max-time 5 http://localhost:$(offset_port $TEST_PORT)/ | grep -q 'Hello World'
)
end_test
begin_test "server can restart without requests failing while down"
(
setup
launch_service "http" bundle exec env MULTIBINDER_SOCK=${TEMPDIR}/multibinder.sock ruby test/httpbinder.rb $(offset_port $TEST_PORT)
wait_for_port "binder" $(offset_port $TEST_PORT)
kill_service "http"
curl --max-time 5 http://localhost:$(offset_port $TEST_PORT)/ | grep -q 'Hello World' &
curl_pid=$!
sleep 0.5
# now restart the service
launch_service "http" bundle exec env MULTIBINDER_SOCK=${TEMPDIR}/multibinder.sock ruby test/httpbinder.rb $(offset_port $TEST_PORT)
# curl should finish, and succeed
wait $curl_pid
)
end_test
begin_test "server can load a second copy then terminate the first"
(
setup
launch_service "http" bundle exec env MULTIBINDER_SOCK=${TEMPDIR}/multibinder.sock ruby test/httpbinder.rb $(offset_port $TEST_PORT) "first"
wait_for_port "binder" $(offset_port $TEST_PORT)
curl --max-time 5 http://localhost:$(offset_port $TEST_PORT)/r1 | grep -q 'Hello World first'
launch_service "http2" bundle exec env MULTIBINDER_SOCK=${TEMPDIR}/multibinder.sock ruby test/httpbinder.rb $(offset_port $TEST_PORT) "second"
curl --max-time 5 http://localhost:$(offset_port $TEST_PORT)/r2 | egrep -q 'Hello World (first|second)'
kill_service "http"
curl --max-time 5 http://localhost:$(offset_port $TEST_PORT)/r3 | grep -q 'Hello World second'
kill_service "http2"
)
end_test
begin_test "multibinder restarts safely on sigusr1"
(
setup
launch_service "http" bundle exec env MULTIBINDER_SOCK=${TEMPDIR}/multibinder.sock ruby test/httpbinder.rb $(offset_port $TEST_PORT)
wait_for_port "binder" $(offset_port $TEST_PORT)
curl --max-time 5 http://localhost:$(offset_port $TEST_PORT)/r1 | grep -q 'Hello World'
kill_service "http"
lsof -p $(service_pid "multibinder")
kill -USR1 $(service_pid "multibinder")
# should still be running, should still be listening
lsof -p $(service_pid "multibinder")
lsof -i :$(offset_port $TEST_PORT) -a -p $(service_pid "multibinder")
# should be able to request the bind again
launch_service "http" bundle exec env MULTIBINDER_SOCK=${TEMPDIR}/multibinder.sock ruby test/httpbinder.rb $(offset_port $TEST_PORT)
wait_for_port "multibinder" $(offset_port $TEST_PORT)
# requests should work
curl --max-time 5 http://localhost:$(offset_port $TEST_PORT)/r2 | grep -q 'Hello World'
# and multibinder should have started listening on the control socket twice
grep 'Respawning' $(service_log "multibinder")
grep 'Listening for binds' $(service_log "multibinder") | grep -n 'Listen' | grep "2:"
)
end_test |
<?php
use Orm\Model;
class Model_M_Trap extends Model
{
protected static $_properties = array(
'id',
'm_trap_id',
'trap_type',
'effect_rate',
'effect_val',
'created_at',
'updated_at',
);
protected static $_observers = array(
'Orm\Observer_CreatedAt' => array(
'events' => array('before_insert'),
'mysql_timestamp' => false,
),
'Orm\Observer_UpdatedAt' => array(
'events' => array('before_save'),
'mysql_timestamp' => false,
),
);
public static function validate($factory)
{
$val = Validation::forge($factory);
$val->add_field('m_trap_id', 'M Trap Id', 'required|valid_string[numeric]');
$val->add_field('trap_type', 'Trap Type', 'required|max_length[255]');
$val->add_field('effect_rate', 'Effect Rate', 'required|valid_string[numeric]');
$val->add_field('effect_val', 'Effect Val', 'required|valid_string[numeric]');
return $val;
}
} |
using System;
namespace FilesTree.Presenter.Events
{
internal sealed class <API key> : EventArgs
{
private readonly string _outputFilePath;
private readonly string _targetFolderPath;
public <API key>(string targetFolderPath, string outputFilePath)
{
_targetFolderPath = targetFolderPath;
_outputFilePath = outputFilePath;
}
public string TargetFolderPath
{
get { return _targetFolderPath; }
}
public string OutputFilePath
{
get { return _outputFilePath; }
}
}
} |
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
// Read Sprockets README (https://github.com/sstephenson/sprockets#<API key>) for details
// about supported directives.
//= require jquery
//= require jquery_ujs
//= require_tree .
//= require vendor_javascripts
//= require select2 |
The MIT License (MIT)
Copyright (c) 2015 Maxim Zalysin <max@zalysin.ru>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
## this is a way different change than the other two!
*We were asked by Charlotte to skip the 2nd and 3rd paragraph of Release 4.*
# Release 4 (2nd and 3rd paragraph):
Make a new branch, and make some changes to awesome_page.md.
Show off some of your markdown GitHub flavored markdown (Links to an external site.)
skills. Make something bold, italic, some sort of code block and a link (Links to an
external site.). Also take a screenshot of you and your pair working on this challenge
and display it inline. (You'll need to remember to upload it to the repository and
link to it). Add and commit your changes for awesome_page.md, push your branch to GitHub.
Make a pull request like last time. The current navigator should review the diff of
the request and merge it. You will be using this work flow all the time as a developer! |
layout: page
title: "Heather Adams"
comments: true
description: "blanks"
keywords: "Heather Adams,CU,Boulder"
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://dl.dropboxusercontent.com/s/pc42nxpaw1ea4o9/highcharts.js?dl=0"></script>
<!-- <script src="../assets/js/highcharts.js"></script> -->
<style type="text/css">@font-face {
font-family: "Bebas Neue";
src: url(https:
}
h1.Bebas {
font-family: "Bebas Neue", Verdana, Tahoma;
}
</style>
</head>
# TEACHING INFORMATION
**College**: Leeds School of Business
**Classes taught**: BADM 1260, BCOR 1020, BCOR 1025, BCOR 2500, BUSM 2001, BUSM 3001, MGMT 3030, MGMT 4120, MGMT 4210, OPIM 3000, OPIM 4060, PRLC 3810, SYST 3000, SYST 4060
# BADM 1260: First-Year Global Experience
**Terms taught**: Spring 2014, Spring 2014, Spring 2015, Spring 2016
**Instructor rating**: 5.54
**Standard deviation in instructor rating**: 0.43
**Average grade** (4.0 scale): 3.58
**Standard deviation in grades** (4.0 scale): 0.11
**Average workload** (raw): 1.27
**Standard deviation in workload** (raw): 0.15
# BCOR 1020: Business Statistics
**Terms taught**: Fall 2008, Spring 2009, Spring 2009, Fall 2009, Spring 2010, Spring 2010, Spring 2010, Spring 2011, Spring 2011, Spring 2011, Fall 2011, Spring 2012, Spring 2012, Spring 2013, Spring 2013, Spring 2014, Spring 2014
**Instructor rating**: 4.79
**Standard deviation in instructor rating**: 0.42
**Average grade** (4.0 scale): 2.62
**Standard deviation in grades** (4.0 scale): 0.23
**Average workload** (raw): 2.16
**Standard deviation in workload** (raw): 0.14
# BCOR 1025: Data Analysis in Business
**Terms taught**: Spring 2016, Spring 2016, Spring 2017, Spring 2017
**Instructor rating**: 4.91
**Standard deviation in instructor rating**: 0.22
**Average grade** (4.0 scale): 2.67
**Standard deviation in grades** (4.0 scale): 0.11
**Average workload** (raw): 2.26
**Standard deviation in workload** (raw): 0.18
# BCOR 2500: INTRODUCTION TO SYSTEMS
**Terms taught**: Fall 2006, Spring 2007, Spring 2007, Fall 2007, Spring 2008, Spring 2008
**Instructor rating**: 3.54
**Standard deviation in instructor rating**: 0.45
**Average grade** (4.0 scale): 3.1
**Standard deviation in grades** (4.0 scale): 0.28
**Average workload** (raw): 1.63
**Standard deviation in workload** (raw): 0.07
# BUSM 2001: Principles of Marketing and Management
**Terms taught**: Fall 2015, Fall 2015, Fall 2016, Fall 2016
**Instructor rating**: 5.24
**Standard deviation in instructor rating**: 0.12
**Average grade** (4.0 scale): 3.08
**Standard deviation in grades** (4.0 scale): 0.15
**Average workload** (raw): 2.16
**Standard deviation in workload** (raw): 0.09
# BUSM 3001: Managing Innovation in Organizations
**Terms taught**: Fall 2015, Fall 2015, Spring 2016, Spring 2016, Fall 2016, Fall 2016, Fall 2016, Spring 2017, Spring 2017
**Instructor rating**: 4.75
**Standard deviation in instructor rating**: 0.72
**Average grade** (4.0 scale): 3.62
**Standard deviation in grades** (4.0 scale): 0.05
**Average workload** (raw): 1.98
**Standard deviation in workload** (raw): 0.24
# MGMT 3030: Critical Leadership Skills
**Terms taught**: Fall 2011, Fall 2012, Fall 2013, Fall 2014, Spring 2015
**Instructor rating**: 5.09
**Standard deviation in instructor rating**: 0.3
**Average grade** (4.0 scale): 3.43
**Standard deviation in grades** (4.0 scale): 0.15
**Average workload** (raw): 2.18
**Standard deviation in workload** (raw): 0.28
# MGMT 4120: Managing Business Processes
**Terms taught**: Spring 2012
**Instructor rating**: 4.5
**Standard deviation in instructor rating**: 0.0
**Average grade** (4.0 scale): 3.01
**Standard deviation in grades** (4.0 scale): 0.0
**Average workload** (raw): 2.38
**Standard deviation in workload** (raw): 0.0
# MGMT 4210: Systems Thinking
**Terms taught**: Fall 2012, Spring 2013, Fall 2013, Spring 2014, Fall 2014, Spring 2015, Fall 2015, Fall 2016
**Instructor rating**: 5.44
**Standard deviation in instructor rating**: 0.35
**Average grade** (4.0 scale): 3.35
**Standard deviation in grades** (4.0 scale): 0.13
**Average workload** (raw): 2.06
**Standard deviation in workload** (raw): 0.21
# OPIM 3000: Systems Thinking
**Terms taught**: Spring 2011
**Instructor rating**: 4.51
**Standard deviation in instructor rating**: 0.0
**Average grade** (4.0 scale): 3.04
**Standard deviation in grades** (4.0 scale): 0.0
**Average workload** (raw): 2.17
**Standard deviation in workload** (raw): 0.0
# OPIM 4060: MANAGING BUS PROCESSES
**Terms taught**: Spring 2010
**Instructor rating**: 4.28
**Standard deviation in instructor rating**: 0.0
**Average grade** (4.0 scale): 2.97
**Standard deviation in grades** (4.0 scale): 0.0
**Average workload** (raw): 2.0
**Standard deviation in workload** (raw): 0.0
# PRLC 3810: Global Issues in Leadership
**Terms taught**: Spring 2013
**Instructor rating**: 5.27
**Standard deviation in instructor rating**: 0.0
**Average grade** (4.0 scale): 3.52
**Standard deviation in grades** (4.0 scale): 0.0
**Average workload** (raw): 3.82
**Standard deviation in workload** (raw): 0.0
# SYST 3000: SYSTEMS THINKING
**Terms taught**: Fall 2007, Fall 2008, Fall 2008, Spring 2009
**Instructor rating**: 4.25
**Standard deviation in instructor rating**: 0.25
**Average grade** (4.0 scale): 3.13
**Standard deviation in grades** (4.0 scale): 0.19
**Average workload** (raw): 2.09
**Standard deviation in workload** (raw): 0.17
# SYST 4060: MANAGING BUS PROCESSES
**Terms taught**: Fall 2008, Spring 2009
**Instructor rating**: 3.78
**Standard deviation in instructor rating**: 0.34
**Average grade** (4.0 scale): 3.38
**Standard deviation in grades** (4.0 scale): 0.08
**Average workload** (raw): 2.01
**Standard deviation in workload** (raw): 0.12 |
'use strict';
//Start by defining the main module and adding the module dependencies
angular.module(<API key>.<API key>, <API key>.<API key>);
// Setting HTML5 Location Mode
angular
.module(<API key>.<API key>)
.config(['$locationProvider',
function($locationProvider) {
$locationProvider.hashPrefix('!');
}
])
.run(['editableOptions',
function(editableOptions) {
editableOptions.theme = 'bs3'; // bootstrap3 theme. Can be also 'bs2', 'default'
}
]);
//Then define the init function for starting up the application
angular.element(document).ready(function() {
//Fixing facebook bug with redirect
if (window.location.hash === '#_=_') window.location.hash = '#!';
//Then init the app
angular.bootstrap(document, [<API key>.<API key>]);
}); |
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[osf]{libertine}
\usepackage[scaled=0.8]{beramono}
\usepackage[margin=1.5in]{geometry}
\usepackage{url}
\usepackage{booktabs}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{nicefrac}
\usepackage{microtype}
\usepackage{bm}
\usepackage{sectsty}
\sectionfont{\large}
\subsectionfont{\normalsize}
\usepackage{titlesec}
\titlespacing{\section}{0pt}{10pt plus 2pt minus 2pt}{0pt plus 2pt minus 0pt}
\titlespacing{\subsection}{0pt}{5pt plus 2pt minus 2pt}{0pt plus 2pt minus 0pt}
\setlength{\parindent}{0pt}
\setlength{\parskip}{1ex}
\newcommand{\acro}[1]{\textsc{\MakeLowercase{
\newcommand{\given}{\mid}
\newcommand{\mc}[1]{\mathcal{
\newcommand{\data}{\mc{D}}
\newcommand{\intd}[1]{\,\mathrm{d}{
\newcommand{\mat}[1]{\bm{\mathrm{
\renewcommand{\vec}[1]{\bm{\mathrm{
\newcommand{\trans}{^\top}
\newcommand{\inv}{^{-1}}
\DeclareMathOperator{\var}{var}
\begin{document}
{\large \textbf{CSE 515T (Spring 2015) Assignment 3}} \\
Due Monday, 16 March 2015 \\
\begin{enumerate}
\item
(Sampling from a multivariate Gaussian distribution).
Assume you can sample from a univariate standard normal distribution
$\mc{N}(0, 1^2)$. In the last assignment, this allowed you to
sample trivially from a multivariate standard normal distribution
$\mc{N}(\vec{0}, \mat{I})$. Use the closure of the Gaussian
distribution to affine transformations to derive a procedure to
sample from an arbitrary multivariate Gaussian distribution
\begin{equation*}
p(\vec{x}) = \mc{N}(\vec{x}; \vec{\mu}, \mat{\Sigma})
\end{equation*}
using an oracle that can draw a sample from the univariate standard
normal distribution.
\item
(Sampling from a Gaussian process).
Consider the squared exponential covariance function
\begin{equation*}
K(x, x'; \lambda, \ell)
=
\lambda^2
\exp\biggl(
-\frac{\lVert x - x' \rVert^2}{2\ell^2}
\biggr).
\end{equation*}
Take a dense grid (somewhere around 100-1\,000 points) in the domain
$x \in [-4, 4]$. For several values of $(\lambda, \ell)$ of your
choosing, draw five samples from a Gaussian process prior with mean
function $\mu(x) = 0$ and this covariance. Plot your samples.
Note: you may encounter numerical problems here. The most common
issues are that the sample covariance $\mat{K}$ is not quite
symmetric or that it is not quite positive definite. To ensure
positive definiteness, you may need to add a small constant (on the
order of $10^{-6}$ perhaps) to the diagonal to the covariance matrix
$\mat{K}$ in case of numerical instability. If the matrix is not
exactly symmetric, a simple trick to symmetrize it is to take
$\frac{1}{2}(\mat{K} + \mat{K}\trans)$.
\item
(Gaussian process regression).
Consider again the data from question 2 of assignment 2:
\begin{align*}
\vec{x}
&=
[-2.26, -1.31, -0.43, 0.32, 0.34, 0.54, 0.86, 1.83, 2.77, 3.58]\trans; \\
\vec{y}
&=
[1.03, 0.70, -0.68, -1.36, -1.74, -1.01, 0.24, 1.55, 1.68, 1.53]\trans.
\end{align*}
Fix the noise variance at $\sigma^2 = 0.5^2$.
\begin{itemize}
\item
Examining a scatter plot of the data, guess which values of
$(\lambda, \ell)$ in the above covariance (if any) might explain
this data well.
\item
Perform Gaussian process regression for these data on the interval
$x_\ast \in [-4, 4]$ using the squared exponential covariance
above for the same set of hyperparameters $(\lambda, \ell)$ above.
Plot the posterior mean and the pointwise 95\% credible interval
for each. Which predictions look the best?
\item
Visualize the model evidence $p(\vec{y} \given \vec{x}, \lambda,
\ell, \sigma^2)$ as a function of $(\lambda, \ell)$. You can
choose to make, for example, a heatmap or a contour plot of this
function. Probably it will be a good idea to compute and plot the
logarithm of the model evidence rather than the model evidence
directly.
\item
Are there any settings of the hyperparameters that explain the data
better than the best polynomial model from question 2 of assignment 2?
\end{itemize}
\item
(Optimization of mean hyperparameters).
Assume the mean function of a Gaussian process has a parameter
vector $\theta$, $\mu(\vec{x}; \theta)$. Given a fixed covariance
function $K$, noise variance $\sigma^2$, and dataset $\data =
(\mat{X}, \vec{y})$, compute the partial derivative of the log
marginal likelihood with respect to the $i$th mean hyperparameter
$\theta_i$:
\begin{equation*}
\frac{\partial}{\partial \theta_i}
\log
p(\vec{y} \given \mat{X}, \theta, \sigma^2).
\end{equation*}
Consider the data from the last question. Keep the covariance
hyperparameters $(\lambda, \ell)$ fixed to the best values you
found. Replace the mean function $\mu$ with a constant, potentially
non-zero mean function $\mu(x; \theta) = \theta$. Use the above
gradient you computed above to optimize the marginal likelihood of
the data as a function of $\theta$. Is the best value the sample
mean of $\vec{y}$? Should we expect it to be?
\end{enumerate}
\end{document} |
var assert = require("assert"),
global = global || require ("../../main/global/global.js").init("Test"),
fs = require("fs"),
Zip = require ("../../main/webServer/zip.js");
/* connect to the 'dataBase' and prepare everything */
before(function(done){
this.timeout(12042);
// write some stuff to the datafile for further testing
done();
})
after (function (done) {
done();
})
describe ('zip is a stream object, and...', function () {
it ('I can pipe things to zip...', function (done) {
var http = require('http');
var request = {hostname : 'localhost', port:'8042','headers' : {'accept-encoding' : 'gzip'}};
var webServer = require('http')
.createServer( function (request, response) {
var testData01= '{"term" : "hugo", "Watt" : 0.42, "timestamp": 1419266112003}';
var testData02= '{"term" : "kaefer", "Watt" : 0.42, "timestamp": 1419266112003}';
var testData="[";
for (var i=0; i<600; i++) testData += testData01+",\n";
testData += testData02+"]";
var testData_echo = require('child_process').spawn("echo", [testData]);
var zip = new Zip(request, response);
// global.log("started a server,...");
testData_echo
.stdout
.pipe (zip)
.pipe (response)
})
.listen(8042);
http.get(request, function (response) {
var result = [];
var zlib = require('zlib');
response
.on ("data", function (chunk) { result.push(chunk) })
.on ("end", function () {
zlib.gunzip( Buffer.concat(result),
function (error, data) {
var lines = JSON.parse (data);
for (var i in lines ) {
if (lines[i].term === 'kaefer') {
webServer.close()
done();
}
}
})
});
})
})
})
function IsJsonString(str) {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
} |
#include "totm_translate.h"
/**
* @brief Translates a given statement or event within a tale
* @param dictionary Dictionary containing words and phrases
* @param statement The statement or event to be translated
* @param text Returned translated text
* @returns zero on success
*/
n_int <API key>(totm_dictionary * dictionary, totm_object * statement, char * text)
{
n_uint i, state, ctr, w=0, tense, event_type;
n_uint who_ctr=0, what_ctr=0;
totm_id who[3], what[2], where, when;
char who1[<API key>];
char who2[<API key>];
char who3[<API key>];
char what1[<API key>];
char what2[<API key>];
char where_text[<API key>];
char when_text[<API key>];
char template[256], wildcard_text[32];
n_uint num_whos=0, num_whats=0, num_wheres=0, num_whens=0;
if (statement == 0)
return -1;
ctr = (n_uint)strlen(text);
event_type = totm_obj_prop_get(statement, <API key>);
if (event_type == <API key>)
return -2;
tense = totm_obj_prop_get(statement, TOTM_PROPERTY_TENSE);
/* get the hashes corresponding to words in the dictionary */
<API key>(statement, TOTM_PROPERTY_WHO, &who[0]);
<API key>(statement, TOTM_PROPERTY_WHO2, &who[1]);
<API key>(statement, TOTM_PROPERTY_WHO3, &who[2]);
<API key>(statement, <API key>, &what[0]);
<API key>(statement, <API key>, &what[1]);
<API key>(statement, TOTM_PROPERTY_WHERE, &where);
<API key>(statement, TOTM_PROPERTY_WHEN, &when);
/* retrieve words from the dictionary */
totm_dictionary_get(dictionary, &who[0], (char *)who1);
totm_dictionary_get(dictionary, &who[1], (char *)who2);
totm_dictionary_get(dictionary, &who[2], (char *)who3);
totm_dictionary_get(dictionary, &what[0], (char *)what1);
totm_dictionary_get(dictionary, &what[1], (char *)what2);
totm_dictionary_get(dictionary, &where, (char *)where_text);
totm_dictionary_get(dictionary, &when, (char *)when_text);
if (who1[0] != 0)
num_whos++;
if (who2[0] != 0)
num_whos++;
if (who3[0] != 0)
num_whos++;
if (what1[0] != 0)
num_whats++;
if (what2[0] != 0)
num_whats++;
if (where_text[0] != 0)
num_wheres++;
if (when_text[0] != 0)
num_whens++;
/* get the template */
if (parser_get_template(event_type, tense,
num_whos, num_whats,
num_wheres, num_whens,
template) < 0)
return -3;
/* reconstruct */
state = 0;
for (i = 0; i < strlen(template); i++) {
switch(state) {
case 0: {
/* reading template text */
if (template[i] == '[') {
state++;
w = 0;
}
else
text[ctr++] = template[i];
break;
}
case 1: {
/* reading wildcard */
if (template[i] == ']') {
wildcard_text[w]=0;
state=0;
/* insert who string */
if (strcmp(wildcard_text, "who") == 0) {
switch(who_ctr) {
case 0: {
for (w = 0; w < strlen((char*)who1); w++)
text[ctr++] = who1[w];
break;
}
case 1: {
for (w = 0; w < strlen((char*)who2); w++)
text[ctr++] = who2[w];
break;
}
case 2: {
for (w = 0; w < strlen((char*)who3); w++)
text[ctr++] = who3[w];
break;
}
}
who_ctr++;
}
/* insert what string */
if (strcmp(wildcard_text, "what") == 0) {
if (what_ctr == 0)
for (w = 0; w < strlen((char*)what1); w++)
text[ctr++] = what1[w];
else
for (w = 0; w < strlen((char*)what2); w++)
text[ctr++] = what2[w];
what_ctr++;
}
/* insert where text */
if (strcmp(wildcard_text, "where") == 0)
for (w = 0; w < strlen((char*)where_text); w++)
text[ctr++] = where_text[w];
/* insert when text */
if (strcmp(wildcard_text, "when") == 0)
for (w = 0; w < strlen((char*)when_text); w++)
text[ctr++] = when_text[w];
}
else
wildcard_text[w++] = template[i];
break;
}
}
}
/* terminate the string */
text[ctr++] = '.';
text[ctr++] = ' ';
text[ctr] = 0;
return 0;
}
/**
* @brief Produces a natural language version of a tale
* @param dictionary Dictionary containing words and phrases
* @param tale The tale to be translated
* @param text Returned translated text
* @returns zero on success
*/
n_int <API key>(totm_dictionary * dictionary, totm_tale * tale, char * text)
{
totm_object * statement;
n_uint i;
for (i = 0; i < tale->length; i++) {
statement = totm_tale_get(tale, i);
<API key>(dictionary, statement, text);
}
return 0;
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.