answer
stringlengths 15
1.25M
|
|---|
# -*- coding: utf-8 -*-
import math
""" procedure to generate Gaussian of unit area when passed a FWHM"""
#IDL: PRO GAUSS2,FWHM,LENGTH,NGAUS
def gauss2(fwhm, length):
#length=length*1l & FWHM=FWHM*1l
#NGAUS=FLTARR(LENGTH)
ngaus = [0.0 for i in range(length)]
#This expression for CHAR comes from requiring f(x=0.5*FWHM)=0.5*f(x=0):
#CHAR=-1d0*ALOG(0.5d0)/(0.5d0*0.5d0*FWHM*FWHM)
char = -1.0 * math.log(0.5) / (0.5*0.5*fwhm*fwhm)
#This expression for AMP (amplitude) comes from requiring that the
#area under the gaussian is unity:
#AMP=SQRT(CHAR/PI)
amp = math.sqrt(char/math.pi)
#FOR CNT=0l,(LENGTH-1) DO BEGIN
# X=(CNT-LENGTH/2)*1.d0
# NGAUS(CNT)=AMP*EXP(-CHAR*X^2)
#ENDFOR
for cnt in range(length):
x = 1.0 * (cnt - length/2)
ngaus[cnt] = amp * math.exp(-1.0*char*x*x)
return ngaus
|
src="jquery-3.2.1.min";
$(document).ready(function(){
$("td:contains('-')").filter(":contains('€')").addClass('neg');
$(".betrag").filter(":contains('-')").addClass('neg');
});
function goBack() {
window.history.back();
}
|
AMD::Engine.routes.draw do
get '/amd/:asset', to: 'assets#finder'
end
|
<div class="navbar navbar-default navbar-static-top" ng-controller="NavbarCtrl">
<div class="container">
<div class="navbar-header">
<button class="navbar-toggle" type="button" ng-click="isCollapsed = !isCollapsed">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="/" class="navbar-brand">sparksensor</a>
</div>
<div collapse="isCollapsed" class="navbar-collapse collapse" id="navbar-main">
<ul class="nav navbar-nav">
<li ng-repeat="item in menu" ng-class="{active: isActive(item.link)}">
<a ng-href="{{item.link}}">{{item.title}}</a>
</li>
</ul>
</div>
</div>
</div>
|
var compare = require('typewiselite')
var search = require('binary-search')
function compareKeys (a, b) {
return compare(a.key, b.key)
}
module.exports = function (_compare) {
var ary = [], kv
_compare = _compare || compare
function cmp (a, b) {
return _compare(a.key, b.key)
}
return kv = {
getIndex: function (key) {
return search(ary, {key: key}, cmp, 0, ary.length - 1)
},
get: function (key) {
var i = this.getIndex(key)
return i >= 0 ? ary[i].value : undefined
},
has: function (key) {
return this.getIndex(key) >= 0
},
//update a key
set: function (key, value) {
return kv.add({key: key, value: value})
},
add: function (o) {
var i = search(ary, o, cmp)
//overwrite a key, or insert a key
if(i < 0) ary.splice(~i, 0, o)
else ary[i] = o
return i
},
toJSON: function () {
return ary.slice()
},
store: ary
}
}
module.exports.search = search
module.exports.compareKeys = compareKeys
|
namespace Grauenwolf.TravellerTools.Names
{
public class RandomPerson
{
<summary>
Initializes a new instance of the <see cref="RandomName"/> class.
</summary>
<param name="firstName"></param>
<param name="lastName"></param>
internal RandomPerson(Result user)
{
FirstName = user.name.first.Substring(0, 1).ToUpper() + user.name.first.Substring(1);
LastName = user.name.last.Substring(0, 1).ToUpper() + user.name.last.Substring(1);
Gender = user.gender == "female" ? "F" : "M";
}
internal RandomPerson(string first, string last, string gender)
{
LastName = last.Substring(0, 1).ToUpper() + last.Substring(1); ;
FirstName = first.Substring(0, 1).ToUpper() + first.Substring(1); ;
Gender = gender;
}
public string FirstName { get; set; }
public string LastName { get; set; }
public string Gender { get; set; }
public string FullName { get { return FirstName + " " + LastName; } }
}
}
|
define( [
'jquery',
'angular',
'json!nuke/data/dummy_model.json',
'json!nuke/data/dummy_layout.json',
'text!nuke/demo.html'
], function( $, ng, dummyModel, dummyLayout, htmlDemoTemplate ) {
'use strict';
var module = ng.module( 'NukeDemoApp', [ 'nbe' ] )
.run( [ '$templateCache', function( $templateCache ) {
$templateCache.put( 'lib/demo.html', htmlDemoTemplate );
} ] );
function NukeDemoController( $scope, $timeout ) {
$scope.model = dummyModel;
$scope.layout = dummyLayout;
}
module.controller( 'NukeDemoController', [ '$scope', '$timeout', NukeDemoController ] );
return module;
} );
|
module Editor::Controllers::Document
class Export
include Editor::Action
include ::Noteshare::Core::Document
expose :document, :active_item
def call(params)
@active_item = 'editor'
@document = DocumentRepository.find params[:id]
ContentManager.new(@document).export
redirect_to "/document/#{params[:id]}"
end
end
end
|
Rethinker
======
Rethinker offers a minimalist ActiveRecord-like API service layer for [RethinkDB](www.rethinkdb.com), the main focus is to simplify the relational queries for has-one, has-many, many-many relationships, with filters, and nested relational query support.
#Install
`
npm install rethinker
`
#Running Tests
Ensure that RethinkDB is [installed correctly](http:
`
npm test
`
#Getting started
Let's assume we have the following entries and their relationships in our model:
A onlne course can be composed by many video lectures, which can be either be public or private, and a course is enrolled by many students.
And we would like to query the following:
- All courses along with their private lectures, with video related data if it's available
- All students with email ending in '@institution.org', along with their enrolled courses
##1. Initialize rethinker with database connection string
`javascript
var Rethinker = require('rethinker').init({
host: 'localhost',
port: 28015,
db: 'test',
pool: {
max: 100,
min: 0,
log: false,
idleTimeoutMillis: 30000,
reapIntervalMillis: 15000
}
})
`
##2. Initialize services
`javascript
var LecturesService = Rethinker.extend({
modelName: 'Lecture',
tableName: 'lectures', // optional, by default it takes the modelName, lowercase it, and make it plural
relations: {
hasOne: {
course: { //for simplicity, 'has one course' is the same as 'belongsTo a course'
on: 'courseId', // attribute defined on the 'lectures' table
from: 'Course'
},
video: {
on: 'videoId',
from: 'Video'
}
}
}
});
var CoursesService = Rethinker.extend({
modelName: 'Course',
relations: {
hasMany: {
videoLectures: {
on: 'courseId',
from: 'Lecture',
filter : function(lecture){ // this will be used for 'filter' method in the rethinkdb API
return lecture.ne(null);
}
},
students: {
on: ['courseId', 'studentId'],
through: 'courses_students', //table 'courses_students' has to be created manually for now
from: 'Student'
}
},
hasOne: {
privateLecture: {
on: 'courseId',
from: 'Lecture',
filter: {
private: true
}
}
}
}
});
var StudentsService = Rethinker.extend({
modelName: 'Student',
relations: {
hasMany: {
'enrolledCourses': {
on: ['studentId', 'courseId'],
through: {
tableName: 'courses_students',
filter: {
enrolled: true
}
},
from: 'Course'
}
}
}
});
var VideosService = Rethinker.extend({
modelName: 'Video',
})
var lecturesService = new LecturesService(),
coursesService = new CoursesService(),
studentsService = new StudentsService(),
videosService = new VideosService();
`
##3. Querying data
##All courses along with their private lectures ordered by createTime, with video related data if it's available
`
coursesService.findAllCourse(null, {
with : {
related : 'privateLecture',
orderBy : 'createTime desc',
with : 'video'
}
})
//Sample result
[{
id : '<API key>',
title : "Course I",
privateLecture : {
courseId : '<API key>',
private : true,
createTime : 1394630809686,
videoId : '<API key>'
video : {
id : '<API key>',
url : 'path/video1.mp4'
}
}
},
]
`
##All students with email ending in '@institution.org', along with their enrolled courses
`
studentsService.findAllStudent(function(studentRow){
return studentRow('email').match('@institution.org')
}, {with : 'enrolledCourses'})
//Sample results
[{
name : "Khanh Luc",
email : "khanh@institution.org",
enrolledCourses : [{
id : "<API key>"
title : "Course I",
},
]
}
.
]
`
#CRUD operations
By initializing the service layer as:
var CoursesService = Rethinker.extend({modelName : 'Course'})
Rethinker adds the following methods to `CoursesService.prototype`
Create
CoursesService.prototype.createCourse([jsonData, options]) -> Promise
The `options` argument is optional. It can be an object with the fields:
- `validate` : whether to call validation method on saving the data (default = true)
- `returnVals` : whether or not to return the saved value, it also supports multiple insert (default = true)
`javascript
//Example
var coursesService = CoursesService.getService(); // returns singleton instance of coursesService
coursesService.createCourse({ // insert a single course data
title : "Physics I"
}).then(function(course){
//course : {id: ... , title : 'Physics I'}
})
coursesService.createCourse([ // insert multiple courses data
{ title : "Physics II"},
{ title : "Physics III"}
]).then(function(courses){
//course : [{id: ... , title : 'Physics II'}, {id: ... , title : 'Physics III'}]
})
`
Retrieve
CoursesService.prototype.findCourse([queryCriteria, options]) -> Promise
CoursesService.prototype.findAllCourse([queryCriteria, options]) -> Promise
The `queryCriteria` can be set as either object, function or string:
- `object/function`: the [filter](http://www.rethinkdb.com/api/javascript/#filter) method is invoked to query the data
- `string`: when options.index is not set, the value is treated as primary key, otherwise [getAll](http://www.rethinkdb.com/api/javascript/#getAll) method is invoked to query the data
In order to query all the data in the table, the `queryCriteria` argument can be set to `null` in `findAllCourses` method
The `options` argument is optional. It can be an object with the fields:
- `index` : same index value to be passed to the API
- `orderBy` : same as [orderBy](http://www.rethinkdb.com/api/javascript/#orderBy), with a minor syntax difference: `orderBy: r.desc('createTime')` can be written as `orderBy: 'createTime desc'`
- `fields` : same as [pluck](http://www.rethinkdb.com/api/javascript/#with_fields), it also can be provided with an array of field names: `fields : ['id', 'title', 'createTitle']`
- `with` : can be set as either string, array, or object
- `string` : name of the relationship previously defined
- `array` : an array of relational query options,
- `object` : used when need to apply some filtering or query nested relational data
- `related` : name of the relationship relative to the resulting queried data
- `filter` : filter the results using [filter](http://www.rethinkdb.com/api/javascript/#filter)
- `orderBy` : order the resulting relational data
- `fields` : pluck fields from the resulting relational data
- `with` : in case further nested relational data need to be fetched, same options above are also applied
`javascript
//Example
var lecturesService = LecturesService.getService(), // returns singleton instance of lecturesService
coursesService = CoursesService.getService();
lecturesService.findLecture('<API key>') // find lecture by id
lecturesService.findLecture(user.id, {index : 'userId'}) // retrieve a single lecture by secondary index 'userId'
lecturesService.findLecture({title : "Lecture I"}, {fields : 'title'}) // find lecture's title by title
lecturesService.findAllLecture(function(lecture){
return lecture.hasFields('videoId')
}, {orderBy : 'title desc'}) // find all lectures that has the videoId attribute, ordered by title
coursesService.findAllCourse(null, { // find all the courses with enrolled students, and private video lectures ordered by title
with : ['students', {
related : 'lectures',
filter : {
private : true
},
orderBy : 'title',
with : 'video'
}
]
}).then(function(courses){
/*
courses : [
{
id : '..',
title : 'Physics I',
lectures : [{ id: ..., title : 'Lecture I', private : true, videoId : ..., video : {...} }...],
students : [{ ... }]
},
]
*/
})
`
Update
CoursesService.prototype.updateCourse([jsonData, queryCriteria, options]) -> Promise
CoursesService.prototype.updateAllCourse([jsonData, queryCriteria, options]) -> Promise
The `jsonData` is the data to be updated, `queryCriteria` and `options` are the same ones described in [Retrieve section](#retrieve), with additional options: `validate`, `returnVals` described in the [Create section](#create)
`javascript
//Example
var videosService = VideosService.getService(); // returns singleton instance of videosService
videosService.updateVideo({url : "path/newName.mp4"}, '<API key>').then(function(){ // update video by it's primary key
}).then(function(video){
// video : video json data with updated values
})
videosService.updateAllVideo({url : "path/newName.mp4"}, req.user.id, {index : 'userId'}) // update all user's videos
.then(function(videos){
//returns an array of updated video values
})
`
Delete
CoursesService.prototype.deleteCourse([queryCriteria, options]) -> Promise
`queryCriteria` and `options` are the same ones described in [Retrieve section](#retrieve)
`javascript
//Example
coursesService.findCourse({title : 'Physics I'})
.then(function(course){
return lecturesService.deleteLecture(course.id, {index : 'courseId'}) // delete all lectures in 'Physics I'
})
coursesService.deleteCourse() // delete all courses
`
#Additional methods
Also the following additional methods are available, all of them return promise
`
CoursesService.prototype.validateCourse([jsonData]) -> Promise // return false to cancel the persistence task
CoursesService.prototype.beforeCreateCourse([jsonData]) -> Promise // return false to cancel the insert task
CoursesService.prototype.beforeUpdateCourse([jsonData]) -> Promise // return false to cancel the update task
CoursesService.prototype.beforeSaveCourse([jsonData]) -> Promise // return false to cancel the persistence task
CoursesService.prototype.afterCreateCourse([jsonData]) -> Promise
CoursesService.prototype.afterUpdateCourse([jsonData]) -> Promise
CoursesService.prototype.existCourse([jsonData]) -> Promise
`
#Extend default methods
Each instance of Rethinker exposes the following attributes/methods that allow to build a complex queries more easily:
- `r` : exposes the [rethinkdb API](http://www.rethinkdb.com/api/javascript/
- `table` : exposes the [table](http://www.rethinkdb.com/api/javascript/#table) instance, takes the this.tableName to initialize the `r.table(this.tableName)`
- `db` : expose the DB instance with the [run](http://www.rethinkdb.com/api/javascript/#run) method
- `buildQuery` : ` function buildQuery(queryCriteria, opts, tableName) -> Promise `
`javascript
OrdersService.prototype.<API key> ...
OrdersService.prototype.findAllOrder = function (queryData, opts, filters) { // override the default findAll method to support extra filter options
!opts && (opts = {});
!filters && (filters = {});
var orderQuery = filters.q || "",
query = this.buildQuery(queryData, _.merge({orderBy: [filters.sort, filters.order].join(' ')}, opts));
if (orderQuery.length > 0) {
query = query.filter(function (order) {
return order('orderId').match(orderQuery)
.or(order('code').eq(orderQuery))
.or(order('user')('name').match(orderQuery))
.or(order('user')('email').match(orderQuery))
.or(order('user')('address').match(orderQuery));
});
}
return this.db.run(query);
};
`
Rethinker also exposes a `DB` instance, basically it wraps around the [run](http://www.rethinkdb.com/api/javascript/#run) method using pooling and returns a promise
`javascript
var r = require('rethinkdb'),
DB = require('rethinker').DB,
db = new DB({
host: 'localhost',
port: 28015,
db: 'test',
pool: {
max: 100,
min: 0,
idleTimeoutMillis: 30000,
reapIntervalMillis: 15000
}
});
db.run(r.tableCreate('courses_students')).then(function(result){
});
`
#Save relational data
Currently it only supports saving has-one relationships
`javascript
var BookingService = Rethinker.extend({
modelName : 'Booking',
relations : {
hasOne : {
activeOrder : {
on : 'bookingId',
from : 'Order',
filter : {
active : true
}
sync : true
},
completedOrder : {
on : 'bookingId',
from : 'Order',
filter : {
active : false,
completed : true
}
sync : 'readOnly'
}
}
}
});
OrdersService = Rethinker.extend({
modelName : 'Order'
}
})
`
The `sync` property in each `relation` declaration is used to specify whether or not to save those related data.
When inserting the following data to the database:
`
var bookingService = new BookingService();
bookingService.createBooking({
date : new Date(),
userId : req.user.id,
activeOrder : {
active : true,
completed : false
},
completedOrder : {
active : false,
completed : true
}
});
`
It will generate the following data in 'booking' table and the 'orders' table:
`javascript
//booking table
{
id : '<API key>'
date : ...
userId : ..
}
//orders table
{
id : ...
active : true,
completed : false,
bookingId : '<API key>'
}
`
Notice that in order to avoid data duplicity, the `activeOrder`, and `completedOrder` attributes are not saved in the booking table. Also in the orders table, only the `activeOrder` is saved since it has the property `sync : true`
Please refer the [test](https://github.com/weisuke/rethinker/blob/master/test/test.js) file for further usage example of this option.
#FAQ
##Is this an ORM?
Not quite so, the main intend is to offer a wrapper around the official API, placing the main emphasis on querying relational (nested relational) data with less code, it's basically a mixin that decorates methods in a class prototype chain. If you are looking for fully featured ORM solution, there are couple of alternatives: [Thinky](http:
##Does this offer validation layer?
Personally i use the `validate` hook along with [express-validator](https://github.com/chriso/validator.js) library to validate the incoming data manually, might consider to add a validation layer in the future releases.
##Can the API be simplified?
Like instead of `coursesService.findAllCourse`, can't it just be `courses.findAll`?
Sure thing, it's just my personal preference, when i'm refactoring, finding 'findAllCourse' usage is a lot more easier, and less error prone than just 'findAll', will consider to add an extra option for this.
##What version of RethinkDB supports?
As RethinkDB hasn't reach the LTS release yet, use of latest version of RethinkDB would be recommended.
|
title: chap3
* content
{:toc}
* technique
basic swing
BPbasic swingLearningfoundationa suite of techniquesimproveimplemention
* technique
available techniques techniquein-depth study
Mastering those important techniquestechniqueimportant techniqueNNtechnique
techniquepick up
## The cross-entropy cost function
*
NNlearn fast from their errorssigmoid+quadratic costerrorneuronwb0errorwb0errorwberror
$$\begin{eqnarray}
\frac{\partial C}{\partial w} & = & (a-y)\sigma'(z) x = a \sigma'(z) \tag{55} \\
\frac{\partial C}{\partial b} & = & (a-y)\sigma'(z) = a \sigma'(z),
\tag{56}\end{eqnarray}$$
y00neuron
$z$$ \sigma'(z)$0$w$$b$ the problem of learning slowdown
$z$ neuron saturation
* cross-entropy cost function
cost function $ \sigma'(z)$, $b$$ \frac{\partial C}{\partial b} = (a-y)\sigma'(z)$, $ \frac{\partial C}{\partial b} = (a-y)$
$ \frac{\partial C}{\partial b} = \frac{\partial C}{\partial a} \sigma'(z) $ cost function $ \frac{\partial C}{\partial a} = (a-y) \frac{1}{ \sigma'(z) } = \frac{ a-y }{a(1-a) }= \frac{1}{1-a}-y[ \frac{1 }{a }+ \frac{1 }{1-a }] = \frac{1 }{1-a }= \frac{1-y }{1-a }- \frac{y }{a } $
$a$$ \begin{eqnarray}
C = -[y \ln a + (1-y) \ln (1-a)]+ {\rm constant},
\tag{76}\end{eqnarray}$
cross-entropy cost function
$ \begin{eqnarray}
C = -\frac{1}{n} \sum_x \left[y \ln a + (1-y ) \ln (1-a) \right],
\tag{57}\end{eqnarray}$
neuron$ \begin{eqnarray} C = -\frac{1}{n} \sum_x
\sum_j \left[y_j \ln a^L_j + (1-y_j) \ln (1-a^L_j) \right].
\tag{63}\end{eqnarray}$
* reasonable cost function
$C$$a$$y$ $C$ $y=0$$ a \approx 0$$ y \ln a$0$ (1-y ) \ln (1-a)$0; $y=1$,00
cross-entropyinterpretationinformation theory
cross-entropy is a measure of surprise$x \rightarrow y = y(x)$$x \rightarrow a = a(x)$ cross-entropysurprise
## Softmax
* softmax layer
the problem of learning slowdowncost functionoutput neuronsoftmax layers of neurons$ \begin{eqnarray}
a^L_j = \frac{e^{z^L_j}}{\sum_k e^{z^L_k}},
\tag{78}\end{eqnarray}$
layer$a^L_j$1 $a^L_j$ $a^L_j$1
* The learning slowdown problem
log-likelihood cost function$ \begin{eqnarray}
C \equiv -\ln a^L_y.
\tag{80}\end{eqnarray}$
Ministlabel7cost$-\ln a^L_7$
$\sigma^L_j= \frac{\partial C}{\partial z^L_j} $$ \frac{\partial a^L_j}{\partial z^L_k} $,$ \frac{\partial a^L_j}{\partial z^L_k}= \begin{cases}a^L_j(1-a^L_j) & j= k\\-a^L_ja^L_k & j\neq k\end{cases}$
$ \frac{\partial a^L_j}{\partial z^L_k}= a^L_j( \sigma_{jk} -a^L_k)$, $ \frac{\partial C}{\partial z^L_j}= a^L_k-\sigma_{jk}$
$j==k$$\frac{\partial C}{\partial z^L_j}= a^L_j-1$ $\frac{\partial C}{\partial z^L_j}= a^L_j$
j1$k\neq j$neuron0One-hot codingindex$k$neuronerror$ z^L_j$$$ \begin{eqnarray}
\frac{\partial C}{\partial b^L_j} & = & a^L_j-y_j \tag{81} \\
\frac{\partial C}{\partial w^L_{jk}} & = & a^{L-1}_k (a^L_j-y_j)
\tag{82}\end{eqnarray}$$
softmax layer+ log-likelihood cost functiont he learning slowdown problem
a sigmoid output layer and cross-entropy, or a softmax output layer and log-likelihoodoutput
* "softmax"
$ \begin{eqnarray}
a^L_j = \frac{e^{c z^L_j}}{\sum_k e^{c z^L_k}},
\tag{83}\end{eqnarray}$
$ c \rightarrow \infty $$z ^L_j$ $a ^L_j$10 $ c =1 $ softmaxmax a "softened" version of the maximum function
## Overfitting and regularization
*
Enrico Fermi"I remember my friend Johnny von Neumann used to say, with four parameters I can fit an elephant, and with five I can make him wiggle his trunk."
point free parametersdescrip
datadatamodelphenomenon capture any genuine insightsgeneralize to new situations.
*
Fermi and von Neumann4NN
Minist100030hidden neuronepoch100%test epochepoch
*
NN major problemtrain effectivelydetect
test accuracy on the test data and the training datastop improving
validation_dataclassification accuracy on the validation_data**early stopping**
validation_data
validation_data test_data test_data ** test_data ** validation_data test_data
approach hold out training_datahold out validation_data
test data validation_data test data validation_dat test data
* Regularization
reducing overfittingNNsizelarge networks have the potential to be more powerful than small networks
techniquestechniquesizeNNregularization techniques
weight decay or L2 regularization,regularized cross-entropy$ \begin{eqnarray} C = -\frac{1}{n} \sum_{xj} \left[ y_j \ln a^L_j+(1-y_j) \ln
(1-a^L_j)\right] + \frac{\lambda}{2n} \sum_w w^2.
\tag{85}\end{eqnarray}$
quadratic cost$ \begin{eqnarray} C = \frac{1}{2n} \sum_x \|y-a^L\|^2 +
\frac{\lambda}{2n} \sum_w w^2.
\tag{86}\end{eqnarray}$
$ \begin{eqnarray} C = C_0 + \frac{\lambda}{2n}
\sum_w w^2,
\tag{87}\end{eqnarray}$
NNprefersmall weightsweightconstbetween finding small weights and minimizing the original cost function
$$ \begin{eqnarray}
\frac{\partial C}{\partial w} & = & \frac{\partial C_0}{\partial w} +
\frac{\lambda}{n} w \tag{88} \\
\frac{\partial C}{\partial b} & = & \frac{\partial C_0}{\partial b}.
\tag{89}\end{eqnarray} $$
: $$\begin{eqnarray}
w & \rightarrow & w-\eta \frac{\partial C_0}{\partial
w}-\frac{\eta \lambda}{n} w \tag{91} \\
& = & \left(1-\frac{\eta \lambda}{n}\right) w -\eta \frac{\partial C_0}{\partial w}.
\tag{92} \end{eqnarray} $$
$ 1-\frac{\eta \lambda}{n}$$ -\eta \frac{\partial C_0}{\partial w}$
* Regularization
reduce overfitting and to increase classification accuracies the regularized runs have provided much more easily replicable results.
cost functionchanges due to gradient descent only make tiny changes to the direction, when the length is longproperly explore the weight space, and consequently harder to find good minima of the cost function.
(**length $\|\delta^l\|$**
*
smaller weights are, in some sense, lower complexity, and so provide a simpler and more powerful explanation for the data, and should thus be preferred
in sciencesimpler explanationsimpler explanationNNthe smallness of the weights the behaviour of the network won't change too much if we change a few random inputs here and there. a regularized network to learn the effects of local noise in the dataweightsNNlarge weights may change its behaviour quite a bit in response to small changes in the input.
NNdatapattern
"Occam's Razor"ideageneral scientific principlecomplex explanations
1 explanationsimple2 simplicity 3 the true test of a model is not simplicityphenomenon
* boss the question of how we generalize
approachgeneralization
develop more powerful techniques for regularization in artificial neural networksgeneralize well even from small data sets.
NN
"the dynamics of gradient descent learning in multilayer nets has a `self-regularization' effect"
* bias
biasbiasneuroninput
biasNNneuron, which is sometimes desirable
## Other techniques for regularization
* L1 regularization
$ \begin{eqnarray} C = C_0 + \frac{\lambda}{n} \sum_w |w|.
\tag{95}\end{eqnarray}$
$ \begin{eqnarray} \frac{\partial C}{\partial
w} = \frac{\partial C_0}{\partial w} + \frac{\lambda}{n} \, {\rm
sgn}(w),
\tag{96}\end{eqnarray} $
: $ \begin{eqnarray} w \rightarrow w' =
w-\frac{\eta \lambda}{n} \mbox{sgn}(w) - \eta \frac{\partial
C_0}{\partial w},
\tag{97}\end{eqnarray} $
L1 regularization0L2 regularization
L1 regularization shrinks the weight much more than L2 regularization. L1 regularizationhigh-importance connections0.
* Dropout
cost function
deletehidden neuronforward-propagatebackpropagate the result, also through the modified network.a mini-batch of examples
hidden neuronsNN hidden neurons
regularization
dropoutNNNNdifferent resultsThe reason is that the different networks may overfit in different ways, and averaging may help eliminate that kind of overfitting.
dropoutNNdropout procedureNN
techniquecomplex co-adaptations of neuronsneuronneuronlearn more robust features that are useful in conjunction with many different random subsets of the other neurons.
Dropout has been especially useful in training large, deep networks, where the problem of overfitting is often acute.
* Artificially expanding the training data
making many small rotations of all the MNIST training images,
The general principle is to expand the training data by applying operations that reflect real-world variation.
* An aside on big data and what it means to compare classification accuracies
In other words, more training data can sometimes compensate for differences in the machine learning algorithm used.
focus on finding new tricks to wring out improved performance on standard benchmark data sets.trickan accident of history
he message to take away, especially in practical applications, is that what we want is both better algorithms and better training data.
## Weight initialization
weightbias01hidden neuron
output neuroncost functionhidden neuron
hidden neuroninput neuron1000x5000,5001hidden neuron 500 1 neuron 1 1 bias5011z0$\sqrt{501} \approx 22.4$
$1/\sqrt{n_{\rm in}}$,bais1z0$\sqrt{500/1000+1} \approx1.22$
## Handwriting recognition revisited: the code
codecost functionclass
class CrossEntropyCost(object):
@staticmethod
def fn(a, y):
return np.sum(np.nan_to_num(-y*np.log(a)-(1-y)*np.log(1-a)))
@staticmethod
def delta(z, a, y):
return (a-y)
weight decayBut although the modification is tiny, it has a big impact on results!
>We've spent thousands of words discussing regularization. It's conceptually quite subtle and difficult to understand. And yet it was trivial to add to our program! It occurs surprisingly often that sophisticated techniques can be implemented with small changes to code.
## How to choose a neural network's hyper-parameters?
*
It's easy to feel lost in hyper-parameter space.
If the situation persists, it damages your confidence. Maybe neural networks are the wrong approach to your problem? Maybe you should quit your job and take up beekeeping?
*
help you develop a workflow that enables you to do a pretty good job setting hyper-parameters.
* Broad strategy
trivialthe first challenge is to get any non-trivial learning
****
minist01imagevalidation images monitoring
As with many things in life, getting started can be the hardest thing to do.
* Learning rate
cost-epoch
* Use early stopping to determine the number of training epochs
training epochs
To implement early stopping we need to say more precisely what it means that the classification accuracy has stopped improving.
best classification accuracy doesn't improve for quite some time
I suggest using the <API key> rule for initial experimentation, and gradually adopting more lenient rules, as you better understand the way your network trains: <API key>, <API key>, and so on.
* Automated techniques
how neural networks behave
grid search Bengio12paperachievements and the limitations of grid searchRandom search for hyper-parameter optimization
12BayesianPractical Bayesian optimization of machine learning algorithms https://github.com/jaberg/hyperopt
*
many papers setting out (sometimes contradictory) recommendations for how to proceed
papertrickPractical recommendations for gradient-based training of deep architectures, by Yoshua Bengio (2012).
Efficient BackProp, by Yann LeCun, Léon Bottou, Genevieve Orr and Klaus-Robert Müller (1998)
Neural Networks: Tricks of the Trade, edited by Grégoire Montavon, Geneviève Orr, and Klaus-Robert Müller.
## Other techniques
*
techniquetechniqueThe larger pointNN
* Hessian technique
BP$C(w+\Delta w)$ Hessian technique$ \begin{eqnarray}
C(w+\Delta w) \approx C(w) + \nabla C \cdot \Delta w +
\frac{1}{2} \Delta w^T H \Delta w.
\tag{105}\end{eqnarray}$
$ \begin{eqnarray}
\Delta w = -H^{-1} \nabla C.
\tag{106}\end{eqnarray}$
theoretical and empirical results Hessian techniqueBPcost function Hessian techniqueBP it's very difficult to apply in practice.
* Momentum-based gradient descent
inspireHessian techniqueinformation about how the gradient is changing.
## Other models of artificial neuron
sigmoid networkmodellearn faster, generalize better to test data, or perhaps do both.
tanh (pronounced "tanch") neuron$ \begin{eqnarray}
\tanh(z) \equiv \frac{e^z-e^{-z}}{e^z+e^{-z}}.
\tag{110}\end{eqnarray}$
$ \begin{eqnarray}
\sigma(z) = \frac{1+\tanh(z/2)}{2},
\tag{111}\end{eqnarray}$
sigmoidrescale[-1,1]
* tanh
sigmoid$a^l_k \delta^{l+1}_j$, $a^l_k$ $a^l_k \delta^{l+1}_j$$ \delta^{l+1}_j$neuron
tanh $a^l_k$
* neuron
* ReLUrectified linear neuron or rectified linear unit
$ \begin{eqnarray}
\max(0, w \cdot x+b).
\tag{112}\end{eqnarray}$
x
## On stories in neural networks
In many parts of science it's possible to obtain very solid, very reliable evidence for quite general hypotheses.
NNestablish reliable general statements
NNtests the limits of the human mind
investigate all these heuristic explanations in depth.
Does this mean you should reject heuristic explanations as unrigorous, and not sufficiently evidence-based? No! In fact, we need such heuristics to inspire and guide our thinking.
it's more important to explore boldly than it is to be rigorously correct in every step of your thinking.
we need good stories to help motivate and inspire us, and rigorous in-depth investigation in order to uncover the real facts of the matter.
|
from . import config
from django.shortcuts import render
from mwoauth import ConsumerToken, Handshaker, tokens
def requests_handshaker():
consumer_key = config.OAUTH_<TwitterConsumerkey> = config.O<API key>
consumer_token = ConsumerToken(consumer_key, consumer_secret)
return Handshaker("https://meta.wikimedia.org/w/index.php", consumer_token)
def get_username(request):
handshaker = requests_handshaker()
if 'access_token_key' in request.session:
access_key = request.session['access_token_key'].encode('utf-8')
access_secret = request.session['access_token_secret'].encode('utf-8')
access_token = tokens.AccessToken(key=access_key, secret=access_secret)
return handshaker.identify(access_token)['username']
else:
return None
|
using UnityEngine;
using System.Collections;
public class Menu : MonoBehaviour
{
public GUIStyle exit;
public GUIStyle play;
// Use this for initialization
void Start () {
Screen.showCursor = true;
}
// Update is called once per frame
void Update () {
}
void OnGUI() {
if (GUI.Button(new Rect(Screen.width/3,Screen.height/3*2, 250, 150), "", play))
Application.LoadLevel(1);
if (GUI.Button(new Rect(Screen.width/3*2,Screen.height/3*2, 250,150), "", exit))
Application.Quit();
}
}
|
package org.gw4e.eclipse.builder.exception;
import org.gw4e.eclipse.builder.GW4EParser;
import org.gw4e.eclipse.builder.Location;
public class <API key> extends <API key> {
private static final long serialVersionUID = 1L;
public <API key>(Location location, String message,<API key> p) {
super(location, message,p);
}
public int getProblemId () {
return GW4EParser.INVALID_SEVERITY;
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
namespace VSCodeDebug
{
public class Message
{
public int id { get; }
public string format { get; }
public dynamic variables { get; }
public dynamic showUser { get; }
public dynamic sendTelemetry { get; }
public Message(int id, string format, dynamic variables = null, bool user = true, bool telemetry = false) {
this.id = id;
this.format = format;
this.variables = variables;
this.showUser = user;
this.sendTelemetry = telemetry;
}
}
public class StackFrame
{
public int id { get; }
public Source source { get; }
public int line { get; }
public int column { get; }
public string name { get; }
public string presentationHint { get; }
public StackFrame(int id, string name, Source source, int line, int column, string hint) {
this.id = id;
this.name = name;
this.source = source;
// These should NEVER be negative
this.line = Math.Max(0, line);
this.column = Math.Max(0, column);
this.presentationHint = hint;
}
}
public class Scope
{
public string name { get; }
public int variablesReference { get; }
public bool expensive { get; }
public Scope(string name, int variablesReference, bool expensive = false) {
this.name = name;
this.variablesReference = variablesReference;
this.expensive = expensive;
}
}
public class Variable
{
public string name { get; }
public string value { get; }
public string type { get; }
public int variablesReference { get; }
public Variable(string name, string value, string type, int variablesReference = 0) {
this.name = name;
this.value = value;
this.type = type;
this.variablesReference = variablesReference;
}
}
public class Thread
{
public int id { get; }
public string name { get; }
public Thread(int id, string name) {
this.id = id;
if (name == null || name.Length == 0) {
this.name = string.Format("Thread #{0}", id);
} else {
this.name = name;
}
}
}
public class Source
{
public string name { get; }
public string path { get; }
public int sourceReference { get; }
public string presentationHint { get; }
public Source(string name, string path, int sourceReference, string hint) {
this.name = name;
this.path = path;
this.sourceReference = sourceReference;
this.presentationHint = hint;
}
}
public class Breakpoint
{
public bool verified { get; }
public int line { get; }
public Breakpoint(bool verified, int line) {
this.verified = verified;
this.line = line;
}
}
public class InitializedEvent : Event
{
public InitializedEvent()
: base("initialized") { }
}
public class StoppedEvent : Event
{
public StoppedEvent(int tid, string reasn, string txt = null)
: base("stopped", new {
threadId = tid,
reason = reasn,
text = txt
}) { }
}
public class ExitedEvent : Event
{
public ExitedEvent(int exCode)
: base("exited", new { exitCode = exCode } ) { }
}
public class TerminatedEvent : Event
{
public TerminatedEvent()
: base("terminated") { }
}
public class ThreadEvent : Event
{
public ThreadEvent(string reasn, int tid)
: base("thread", new {
reason = reasn,
threadId = tid
}) { }
}
public class OutputEvent : Event
{
public OutputEvent(string cat, string outpt)
: base("output", new {
category = cat,
output = outpt
}) { }
}
public class Capabilities : ResponseBody {
public bool <API key>;
public bool <API key>;
public bool <API key>;
public bool <API key>;
public dynamic[] <API key>;
}
public class ErrorResponseBody : ResponseBody {
public Message error { get; }
public ErrorResponseBody(Message error) {
this.error = error;
}
}
public class <API key> : ResponseBody
{
public StackFrame[] stackFrames { get; }
public int totalFrames { get; }
public <API key>(List<StackFrame> frames, int total) {
stackFrames = frames.ToArray<StackFrame>();
totalFrames = total;
}
}
public class ScopesResponseBody : ResponseBody
{
public Scope[] scopes { get; }
public ScopesResponseBody(List<Scope> scps) {
scopes = scps.ToArray<Scope>();
}
}
public class <API key> : ResponseBody
{
public Variable[] variables { get; }
public <API key>(List<Variable> vars) {
variables = vars.ToArray<Variable>();
}
}
public class ThreadsResponseBody : ResponseBody
{
public Thread[] threads { get; }
public ThreadsResponseBody(List<Thread> ths) {
threads = ths.ToArray<Thread>();
}
}
public class <API key> : ResponseBody
{
public string result { get; }
public int variablesReference { get; }
public <API key>(string value, int reff = 0) {
result = value;
variablesReference = reff;
}
}
public class <API key> : ResponseBody
{
public Breakpoint[] breakpoints { get; }
public <API key>(List<Breakpoint> bpts = null) {
if (bpts == null)
breakpoints = new Breakpoint[0];
else
breakpoints = bpts.ToArray<Breakpoint>();
}
}
public abstract class DebugSession : ProtocolServer
{
private bool <API key> = true;
private bool _clientPathsAreURI = true;
public DebugSession()
{
}
public void SendResponse(Response response, dynamic body = null)
{
if (body != null) {
response.SetBody(body);
}
SendMessage(response);
}
public void SendErrorResponse(Response response, int id, string format, dynamic arguments = null, bool user = true, bool telemetry = false)
{
var msg = new Message(id, format, arguments, user, telemetry);
var message = Utilities.ExpandVariables(msg.format, msg.variables);
response.SetErrorBody(message, new ErrorResponseBody(msg));
SendMessage(response);
}
protected override void DispatchRequest(string command, dynamic args, Response response)
{
if (args == null) {
args = new { };
}
try {
switch (command) {
case "initialize":
if (args.linesStartAt1 != null) {
<API key> = (bool)args.linesStartAt1;
}
var pathFormat = (string)args.pathFormat;
if (pathFormat != null) {
switch (pathFormat) {
case "uri":
_clientPathsAreURI = true;
break;
case "path":
_clientPathsAreURI = false;
break;
default:
SendErrorResponse(response, 1015, "initialize: bad value '{_format}' for pathFormat", new { _format = pathFormat });
return;
}
}
Initialize(response, args);
break;
case "launch":
Launch(response, args);
break;
case "attach":
Attach(response, args);
break;
case "disconnect":
Disconnect(response, args);
break;
case "next":
Next(response, args);
break;
case "continue":
Continue(response, args);
break;
case "stepIn":
StepIn(response, args);
break;
case "stepOut":
StepOut(response, args);
break;
case "pause":
Pause(response, args);
break;
case "stackTrace":
StackTrace(response, args);
break;
case "scopes":
Scopes(response, args);
break;
case "variables":
Variables(response, args);
break;
case "source":
Source(response, args);
break;
case "threads":
Threads(response, args);
break;
case "setBreakpoints":
SetBreakpoints(response, args);
break;
case "<API key>":
<API key>(response, args);
break;
case "<API key>":
<API key>(response, args);
break;
case "evaluate":
Evaluate(response, args);
break;
default:
SendErrorResponse(response, 1014, "unrecognized request: {_request}", new { _request = command });
break;
}
}
catch (Exception e) {
SendErrorResponse(response, 1104, "error while processing request '{_request}' (exception: {_exception})", new { _request = command, _exception = e.Message });
}
if (command == "disconnect") {
Stop();
}
}
public abstract void Initialize(Response response, dynamic args);
public abstract void Launch(Response response, dynamic arguments);
public abstract void Attach(Response response, dynamic arguments);
public abstract void Disconnect(Response response, dynamic arguments);
public virtual void <API key>(Response response, dynamic arguments)
{
}
public virtual void <API key>(Response response, dynamic arguments)
{
}
public abstract void SetBreakpoints(Response response, dynamic arguments);
public abstract void Continue(Response response, dynamic arguments);
public abstract void Next(Response response, dynamic arguments);
public abstract void StepIn(Response response, dynamic arguments);
public abstract void StepOut(Response response, dynamic arguments);
public abstract void Pause(Response response, dynamic arguments);
public abstract void StackTrace(Response response, dynamic arguments);
public abstract void Scopes(Response response, dynamic arguments);
public abstract void Variables(Response response, dynamic arguments);
public abstract void Source(Response response, dynamic arguments);
public abstract void Threads(Response response, dynamic arguments);
public abstract void Evaluate(Response response, dynamic arguments);
// protected
protected int <API key>(int line)
{
return <API key> ? line : line - 1;
}
protected int <API key>(int line)
{
return <API key> ? line : line + 1;
}
protected string <API key>(string path)
{
if (_clientPathsAreURI) {
try {
var uri = new System.Uri(path);
return uri.AbsoluteUri;
}
catch {
return null;
}
}
else {
return path;
}
}
protected string <API key>(string clientPath)
{
if (clientPath == null) {
return null;
}
if (_clientPathsAreURI) {
if (Uri.<API key>(clientPath, UriKind.Absolute)) {
Uri uri = new Uri(clientPath);
return uri.LocalPath;
}
Program.Log("path not well formed: '{0}'", clientPath);
return null;
}
else {
return clientPath;
}
}
}
}
|
<!DOCTYPE HTML PUBLIC "-
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.6.0_27) on Thu Jan 23 20:12:05 EST 2014 -->
<meta http-equiv="Content-Type" content="text/html" charset="utf-8">
<title>Uses of Class org.apache.lucene.search.BooleanQuery.TooManyClauses (Lucene 4.6.1 API)</title>
<meta name="date" content="2014-01-23">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Class org.apache.lucene.search.BooleanQuery.TooManyClauses (Lucene 4.6.1 API)";
}
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="topNav"><a name="navbar_top">
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../org/apache/lucene/search/BooleanQuery.TooManyClauses.html" title="class in org.apache.lucene.search">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>PREV</li>
<li>NEXT</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/lucene/search//<API key>.TooManyClauses.html" target="_top">FRAMES</a></li>
<li><a href="BooleanQuery.TooManyClauses.html" target="_top">NO FRAMES</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<a name="skip-navbar_top">
</a></div>
<div class="header">
<h2 title="Uses of Class org.apache.lucene.search.BooleanQuery.TooManyClauses" class="title">Uses of Class<br>org.apache.lucene.search.BooleanQuery.TooManyClauses</h2>
</div>
<div class="classUseContainer">No usage of org.apache.lucene.search.BooleanQuery.TooManyClauses</div>
<div class="bottomNav"><a name="navbar_bottom">
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="<API key>">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../org/apache/lucene/search/BooleanQuery.TooManyClauses.html" title="class in org.apache.lucene.search">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>PREV</li>
<li>NEXT</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/lucene/search//<API key>.TooManyClauses.html" target="_top">FRAMES</a></li>
<li><a href="BooleanQuery.TooManyClauses.html" target="_top">NO FRAMES</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<a name="skip-navbar_bottom">
</a></div>
<p class="legalCopy"><small>
<i>Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.</i>
<script src='../../../../../prettify.js' type='text/javascript'></script>
<script type='text/javascript'>
(function(){
var oldonload = window.onload;
if (typeof oldonload != 'function') {
window.onload = prettyPrint;
} else {
window.onload = function() {
oldonload();
prettyPrint();
}
}
})();
</script>
</small></p>
</body>
</html>
|
/**
* This is where the magic happens. The Game object is the heart of your game,
* providing quick access to common functions and handling the boot process.
*
* "Hell, there are no rules here - we're trying to accomplish something."
* Thomas A. Edison
*
* @class Phaser.Game
* @constructor
* @param {object} [gameConfig={}] - The game configuration object
*/
Phaser.Game = function (gameConfig) {
/**
* @property {number} id - Phaser Game ID (for when Pixi supports multiple instances).
* @readonly
*/
this.id = Phaser.GAMES.push(this) - 1;
/**
* @property {object} config - The Phaser.Game configuration object.
*/
this.config = null;
/**
* @property {object} physicsConfig - The Phaser.Physics.World configuration object.
*/
this.physicsConfig = null;
/**
* @property {string|HTMLElement} parent - The Games DOM parent.
* @default
*/
this.parent = '';
/**
* The current Game Width in pixels.
*
* _Do not modify this property directly:_ use {@link Phaser.ScaleManager#setGameSize} - eg. `game.scale.setGameSize(width, height)` - instead.
*
* @property {integer} width
* @readonly
* @default
*/
this.width = 800;
/**
* The current Game Height in pixels.
*
* _Do not modify this property directly:_ use {@link Phaser.ScaleManager#setGameSize} - eg. `game.scale.setGameSize(width, height)` - instead.
*
* @property {integer} height
* @readonly
* @default
*/
this.height = 600;
/**
* The resolution of your game. This value is read only, but can be changed at start time it via a game configuration object.
*
* @property {integer} resolution
* @readonly
* @default
*/
this.resolution = 1;
/**
* @property {integer} _width - Private internal var.
* @private
*/
this._width = 800;
/**
* @property {integer} _height - Private internal var.
* @private
*/
this._height = 600;
/**
* @property {boolean} transparent - Use a transparent canvas background or not.
* @default
*/
this.transparent = false;
/**
* @property {boolean} antialias - Anti-alias graphics. By default scaled images are smoothed in Canvas and WebGL, set anti-alias to false to disable this globally.
* @default
*/
this.antialias = false;
/**
* @property {boolean} <API key> - The value of the <API key> flag affects whether or not the contents of the stencil buffer is retained after rendering.
* @default
*/
this.<API key> = false;
/**
* Clear the Canvas each frame before rendering the display list.
* You can set this to `false` to gain some performance if your game always contains a background that completely fills the display.
* @property {boolean} clearBeforeRender
* @default
*/
this.clearBeforeRender = true;
/**
* @property {PIXI.CanvasRenderer|PIXI.WebGLRenderer} renderer - The Pixi Renderer.
* @protected
*/
this.renderer = null;
/**
* @property {number} renderType - The Renderer this game will use. Either Phaser.AUTO, Phaser.CANVAS, Phaser.WEBGL, or Phaser.HEADLESS.
* @readonly
*/
this.renderType = Phaser.AUTO;
/**
* @property {Phaser.StateManager} state - The StateManager.
*/
this.state = null;
/**
* @property {boolean} isBooted - Whether the game engine is booted, aka available.
* @readonly
*/
this.isBooted = false;
/**
* @property {boolean} isRunning - Is game running or paused?
* @readonly
*/
this.isRunning = false;
/**
* @property {Phaser.<API key>} raf - Automatically handles the core game loop via <API key> or setTimeout
* @protected
*/
this.raf = null;
/**
* @property {Phaser.GameObjectFactory} add - Reference to the Phaser.GameObjectFactory.
*/
this.add = null;
/**
* @property {Phaser.GameObjectCreator} make - Reference to the GameObject Creator.
*/
this.make = null;
/**
* @property {Phaser.Cache} cache - Reference to the assets cache.
*/
this.cache = null;
/**
* @property {Phaser.Input} input - Reference to the input manager
*/
this.input = null;
/**
* @property {Phaser.Loader} load - Reference to the assets loader.
*/
this.load = null;
/**
* @property {Phaser.Math} math - Reference to the math helper.
*/
this.math = null;
/**
* @property {Phaser.Net} net - Reference to the network class.
*/
this.net = null;
/**
* @property {Phaser.ScaleManager} scale - The game scale manager.
*/
this.scale = null;
/**
* @property {Phaser.SoundManager} sound - Reference to the sound manager.
*/
this.sound = null;
/**
* @property {Phaser.Stage} stage - Reference to the stage.
*/
this.stage = null;
/**
* @property {Phaser.Time} time - Reference to the core game clock.
*/
this.time = null;
/**
* @property {Phaser.TweenManager} tweens - Reference to the tween manager.
*/
this.tweens = null;
/**
* @property {Phaser.World} world - Reference to the world.
*/
this.world = null;
/**
* @property {Phaser.Physics} physics - Reference to the physics manager.
*/
this.physics = null;
/**
* @property {Phaser.PluginManager} plugins - Reference to the plugin manager.
*/
this.plugins = null;
/**
* @property {Phaser.RandomDataGenerator} rnd - Instance of repeatable random data generator helper.
*/
this.rnd = null;
/**
* @property {Phaser.Device} device - Contains device information and capabilities.
*/
this.device = Phaser.Device;
/**
* @property {Phaser.Camera} camera - A handy reference to world.camera.
*/
this.camera = null;
/**
* @property {HTMLCanvasElement} canvas - A handy reference to renderer.view, the canvas that the game is being rendered in to.
*/
this.canvas = null;
/**
* @property {<API key>} context - A handy reference to renderer.context (only set for CANVAS games, not WebGL)
*/
this.context = null;
/**
* @property {Phaser.Utils.Debug} debug - A set of useful debug utilities.
*/
this.debug = null;
/**
* @property {Phaser.Particles} particles - The Particle Manager.
*/
this.particles = null;
/**
* @property {Phaser.Create} create - The Asset Generator.
*/
this.create = null;
/**
* If `false` Phaser will automatically render the display list every update. If `true` the render loop will be skipped.
* You can toggle this value at run-time to gain exact control over when Phaser renders. This can be useful in certain types of game or application.
* Please note that if you don't render the display list then none of the game object transforms will be updated, so use this value carefully.
* @property {boolean} lockRender
* @default
*/
this.lockRender = false;
/**
* @property {boolean} stepping - Enable core loop stepping with Game.enableStep().
* @default
* @readonly
*/
this.stepping = false;
/**
* @property {boolean} pendingStep - An internal property used by enableStep, but also useful to query from your own game objects.
* @default
* @readonly
*/
this.pendingStep = false;
/**
* @property {number} stepCount - When stepping is enabled this contains the current step cycle.
* @default
* @readonly
*/
this.stepCount = 0;
/**
* @property {Phaser.Signal} onPause - This event is fired when the game pauses.
*/
this.onPause = null;
/**
* @property {Phaser.Signal} onResume - This event is fired when the game resumes from a paused state.
*/
this.onResume = null;
/**
* @property {Phaser.Signal} onBlur - This event is fired when the game no longer has focus (typically on page hide).
*/
this.onBlur = null;
/**
* @property {Phaser.Signal} onFocus - This event is fired when the game has focus (typically on page show).
*/
this.onFocus = null;
/**
* @property {boolean} _paused - Is game paused?
* @private
*/
this._paused = false;
/**
* @property {boolean} _codePaused - Was the game paused via code or a visibility change?
* @private
*/
this._codePaused = false;
this.currentUpdateID = 0;
/**
* Number of logic updates expected to occur this render frame; will be 1 unless there are catch-ups required (and allowed).
* @property {integer} updatesThisFrame
* @protected
*/
this.updatesThisFrame = 1;
/**
* @property {number} _deltaTime - Accumulate elapsed time until a logic update is due.
* @private
*/
this._deltaTime = 0;
/**
* @property {number} _lastCount - Remember how many 'catch-up' iterations were used on the logicUpdate last frame.
* @private
*/
this._lastCount = 0;
/**
* @property {number} _spiraling - If the 'catch-up' iterations are spiraling out of control, this counter is incremented.
* @private
*/
this._spiraling = 0;
/**
* @property {boolean} _kickstart - Force a logic update + render by default (always set on Boot and State swap)
* @private
*/
this._kickstart = true;
/**
* If the game is struggling to maintain the desired FPS, this signal will be dispatched.
* The desired/chosen FPS should probably be closer to the {@link Phaser.Time#suggestedFps} value.
* @property {Phaser.Signal} fpsProblemNotifier
* @public
*/
this.fpsProblemNotifier = new Phaser.Signal();
/**
* @property {boolean} forceSingleUpdate - Should the game loop force a logic update, regardless of the delta timer? Set to true if you know you need this. You can toggle it on the fly.
*/
this.forceSingleUpdate = true;
/**
* @property {number} _nextNotification - The soonest game.time.time value that the next fpsProblemNotifier can be dispatched.
* @private
*/
this.<API key> = 0;
// Parse the configuration object
if (typeof gameConfig !== 'object')
{
throw new Error('Missing game configuration object: ' + gameConfig);
}
this.parseConfig(gameConfig);
this.device.whenReady(this.boot, this);
return this;
};
Phaser.Game.prototype = {
/**
* Parses a Game configuration object.
*
* @method Phaser.Game#parseConfig
* @protected
*/
parseConfig: function (config) {
this.config = config;
if (config['enableDebug'] === undefined)
{
this.config.enableDebug = true;
}
if (config['width'])
{
this._width = config['width'];
}
if (config['height'])
{
this._height = config['height'];
}
if (config['renderer'])
{
this.renderType = config['renderer'];
}
if (config['parent'])
{
this.parent = config['parent'];
}
if (config['transparent'] !== undefined)
{
this.transparent = config['transparent'];
}
if (config['antialias'] !== undefined)
{
this.antialias = config['antialias'];
}
if (config['resolution'])
{
this.resolution = config['resolution'];
}
if (config['<API key>'] !== undefined)
{
this.<API key> = config['<API key>'];
}
if (config['clearBeforeRender'] !== undefined)
{
this.clearBeforeRender = config['clearBeforeRender'];
}
if (config['physicsConfig'])
{
this.physicsConfig = config['physicsConfig'];
}
var seed = [(Date.now() * Math.random()).toString()];
if (config['seed'])
{
seed = config['seed'];
}
this.rnd = new Phaser.RandomDataGenerator(seed);
var state = null;
if (config['state'])
{
state = config['state'];
}
this.state = new Phaser.StateManager(this, state);
},
/**
* Initialize engine sub modules and start the game.
*
* @method Phaser.Game#boot
* @protected
*/
boot: function () {
if (this.isBooted)
{
return;
}
this.onPause = new Phaser.Signal();
this.onResume = new Phaser.Signal();
this.onBlur = new Phaser.Signal();
this.onFocus = new Phaser.Signal();
this.isBooted = true;
PIXI.game = this;
this.math = Phaser.Math;
this.scale = new Phaser.ScaleManager(this, this._width, this._height);
this.stage = new Phaser.Stage(this);
this.setUpRenderer();
this.world = new Phaser.World(this);
this.add = new Phaser.GameObjectFactory(this);
this.make = new Phaser.GameObjectCreator(this);
this.cache = new Phaser.Cache(this);
this.load = new Phaser.Loader(this);
this.time = new Phaser.Time(this);
this.tweens = new Phaser.TweenManager(this);
this.input = new Phaser.Input(this);
this.sound = new Phaser.SoundManager(this);
this.physics = new Phaser.Physics(this, this.physicsConfig);
this.particles = new Phaser.Particles(this);
this.create = new Phaser.Create(this);
this.plugins = new Phaser.PluginManager(this);
this.net = new Phaser.Net(this);
this.time.boot();
this.stage.boot();
this.world.boot();
this.scale.boot();
this.input.boot();
this.sound.boot();
this.state.boot();
if (this.config['enableDebug'])
{
this.debug = new Phaser.Utils.Debug(this);
this.debug.boot();
}
else
{
this.debug = { preUpdate: function () {}, update: function () {}, reset: function () {} };
}
this.showDebugHeader();
this.isRunning = true;
if (this.config && this.config['forceSetTimeOut'])
{
this.raf = new Phaser.<API key>(this, this.config['forceSetTimeOut']);
}
else
{
this.raf = new Phaser.<API key>(this, false);
}
this._kickstart = true;
if (window['focus'])
{
if (!window['PhaserGlobal'] || (window['PhaserGlobal'] && !window['PhaserGlobal'].stopFocus))
{
window.focus();
}
}
this.raf.start();
},
/**
* Displays a Phaser version debug header in the console.
*
* @method Phaser.Game#showDebugHeader
* @protected
*/
showDebugHeader: function () {
if (window['PhaserGlobal'] && window['PhaserGlobal'].hideBanner)
{
return;
}
var v = Phaser.VERSION;
var r = 'Canvas';
var a = 'HTML Audio';
var c = 1;
if (this.renderType === Phaser.WEBGL)
{
r = 'WebGL';
c++;
}
else if (this.renderType === Phaser.HEADLESS)
{
r = 'Headless';
}
if (this.device.webAudio)
{
a = 'WebAudio';
c++;
}
if (this.device.chrome)
{
var args = [
'%c %c %c Phaser v' + v + ' | Pixi.js | ' + r + ' | ' + a + ' %c %c ' + '%c http://phaser.io %c\u2665%c\u2665%c\u2665',
'background: #fb8cb3',
'background: #d44a52',
'color: #ffffff; background: #871905;',
'background: #d44a52',
'background: #fb8cb3',
'background: #ffffff'
];
for (var i = 0; i < 3; i++)
{
if (i < c)
{
args.push('color: #ff2424; background: #fff');
}
else
{
args.push('color: #959595; background: #fff');
}
}
console.log.apply(console, args);
}
else if (window['console'])
{
console.log('Phaser v' + v + ' | Pixi.js ' + PIXI.VERSION + ' | ' + r + ' | ' + a + ' | http://phaser.io');
}
},
/**
* Checks if the device is capable of using the requested renderer and sets it up or an alternative if not.
*
* @method Phaser.Game#setUpRenderer
* @protected
*/
setUpRenderer: function () {
if (this.config['canvas'])
{
this.canvas = this.config['canvas'];
}
else
{
this.canvas = Phaser.Canvas.create(this, this.width, this.height, this.config['canvasID'], true);
}
if (this.config['canvasStyle'])
{
this.canvas.style = this.config['canvasStyle'];
}
else
{
this.canvas.style['-webkit-full-screen'] = 'width: 100%; height: 100%';
}
if (this.renderType === Phaser.HEADLESS || this.renderType === Phaser.CANVAS || (this.renderType === Phaser.AUTO && !this.device.webGL))
{
if (this.device.canvas)
{
// They requested Canvas and their browser supports it
this.renderType = Phaser.CANVAS;
this.renderer = new PIXI.CanvasRenderer(this);
this.context = this.renderer.context;
}
else
{
throw new Error('Phaser.Game - Cannot create Canvas or WebGL context, aborting.');
}
}
else
{
// They requested WebGL and their browser supports it
this.renderType = Phaser.WEBGL;
this.renderer = new PIXI.WebGLRenderer(this);
this.context = null;
this.canvas.addEventListener('webglcontextlost', this.contextLost.bind(this), false);
this.canvas.addEventListener('<API key>', this.contextRestored.bind(this), false);
}
if (this.device.cocoonJS)
{
this.canvas.screencanvas = (this.renderType === Phaser.CANVAS) ? true : false;
}
if (this.renderType !== Phaser.HEADLESS)
{
this.stage.smoothed = this.antialias;
Phaser.Canvas.addToDOM(this.canvas, this.parent, false);
Phaser.Canvas.setTouchAction(this.canvas);
}
},
/**
* Handles WebGL context loss.
*
* @method Phaser.Game#contextLost
* @private
* @param {Event} event - The webglcontextlost event.
*/
contextLost: function (event) {
event.preventDefault();
this.renderer.contextLost = true;
},
/**
* Handles WebGL context restoration.
*
* @method Phaser.Game#contextRestored
* @private
*/
contextRestored: function () {
this.renderer.initContext();
this.cache.clearGLTextures();
this.renderer.contextLost = false;
},
/**
* The core game loop.
*
* @method Phaser.Game#update
* @protected
* @param {number} time - The current time as provided by <API key>.
*/
update: function (time) {
this.time.update(time);
if (this._kickstart)
{
this.updateLogic(this.time.desiredFpsMult);
// call the game render update exactly once every frame
this.updateRender(this.time.slowMotion * this.time.desiredFps);
this._kickstart = false;
return;
}
// if the logic time is spiraling upwards, skip a frame entirely
if (this._spiraling > 1 && !this.forceSingleUpdate)
{
// cause an event to warn the program that this CPU can't keep up with the current desiredFps rate
if (this.time.time > this.<API key>)
{
// only permit one fps notification per 10 seconds
this.<API key> = this.time.time + 10000;
// dispatch the notification signal
this.fpsProblemNotifier.dispatch();
}
// reset the _deltaTime accumulator which will cause all pending dropped frames to be permanently skipped
this._deltaTime = 0;
this._spiraling = 0;
// call the game render update exactly once every frame
this.updateRender(this.time.slowMotion * this.time.desiredFps);
}
else
{
// step size taking into account the slow motion speed
var slowStep = this.time.slowMotion * 1000.0 / this.time.desiredFps;
// accumulate time until the slowStep threshold is met or exceeded... up to a limit of 3 catch-up frames at slowStep intervals
this._deltaTime += Math.max(Math.min(slowStep * 3, this.time.elapsed), 0);
// call the game update logic multiple times if necessary to "catch up" with dropped frames
// unless forceSingleUpdate is true
var count = 0;
this.updatesThisFrame = Math.floor(this._deltaTime / slowStep);
if (this.forceSingleUpdate)
{
this.updatesThisFrame = Math.min(1, this.updatesThisFrame);
}
while (this._deltaTime >= slowStep)
{
this._deltaTime -= slowStep;
this.currentUpdateID = count;
this.updateLogic(this.time.desiredFpsMult);
count++;
if (this.forceSingleUpdate && count === 1)
{
break;
}
else
{
this.time.refresh();
}
}
// detect spiraling (if the catch-up loop isn't fast enough, the number of iterations will increase constantly)
if (count > this._lastCount)
{
this._spiraling++;
}
else if (count < this._lastCount)
{
// looks like it caught up successfully, reset the spiral alert counter
this._spiraling = 0;
}
this._lastCount = count;
// call the game render update exactly once every frame unless we're playing catch-up from a spiral condition
this.updateRender(this._deltaTime / slowStep);
}
},
/**
* Updates all logic subsystems in Phaser. Called automatically by Game.update.
*
* @method Phaser.Game#updateLogic
* @protected
* @param {number} timeStep - The current timeStep value as determined by Game.update.
*/
updateLogic: function (timeStep) {
if (!this._paused && !this.pendingStep)
{
if (this.stepping)
{
this.pendingStep = true;
}
this.scale.preUpdate();
this.debug.preUpdate();
this.camera.preUpdate();
this.physics.preUpdate();
this.state.preUpdate(timeStep);
this.plugins.preUpdate(timeStep);
this.stage.preUpdate();
this.state.update();
this.stage.update();
this.tweens.update();
this.sound.update();
this.input.update();
this.physics.update();
this.particles.update();
this.plugins.update();
this.stage.postUpdate();
this.plugins.postUpdate();
}
else
{
// Scaling and device orientation changes are still reflected when paused.
this.scale.pauseUpdate();
this.state.pauseUpdate();
this.debug.preUpdate();
}
this.stage.updateTransform();
},
/**
* Runs the Render cycle.
* It starts by calling State.preRender. In here you can do any last minute adjustments of display objects as required.
* It then calls the renderer, which renders the entire display list, starting from the Stage object and working down.
* It then calls plugin.render on any loaded plugins, in the order in which they were enabled.
* After this State.render is called. Any rendering that happens here will take place on-top of the display list.
* Finally plugin.postRender is called on any loaded plugins, in the order in which they were enabled.
* This method is called automatically by Game.update, you don't need to call it directly.
* Should you wish to have fine-grained control over when Phaser renders then use the `Game.lockRender` boolean.
* Phaser will only render when this boolean is `false`.
*
* @method Phaser.Game#updateRender
* @protected
* @param {number} elapsedTime - The time elapsed since the last update.
*/
updateRender: function (elapsedTime) {
if (this.lockRender)
{
return;
}
this.state.preRender(elapsedTime);
if (this.renderType !== Phaser.HEADLESS)
{
this.renderer.render(this.stage);
this.plugins.render(elapsedTime);
this.state.render(elapsedTime);
}
this.plugins.postRender(elapsedTime);
},
/**
* Enable core game loop stepping. When enabled you must call game.step() directly (perhaps via a DOM button?)
* Calling step will advance the game loop by one frame. This is extremely useful for hard to track down errors!
*
* @method Phaser.Game#enableStep
*/
enableStep: function () {
this.stepping = true;
this.pendingStep = false;
this.stepCount = 0;
},
/**
* Disables core game loop stepping.
*
* @method Phaser.Game#disableStep
*/
disableStep: function () {
this.stepping = false;
this.pendingStep = false;
},
/**
* When stepping is enabled you must call this function directly (perhaps via a DOM button?) to advance the game loop by one frame.
* This is extremely useful to hard to track down errors! Use the internal stepCount property to monitor progress.
*
* @method Phaser.Game#step
*/
step: function () {
this.pendingStep = false;
this.stepCount++;
},
/**
* Nukes the entire game from orbit.
*
* Calls destroy on Game.state, Game.sound, Game.scale, Game.stage, Game.input, Game.physics and Game.plugins.
*
* Then sets all of those local handlers to null, destroys the renderer, removes the canvas from the DOM
* and resets the PIXI default renderer.
*
* @method Phaser.Game#destroy
*/
destroy: function () {
this.raf.stop();
this.state.destroy();
this.sound.destroy();
this.scale.destroy();
this.stage.destroy();
this.input.destroy();
this.physics.destroy();
this.plugins.destroy();
this.state = null;
this.sound = null;
this.scale = null;
this.stage = null;
this.input = null;
this.physics = null;
this.plugins = null;
this.cache = null;
this.load = null;
this.time = null;
this.world = null;
this.isBooted = false;
this.renderer.destroy(false);
Phaser.Canvas.removeFromDOM(this.canvas);
PIXI.defaultRenderer = null;
Phaser.GAMES[this.id] = null;
},
/**
* Called by the Stage visibility handler.
*
* @method Phaser.Game#gamePaused
* @param {object} event - The DOM event that caused the game to pause, if any.
* @protected
*/
gamePaused: function (event) {
// If the game is already paused it was done via game code, so don't re-pause it
if (!this._paused)
{
this._paused = true;
this.time.gamePaused();
if (this.sound.muteOnPause)
{
this.sound.setMute();
}
this.onPause.dispatch(event);
if (this.device.cordova && this.device.iOS)
{
this.lockRender = true;
}
}
},
/**
* Called by the Stage visibility handler.
*
* @method Phaser.Game#gameResumed
* @param {object} event - The DOM event that caused the game to pause, if any.
* @protected
*/
gameResumed: function (event) {
// Game is paused, but wasn't paused via code, so resume it
if (this._paused && !this._codePaused)
{
this._paused = false;
this.time.gameResumed();
this.input.reset();
if (this.sound.muteOnPause)
{
this.sound.unsetMute();
}
this.onResume.dispatch(event);
if (this.device.cordova && this.device.iOS)
{
this.lockRender = false;
}
}
},
/**
* Called by the Stage visibility handler.
*
* @method Phaser.Game#focusLoss
* @param {object} event - The DOM event that caused the game to pause, if any.
* @protected
*/
focusLoss: function (event) {
this.onBlur.dispatch(event);
if (!this.stage.<API key>)
{
this.gamePaused(event);
}
},
/**
* Called by the Stage visibility handler.
*
* @method Phaser.Game#focusGain
* @param {object} event - The DOM event that caused the game to pause, if any.
* @protected
*/
focusGain: function (event) {
this.onFocus.dispatch(event);
if (!this.stage.<API key>)
{
this.gameResumed(event);
}
}
};
Phaser.Game.prototype.constructor = Phaser.Game;
/**
* The paused state of the Game. A paused game doesn't update any of its subsystems.
* When a game is paused the onPause event is dispatched. When it is resumed the onResume event is dispatched.
* @name Phaser.Game#paused
* @property {boolean} paused - Gets and sets the paused state of the Game.
*/
Object.defineProperty(Phaser.Game.prototype, "paused", {
get: function () {
return this._paused;
},
set: function (value) {
if (value === true)
{
if (this._paused === false)
{
this._paused = true;
this.sound.setMute();
this.time.gamePaused();
this.onPause.dispatch(this);
}
this._codePaused = true;
}
else
{
if (this._paused)
{
this._paused = false;
this.input.reset();
this.sound.unsetMute();
this.time.gameResumed();
this.onResume.dispatch(this);
}
this._codePaused = false;
}
}
});
/**
*
* "Deleted code is debugged code." - Jeff Sickel
*
* ()
*
*/
|
#include "pci.h"
#include "pciids.h"
#include "kstdio.h"
#include "heap.h"
#include "ehci.h"
#define headerAddress(bus,dev,func,reg) \
((uint32_t)((((bus) & 0xFF) << 16) | (((dev) & 0x1F) << 11) | \
(((func) & 0x07) << 8) | (((reg) & 0x3F) << 2) | 0x80000000L)) \
uint8_t pci_read_8(int bus, int dev, int function, int reg)
{
uint32_t address = headerAddress(bus, dev, function, reg/4 );
outl(PCI_CONFIG_PORT,address);
return inb(PCI_DATA_PORT + (reg%4));
}
uint16_t pci_read_16(int bus, int dev, int function, int reg)
{
uint32_t address = headerAddress(bus, dev, function, reg/2 );
outl(PCI_CONFIG_PORT,address);
return inw(PCI_DATA_PORT + (reg%2));
}
uint32_t pci_read_32(int bus, int dev, int function, int reg)
{
uint32_t address = headerAddress(bus, dev, function, reg );
outl(PCI_CONFIG_PORT,address);
return inl(PCI_DATA_PORT);
}
void pci_write_8(int bus, int dev, int function, int reg, uint8_t data)
{
uint32_t address = headerAddress(bus, dev, function, reg/4 );
outl(PCI_CONFIG_PORT,address);
return outb(PCI_DATA_PORT + (reg%4), data);
}
void pci_write_16(int bus, int dev, int function, int reg, uint16_t data)
{
uint32_t address = headerAddress(bus, dev, function, reg/2 );
outl(PCI_CONFIG_PORT,address);
return outw(PCI_DATA_PORT + (reg%2), data);
}
void pci_write_32(int bus, int dev, int function, int reg, uint32_t data)
{
uint32_t address = headerAddress(bus, dev, function, reg );
outl(PCI_CONFIG_PORT,address);
return outl(PCI_DATA_PORT, data);
}
void pci_read_device(int bus, int dev, int function, PCI_device_t* device)
{
uint32_t address;
size_t cnt;
for(cnt=0;cnt<64;cnt++)
{
address = headerAddress(bus,dev,function,cnt);
outl(PCI_CONFIG_PORT,address);
device->header[cnt] = inl(PCI_DATA_PORT);
}
}
void pci_device_dump(PCI_device_t* device)
{
for(int i=0;i!=<API key>;i++)
{
PCI_device_info_t* info = &<API key>[i];
if(info->vendor_id == device->vendorId &&
info->device_id == device->deviceId)
{
for(int i=0;i!=<API key>;i++)
{
if(<API key>[i].vendor_id == device->vendorId)
{
kp("\t%2x:%2x %s %s",device->classCode,device->subClassCode,<API key>[i].vendor_name,info->device_name);
}
}
break;
}
}
}
void pci_read_bar(uint32_t id, uint32_t idx,uint32_t* address,uint32_t* mask)
{
uint32_t reg = 4 + idx;
*address = pci_read_32(PCI_EXTRACT(id),reg);
pci_write_32(PCI_EXTRACT(id),reg,0xffffffff);
*mask = pci_read_32(PCI_EXTRACT(id),reg);
pci_write_32(PCI_EXTRACT(id),reg,*address);
}
void pci_init()
{
kp("PCI Initializing");
PCI_device_t* device = (PCI_device_t*)kmalloc(sizeof(PCI_device_t));
int cnt = 0;
for(int bus = 0;bus!=0xFF;bus++)
{
for(int dev = 0;dev!=32;dev++)
{
for(int func = 0;func!=8;func++)
{
device->header[0] = pci_read_32(bus,dev,func,0);
if(device->vendorId == 0 || device->vendorId == 0xFFFF || device->deviceId == 0xFFFF)
continue;
pci_read_device(bus,dev,func,device);
//pci_device_dump(device);
//ehci_init(PCI_ID(bus,dev,func),device);
cnt++;
}
}
}
}
|
module <API key>
module Adapter
class JsonApi
class Relationship
def initialize(parent_serializer, <API key>, association)
serializer = association.serializer
options = association.options
links = association.links
meta = association.meta
@object = parent_serializer.object
@scope = parent_serializer.scope
@association_options = options || {}
@<API key> = <API key>
@data = data_for(serializer)
@links = (links || {}).each_with_object({}) do |(key, value), hash|
result = Link.new(parent_serializer, value).as_json
hash[key] = result if result
end
@meta = meta.respond_to?(:call) ? parent_serializer.instance_eval(&meta) : meta
end
def as_json
hash = {}
hash[:data] = data if association_options[:include_data]
links = self.links
hash[:links] = links if links.any?
meta = self.meta
hash[:meta] = meta if meta
hash
end
protected
attr_reader :object, :scope, :data, :<API key>,
:association_options, :links, :meta
private
def data_for(serializer)
if serializer.respond_to?(:each)
serializer.map { |s| ResourceIdentifier.new(s, <API key>).as_json }
elsif association_options[:virtual_value]
association_options[:virtual_value]
elsif serializer && serializer.object
ResourceIdentifier.new(serializer, <API key>).as_json
end
end
end
end
end
end
|
# -*- coding: utf-8 -*-
""" Request Management System - Controllers """
prefix = request.controller
resourcename = request.function
if prefix not in deployment_settings.modules:
session.error = T("Module disabled!")
redirect(URL(r=request, c="default", f="index"))
# Options Menu (available in all Functions' Views)
menu = [
[T("Home"), False, URL(r=request, f="index")],
[T("Requests"), False, URL(r=request, f="req"), [
[T("List"), False, URL(r=request, f="req")],
[T("Add"), False, URL(r=request, f="req", args="create")],
# @ToDo Search by priority, status, location
#[T("Search"), False, URL(r=request, f="req", args="search")],
]],
[T("All Requested Items"), False, URL(r=request, f="ritem")],
]
if session.rcvars:
if "hms_hospital" in session.rcvars:
hospital = db.hms_hospital
query = (hospital.id == session.rcvars["hms_hospital"])
selection = db(query).select(hospital.id, hospital.name, limitby=(0, 1)).first()
if selection:
menu_hospital = [
[selection.name, False, URL(r=request, c="hms", f="hospital", args=[selection.id])]
]
menu.extend(menu_hospital)
if "cr_shelter" in session.rcvars:
shelter = db.cr_shelter
query = (shelter.id == session.rcvars["cr_shelter"])
selection = db(query).select(shelter.id, shelter.name, limitby=(0, 1)).first()
if selection:
menu_shelter = [
[selection.name, False, URL(r=request, c="cr", f="shelter", args=[selection.id])]
]
menu.extend(menu_shelter)
response.menu_options = menu
def index():
""" Module's Home Page
Default to the rms_req list view.
"""
request.function = "req"
request.args = []
return req()
#module_name = deployment_settings.modules[prefix].name_nice
#response.title = module_name
#return dict(module_name=module_name, a=1)
def req():
""" RESTful CRUD controller """
resourcename = request.function # check again in case we're coming from index()
tablename = "%s_%s" % (prefix, resourcename)
table = db[tablename]
# Pre-processor
def prep(r):
response.s3.cancel = r.here()
if r.representation in <API key> and r.method != "delete":
# Don't send the locations list to client (pulled by AJAX instead)
r.table.location_id.requires = IS_NULL_OR(IS_ONE_OF_EMPTY(db, "gis_location.id"))
#if r.method == "create" and not r.component:
# listadd arrives here as method=None
if not r.component:
table.datetime.default = request.utcnow
table.person_id.default = s3_logged_in_person()
# @ToDo Default the Organisation too
return True
response.s3.prep = prep
# Post-processor
def postp(r, output):
if r.representation in <API key>:
#if r.method == "create" and not r.component:
# listadd arrives here as method=None
if r.method != "delete" and not r.component:
# Redirect to the Assessments tabs after creation
r.next = r.other(method="ritem", record_id=s3xrc.get_session(prefix, resourcename))
# Custom Action Buttons
if not r.component:
response.s3.actions = [
dict(label=str(T("Open")), _class="action-btn", url=str(URL(r=request, args=["[id]", "update"]))),
dict(label=str(T("Items")), _class="action-btn", url=str(URL(r=request, args=["[id]", "ritem"]))),
]
return output
response.s3.postp = postp
s3xrc.model.configure(table,
#listadd=False, #@todo: List add is causing errors with JS - FIX
editable=True)
return s3_rest_controller(prefix,
resourcename,
rheader=shn_rms_req_rheader)
def shn_rms_req_rheader(r):
""" Resource Header for Requests """
if r.representation == "html":
if r.name == "req":
req_record = r.record
if req_record:
_next = r.here()
_same = r.same()
try:
location = db(db.gis_location.id == req_record.location_id).select(limitby=(0, 1)).first()
location_represent = <API key>(location.id)
except:
location_represent = None
rheader_tabs = shn_rheader_tabs( r,
[(T("Edit Details"), None),
(T("Items"), "ritem"),
]
)
rheader = DIV( TABLE(
TR( TH( T("Message") + ": "),
TD(req_record.message, _colspan=3)
),
TR( TH( T("Time of Request") + ": "),
req_record.datetime,
TH( T( "Location") + ": "),
location_represent,
),
TR( TH( T("Priority") + ": "),
req_record.priority,
TH( T("Document") + ": "),
document_represent(req_record.document_id)
),
),
rheader_tabs
)
return rheader
return None
def ritem():
""" RESTful CRUD controller """
tablename = "%s_%s" % (prefix, resourcename)
table = db[tablename]
s3xrc.model.configure(table, insertable=False)
return s3_rest_controller(prefix, resourcename)
def store_for_req():
store_table = None
return dict(store_table = store_table)
|
#![crate_name = "rusoto"]
#![crate_type = "lib"]
#![cfg_attr(feature = "unstable", feature(custom_derive, plugin))]
#![cfg_attr(feature = "unstable", plugin(serde_macros))]
#![cfg_attr(feature = "nightly-testing", plugin(clippy))]
#![cfg_attr(feature = "nightly-testing", allow(<API key>, <API key>, ptr_arg, <API key>))]
#![allow(dead_code)]
#![cfg_attr(not(feature = "unstable"), deny(warnings))]
//! # Example
//! The following code shows a simple example of using Rusoto's DynamoDB API to
//! list the names of all tables in a database.
//! ```rust,ignore
//! use std::default::Default;
//! use rusoto::{<API key>, Region};
//! use rusoto::dynamodb::{DynamoDbClient, ListTablesInput};
//! let provider = <API key>::new().unwrap();
//! let client = DynamoDbClient::new(provider, Region::UsEast1);
//! let list_tables_input: ListTablesInput = Default::default();
//! match client.list_tables(&list_tables_input) {
//! Ok(output) => {
//! match output.table_names {
//! Some(table_name_list) => {
//! println!("Tables in database:");
//! for table_name in table_name_list {
//! println!("{}", table_name);
//! None => println!("No tables in database!"),
//! Err(error) => {
//! println!("Error: {:?}", error);
extern crate chrono;
extern crate hyper;
#[macro_use] extern crate lazy_static;
#[macro_use] extern crate log;
extern crate md5;
extern crate regex;
extern crate ring;
extern crate rustc_serialize;
extern crate serde;
extern crate serde_json;
extern crate time;
extern crate url;
extern crate xml;
pub use credential::{
AwsCredentials,
ChainProvider,
CredentialsError,
EnvironmentProvider,
IamProvider,
ProfileProvider,
<API key>,
<API key>,
<API key>,
};
pub use region::{ParseRegionError, Region};
pub use request::{<API key>, HttpResponse, HttpDispatchError};
pub use signature::SignedRequest;
mod credential;
mod param;
mod region;
mod request;
mod xmlerror;
mod xmlutil;
mod serialization;
#[macro_use] mod signature;
#[cfg(test)]
mod mock;
#[cfg(feature = "acm")]
pub mod acm;
#[cfg(feature = "cloudhsm")]
pub mod cloudhsm;
#[cfg(feature = "cloudtrail")]
pub mod cloudtrail;
#[cfg(feature = "codecommit")]
pub mod codecommit;
#[cfg(feature = "codedeploy")]
pub mod codedeploy;
#[cfg(feature = "codepipeline")]
pub mod codepipeline;
#[cfg(feature = "cognito-identity")]
pub mod cognitoidentity;
#[cfg(feature = "config")]
pub mod config;
#[cfg(feature = "datapipeline")]
pub mod datapipeline;
#[cfg(feature = "devicefarm")]
pub mod devicefarm;
#[cfg(feature = "directconnect")]
pub mod directconnect;
#[cfg(feature = "ds")]
pub mod ds;
#[cfg(feature = "dynamodb")]
pub mod dynamodb;
#[cfg(feature = "dynamodbstreams")]
pub mod dynamodbstreams;
#[cfg(feature = "ec2")]
pub mod ec2;
#[cfg(feature = "ecr")]
pub mod ecr;
#[cfg(feature = "ecs")]
pub mod ecs;
#[cfg(feature = "emr")]
pub mod emr;
#[cfg(feature = "elastictranscoder")]
pub mod elastictranscoder;
#[cfg(feature = "events")]
pub mod events;
#[cfg(feature = "firehose")]
pub mod firehose;
#[cfg(feature = "iam")]
pub mod iam;
#[cfg(feature = "inspector")]
pub mod inspector;
#[cfg(feature = "iot")]
pub mod iot;
#[cfg(feature = "kinesis")]
pub mod kinesis;
#[cfg(feature = "kms")]
pub mod kms;
#[cfg(feature = "logs")]
pub mod logs;
#[cfg(feature = "machinelearning")]
pub mod machinelearning;
#[cfg(feature = "<API key>")]
pub mod <API key>;
#[cfg(feature = "opsworks")]
pub mod opsworks;
#[cfg(feature = "route53domains")]
pub mod route53domains;
#[cfg(feature = "s3")]
pub mod s3;
#[cfg(feature = "sqs")]
pub mod sqs;
#[cfg(feature = "ssm")]
pub mod ssm;
#[cfg(feature = "storagegateway")]
pub mod storagegateway;
#[cfg(feature = "swf")]
pub mod swf;
#[cfg(feature = "waf")]
pub mod waf;
#[cfg(feature = "workspaces")]
pub mod workspaces;
/*
#[cfg(feature = "gamelift")]
pub mod gamelift;
#[cfg(feature = "support")]
pub mod support;
*/
|
w5 w7 QUERY3 w76 w25 w16 w1 w30 w5 w3 w98 w7 QUERY1 w80 <A HREF = page97.html > QUERY1 QUERY2 QUERY3 w59 QUERY2 w81 QUERY2 </A> <A HREF = page90.html > QUERY2 w5 w32 </A> w18 <A HREF = page15.html > w21 w3 w97 w8 w4 </A> <A HREF = page71.html > QUERY1 </A> w14 w5 w13 w18 QUERY1 w6 w48 w11 w17 QUERY2 w14 w4 <A HREF = page35.html > QUERY1 QUERY2 QUERY3 QUERY1 w14 </A> w43 w40 QUERY2 w17 w12 w16 QUERY2 w12 w16 w19 w56 w82 <A HREF = page80.html > w5 w17 w12 w15 w34 </A> QUERY2 w2 w91 w11 w20 w13 w15 w98 w1 QUERY1 w12 <A HREF = page88.html > w44 QUERY1 w31 w82 w3 </A> w17 w2 w11 w50 QUERY3 w70 w58
|
<table width="90%" border="0"><tr><td><script>function openfile(url) {fullwin = window.open(url, "fulltext", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes");}</script><div class="layoutclass_pic"><div class="<API key>"><table class="ztable"><tr><th class="ztd1"><b> </b></th><td class="ztd2"></td></tr>
<tr><th class="ztd1"><b> </b></th><td class="ztd2"> <a href="/cgi-bin/cydic/gsweb.cgi?o=dcydic&schfmt=text&gourl=%3De0%26sec%3Dsec1%26op%3Dsid%3D%22CW0000000791%22.%26v%3D-1" class="clink" target=_blank></a></font> <font class="dianuan_mark"></font><font size=-2 color="#999900"><font class="dianyuanfont"><b><i>1></i></b></font></font><br><font size=4 color="#808080"></font><font size=-2 color="#999900"><font class="dianyuanfont"><b><i>2></i></b></font></font><font size=-2 color="#999900"><font class="dianyuanfont"><b><i>3></i></b></font></font><font size=-2 color="#999900"><font class="dianyuanfont"><b><i>4></i></b></font></font></font> <br><font class="dianuan_mark2"></font><br></font>
<div class="Rulediv"><font class="english_word">(1)</font> <font class="dianuan_mark"><font class="dianuan_mark"></font></font></font></div>
<div class="Rulediv"><font class="english_word">(2)</font> </font></div>
<div class="Rulediv"><font class="english_word">(3)</font> </font></div>
<div class="Rulediv"><font class="english_word">(4)</font> </font><font size=4 ></div><br><font class="dianuan_mark2"></font><br></font> <font class="dianuan_mark"><font class="dianuan_mark"></font></font><br>……</font></td></tr>
</td></tr></table></div> <!-- <API key> --><div class="<API key>"></div> <!-- <API key> --></div> <!-- layoutclass_pic --></td></tr></table>
|
<!DOCTYPE html>
<!--[if lt IE 9]><html class="no-js lt-ie9" lang="en" dir="ltr"><![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="en" dir="ltr">
<!--<![endif]-->
<!-- Usage: /eic/site/ccc-rec.nsf/tpl-eng/template-1col.html?Open&id=3 (optional: ?Open&page=filename.html&id=x) -->
<!-- Created: ; Product Code: 536; Server: stratnotes2.ic.gc.ca -->
<head>
<title>
GiltteryStar Technologies Ltd -
Complete profile - Canadian Company Capabilities - Industries and Business - Industry Canada
</title>
<!-- Title ends / Fin du titre -->
<meta charset="utf-8" />
<meta name="dcterms.language" title="ISO639-2" content="eng" />
<meta name="dcterms.title" content="" />
<meta name="description" content="" />
<meta name="dcterms.description" content="" />
<meta name="dcterms.type" content="report, data set" />
<meta name="dcterms.subject" content="businesses, industry" />
<meta name="dcterms.subject" content="businesses, industry" />
<meta name="dcterms.issued" title="W3CDTF" content="" />
<meta name="dcterms.modified" title="W3CDTF" content="" />
<meta name="keywords" content="" />
<meta name="dcterms.creator" content="" />
<meta name="author" content="" />
<meta name="dcterms.created" title="W3CDTF" content="" />
<meta name="dcterms.publisher" content="" />
<meta name="dcterms.audience" title="icaudience" content="" />
<meta name="dcterms.spatial" title="ISO3166-1" content="" />
<meta name="dcterms.spatial" title="gcgeonames" content="" />
<meta name="dcterms.format" content="HTML" />
<meta name="dcterms.identifier" title="ICsiteProduct" content="536" />
<!-- EPI-11240 -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- MCG-202 -->
<meta content="width=device-width,initial-scale=1" name="viewport">
<!-- EPI-11567 -->
<meta name = "format-detection" content = "telephone=no">
<!-- EPI-12603 -->
<meta name="robots" content="noarchive">
<!-- EPI-11190 - Webtrends -->
<script>
var startTime = new Date();
startTime = startTime.getTime();
</script>
<!--[if gte IE 9 | !IE ]><!-->
<link href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/assets/favicon.ico" rel="icon" type="image/x-icon">
<link rel="stylesheet" href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/css/wet-boew.min.css">
<!--<![endif]-->
<link rel="stylesheet" href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/css/theme.min.css">
<!--[if lt IE 9]>
<link href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/assets/favicon.ico" rel="shortcut icon" />
<link rel="stylesheet" href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/css/ie8-wet-boew.min.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/js/ie8-wet-boew.min.js"></script>
<![endif]
<!--[if lte IE 9]>
<![endif]
<noscript><link rel="stylesheet" href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/css/noscript.min.css" /></noscript>
<!-- Google Tag Manager DO NOT REMOVE OR MODIFY - NE PAS SUPPRIMER OU MODIFIER -->
<script>dataLayer1 = [];</script>
<!-- End Google Tag Manager -->
<!-- EPI-11235 -->
<link rel="stylesheet" href="/eic/home.nsf/css/<API key>.css">
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<link href="/app/ccc/srch/css/print.css" media="print" rel="stylesheet" type="text/css" />
</head>
<body class="home" vocab="http://schema.org/" typeof="WebPage">
<!-- EPIC HEADER BEGIN -->
<!-- Google Tag Manager DO NOT REMOVE OR MODIFY - NE PAS SUPPRIMER OU MODIFIER -->
<noscript><iframe title="Google Tag Manager" src="
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.<API key>(s)[0], j=d.createElement(s),dl=l!='dataLayer1'?'&l='+l:'';j.async=true;j.src='
<!-- End Google Tag Manager -->
<!-- EPI-12801 -->
<span typeof="Organization"><meta property="legalName" content="<API key>"></span>
<ul id="wb-tphp">
<li class="wb-slc">
<a class="wb-sl" href="#wb-cont">Skip to main content</a>
</li>
<li class="wb-slc visible-sm visible-md visible-lg">
<a class="wb-sl" href="#wb-info">Skip to "About this site"</a>
</li>
</ul>
<header role="banner">
<div id="wb-bnr" class="container">
<section id="wb-lng" class="visible-md visible-lg text-right">
<h2 class="wb-inv">Language selection</h2>
<div class="row">
<div class="col-md-12">
<ul class="list-inline mrgn-bttm-0">
<li><a href="nvgt.do?V_TOKEN=1492288524919&V_SEARCH.docsCount=3&V_DOCUMENT.docRank=19499&V_SEARCH.docsStart=19498&V_SEARCH.command=navigate&V_SEARCH.resultsJSP=/prfl.do&lang=fra&redirectUrl=/app/scr/imbs/ccc/rgstrtn/?_flId?_flxKy=e1s1&estblmntNo=234567041301&profileId=61&_evId=bck&lang=eng&V_SEARCH.showStricts=false&prtl=1&_flId?_flId?_flxKy=e1s1" title="Français" lang="fr">Français</a></li>
</ul>
</div>
</div>
</section>
<div class="row">
<div class="brand col-xs-8 col-sm-9 col-md-6">
<a href="http:
</div>
<section class="wb-mb-links col-xs-4 col-sm-3 visible-sm visible-xs" id="wb-glb-mn">
<h2>Search and menus</h2>
<ul class="list-inline text-right chvrn">
<li><a href="#mb-pnl" title="Search and menus" aria-controls="mb-pnl" class="overlay-lnk" role="button"><span class="glyphicon glyphicon-search"><span class="glyphicon glyphicon-th-list"><span class="wb-inv">Search and menus</span></span></span></a></li>
</ul>
<div id="mb-pnl"></div>
</section>
<!-- Site Search Removed -->
</div>
</div>
<nav role="navigation" id="wb-sm" class="wb-menu visible-md visible-lg" data-trgt="mb-pnl" data-ajax-fetch="//cdn.canada.ca/gcweb-cdn-dev/sitemenu/sitemenu-en.html" typeof="<API key>">
<h2 class="wb-inv">Topics menu</h2>
<div class="container nvbar">
<div class="row">
<ul class="list-inline menu">
<li><a href="https:
<li><a href="http:
<li><a href="https://travel.gc.ca/">Travel</a></li>
<li><a href="https:
<li><a href="https:
<li><a href="http://healthycanadians.gc.ca/index-eng.php">Health</a></li>
<li><a href="https:
<li><a href="https:
</ul>
</div>
</div>
</nav>
<!-- EPIC BODY BEGIN -->
<nav role="navigation" id="wb-bc" class="" property="breadcrumb">
<h2 class="wb-inv">You are here:</h2>
<div class="container">
<div class="row">
<ol class="breadcrumb">
<li><a href="/eic/site/icgc.nsf/eng/home" title="Home">Home</a></li>
<li><a href="/eic/site/icgc.nsf/eng/h_07063.html" title="Industries and Business">Industries and Business</a></li>
<li><a href="/eic/site/ccc-rec.nsf/tpl-eng/../eng/home" >Canadian Company Capabilities</a></li>
</ol>
</div>
</div>
</nav>
</header>
<main id="wb-cont" role="main" property="mainContentOfPage" class="container">
<!-- End Header -->
<!-- Begin Body -->
<!-- Begin Body Title -->
<!-- End Body Title -->
<!-- Begin Body Head -->
<!-- End Body Head -->
<!-- Begin Body Content -->
<br>
<!-- Complete Profile -->
<!-- Company Information above tabbed area-->
<input id="showMore" type="hidden" value='more'/>
<input id="showLess" type="hidden" value='less'/>
<h1 id="wb-cont">
Company profile - Canadian Company Capabilities
</h1>
<div class="profileInfo hidden-print">
<ul class="list-inline">
<li><a href="cccSrch.do?lang=eng&profileId=&prtl=1&key.hitsPerPage=25&searchPage=%252Fapp%252Fccc%252Fsrch%252FcccBscSrch.do%253Flang%253Deng%2526amp%253Bprtl%253D1%2526amp%253Btagid%253D&V_SEARCH.scopeCategory=CCC.Root&V_SEARCH.depth=1&V_SEARCH.showStricts=false&V_SEARCH.sortSpec=title+asc&rstBtn.x=" class="btn btn-link">New Search</a> |</li>
<li><form name="searchForm" method="post" action="/app/ccc/srch/bscSrch.do">
<input type="hidden" name="lang" value="eng" />
<input type="hidden" name="profileId" value="" />
<input type="hidden" name="prtl" value="1" />
<input type="hidden" name="searchPage" value="%2Fapp%2Fccc%2Fsrch%2FcccBscSrch.do%3Flang%3Deng%26amp%3Bprtl%3D1%26amp%3Btagid%3D" />
<input type="hidden" name="V_SEARCH.scopeCategory" value="CCC.Root" />
<input type="hidden" name="V_SEARCH.depth" value="1" />
<input type="hidden" name="V_SEARCH.showStricts" value="false" />
<input id="repeatSearchBtn" class="btn btn-link" type="submit" value="Return to search results" />
</form></li>
<li>| <a href="nvgt.do?V_SEARCH.docsStart=19497&V_DOCUMENT.docRank=19498&V_SEARCH.docsCount=3&lang=eng&prtl=1&sbPrtl=&profile=cmpltPrfl&V_TOKEN=1492288557906&V_SEARCH.command=navigate&V_SEARCH.resultsJSP=%2fprfl.do&estblmntNo=234567156587&profileId=&key.newSearchLabel=">Previous Company</a></li>
<li>| <a href="nvgt.do?V_SEARCH.docsStart=19499&V_DOCUMENT.docRank=19500&V_SEARCH.docsCount=3&lang=eng&prtl=1&sbPrtl=&profile=cmpltPrfl&V_TOKEN=1492288557906&V_SEARCH.command=navigate&V_SEARCH.resultsJSP=%2fprfl.do&estblmntNo=234567035703&profileId=&key.newSearchLabel=">Next Company</a></li>
</ul>
</div>
<details>
<summary>Third-Party Information Liability Disclaimer</summary>
<p>Some of the information on this Web page has been provided by external sources. The Government of Canada is not responsible for the accuracy, reliability or currency of the information supplied by external sources. Users wishing to rely upon this information should consult directly with the source of the information. Content provided by external sources is not subject to official languages, privacy and accessibility requirements.</p>
</details>
<h2>
GiltteryStar Technologies Ltd
</h2>
<div class="row">
<div class="col-md-5">
<h2 class="h5 mrgn-bttm-0">Legal/Operating Name:</h2>
<p>GiltteryStar Technologies Ltd</p>
<p><a href="mailto:jianzhang_2006@yahoo.com" title="jianzhang_2006@yahoo.com">jianzhang_2006@yahoo.com</a></p>
</div>
<div class="col-md-4 mrgn-sm-sm">
<h2 class="h5 mrgn-bttm-0">Mailing Address:</h2>
<address class="mrgn-bttm-md">
87 Castlethorpe Cres<br/>
NEPEAN,
Ontario<br/>
K2G 5R2
<br/>
</address>
<h2 class="h5 mrgn-bttm-0">Location Address:</h2>
<address class="mrgn-bttm-md">
87 Castlethorpe Cres<br/>
NEPEAN,
Ontario<br/>
K2G 5R2
<br/>
</address>
<p class="mrgn-bttm-0"><abbr title="Telephone">Tel.</abbr>:
(613) 225-7215
</p>
<p class="mrgn-bttm-lg"><abbr title="Facsimile">Fax</abbr>:
(613) 225-7215</p>
</div>
<div class="col-md-3 mrgn-tp-md">
</div>
</div>
<div class="row mrgn-tp-md mrgn-bttm-md">
<div class="col-md-12">
<h2 class="wb-inv">Company Profile</h2>
<br> Software consulting services - Enterprise Application Development<br>
</div>
</div>
<!-- <div class="wb-tabs ignore-session update-hash wb-eqht-off print-active"> -->
<div class="wb-tabs ignore-session">
<div class="tabpanels">
<details id="details-panel1">
<summary>
Full profile
</summary>
<!-- Tab 1 -->
<h2 class="wb-invisible">
Full profile
</h2>
<!-- Contact Information -->
<h3 class="page-header">
Contact information
</h3>
<section class="container-fluid">
<div class="row mrgn-tp-lg">
<div class="col-md-3">
<strong>
Jian
Zhang
</strong></div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Title:
</strong>
</div>
<div class="col-md-7">
Data Provider<br>
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Telephone:
</strong>
</div>
<div class="col-md-7">
(613) 225-7215
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Email:
</strong>
</div>
<div class="col-md-7">
zhgchn@yahoo.com
</div>
</div>
</section>
<p class="mrgn-tp-lg text-right small hidden-print">
<a href="#wb-cont">top of page</a>
</p>
<!-- Company Description -->
<h3 class="page-header">
Company description
</h3>
<section class="container-fluid">
<div class="row">
<div class="col-md-5">
<strong>
Country of Ownership:
</strong>
</div>
<div class="col-md-7">
Canada
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Exporting:
</strong>
</div>
<div class="col-md-7">
No
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Primary Industry (NAICS):
</strong>
</div>
<div class="col-md-7">
541510 - Computer Systems Design and Related Services
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Alternate Industries (NAICS):
</strong>
</div>
<div class="col-md-7">
541690 - Other Scientific and Technical Consulting Services<br>
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Primary Business Activity:
</strong>
</div>
<div class="col-md-7">
Services
</div>
</div>
</section>
<!-- Products / Services / Licensing -->
<h3 class="page-header">
Product / Service / Licensing
</h3>
<section class="container-fluid">
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Service Name:
</strong>
</div>
<div class="col-md-9">
Enterprise Application Development<br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-12">
Business requirements analysis, solution architecture design, application development and deployment<br>
<br>
</div>
</div>
</section>
<p class="mrgn-tp-lg text-right small hidden-print">
<a href="#wb-cont">top of page</a>
</p>
<!-- Technology Profile -->
<!-- Market Profile -->
<!-- Sector Information -->
<details class="mrgn-tp-md mrgn-bttm-md">
<summary>
Third-Party Information Liability Disclaimer
</summary>
<p>
Some of the information on this Web page has been provided by external sources. The Government of Canada is not responsible for the accuracy, reliability or currency of the information supplied by external sources. Users wishing to rely upon this information should consult directly with the source of the information. Content provided by external sources is not subject to official languages, privacy and accessibility requirements.
</p>
</details>
</details>
<details id="details-panel2">
<summary>
Contacts
</summary>
<h2 class="wb-invisible">
Contact information
</h2>
<!-- Contact Information -->
<section class="container-fluid">
<div class="row mrgn-tp-lg">
<div class="col-md-3">
<strong>
Jian
Zhang
</strong></div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Title:
</strong>
</div>
<div class="col-md-7">
Data Provider<br>
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Telephone:
</strong>
</div>
<div class="col-md-7">
(613) 225-7215
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Email:
</strong>
</div>
<div class="col-md-7">
zhgchn@yahoo.com
</div>
</div>
</section>
</details>
<details id="details-panel3">
<summary>
Description
</summary>
<h2 class="wb-invisible">
Company description
</h2>
<section class="container-fluid">
<div class="row">
<div class="col-md-5">
<strong>
Country of Ownership:
</strong>
</div>
<div class="col-md-7">
Canada
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Exporting:
</strong>
</div>
<div class="col-md-7">
No
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Primary Industry (NAICS):
</strong>
</div>
<div class="col-md-7">
541510 - Computer Systems Design and Related Services
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Alternate Industries (NAICS):
</strong>
</div>
<div class="col-md-7">
541690 - Other Scientific and Technical Consulting Services<br>
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Primary Business Activity:
</strong>
</div>
<div class="col-md-7">
Services
</div>
</div>
</section>
</details>
<details id="details-panel4">
<summary>
Products, services and licensing
</summary>
<h2 class="wb-invisible">
Product / Service / Licensing
</h2>
<section class="container-fluid">
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Service Name:
</strong>
</div>
<div class="col-md-9">
Enterprise Application Development<br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-12">
Business requirements analysis, solution architecture design, application development and deployment<br>
<br>
</div>
</div>
</section>
</details>
</div>
</div>
<div class="row">
<div class="col-md-12 text-right">
Last Update Date 2016-03-01
</div>
</div>
<!
- Artifact ID: CBW - IMBS - CCC Search WAR
- Group ID: ca.gc.ic.strategis.imbs.ccc.search
- Version: 3.26
- Built-By: bamboo
- Build Timestamp: 2017-03-02T21:29:28Z
<!-- End Body Content -->
<!-- Begin Body Foot -->
<!-- End Body Foot -->
<!-- END MAIN TABLE -->
<!-- End body -->
<!-- Begin footer -->
<div class="row pagedetails">
<div class="col-sm-5 col-xs-12 datemod">
<dl id="wb-dtmd">
<dt class=" hidden-print">Date Modified:</dt>
<dd class=" hidden-print">
<span><time>2017-03-02</time></span>
</dd>
</dl>
</div>
<div class="clear visible-xs"></div>
<div class="col-sm-4 col-xs-6">
</div>
<div class="col-sm-3 col-xs-6 text-right">
</div>
<div class="clear visible-xs"></div>
</div>
</main>
<footer role="contentinfo" id="wb-info">
<nav role="navigation" class="container wb-navcurr">
<h2 class="wb-inv">About government</h2>
<!-- EPIC FOOTER BEGIN -->
<!-- EPI-11638 Contact us -->
<ul class="list-unstyled colcount-sm-2 colcount-md-3">
<li><a href="http://www.ic.gc.ca/eic/site/icgc.nsf/eng/h_07026.html#pageid=E048-H00000&from=Industries">Contact us</a></li>
<li><a href="https:
<li><a href="https:
<li><a href="https:
<li><a href="https:
<li><a href="https:
<li><a href="http://pm.gc.ca/eng">Prime Minister</a></li>
<li><a href="https:
<li><a href="http://open.canada.ca/en/">Open government</a></li>
</ul>
</nav>
<div class="brand">
<div class="container">
<div class="row">
<nav class="col-md-10 ftr-urlt-lnk">
<h2 class="wb-inv">About this site</h2>
<ul>
<li><a href="https:
<li><a href="https:
<li><a href="http://www1.canada.ca/en/newsite.html">About Canada.ca</a></li>
<li><a href="http:
<li><a href="http://www.ic.gc.ca/eic/site/icgc.nsf/eng/h_07033.html#p1">Privacy</a></li>
</ul>
</nav>
<div class="col-xs-6 visible-sm visible-xs tofpg">
<a href="#wb-cont">Top of Page <span class="glyphicon <API key>"></span></a>
</div>
<div class="col-xs-6 col-md-2 text-right">
<object type="image/svg+xml" tabindex="-1" role="img" data="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/assets/wmms-blk.svg" aria-label="Symbol of the Government of Canada"></object>
</div>
</div>
</div>
</div>
</footer>
<!--[if gte IE 9 | !IE ]><!-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/js/wet-boew.min.js"></script>
<!--<![endif]-->
<!--[if lt IE 9]>
<script src="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/js/ie8-wet-boew2.min.js"></script>
<![endif]
<script src="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/js/theme.min.js"></script>
<!-- EPI-10519 -->
<span class="wb-sessto"
data-wb-sessto='{"inactivity": 1800000, "reactionTime": 180000, "sessionalive": 1800000, "logouturl": "/app/ccc/srch/cccSrch.do?lang=eng&prtl=1"}'></span>
<script src="/eic/home.nsf/js/jQuery.<API key>.js"></script>
<!-- EPI-11190 - Webtrends -->
<script src="/eic/home.nsf/js/webtrends.js"></script>
<script>var endTime = new Date();</script>
<noscript>
<div><img alt="" id="DCSIMG" width="1" height="1" src="
</noscript>
<!-- /Webtrends -->
<!-- JS deps -->
<script src="/eic/home.nsf/js/jquery.imagesloaded.js"></script>
<!-- EPI-11262 - Util JS -->
<script src="/eic/home.nsf/js/<API key>.min.js"></script>
<!-- EPI-11383 -->
<script src="/eic/home.nsf/js/jQuery.icValidationErrors.js"></script>
<span style="display:none;" id='app-info' <API key>='' <API key>='' <API key>='' <API key>='' data-issue-tracking='' data-scm-sha1='' <API key>='' data-scm-branch='' <API key>=''></span>
</body></html>
<!-- End Footer -->
<!
- Artifact ID: CBW - IMBS - CCC Search WAR
- Group ID: ca.gc.ic.strategis.imbs.ccc.search
- Version: 3.26
- Built-By: bamboo
- Build Timestamp: 2017-03-02T21:29:28Z
|
<?php
namespace Epsilon\Environment;
defined('EPSILON_EXEC') or die();
use Epsilon\Factory;
use Epsilon\Object\Object;
/**
* Class Cookie
*
* @package Epsilon\Environment
*/
class Cookie extends Object
{
private static $Instance;
private $Cookies;
private $newCookies;
public $Lifespan;
public $Path;
public $Domain;
/**
* Load the active cookies of the current session
*
* @param array $Options
*/
public function __construct($Options = [])
{
parent::__construct($Options);
if (!isset($this->Cookies)) {
$this->Cookies = &$_COOKIE;
}
$this->newCookies = [];
}
/**
* @return Cookie
*/
public static function getInstance()
{
if (!isset(self::$Instance)) {
self::$Instance = new Cookie();
}
return self::$Instance;
}
/**
* Set a cookie
*
* @param string $Key
* @param mixed $Value
* @param int|NULL $Lifespan seconds
*/
function set($Key, $Value, $Lifespan = null)
{
if ($Value === null) {
$Lifespan = time() - 1;
}
$this->newCookies[$Key] = [
'value' => base64_encode($Value),
'lifespan' => $Lifespan
];
$Lifespan = time() + ((is_int($Lifespan)) ? $Lifespan : $this->Lifespan);
if (!Factory::getApplication()->isCLI()) {
setcookie($Key, base64_encode($Value), $Lifespan, $this->Path, $this->Domain);
}
}
/**
* @param $Key
* @return null|string
*/
function get($Key)
{
if (isset($this->newCookies[$Key])) {
$value = $this->newCookies[$Key]['value'];
} elseif (isset($this->Cookies[$Key])) {
$value = $this->Cookies[$Key];
} else {
$value = null;
}
return ($value) ? base64_decode($value) : null;
}
}
|
<!DOCTYPE html>
<!--[if lt IE 9]><html class="no-js lt-ie9" lang="en" dir="ltr"><![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="en" dir="ltr">
<!--<![endif]-->
<!-- Usage: /eic/site/ccc-rec.nsf/tpl-eng/template-1col.html?Open&id=3 (optional: ?Open&page=filename.html&id=x) -->
<!-- Created: ; Product Code: 536; Server: stratnotes2.ic.gc.ca -->
<head>
<title>
Industrial Engines Limited -
Complete profile - Canadian Company Capabilities - Industries and Business - Industry Canada
</title>
<!-- Title ends / Fin du titre -->
<meta charset="utf-8" />
<meta name="dcterms.language" title="ISO639-2" content="eng" />
<meta name="dcterms.title" content="" />
<meta name="description" content="" />
<meta name="dcterms.description" content="" />
<meta name="dcterms.type" content="report, data set" />
<meta name="dcterms.subject" content="businesses, industry" />
<meta name="dcterms.subject" content="businesses, industry" />
<meta name="dcterms.issued" title="W3CDTF" content="" />
<meta name="dcterms.modified" title="W3CDTF" content="" />
<meta name="keywords" content="" />
<meta name="dcterms.creator" content="" />
<meta name="author" content="" />
<meta name="dcterms.created" title="W3CDTF" content="" />
<meta name="dcterms.publisher" content="" />
<meta name="dcterms.audience" title="icaudience" content="" />
<meta name="dcterms.spatial" title="ISO3166-1" content="" />
<meta name="dcterms.spatial" title="gcgeonames" content="" />
<meta name="dcterms.format" content="HTML" />
<meta name="dcterms.identifier" title="ICsiteProduct" content="536" />
<!-- EPI-11240 -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- MCG-202 -->
<meta content="width=device-width,initial-scale=1" name="viewport">
<!-- EPI-11567 -->
<meta name = "format-detection" content = "telephone=no">
<!-- EPI-12603 -->
<meta name="robots" content="noarchive">
<!-- EPI-11190 - Webtrends -->
<script>
var startTime = new Date();
startTime = startTime.getTime();
</script>
<!--[if gte IE 9 | !IE ]><!-->
<link href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/assets/favicon.ico" rel="icon" type="image/x-icon">
<link rel="stylesheet" href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/css/wet-boew.min.css">
<!--<![endif]-->
<link rel="stylesheet" href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/css/theme.min.css">
<!--[if lt IE 9]>
<link href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/assets/favicon.ico" rel="shortcut icon" />
<link rel="stylesheet" href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/css/ie8-wet-boew.min.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/js/ie8-wet-boew.min.js"></script>
<![endif]
<!--[if lte IE 9]>
<![endif]
<noscript><link rel="stylesheet" href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/css/noscript.min.css" /></noscript>
<!-- Google Tag Manager DO NOT REMOVE OR MODIFY - NE PAS SUPPRIMER OU MODIFIER -->
<script>dataLayer1 = [];</script>
<!-- End Google Tag Manager -->
<!-- EPI-11235 -->
<link rel="stylesheet" href="/eic/home.nsf/css/<API key>.css">
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<link href="/app/ccc/srch/css/print.css" media="print" rel="stylesheet" type="text/css" />
</head>
<body class="home" vocab="http://schema.org/" typeof="WebPage">
<!-- EPIC HEADER BEGIN -->
<!-- Google Tag Manager DO NOT REMOVE OR MODIFY - NE PAS SUPPRIMER OU MODIFIER -->
<noscript><iframe title="Google Tag Manager" src="
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.<API key>(s)[0], j=d.createElement(s),dl=l!='dataLayer1'?'&l='+l:'';j.async=true;j.src='
<!-- End Google Tag Manager -->
<!-- EPI-12801 -->
<span typeof="Organization"><meta property="legalName" content="<API key>"></span>
<ul id="wb-tphp">
<li class="wb-slc">
<a class="wb-sl" href="#wb-cont">Skip to main content</a>
</li>
<li class="wb-slc visible-sm visible-md visible-lg">
<a class="wb-sl" href="#wb-info">Skip to "About this site"</a>
</li>
</ul>
<header role="banner">
<div id="wb-bnr" class="container">
<section id="wb-lng" class="visible-md visible-lg text-right">
<h2 class="wb-inv">Language selection</h2>
<div class="row">
<div class="col-md-12">
<ul class="list-inline mrgn-bttm-0">
<li><a href="nvgt.do?V_TOKEN=1492293393711&V_SEARCH.docsCount=3&V_DOCUMENT.docRank=22901&V_SEARCH.docsStart=22900&V_SEARCH.command=navigate&V_SEARCH.resultsJSP=/prfl.do&lang=fra&redirectUrl=/app/scr/imbs/ccc/rgstrtn
</ul>
</div>
</div>
</section>
<div class="row">
<div class="brand col-xs-8 col-sm-9 col-md-6">
<a href="http:
</div>
<section class="wb-mb-links col-xs-4 col-sm-3 visible-sm visible-xs" id="wb-glb-mn">
<h2>Search and menus</h2>
<ul class="list-inline text-right chvrn">
<li><a href="#mb-pnl" title="Search and menus" aria-controls="mb-pnl" class="overlay-lnk" role="button"><span class="glyphicon glyphicon-search"><span class="glyphicon glyphicon-th-list"><span class="wb-inv">Search and menus</span></span></span></a></li>
</ul>
<div id="mb-pnl"></div>
</section>
<!-- Site Search Removed -->
</div>
</div>
<nav role="navigation" id="wb-sm" class="wb-menu visible-md visible-lg" data-trgt="mb-pnl" data-ajax-fetch="//cdn.canada.ca/gcweb-cdn-dev/sitemenu/sitemenu-en.html" typeof="<API key>">
<h2 class="wb-inv">Topics menu</h2>
<div class="container nvbar">
<div class="row">
<ul class="list-inline menu">
<li><a href="https:
<li><a href="http:
<li><a href="https://travel.gc.ca/">Travel</a></li>
<li><a href="https:
<li><a href="https:
<li><a href="http://healthycanadians.gc.ca/index-eng.php">Health</a></li>
<li><a href="https:
<li><a href="https:
</ul>
</div>
</div>
</nav>
<!-- EPIC BODY BEGIN -->
<nav role="navigation" id="wb-bc" class="" property="breadcrumb">
<h2 class="wb-inv">You are here:</h2>
<div class="container">
<div class="row">
<ol class="breadcrumb">
<li><a href="/eic/site/icgc.nsf/eng/home" title="Home">Home</a></li>
<li><a href="/eic/site/icgc.nsf/eng/h_07063.html" title="Industries and Business">Industries and Business</a></li>
<li><a href="/eic/site/ccc-rec.nsf/tpl-eng/../eng/home" >Canadian Company Capabilities</a></li>
</ol>
</div>
</div>
</nav>
</header>
<main id="wb-cont" role="main" property="mainContentOfPage" class="container">
<!-- End Header -->
<!-- Begin Body -->
<!-- Begin Body Title -->
<!-- End Body Title -->
<!-- Begin Body Head -->
<!-- End Body Head -->
<!-- Begin Body Content -->
<br>
<!-- Complete Profile -->
<!-- Company Information above tabbed area-->
<input id="showMore" type="hidden" value='more'/>
<input id="showLess" type="hidden" value='less'/>
<h1 id="wb-cont">
Company profile - Canadian Company Capabilities
</h1>
<div class="profileInfo hidden-print">
<ul class="list-inline">
<li><a href="cccSrch.do?lang=eng&profileId=&prtl=1&key.hitsPerPage=25&searchPage=%252Fapp%252Fccc%252Fsrch%252FcccBscSrch.do%253Flang%253Deng%2526amp%253Bprtl%253D1%2526amp%253Btagid%253D&V_SEARCH.scopeCategory=CCC.Root&V_SEARCH.depth=1&V_SEARCH.showStricts=false&V_SEARCH.sortSpec=title+asc&rstBtn.x=" class="btn btn-link">New Search</a> |</li>
<li><form name="searchForm" method="post" action="/app/ccc/srch/bscSrch.do">
<input type="hidden" name="lang" value="eng" />
<input type="hidden" name="profileId" value="" />
<input type="hidden" name="prtl" value="1" />
<input type="hidden" name="searchPage" value="%2Fapp%2Fccc%2Fsrch%2FcccBscSrch.do%3Flang%3Deng%26amp%3Bprtl%3D1%26amp%3Btagid%3D" />
<input type="hidden" name="V_SEARCH.scopeCategory" value="CCC.Root" />
<input type="hidden" name="V_SEARCH.depth" value="1" />
<input type="hidden" name="V_SEARCH.showStricts" value="false" />
<input id="repeatSearchBtn" class="btn btn-link" type="submit" value="Return to search results" />
</form></li>
<li>| <a href="nvgt.do?V_SEARCH.docsStart=22899&V_DOCUMENT.docRank=22900&V_SEARCH.docsCount=3&lang=eng&prtl=1&sbPrtl=&profile=cmpltPrfl&V_TOKEN=1492293397815&V_SEARCH.command=navigate&V_SEARCH.resultsJSP=%2fprfl.do&estblmntNo=234567004774&profileId=&key.newSearchLabel=">Previous Company</a></li>
<li>| <a href="nvgt.do?V_SEARCH.docsStart=22901&V_DOCUMENT.docRank=22902&V_SEARCH.docsCount=3&lang=eng&prtl=1&sbPrtl=&profile=cmpltPrfl&V_TOKEN=1492293397815&V_SEARCH.command=navigate&V_SEARCH.resultsJSP=%2fprfl.do&estblmntNo=234567011447&profileId=&key.newSearchLabel=">Next Company</a></li>
</ul>
</div>
<details>
<summary>Third-Party Information Liability Disclaimer</summary>
<p>Some of the information on this Web page has been provided by external sources. The Government of Canada is not responsible for the accuracy, reliability or currency of the information supplied by external sources. Users wishing to rely upon this information should consult directly with the source of the information. Content provided by external sources is not subject to official languages, privacy and accessibility requirements.</p>
</details>
<h2>
Industrial Engines Limited
</h2>
<div class="row">
<div class="col-md-5">
<h2 class="h5 mrgn-bttm-0">Legal/Operating Name:</h2>
<p>Industrial Engines Limited</p>
<div class="mrgn-tp-md"></div>
<p class="mrgn-bttm-0" ><a href="http:
target="_blank" title="Website URL">http:
<p><a href="mailto:iel@industrialengines.ca" title="iel@industrialengines.ca">iel@industrialengines.ca</a></p>
</div>
<div class="col-md-4 mrgn-sm-sm">
<h2 class="h5 mrgn-bttm-0">Mailing Address:</h2>
<address class="mrgn-bttm-md">
121-788 Caldew St<br/>
DELTA,
British Columbia<br/>
V3M 5S2
<br/>
</address>
<h2 class="h5 mrgn-bttm-0">Location Address:</h2>
<address class="mrgn-bttm-md">
121-788 Caldew St<br/>
DELTA,
British Columbia<br/>
V3M 5S2
<br/>
</address>
<p class="mrgn-bttm-0"><abbr title="Telephone">Tel.</abbr>:
(604) 525-8529
</p>
<p class="mrgn-bttm-0"><abbr title="Telephone">Tel.</abbr>:
(877) 438-6560</p>
<p class="mrgn-bttm-lg"><abbr title="Facsimile">Fax</abbr>:
(604) 525-0974</p>
</div>
<div class="col-md-3 mrgn-tp-md">
</div>
</div>
<div class="row mrgn-tp-md mrgn-bttm-md">
<div class="col-md-12">
<h2 class="wb-inv">Company Profile</h2>
<br> Industrial Engines Limited was incorporated in 1959 with the
<br>express purpose of producing and marketing engine driven products
<br>for sale in the electrical power generation, industrial and marine
<br>markets in Canada. A steady growth has been achieved since
<br>incorporation and products are now marketed to Distributors,
<br>Original Equipment Manufacturers, Boat Builders, and other users
<br>throughout Western Canada and Internationally.
<br>
<br>The company is located in adequate facilities in South Vancouver
<br>adjacent to the Vancouver International Airport. The buildings
<br>include offices, manufacturing, assembly, servicing, testing,
<br>warehouse and parts distribution.
<br>
<br>The company has an engineering and technical staff which is
<br>capable of designing and developing unique products to meet
<br>special applications and customer needs. Company systems are
<br>fully computerized and supported by an IBM main frame and P.C.
<br>equipment. The working capital position of the company is very
<br>adequate and excellent banking relations are maintained
<br>with the Canadian Imperial Bank of Commerce, Vancouver, B.C.
<br>
<br>Major suppliers of Industrial Engines Limited include Ford Motor
<br>Company, Kubota Canada Ltd., Newage International and Borg
<br>Warner.<br>
</div>
</div>
<!-- <div class="wb-tabs ignore-session update-hash wb-eqht-off print-active"> -->
<div class="wb-tabs ignore-session">
<div class="tabpanels">
<details id="details-panel1">
<summary>
Full profile
</summary>
<!-- Tab 1 -->
<h2 class="wb-invisible">
Full profile
</h2>
<!-- Contact Information -->
<h3 class="page-header">
Contact information
</h3>
<section class="container-fluid">
<div class="row mrgn-tp-lg">
<div class="col-md-3">
<strong>
Abe
Bergler
</strong></div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Title:
</strong>
</div>
<div class="col-md-7">
<!--if client gender is not null or empty we use gender based job title
General Manager
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Telephone:
</strong>
</div>
<div class="col-md-7">
(604) 525-8529
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Ext:
</strong>
</div>
<div class="col-md-7">
338
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Facsimile:
</strong>
</div>
<div class="col-md-7">
(604) 525-0974
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Email:
</strong>
</div>
<div class="col-md-7">
iel@radiant.net
</div>
</div>
<div class="row mrgn-tp-lg">
<div class="col-md-3">
<strong>
Peter
Gordon
</strong></div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Title:
</strong>
</div>
<div class="col-md-7">
General Manager<br>
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Telephone:
</strong>
</div>
<div class="col-md-7">
(604) 525-8529
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Facsimile:
</strong>
</div>
<div class="col-md-7">
(604) 525-0974
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Email:
</strong>
</div>
<div class="col-md-7">
iel@industrialengines.ca
</div>
</div>
<div class="row mrgn-tp-lg">
<div class="col-md-3">
<strong>
Dennis
Forman
</strong></div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Title:
</strong>
</div>
<div class="col-md-7">
General Manager<br>
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Telephone:
</strong>
</div>
<div class="col-md-7">
(604) 525-8529
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Facsimile:
</strong>
</div>
<div class="col-md-7">
(604) 525-0974
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Email:
</strong>
</div>
<div class="col-md-7">
iel@industrialengines.ca
</div>
</div>
</section>
<p class="mrgn-tp-lg text-right small hidden-print">
<a href="#wb-cont">top of page</a>
</p>
<!-- Company Description -->
<h3 class="page-header">
Company description
</h3>
<section class="container-fluid">
<div class="row">
<div class="col-md-5">
<strong>
Country of Ownership:
</strong>
</div>
<div class="col-md-7">
Canada
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Year Established:
</strong>
</div>
<div class="col-md-7">
1959
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Exporting:
</strong>
</div>
<div class="col-md-7">
Yes
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Primary Industry (NAICS):
</strong>
</div>
<div class="col-md-7">
333619 - Other Engine and Power Transmission Equipment Manufacturing
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Primary Business Activity:
</strong>
</div>
<div class="col-md-7">
Manufacturer / Processor / Producer
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Total Sales ($CDN):
</strong>
</div>
<div class="col-md-7">
$1,000,000 to $4,999,999
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Export Sales ($CDN):
</strong>
</div>
<div class="col-md-7">
$1 to $99,999
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Number of Employees:
</strong>
</div>
<div class="col-md-7">
15
</div>
</div>
</section>
<!-- Products / Services / Licensing -->
<h3 class="page-header">
Product / Service / Licensing
</h3>
<section class="container-fluid">
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
GENERATOR SETS, DIESEL ENGINE, AC 50 TO 250KW <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
ENGINES, DIESEL & SEMI-DIESEL, MARINE, SHIPS <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
ENGINES, DIESEL & SEMI-DIESEL, MARINE, BOATS <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
ENGINES, GAS, MARINE, EXC OUTBOARD <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
SHIPS, PARTS, ATTACHMENTS & ACCESSORIES NES <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
GENERATOR SETS, DIESEL ENGINE, AC UNDER 50KW <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
ENGINES, DIESEL, NES, 100 BRAKE HP & UNDER <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
ENGINES, GAS, NES, OVER 11 BHP, TO 50 BHP <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
ENGINES, GAS, NES, OVER 50 BHP <br>
</div>
</div>
</section>
<p class="mrgn-tp-lg text-right small hidden-print">
<a href="#wb-cont">top of page</a>
</p>
<!-- Technology Profile -->
<!-- Market Profile -->
<h3 class="page-header">
Market profile
</h3>
<section class="container-fluid">
<h4>
Geographic markets:
</h4>
<h5>
Export experience:
</h5>
<ul>
<li>Bangladesh</li>
<li>Japan</li>
<li>United States</li>
<li>Alaska</li>
<li>Florida</li>
<li>Hawaii</li>
<li>Massachusetts</li>
<li>Minnesota</li>
</ul>
<h5>
Actively pursuing:
</h5>
<ul>
<li>Algeria</li>
<li>American Samoa</li>
<li>Australia</li>
<li>Cambodia</li>
<li>Cook Islands</li>
<li>Egypt</li>
<li>Fiji</li>
<li>French Polynesia</li>
<li>Guam</li>
<li>Guinea</li>
<li>Indonesia</li>
<li>Iran, Islamic Republic of</li>
<li>Iraq</li>
<li>Jordan</li>
<li>Korea, Democratic People's Republic of</li>
<li>Korea, Republic of</li>
<li>Lao People's Democratic Republic</li>
<li>Lebanon</li>
<li>Libyan Arab Jamahiriya</li>
<li>Macao</li>
<li>Malaysia</li>
<li>Mauritania</li>
<li>Morocco</li>
<li>New Caledonia</li>
<li>New Zealand</li>
<li>Papua New Guinea</li>
<li>Philippines</li>
<li>Samoa</li>
<li>Saudi Arabia</li>
<li>Singapore</li>
<li>Solomon Islands</li>
<li>Sudan</li>
<li>Syrian Arab Republic</li>
<li>Taiwan</li>
<li>Thailand</li>
<li>Tonga</li>
<li>Tunisia</li>
<li>Vanuatu</li>
<li>Viet Nam</li>
<li>Yemen</li>
<li>California</li>
<li>Oregon</li>
<li>Washington</li>
</ul>
</section>
<p class="mrgn-tp-lg text-right small hidden-print">
<a href="#wb-cont">top of page</a>
</p>
<!-- Sector Information -->
<details class="mrgn-tp-md mrgn-bttm-md">
<summary>
Third-Party Information Liability Disclaimer
</summary>
<p>
Some of the information on this Web page has been provided by external sources. The Government of Canada is not responsible for the accuracy, reliability or currency of the information supplied by external sources. Users wishing to rely upon this information should consult directly with the source of the information. Content provided by external sources is not subject to official languages, privacy and accessibility requirements.
</p>
</details>
</details>
<details id="details-panel2">
<summary>
Contacts
</summary>
<h2 class="wb-invisible">
Contact information
</h2>
<!-- Contact Information -->
<section class="container-fluid">
<div class="row mrgn-tp-lg">
<div class="col-md-3">
<strong>
Abe
Bergler
</strong></div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Title:
</strong>
</div>
<div class="col-md-7">
<!--if client gender is not null or empty we use gender based job title
General Manager
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Telephone:
</strong>
</div>
<div class="col-md-7">
(604) 525-8529
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Ext:
</strong>
</div>
<div class="col-md-7">
338
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Facsimile:
</strong>
</div>
<div class="col-md-7">
(604) 525-0974
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Email:
</strong>
</div>
<div class="col-md-7">
iel@radiant.net
</div>
</div>
<div class="row mrgn-tp-lg">
<div class="col-md-3">
<strong>
Peter
Gordon
</strong></div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Title:
</strong>
</div>
<div class="col-md-7">
General Manager<br>
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Telephone:
</strong>
</div>
<div class="col-md-7">
(604) 525-8529
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Facsimile:
</strong>
</div>
<div class="col-md-7">
(604) 525-0974
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Email:
</strong>
</div>
<div class="col-md-7">
iel@industrialengines.ca
</div>
</div>
<div class="row mrgn-tp-lg">
<div class="col-md-3">
<strong>
Dennis
Forman
</strong></div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Title:
</strong>
</div>
<div class="col-md-7">
General Manager<br>
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Telephone:
</strong>
</div>
<div class="col-md-7">
(604) 525-8529
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Facsimile:
</strong>
</div>
<div class="col-md-7">
(604) 525-0974
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Email:
</strong>
</div>
<div class="col-md-7">
iel@industrialengines.ca
</div>
</div>
</section>
</details>
<details id="details-panel3">
<summary>
Description
</summary>
<h2 class="wb-invisible">
Company description
</h2>
<section class="container-fluid">
<div class="row">
<div class="col-md-5">
<strong>
Country of Ownership:
</strong>
</div>
<div class="col-md-7">
Canada
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Year Established:
</strong>
</div>
<div class="col-md-7">
1959
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Exporting:
</strong>
</div>
<div class="col-md-7">
Yes
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Primary Industry (NAICS):
</strong>
</div>
<div class="col-md-7">
333619 - Other Engine and Power Transmission Equipment Manufacturing
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Primary Business Activity:
</strong>
</div>
<div class="col-md-7">
Manufacturer / Processor / Producer
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Total Sales ($CDN):
</strong>
</div>
<div class="col-md-7">
$1,000,000 to $4,999,999
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Export Sales ($CDN):
</strong>
</div>
<div class="col-md-7">
$1 to $99,999
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Number of Employees:
</strong>
</div>
<div class="col-md-7">
15
</div>
</div>
</section>
</details>
<details id="details-panel4">
<summary>
Products, services and licensing
</summary>
<h2 class="wb-invisible">
Product / Service / Licensing
</h2>
<section class="container-fluid">
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
GENERATOR SETS, DIESEL ENGINE, AC 50 TO 250KW <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
ENGINES, DIESEL & SEMI-DIESEL, MARINE, SHIPS <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
ENGINES, DIESEL & SEMI-DIESEL, MARINE, BOATS <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
ENGINES, GAS, MARINE, EXC OUTBOARD <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
SHIPS, PARTS, ATTACHMENTS & ACCESSORIES NES <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
GENERATOR SETS, DIESEL ENGINE, AC UNDER 50KW <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
ENGINES, DIESEL, NES, 100 BRAKE HP & UNDER <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
ENGINES, GAS, NES, OVER 11 BHP, TO 50 BHP <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
ENGINES, GAS, NES, OVER 50 BHP <br>
</div>
</div>
</section>
</details>
<details id="details-panel6">
<summary>
Market
</summary>
<h2 class="wb-invisible">
Market profile
</h2>
<section class="container-fluid">
<h4>
Geographic markets:
</h4>
<h5>
Export experience:
</h5>
<ul>
<li>Bangladesh</li>
<li>Japan</li>
<li>United States</li>
<li>Alaska</li>
<li>Florida</li>
<li>Hawaii</li>
<li>Massachusetts</li>
<li>Minnesota</li>
</ul>
<h5>
Actively pursuing:
</h5>
<ul>
<li>Algeria</li>
<li>American Samoa</li>
<li>Australia</li>
<li>Cambodia</li>
<li>Cook Islands</li>
<li>Egypt</li>
<li>Fiji</li>
<li>French Polynesia</li>
<li>Guam</li>
<li>Guinea</li>
<li>Indonesia</li>
<li>Iran, Islamic Republic of</li>
<li>Iraq</li>
<li>Jordan</li>
<li>Korea, Democratic People's Republic of</li>
<li>Korea, Republic of</li>
<li>Lao People's Democratic Republic</li>
<li>Lebanon</li>
<li>Libyan Arab Jamahiriya</li>
<li>Macao</li>
<li>Malaysia</li>
<li>Mauritania</li>
<li>Morocco</li>
<li>New Caledonia</li>
<li>New Zealand</li>
<li>Papua New Guinea</li>
<li>Philippines</li>
<li>Samoa</li>
<li>Saudi Arabia</li>
<li>Singapore</li>
<li>Solomon Islands</li>
<li>Sudan</li>
<li>Syrian Arab Republic</li>
<li>Taiwan</li>
<li>Thailand</li>
<li>Tonga</li>
<li>Tunisia</li>
<li>Vanuatu</li>
<li>Viet Nam</li>
<li>Yemen</li>
<li>California</li>
<li>Oregon</li>
<li>Washington</li>
</ul>
</section>
</details>
</div>
</div>
<div class="row">
<div class="col-md-12 text-right">
Last Update Date 2017-03-28
</div>
</div>
<!
- Artifact ID: CBW - IMBS - CCC Search WAR
- Group ID: ca.gc.ic.strategis.imbs.ccc.search
- Version: 3.26
- Built-By: bamboo
- Build Timestamp: 2017-03-02T21:29:28Z
<!-- End Body Content -->
<!-- Begin Body Foot -->
<!-- End Body Foot -->
<!-- END MAIN TABLE -->
<!-- End body -->
<!-- Begin footer -->
<div class="row pagedetails">
<div class="col-sm-5 col-xs-12 datemod">
<dl id="wb-dtmd">
<dt class=" hidden-print">Date Modified:</dt>
<dd class=" hidden-print">
<span><time>2017-03-02</time></span>
</dd>
</dl>
</div>
<div class="clear visible-xs"></div>
<div class="col-sm-4 col-xs-6">
</div>
<div class="col-sm-3 col-xs-6 text-right">
</div>
<div class="clear visible-xs"></div>
</div>
</main>
<footer role="contentinfo" id="wb-info">
<nav role="navigation" class="container wb-navcurr">
<h2 class="wb-inv">About government</h2>
<!-- EPIC FOOTER BEGIN -->
<!-- EPI-11638 Contact us -->
<ul class="list-unstyled colcount-sm-2 colcount-md-3">
<li><a href="http://www.ic.gc.ca/eic/site/icgc.nsf/eng/h_07026.html#pageid=E048-H00000&from=Industries">Contact us</a></li>
<li><a href="https:
<li><a href="https:
<li><a href="https:
<li><a href="https:
<li><a href="https:
<li><a href="http://pm.gc.ca/eng">Prime Minister</a></li>
<li><a href="https:
<li><a href="http://open.canada.ca/en/">Open government</a></li>
</ul>
</nav>
<div class="brand">
<div class="container">
<div class="row">
<nav class="col-md-10 ftr-urlt-lnk">
<h2 class="wb-inv">About this site</h2>
<ul>
<li><a href="https:
<li><a href="https:
<li><a href="http://www1.canada.ca/en/newsite.html">About Canada.ca</a></li>
<li><a href="http:
<li><a href="http://www.ic.gc.ca/eic/site/icgc.nsf/eng/h_07033.html#p1">Privacy</a></li>
</ul>
</nav>
<div class="col-xs-6 visible-sm visible-xs tofpg">
<a href="#wb-cont">Top of Page <span class="glyphicon <API key>"></span></a>
</div>
<div class="col-xs-6 col-md-2 text-right">
<object type="image/svg+xml" tabindex="-1" role="img" data="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/assets/wmms-blk.svg" aria-label="Symbol of the Government of Canada"></object>
</div>
</div>
</div>
</div>
</footer>
<!--[if gte IE 9 | !IE ]><!-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/js/wet-boew.min.js"></script>
<!--<![endif]-->
<!--[if lt IE 9]>
<script src="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/js/ie8-wet-boew2.min.js"></script>
<![endif]
<script src="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/js/theme.min.js"></script>
<!-- EPI-10519 -->
<span class="wb-sessto"
data-wb-sessto='{"inactivity": 1800000, "reactionTime": 180000, "sessionalive": 1800000, "logouturl": "/app/ccc/srch/cccSrch.do?lang=eng&prtl=1"}'></span>
<script src="/eic/home.nsf/js/jQuery.<API key>.js"></script>
<!-- EPI-11190 - Webtrends -->
<script src="/eic/home.nsf/js/webtrends.js"></script>
<script>var endTime = new Date();</script>
<noscript>
<div><img alt="" id="DCSIMG" width="1" height="1" src="
</noscript>
<!-- /Webtrends -->
<!-- JS deps -->
<script src="/eic/home.nsf/js/jquery.imagesloaded.js"></script>
<!-- EPI-11262 - Util JS -->
<script src="/eic/home.nsf/js/<API key>.min.js"></script>
<!-- EPI-11383 -->
<script src="/eic/home.nsf/js/jQuery.icValidationErrors.js"></script>
<span style="display:none;" id='app-info' <API key>='' <API key>='' <API key>='' <API key>='' data-issue-tracking='' data-scm-sha1='' <API key>='' data-scm-branch='' <API key>=''></span>
</body></html>
<!-- End Footer -->
<!
- Artifact ID: CBW - IMBS - CCC Search WAR
- Group ID: ca.gc.ic.strategis.imbs.ccc.search
- Version: 3.26
- Built-By: bamboo
- Build Timestamp: 2017-03-02T21:29:28Z
|
# Compiler, Flags, Directory Name and Executable Name
CC= g++
CFLAGS= -std=c++11
ODIR= ../obj
# Source codes and objects (Add here new .cpp tests separated by spaces)
SRCS= testPoint.cpp
EXEC= t1
OBJS= $(patsubst %.cpp,$(ODIR)/%.o,$(SRCS))
all: $(EXEC)
# Concatenate objects with your new directory
$(OBJS): | $(ODIR)
# Compile and create objects
$(ODIR)/%.o: %.cpp
$(CC) $(CFLAGS) -c $< -o $@
# Generate the executables
$(EXEC): $(OBJS)
$(CC) $(CFLAGS) $^ -o $@
rm -rf *.settings
# Delete objects, executables and new directories
clean:
|
package org.jabref.gui.openoffice;
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.ButtonGroup;
import javax.swing.JButton;
import javax.swing.JComponent;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JRadioButton;
import javax.swing.JTextField;
import org.jabref.Globals;
import org.jabref.gui.JabRefFrame;
import org.jabref.gui.keyboard.KeyBinding;
import org.jabref.logic.l10n.Localization;
import com.jgoodies.forms.builder.ButtonBarBuilder;
import com.jgoodies.forms.builder.FormBuilder;
import com.jgoodies.forms.layout.FormLayout;
/**
* Dialog for adding citation with page number info.
*/
class AdvancedCiteDialog {
private static boolean defaultInPar = true;
private boolean okPressed;
private final JDialog diag;
private final JTextField pageInfo = new JTextField(15);
public AdvancedCiteDialog(JabRefFrame parent) {
diag = new JDialog((JFrame) null, Localization.lang("Cite special"), true);
ButtonGroup bg = new ButtonGroup();
JRadioButton inPar = new JRadioButton(Localization.lang("Cite selected entries between parenthesis"));
JRadioButton inText = new JRadioButton(Localization.lang("Cite selected entries with in-text citation"));
bg.add(inPar);
bg.add(inText);
if (defaultInPar) {
inPar.setSelected(true);
} else {
inText.setSelected(true);
}
inPar.addChangeListener(changeEvent -> defaultInPar = inPar.isSelected());
FormBuilder builder = FormBuilder.create()
.layout(new FormLayout("left:pref, 4dlu, fill:pref", "pref, 4dlu, pref, 4dlu, pref"));
builder.add(inPar).xyw(1, 1, 3);
builder.add(inText).xyw(1, 3, 3);
builder.add(Localization.lang("Extra information (e.g. page number)") + ":").xy(1, 5);
builder.add(pageInfo).xy(3, 5);
builder.padding("10dlu, 10dlu, 10dlu, 10dlu");
diag.getContentPane().add(builder.getPanel(), BorderLayout.CENTER);
ButtonBarBuilder bb = new ButtonBarBuilder();
bb.addGlue();
JButton ok = new JButton(Localization.lang("OK"));
JButton cancel = new JButton(Localization.lang("Cancel"));
bb.addButton(ok);
bb.addButton(cancel);
bb.addGlue();
bb.padding("5dlu, 5dlu, 5dlu, 5dlu");
diag.getContentPane().add(bb.getPanel(), BorderLayout.SOUTH);
diag.pack();
ActionListener okAction = actionEvent -> {
okPressed = true;
diag.dispose();
};
ok.addActionListener(okAction);
pageInfo.addActionListener(okAction);
inPar.addActionListener(okAction);
inText.addActionListener(okAction);
Action cancelAction = new AbstractAction() {
@Override
public void actionPerformed(ActionEvent actionEvent) {
okPressed = false;
diag.dispose();
}
};
cancel.addActionListener(cancelAction);
builder.getPanel().getInputMap(JComponent.<API key>)
.put(Globals.getKeyPrefs().getKey(KeyBinding.CLOSE), "close");
builder.getPanel().getActionMap().put("close", cancelAction);
}
public void showDialog() {
diag.<API key>(diag.getParent());
diag.setVisible(true);
}
public boolean canceled() {
return !okPressed;
}
public String getPageInfo() {
return pageInfo.getText().trim();
}
public boolean isInParenthesisCite() {
return defaultInPar;
}
}
|
// GuidExtensions.cs
// Craig Fowler <craig@csf-dev.com>
// 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.
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
namespace CSF
{
<summary>
Extension methods for the <c>System.Guid</c> type.
</summary>
public static class GuidExtensions
{
#region constants
private const int GUID_BYTE_COUNT = 16;
private static readonly int[] REORDERING_MAP = new[] { 3, 2, 1, 0, 5, 4, 7, 6, 8, 9, 10, 11, 12, 13, 14, 15 };
#endregion
#region extension methods
<summary>
Returns a byte array representing the given <c>System.Guid</c> in an RFC-4122 compliant format.
</summary>
<remarks>
<para>
The rationale for this method (and the reason for requiring it) is because Microsoft internally represent the
GUID structure in a manner which does not comply with RFC-4122's definition of a UUID. The first three blocks
of data (out of 4 total) are stored using the machine's native endianness. The RFC defines that these three
blocks should be represented in big-endian format. This does not cause a problem when getting a
<API key> of the GUID, since the framework automatically converts to big-endian format before
formatting as a string. When getting a byte array equivalent of the GUID though, it can cause issues if the
recipient of that byte array expects a standards-compliant UUID.
</para>
<para>
This method checks the architecture of the current machine. If it is little-endian then - before returning a
value - the byte-order of the first three blocks of data are reversed. If the machine is big-endian then the
bytes are left untouched (since they are already correct).
</para>
<para>
For more information, see https://en.wikipedia.org/wiki/<API key>#Binary_encoding
</para>
</remarks>
<returns>
A byte array representation of the GUID, in RFC-4122 compliant form.
</returns>
<param name='guid'>
The GUID for which to get the byte array.
</param>
public static byte[] ToRFC4122ByteArray(this Guid guid)
{
return BitConverter.IsLittleEndian? ReorderBytes(guid.ToByteArray()) : guid.ToByteArray();
}
<summary>
Returns a <c>System.Guid</c>, created from the given RFC-4122 compliant byte array.
</summary>
<remarks>
<para>
The rationale for this method (and the reason for requiring it) is because Microsoft internally represent the
GUID structure in a manner which does not comply with RFC-4122's definition of a UUID. The first three blocks
of data (out of 4 total) are stored using the machine's native endianness. The RFC defines that these three
blocks should be represented in big-endian format. This does not cause a problem when getting a
<API key> of the GUID, since the framework automatically converts to big-endian format before
formatting as a string. When getting a byte array equivalent of the GUID though, it can cause issues if the
recipient of that byte array expects a standards-compliant UUID.
</para>
<para>
This method checks the architecture of the current machine. If it is little-endian then - before returning a
value - the byte-order of the first three blocks of data are reversed. If the machine is big-endian then the
bytes are left untouched (since they are already correct).
</para>
<para>
For more information, see https://en.wikipedia.org/wiki/<API key>#Binary_encoding
</para>
</remarks>
<returns>
A GUID, created from the given byte array.
</returns>
<param name='guidBytes'>
A byte array representing a GUID, in RFC-4122 compliant form.
</param>
public static Guid <API key>(this byte[] guidBytes)
{
return new Guid(BitConverter.IsLittleEndian? ReorderBytes(guidBytes) : guidBytes);
}
#endregion
#region static methods
<summary>
Copies a byte array that represents a GUID, reversing the order of the bytes in data-blocks one to three.
</summary>
<returns>
A copy of the original byte array, with the modifications.
</returns>
<param name='guidBytes'>
A byte array representing a GUID.
</param>
public static byte[] ReorderBytes(byte[] guidBytes)
{
if(guidBytes == null)
{
throw new <API key>(nameof(guidBytes));
}
else if(guidBytes.Length != GUID_BYTE_COUNT)
{
throw new ArgumentException(Resources.ExceptionMessages.<API key>, nameof(guidBytes));
}
byte[] output = new byte[GUID_BYTE_COUNT];
for(int i = 0; i < GUID_BYTE_COUNT; i++)
{
output[i] = guidBytes[REORDERING_MAP[i]];
}
return output;
}
#endregion
}
}
|
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
$template = get_option( 'template' );
switch ( $template ) {
case 'twentyeleven' :
echo '<div id="primary"><div id="content" role="main" class="twentyeleven">';
break;
case 'twentytwelve' :
echo '<div id="primary" class="site-content"><div id="content" role="main" class="twentytwelve">';
break;
case 'twentythirteen' :
echo '<div id="primary" class="site-content"><div id="content" role="main" class="entry-content twentythirteen">';
break;
case 'twentyfourteen' :
echo '<div id="primary" class="content-area"><div id="content" role="main" class="site-content twentyfourteen"><div class="tfwc">';
break;
case 'twentyfifteen' :
echo '<div id="primary" role="main" class="content-area twentyfifteen"><div id="main" class="site-main t15wc">';
break;
case 'twentysixteen' :
echo '<div id="primary" class="content-area twentysixteen"><main id="main" class="site-main" role="main">';
break;
default :
echo '<div id="container"><div id="content" role="main">';
break;
}
|
# Apollo REST Data Source
This package exports a ([`RESTDataSource`](https://github.com/apollographql/apollo-server/tree/main/packages/<API key>)) class which is used for fetching data from a REST API and exposing it via GraphQL within Apollo Server.
## Documentation
View the [Apollo Server documentation for data sources](https:
## Usage
To get started, install the `<API key>` package:
bash
npm install <API key>
To define a data source, extend the [`RESTDataSource`](https://github.com/apollographql/apollo-server/tree/main/packages/<API key>) class and implement the data fetching methods that your resolvers require. Data sources can then be provided via the `dataSources` property to the `ApolloServer` constructor, as demonstrated in the _Accessing data sources from resolvers_ section below.
Your implementation of these methods can call on convenience methods built into the [RESTDataSource](https://github.com/apollographql/apollo-server/tree/main/packages/<API key>) class to perform HTTP requests, while making it easy to build up query parameters, parse JSON results, and handle errors.
javascript
const { RESTDataSource } = require('<API key>');
class MoviesAPI extends RESTDataSource {
constructor() {
super();
this.baseURL = 'https://movies-api.example.com/';
}
async getMovie(id) {
return this.get(`movies/${id}`);
}
async getMostViewedMovies(limit = 10) {
const data = await this.get('movies', {
per_page: limit,
order_by: 'most_viewed',
});
return data.results;
}
}
HTTP Methods
The `get` method on the [RESTDataSource](https://github.com/apollographql/apollo-server/tree/main/packages/<API key>) makes an HTTP `GET` request. Similarly, there are methods built-in to allow for POST, PUT, PATCH, and DELETE requests.
javascript
class MoviesAPI extends RESTDataSource {
constructor() {
super();
this.baseURL = 'https://movies-api.example.com/';
}
// an example making an HTTP POST request
async postMovie(movie) {
return this.post(
`movies`, // path
movie, // request body
);
}
// an example making an HTTP PUT request
async newMovie(movie) {
return this.put(
`movies`, // path
movie, // request body
);
}
// an example making an HTTP PATCH request
async updateMovie(movie) {
return this.patch(
`movies`, // path
{ id: movie.id, movie }, // request body
);
}
// an example making an HTTP DELETE request
async deleteMovie(movie) {
return this.delete(
`movies/${movie.id}`, // path
);
}
}
All of the HTTP helper functions (`get`, `put`, `post`, `patch`, and `delete`) accept a third options parameter, which can be used to set things like headers and referrers. For more info on the options available, see MDN's [fetch docs](https://developer.mozilla.org/en-US/docs/Web/API/<API key>/fetch#Parameters).
Intercepting fetches
Data sources allow you to intercept fetches to set headers, query parameters, or make other changes to the outgoing request. This is most often used for authorization or other common concerns that apply to all requests. Data sources also get access to the GraphQL context, which is a great place to store a user token or other information you need to have available.
You can easily set a header on every request:
javascript
class PersonalizationAPI extends RESTDataSource {
willSendRequest(request) {
request.headers.set('Authorization', this.context.token);
}
}
Or add a query parameter:
javascript
class PersonalizationAPI extends RESTDataSource {
willSendRequest(request) {
request.params.set('api_key', this.context.token);
}
}
If you're using TypeScript, make sure to import the `RequestOptions` type:
javascript
import { RESTDataSource, RequestOptions } from '<API key>';
class PersonalizationAPI extends RESTDataSource {
baseURL = 'https://personalization-api.example.com/';
willSendRequest(request: RequestOptions) {
request.headers.set('Authorization', this.context.token);
}
}
Resolving URLs dynamically
In some cases, you'll want to set the URL based on the environment or other contextual values. You can use a getter for this:
javascript
get baseURL() {
if (this.context.env === 'development') {
return 'https://movies-api-dev.example.com/';
} else {
return 'https://movies-api.example.com/';
}
}
If you need more customization, including the ability to resolve a URL asynchronously, you can also override `resolveURL`:
javascript
async resolveURL(request: RequestOptions) {
if (!this.baseURL) {
const addresses = await resolveSrv(request.path.split("/")[1] + ".service.consul");
this.baseURL = addresses[0];
}
return super.resolveURL(request);
}
Accessing data sources from resolvers
To give resolvers access to data sources, you pass them as options to the `ApolloServer` constructor:
javascript
const server = new ApolloServer({
typeDefs,
resolvers,
dataSources: () => {
return {
moviesAPI: new MoviesAPI(),
personalizationAPI: new PersonalizationAPI(),
};
},
context: () => {
return {
token: 'foo',
};
},
});
Apollo Server will put the data sources on the context for every request, so you can access them from your resolvers. It will also give your data sources access to the context. (The reason for not having users put data sources on the context directly is because that would lead to a circular dependency.)
From our resolvers, we can access the data source and return the result:
javascript
Query: {
movie: async (_source, { id }, { dataSources }) => {
return dataSources.moviesAPI.getMovie(id);
},
mostViewedMovies: async (_source, _args, { dataSources }) => {
return dataSources.moviesAPI.getMostViewedMovies();
},
favorites: async (_source, _args, { dataSources }) => {
return dataSources.personalizationAPI.getFavorites();
},
},
|
package com.ricex.aft.android.request;
import org.springframework.http.HttpStatus;
public class AFTResponse<T> {
/** The successful response from the server */
private final T response;
/** The error response from the server */
private final String error;
/** The HttpStatus code of the response */
private final HttpStatus statusCode;
/** Whether or not this response is valid */
private final boolean valid;
/** Creates a new instance of AFTResponse, representing a successful response
*
* @param response The parsed response received from the server
* @param statusCode The status code of the response
*/
public AFTResponse(T response, HttpStatus statusCode) {
this.response = response;
this.statusCode = statusCode;
this.error = null;
valid = true;
}
/** Creates a new instance of AFTResponse, representing an invalid (error) response
*
* @param response The response (if any) received from the server
* @param error The error message received from the server
* @param statusCode The status code of the response
*/
public AFTResponse(T response, String error, HttpStatus statusCode) {
this.response = response;
this.error = error;
this.statusCode = statusCode;
valid = false;
}
/** Whether or not this response is valid
*
* @return True if the server returned Http OK (200), otherwise false
*/
public boolean isValid() {
return valid;
}
/** The response from the server if valid
*
* @return The response from the server
*/
public T getResponse() {
return response;
}
/** Returns the error received by the server, if invalid response
*
* @return The error the server returned
*/
public String getError() {
return error;
}
/** Return the status code received from the server
*
* @return the status code received from the server
*/
public HttpStatus getStatusCode() {
return statusCode;
}
}
|
<?php
use Cake\Core\Plugin;
use Cake\Routing\Router;
Router::scope('/', function ($routes) {
/**
* Here, we are connecting '/' (base path) to a controller called 'Pages',
* its action called 'display', and we pass a param to select the view file
* to use (in this case, src/Template/Pages/home.ctp)...
*/
$routes->connect('/', ['controller' => 'Pages', 'action' => 'display', 'home']);
/**
* ...and connect the rest of 'Pages' controller's URLs.
*/
* `$routes->connect('/:controller/:action/*', [], ['routeClass' => 'InflectedRoute']);`
*
* You can remove these routes once you've connected the
* routes you want in your application.
*/
$routes->fallbacks();
});
/**
* Load all plugin routes. See the Plugin documentation on
* how to customize the loading of plugin routes.
*/
Plugin::routes();
|
/* app/ui/map/svg */
define(
[
'jquery',
'raphael',
'app/ui/map/data',
'app/ui/map/util',
'util/detector',
'pubsub'
],
function ($, Raphael, MapData, MapUtil, Detector) {
'use strict';
var SVG;
return {
nzte: {},
markers: [],
exports: {},
countryText: {},
sets: {},
continentSets: {},
text: {},
raphael: null,
_$container: null,
_isExportsMap: false,
init: function () {
SVG = this;
this._$container = $('.js-map-container');
this._isExportsMap = $('#js-map-nzte').length ? false : true;
//If already setup just show the map again
if (this._$container.is('.is-loaded')) {
this._$container.show();
return;
}
if (this._isExportsMap) {
this._initInteractiveMap();
return;
}
this._initRegularMap();
},
_initInteractiveMap: function () {
this._setUpMap();
this._drawMap();
this.<API key>();
this.<API key>();
this._setLoaded();
this._hideLoader();
},
_initRegularMap: function () {
this._setUpMap();
this._drawMap();
this._createSets();
this.<API key>();
this._setLoaded();
this._hideLoader();
},
_setLoaded: function () {
this._$container.addClass('is-loaded');
},
_hideLoader: function () {
$.publish('/loader/hide');
},
_setUpMap: function () {
var id = this._isExportsMap ? 'js-map-exports' : 'js-map-nzte';
this._$container.show();
this.raphael = Raphael(id, '100%', '100%');
this.raphael.setViewBox(0, 0, 841, 407, true);
this.raphael.canvas.setAttribute('preserveAspectRatio', 'xMinYMin meet');
},
_drawMap: function () {
this._addMainMap();
this.<API key>();
this.<API key>();
if (this._isExportsMap) {
this._addCountryMarkers();
}
},
_addMainMap: function () {
var mainAttr = {
stroke: 'none',
fill: '#dededd',
'fill-rule': 'evenodd',
'stroke-linejoin': 'round'
};
this.nzte.main = this.raphael.path(MapData.main).attr(mainAttr);
},
<API key>: function () {
var markerAttr = {
stroke: 'none',
fill: '#f79432',
'stroke-linejoin': 'round',
cursor: 'pointer'
};
var markerPaths = MapData.markers[0];
for (var continent in markerPaths) {
if (!this._isExportsMap || this._isExportsMap && continent !== 'new-zealand') {
this.markers[continent] = this.raphael.path(markerPaths[continent]).attr(markerAttr);
}
}
},
<API key>: function () {
var textAttr = {
stroke: 'none',
fill: '#ffffff',
'fill-rule': 'evenodd',
'stroke-linejoin': 'round',
cursor: 'pointer'
};
var textPaths = MapData.text[0];
for (var continent in textPaths) {
if (!this._isExportsMap || this._isExportsMap && continent !== 'new-zealand') {
this.text[continent] = this.raphael.path(textPaths[continent]).attr(textAttr);
}
}
},
_addCountryMarkers: function () {
var marker;
for (var region in this.markers) {
marker = this.markers[region];
this._createHoverBox(region, marker);
}
},
_createHoverBox: function (region, marker) {
var set;
var markerAttr = {
stroke: 'none',
fill: '#116697',
opacity: 0,
'stroke-linejoin': 'round'
};
var markerPaths = MapData.exportsText[0];
var country = markerPaths[region];
if (!country) {
return;
}
var countryText = markerPaths[region][0];
var numberOfCountries = Object.keys(countryText).length;
var markerBox = marker.getBBox();
var topX = markerBox.x;
var bottomY = markerBox.y2;
var width = region !== '<API key>' ? 150 : 200;
//Add the rectangle
this.exports[region] = this.raphael.rect(topX + 28, bottomY - 1, width, (21 * numberOfCountries) + 5).toBack().attr(markerAttr);
//Create a set to combine countries, hover box and region icon/text
set = this.raphael.set();
set.push(
this.exports[region]
);
//Add the country Text
this._addCountryText(markerBox, countryText, topX + 28, bottomY - 1, 21, region, set);
},
_addCountryText: function (markerBox, countryText, x, y, height, region, set) {
var updatedX = x + 10;
var updatedY = y + 10;
var textAttr = {
font: '13px Arial',
textAlign: 'left',
fill: "#ffffff",
cursor: 'pointer',
'text-decoration': 'underline',
'text-anchor': 'start',
opacity: 0
};
for (var country in countryText) {
var text = countryText[country].toUpperCase();
this.countryText[country] = this.raphael.text(updatedX, updatedY, text).toBack().attr(textAttr);
updatedY += height;
set.push(
this.countryText[country]
);
}
this.continentSets[region] = set.hide();
},
_createSets: function () {
for (var region in this.markers) {
var set = this.raphael.set();
set.push(
this.markers[region],
this.text[region]
);
this.sets[region] = set;
}
},
<API key>: function () {
for (var region in this.markers) {
var set = this.raphael.set();
set.push(
this.markers[region],
this.text[region],
this.continentSets[region]
);
this.sets[region] = set;
}
},
<API key>: function () {
this.<API key>();
this.<API key>();
},
<API key>: function () {
var bounceEasing = 'cubic-bezier(0.680, -0.550, 0.265, 1.550)';
var <API key> = {
transform: 's1.1'
};
var <API key> = {
transform: 's1.1t5,0'
};
var <API key> = {
transform: 's1'
};
var mouseOverMarker = {
fill: '#116697'
};
var mouseOutMarker = {
fill: '#f79432'
};
for (var region in this.sets) {
var set = this.sets[region];
var marker = this.markers[region];
var text = this.text[region];
(function (savedSet, savedRegion, savedMarker, savedText) {
savedSet.attr({
cursor: 'pointer'
});
savedSet.hover(function () {
//A slight translation is needed for '<API key>' so when hovered it isn't clipped by container
var transformAttr = savedRegion !== '<API key>' ? <API key> : <API key>;
savedMarker.animate(transformAttr, 250, bounceEasing);
savedMarker.animate(mouseOverMarker, 250, 'easeInOutExpo');
savedText.animate(transformAttr, 250, bounceEasing);
}, function () {
savedMarker.animate(<API key>, 250, bounceEasing);
savedMarker.animate(mouseOutMarker, 250, 'easeInOutSine');
savedText.animate(<API key>, 250, bounceEasing);
});
savedSet.click(function () {
MapUtil.goToUrl(savedRegion, false);
});
})(set, region, marker, text);
}
},
<API key>: function () {
var noHover = Detector.noSvgHover();
var mouseOverMarker = {
fill: '#116697'
};
var mouseOutMarker = {
fill: '#f79432'
};
for (var region in this.sets) {
var set = this.sets[region];
var continentSet = this.continentSets[region];
var marker = this.markers[region];
var text = this.text[region];
var hoverBox = this.exports[region];
(function (savedSet, savedContinentSet, savedRegion, savedMarker, savedText, savedBox) {
savedSet.attr({
cursor: 'pointer'
});
if (noHover) {
savedMarker.data('open', false);
savedSet.click(function () {
if (savedMarker.data('open') === false) {
SVG._closeAllContinents();
savedMarker.data('open', true);
savedMarker.animate(mouseOverMarker, 250, 'easeInOutExpo');
savedContinentSet.show().toFront().animate({ opacity: 1 }, 250, 'easeInOutExpo');
} else {
savedMarker.data('open', false);
savedMarker.animate(mouseOutMarker, 250, 'easeInOutSine');
savedContinentSet.animate({ opacity: 0 }, 250, 'easeInOutSine').hide().toBack();
}
});
savedSet.hover(function () {
savedMarker.animate(mouseOverMarker, 250, 'easeInOutExpo');
}, function () {
savedMarker.data('open') === false && savedMarker.animate(mouseOutMarker, 250, 'easeInOutSine');
});
} else {
savedSet.hover(function () {
savedMarker.animate(mouseOverMarker, 250, 'easeInOutExpo');
savedContinentSet.show().toFront().animate({ opacity: 1 }, 250, 'easeInOutExpo');
}, function () {
savedMarker.animate(mouseOutMarker, 250, 'easeInOutSine');
savedContinentSet.animate({ opacity: 0 }, 250, 'easeInOutSine').hide().toBack();
});
}
})(set, continentSet, region, marker, text, hoverBox);
}
},
_closeAllContinents: function () {
for (var region in this.sets) {
var continentSet = this.continentSets[region];
var marker = this.markers[region];
var mouseOutMarker = {
fill: '#f79432'
};
marker.data('open', false);
marker.animate(mouseOutMarker, 250, 'easeInOutSine');
continentSet.animate({ opacity: 0 }, 250, 'easeInOutSine').hide().toBack();
}
},
<API key>: function () {
for (var country in this.countryText) {
var text = this.countryText[country];
(function (savedText, savedCountry) {
savedText.click(function () {
MapUtil.goToUrl(savedCountry, true);
});
savedText.hover(function () {
savedText.animate({ 'fill-opacity': 0.6 }, 250, 'easeInOutSine');
}, function () {
savedText.animate({ 'fill-opacity': 1 }, 250, 'easeInOutSine');
});
})(text, country);
}
}
};
}
);
|
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
$active_group = 'default';
$query_builder = TRUE;
$db['default'] = array(
'dsn' => '',
'hostname' => 'localhost:8889',
'username' => 'root',
'password' => 'root',
'database' => 'belttest',
'dbdriver' => 'mysqli',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => (ENVIRONMENT !== 'production'),
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);
|
<?php
// src/AppBundle/Entity/Blog.php
namespace AppBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="blog")
*/
class Blog
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @ORM\Column(type="string", length=100)
*/
protected $title;
/**
* @ORM\Column(type="decimal", scale=2)
*/
protected $body;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set title
*
* @param string $title
* @return Blog
*/
public function setTitle($title)
{
$this->title = $title;
return $this;
}
/**
* Get title
*
* @return string
*/
public function getTitle()
{
return $this->title;
}
/**
* Set body
*
* @param string $body
* @return Blog
*/
public function setBody($body)
{
$this->body = $body;
return $this;
}
/**
* Get body
*
* @return string
*/
public function getBody()
{
return $this->body;
}
}
|
import {Chart} from 'react-google-charts';
import React, {Component, PropTypes} from 'react';
import DataFormatter from '../../utils/DataFormatter';
class EnvyBarChart extends Component {
constructor(props) {
super(props);
this.state={
options:{
hAxis: {title: 'Event Type'},
vAxis: {title: 'Envy Events'},
legend: 'none',
},
};
}
generateGraph(events) {
var formatter = new DataFormatter();
var result = formatter.generateEnvyGraph(events);
return result;
}
render() {
var data = this.generateGraph(this.props.events);
return (
<Chart
chartType="ColumnChart"
data={data}
options={this.state.options}
graph_id="EnvyBarChart"
width='40vw'
height='50vh'
/>
);
}
};
EnvyBarChart.propTypes = {
events: PropTypes.array.isRequired
}
export default EnvyBarChart;
|
using ApiAiSDK.Model;
using Microsoft.Bot.Builder.Dialogs;
using Microsoft.Bot.Connector;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using UPT.BOT.Aplicacion.DTOs.BOT;
using UPT.BOT.Distribucion.Bot.Acceso.Documento;
namespace UPT.BOT.Distribucion.Bot.BotService.Dialogos.Documento
{
[Serializable]
public class BoletinDialog : BaseDialog, IDialog<object>
{
private AIResponse response;
public BoletinDialog(AIResponse response)
{
this.response = response;
}
public async Task StartAsync(IDialogContext context)
{
IMessageActivity actividaMensaje = context.MakeMessage();
actividaMensaje.Text = response.Result.Fulfillment.Speech ?? string.Empty;
actividaMensaje.Recipient = actividaMensaje.From;
actividaMensaje.Type = ActivityTypes.Message;
await context.PostAsync(actividaMensaje);
List<BoletinDto> entidades = new BoletinProxy(ruta).Obtener();
List<Attachment> listaAdjuntos = new List<Attachment>();
HeroCard tarjetaFormato = new HeroCard("Boletines");
tarjetaFormato.Subtitle = "Puedes descargar boletines que te serán de gran ayuda!";
tarjetaFormato.Buttons = entidades.Select(p => new CardAction
{
Title = p.DescripcionTitulo,
Value = p.DescripcionUrl,
Type = ActionTypes.DownloadFile
}).ToList();
listaAdjuntos.Add(tarjetaFormato.ToAttachment());
IMessageActivity actividadTarjeta = context.MakeMessage();
actividadTarjeta.Recipient = actividadTarjeta.From;
actividadTarjeta.Attachments = listaAdjuntos;
actividadTarjeta.AttachmentLayout = <API key>.List;
actividadTarjeta.Type = ActivityTypes.Message;
await context.PostAsync(actividadTarjeta);
context.Done(this);
}
}
}
|
"use strict";
let mongoose = require('mongoose'),
Schema = mongoose.Schema,
EmailValidator = require('./emailValidator');
class User {
constructor(explicitConnection) {
this.explicitConnection = explicitConnection;
this.schema = new Schema({
email: {
type: 'string',
trim: true,
required: true
},
organization: {
type: 'string',
trim: true,
required: true
},
password: {type: 'string', required: true},
isVisibleAccount: {type: 'boolean'},
userApiKey: {type: 'string'},
userApiSecret: {type: 'string'},
linkedApps: {},
avatarProto: {type: 'string'},
gmailAccount: {type: 'string'},
facebookAccount: {type: 'string'},
twitterAccount: {type: 'string'},
fullname: {type: 'string'},
loginHistories: [],
<API key>: [],
change<API key>: [],
sparqlQuestions: [],
blockingHistories: [],
authorizations: {},
tripleUsage: {type: 'number', default: 0},
tripleUsageHistory: [],
isBlocked: {
type: 'boolean',
required: true
},
blockedCause: {
type: 'string',
}
}).index({ email: 1, organization: 1 }, { unique: true });
}
getModel() {
if (this.explicitConnection === undefined) {
return mongoose.model('User', this.schema);
} else {
return this.explicitConnection.model('User', this.schema);
}
}
}
module.exports = User;
|
package cn.edu.ustc.appseed.clubseed.activity;
/*
* Show the detail content of the event which you select.
* Why to use a custom toolbar instead of the default toolbar in ActionBarActivity?
* Because the custom toolbar is very convenient to edit it and good to unify the GUI.
*/
import android.content.Intent;
import android.graphics.Bitmap;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.alibaba.fastjson.JSON;
import cn.edu.ustc.appseed.clubseed.R;
import cn.edu.ustc.appseed.clubseed.data.Event;
import cn.edu.ustc.appseed.clubseed.data.ViewActivityPhp;
import cn.edu.ustc.appseed.clubseed.fragment.NoticeFragment;
import cn.edu.ustc.appseed.clubseed.fragment.StarFragment;
import cn.edu.ustc.appseed.clubseed.utils.AppUtils;
public class StarContentActivity extends ActionBarActivity {
private Toolbar toolbar;
private TextView mTextView;
private ImageView mImageView;
private TextView nullTextView;
private Event mEvent;
int ID;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.<API key>);
toolbar = (Toolbar) findViewById(R.id.toolbar);
mTextView = (TextView) findViewById(R.id.<API key>);
mImageView = (ImageView) findViewById(R.id.imgContent);
if (toolbar != null) {
toolbar.setNavigationIcon(getResources().getDrawable(R.drawable.ic_arrow_back));
setSupportActionBar(toolbar);
toolbar.<API key>(new View.OnClickListener() {
@Override
public void onClick(View v) {
onBackPressed();
}
});
}
ID = getIntent().getIntExtra(StarFragment.EXTRA_ID, 0);
mEvent = AppUtils.savedEvents.get(ID);
setTitle(mEvent.getTitle());
mTextView.setText(mEvent.getContent());
mImageView.setImageBitmap(mEvent.getBitmap());
}
}
|
package com.smbc.droid;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.support.v4.view.ViewPager;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import com.android.volley.toolbox.NetworkImageView;
public class MainActivity extends FragmentActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
final ComicPagerAdapter adapter = new ComicPagerAdapter( <API key>());
final ViewPager viewPager = (ViewPager) findViewById(R.id.pager);
viewPager.setAdapter(adapter);
// findViewById(R.id.btn_next).setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View view) {
// viewPager.setCurrentItem(viewPager.getCurrentItem()+1, true);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
// getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
}
@Override
public boolean <API key>(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection <API key>
if (id == R.id.action_settings) {
return true;
}
return super.<API key>(item);
}
}
|
#pragma once
#include "Task.h"
namespace vlp {
class WaitTask : public Task {
public:
void run(Engine& engine) override;
};
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace image_viewer
{
static class Program
{
<summary>
The main entry point for the application.
</summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.<API key>(false);
Application.Run(new ImageForm());
}
}
}
|
using System;
using OKHOSTING.UI.Controls;
using OKHOSTING.UI.Controls.Layouts;
using OKHOSTING.UI.Xamarin.Mac.Controls;
using OKHOSTING.UI.Xamarin.Mac.Controls.Layout;
namespace OKHOSTING.UI.Xamarin.Mac
{
public class Platform
{
public override T Create<T>()
{
T control = null;
if (typeof(T) == typeof(IAutocomplete))
{
control = new Autocomplete() as T;
}
else if (typeof(T) == typeof(IButton))
{
control = new Button() as T;
}
else if (typeof(T) == typeof(ICalendar))
{
control = new Calendar() as T;
}
else if (typeof(T) == typeof(ICheckBox))
{
control = new CheckBox() as T;
}
else if (typeof(T) == typeof(IHyperLink))
{
control = new HyperLink() as T;
}
else if (typeof(T) == typeof(IImage))
{
control = new Image() as T;
}
else if (typeof(T) == typeof(ILabel))
{
control = new Label() as T;
}
else if (typeof(T) == typeof(ILabelButton))
{
control = new LabelButton() as T;
}
else if (typeof(T) == typeof(IListPicker))
{
control = new ListPicker() as T;
}
else if (typeof(T) == typeof(IPasswordTextBox))
{
control = new PasswordTextBox() as T;
}
else if (typeof(T) == typeof(ITextArea))
{
control = new TextArea() as T;
}
else if (typeof(T) == typeof(ITextBox))
{
control = new TextBox() as T;
}
else if (typeof(T) == typeof(IGrid))
{
control = new Grid() as T;
}
else if (typeof(T) == typeof(IStack))
{
control = new Stack() as T;
}
return control;
}
public override void Finish()
{
base.Finish();
}
//virtual
public virtual Color Parse(global::Xamarin.Mac.Color color)
{
return new Color((int) color.A, (int) color.R, (int) color.G, (int) color.B);
}
public virtual global::Xamarin.Mac.Color Parse(Color color)
{
return global::Xamarin.Mac.Color.FromRgba(color.Alpha, color.Red, color.Green, color.Blue);
}
public virtual HorizontalAlignment Parse(global::Xamarin.Mac.LayoutAlignment horizontalAlignment)
{
switch (horizontalAlignment)
{
case global::Xamarin.Mac.LayoutAlignment.Start:
return HorizontalAlignment.Left;
case global::Xamarin.Mac.LayoutAlignment.Center:
return HorizontalAlignment.Center;
case global::Xamarin.Mac.LayoutAlignment.End:
return HorizontalAlignment.Right;
case global::Xamarin.Mac.LayoutAlignment.Fill:
return HorizontalAlignment.Fill;
}
return HorizontalAlignment.Left;
}
public virtual global::Xamarin.Mac.LayoutAlignment Parse(HorizontalAlignment horizontalAlignment)
{
switch (horizontalAlignment)
{
case HorizontalAlignment.Left:
return global::Xamarin.Mac.LayoutAlignment.Start;
case HorizontalAlignment.Center:
return global::Xamarin.Mac.LayoutAlignment.Center;
case HorizontalAlignment.Right:
return global::Xamarin.Mac.LayoutAlignment.End;
case HorizontalAlignment.Fill:
return global::Xamarin.Mac.LayoutAlignment.Fill;
}
throw new <API key>("horizontalAlignment");
}
public virtual VerticalAlignment <API key>(global::Xamarin.Mac.LayoutAlignment verticalAlignment)
{
switch (verticalAlignment)
{
case global::Xamarin.Mac.LayoutAlignment.Start:
return VerticalAlignment.Top;
case global::Xamarin.Mac.LayoutAlignment.Center:
return VerticalAlignment.Center;
case global::Xamarin.Mac.LayoutAlignment.End:
return VerticalAlignment.Bottom;
case global::Xamarin.Mac.LayoutAlignment.Fill:
return VerticalAlignment.Fill;
}
return VerticalAlignment.Top;
}
public virtual global::Xamarin.Mac.LayoutAlignment Parse(VerticalAlignment verticalAlignment)
{
switch (verticalAlignment)
{
case VerticalAlignment.Top:
return global::Xamarin.Mac.LayoutAlignment.Start;
case VerticalAlignment.Center:
return global::Xamarin.Mac.LayoutAlignment.Center;
case VerticalAlignment.Bottom:
return global::Xamarin.Mac.LayoutAlignment.End;
case VerticalAlignment.Fill:
return global::Xamarin.Mac.LayoutAlignment.Fill;
}
return global::Xamarin.Mac.LayoutAlignment.Start;
}
public HorizontalAlignment Parse(global::Xamarin.Mac.TextAlignment textAlignment)
{
switch (textAlignment)
{
case global::Xamarin.Mac.TextAlignment.Start:
return HorizontalAlignment.Left;
case global::Xamarin.Mac.TextAlignment.Center:
return HorizontalAlignment.Center;
case global::Xamarin.Mac.TextAlignment.End:
return HorizontalAlignment.Right;
}
return HorizontalAlignment.Left;
}
public global::Xamarin.Mac.TextAlignment ParseTextAlignment(HorizontalAlignment alignment)
{
switch (alignment)
{
case HorizontalAlignment.Left:
return global::Xamarin.Mac.TextAlignment.Start;
case HorizontalAlignment.Center:
return global::Xamarin.Mac.TextAlignment.Center;
case HorizontalAlignment.Right:
return global::Xamarin.Mac.TextAlignment.End;
case HorizontalAlignment.Fill:
return global::Xamarin.Mac.TextAlignment.Start;
}
return global::Xamarin.Mac.TextAlignment.Start;
}
//static
public static new Platform Current
{
get
{
var platform = (Platform)UI.Platform.Current;
if (platform == null)
{
platform = new Platform();
UI.Platform.Current = platform;
}
return platform;
}
}
}
}
|
<!DOCTYPE html><html><head><meta charset="utf-8" />
<meta http-equiv="refresh" content="0;url=/place/togo/health/" />
</head></html>
|
MIT License
Copyright (c) 2016 Dan Guevarra
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.
|
module.export = {
};
|
(function (ns) {
// dependencies
var assert = require('assert');
var esgraph = require('esgraph');
var worklist = require('analyses');
var common = require("../../base/common.js");
var Context = require("../../base/context.js");
var Base = require("../../base/index.js");
var codegen = require('escodegen');
var annotateRight = require("./infer_expression.js");
var InferenceScope = require("./registry/").InferenceScope;
var System = require("./registry/system.js");
var Annotations = require("./../../type-system/annotation.js");
var walk = require('estraverse');
var Tools = require("../settools.js");
var Shade = require("../../interfaces.js");
var walkes = require('walkes');
var validator = require('../validator');
var TypeInfo = require("../../type-system/typeinfo.js").TypeInfo;
// shortcuts
var Syntax = common.Syntax;
var Set = worklist.Set;
var FunctionAnnotation = Annotations.FunctionAnnotation;
var ANNO = Annotations.ANNO;
function findConstantsFor(ast, names, constantVariables) {
var result = new Set(), annotation, name, formerValue;
constantVariables = constantVariables ? constantVariables.values() : [];
walkes(ast, {
<API key>: function(recurse) {
if (this.left.type != Syntax.Identifier) {
Shade.throwError(ast, "Can't find constant for computed left expression");
}
name = this.left.name;
if(names.has(name)) {
annotation = ANNO(this.right);
if(annotation.hasConstantValue()) {
switch(this.operator) {
case "=":
result.add({ name: name, constant: TypeInfo.copyStaticValue(annotation)});
break;
case "-=":
case "+=":
case "*=":
case "/=":
formerValue = constantVariables.filter(function(v){ return v.name == name; });
if(formerValue.length) {
var c = formerValue[0].constant, v;
switch(this.operator) {
case "+=":
v = c + TypeInfo.copyStaticValue(annotation);
break;
case "-=":
v = c - TypeInfo.copyStaticValue(annotation);
break;
case "*=":
v = c * TypeInfo.copyStaticValue(annotation);
break;
case "/=":
v = c / TypeInfo.copyStaticValue(annotation);
break;
}
result.add({ name: name, constant: v});
}
break;
default:
assert(!this.operator);
}
}
}
recurse(this.right);
},
VariableDeclarator: function(recurse) {
name = this.id.name;
if (this.init && names.has(name)) {
annotation = ANNO(this.init);
if(annotation.hasConstantValue()) {
result.add({ name: name, constant: TypeInfo.copyStaticValue(annotation)});
}
}
recurse(this.init);
},
UpdateExpression: function(recurse) {
if(this.argument.type == Syntax.Identifier) {
name = this.argument.name;
annotation = ANNO(this);
if(annotation.hasConstantValue()) {
var value = TypeInfo.copyStaticValue(annotation);
if (!this.prefix) {
value = this.operator == "--" ? --value : ++value;
}
result.add({ name: name, constant: value});
}
}
}
});
return result;
}
/**
*
* @param ast
* @param {AnalysisContext} context
* @param {*} opt
* @constructor
*/
var TypeInference = function (ast, context, opt) {
opt = opt || {};
this.context = context;
this.propagateConstants = opt.propagateConstants || false;
};
Base.extend(TypeInference.prototype, {
/**
* @param {*} ast
* @param {*} opt
* @returns {*}
*/
inferBody: function (ast, opt) {
var cfg = esgraph(ast, { omitExceptions: true }),
context = this.context,
propagateConstants = this.propagateConstants;
//console.log("infer body", cfg)
var result = worklist(cfg,
/**
* @param {Set} input
* @this {FlowNode}
* @returns {*}
*/
function (input) {
if (!this.astNode || this.type) // Start and end node do not influence the result
return input;
//console.log("Analyze", codegen.generate(this.astNode), this.astNode.type);
// Local
if(propagateConstants) {
this.kill = this.kill || Tools.<API key>(this.astNode, true);
}
annotateRight(context, this.astNode, propagateConstants ? input : null );
this.decl = this.decl || context.declare(this.astNode);
//context.computeConstants(this.astNode, input);
if(!propagateConstants) {
return input;
}
var filteredInput = null, generate = null;
if (this.kill.size) {
// Only if there's an assignment, we need to generate
generate = findConstantsFor(this.astNode, this.kill, propagateConstants ? input : null);
var that = this;
filteredInput = new Set(input.filter(function (elem) {
return !that.kill.some(function(tokill) { return elem.name == tokill });
}));
}
var result = Set.union(filteredInput || input, generate);
// console.log("input:", input);
// console.log("kill:", this.kill);
// console.log("generate:", generate);
// console.log("filteredInput:", filteredInput);
// console.log("result:", result);
return result;
}
, {
direction: 'forward',
merge: worklist.merge(function(a,b) {
if (!a && !b)
return null;
//console.log("Merge", a && a.values(), b && b.values())
var result = Set.intersect(a, b);
//console.log("Result", result && result.values())
return result;
})
});
//Tools.printMap(result, cfg);
return ast;
}
});
/**
*
* @param ast
* @param {AnalysisContext} context
* @param opt
* @returns {*}
*/
var inferProgram = function (ast, context, opt) {
opt = opt || {};
//var globalScope = createGlobalScope(ast);
//<API key>(globalScope, opt);
var typeInference = new TypeInference(ast, context, opt);
var result = typeInference.inferBody(ast, opt);
return result;
};
ns.infer = inferProgram;
}(exports));
|
<!DOCTYPE html PUBLIC "-
<html xmlns="http:
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>plugin_mmasgis: Class Members - Variables</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.3 -->
<script type="text/javascript"><!
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">plugin_mmasgis</div>
</td>
</tr>
</tbody>
</table>
</div>
<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 id="searchli">
<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="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li class="current"><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
<div id="navrow3" class="tabs2">
<ul class="tablist">
<li><a href="functions.html"><span>All</span></a></li>
<li><a href="functions_func.html"><span>Functions</span></a></li>
<li class="current"><a href="functions_vars.html"><span>Variables</span></a></li>
</ul>
</div>
<div id="navrow4" class="tabs3">
<ul class="tablist">
<li><a href="functions_vars.html#index__"><span>_</span></a></li>
<li><a href="functions_vars_0x61.html#index_a"><span>a</span></a></li>
<li><a href="functions_vars_0x62.html#index_b"><span>b</span></a></li>
<li><a href="functions_vars_0x63.html#index_c"><span>c</span></a></li>
<li><a href="functions_vars_0x64.html#index_d"><span>d</span></a></li>
<li><a href="functions_vars_0x65.html#index_e"><span>e</span></a></li>
<li><a href="functions_vars_0x66.html#index_f"><span>f</span></a></li>
<li><a href="functions_vars_0x67.html#index_g"><span>g</span></a></li>
<li><a href="functions_vars_0x68.html#index_h"><span>h</span></a></li>
<li><a href="functions_vars_0x69.html#index_i"><span>i</span></a></li>
<li><a href="functions_vars_0x6c.html#index_l"><span>l</span></a></li>
<li><a href="functions_vars_0x6d.html#index_m"><span>m</span></a></li>
<li><a href="functions_vars_0x6e.html#index_n"><span>n</span></a></li>
<li><a href="functions_vars_0x6f.html#index_o"><span>o</span></a></li>
<li><a href="functions_vars_0x70.html#index_p"><span>p</span></a></li>
<li><a href="functions_vars_0x71.html#index_q"><span>q</span></a></li>
<li><a href="functions_vars_0x72.html#index_r"><span>r</span></a></li>
<li><a href="functions_vars_0x73.html#index_s"><span>s</span></a></li>
<li><a href="functions_vars_0x74.html#index_t"><span>t</span></a></li>
<li><a href="functions_vars_0x75.html#index_u"><span>u</span></a></li>
<li><a href="functions_vars_0x76.html#index_v"><span>v</span></a></li>
<li class="current"><a href="functions_vars_0x77.html#index_w"><span>w</span></a></li>
</ul>
</div>
</div>
<div class="contents">
 
<h3><a class="anchor" id="index_w"></a>- w -</h3><ul>
<li>w
: <a class="el" href="<API key>.html#<API key>">mmasgis::albero::MainWindowAlbero</a>
, <a class="el" href="<API key>.html#<API key>">mmasgis::anagrafica::<API key></a>
, <a class="el" href="<API key>.html#<API key>">mmasgis::esportazione::<API key></a>
, <a class="el" href="<API key>.html#<API key>">mmasgis::interrogazioni::MainWindowQuery</a>
, <a class="el" href="<API key>.html#<API key>">mmasgis::separatore::<API key></a>
, <a class="el" href="<API key>.html#<API key>">mmasgis::risultati::testDialog</a>
, <a class="el" href="<API key>.html#<API key>">mmasgis::configurazione::<API key></a>
</li>
<li>wordButton
: <a class="el" href="<API key>.html#<API key>">mmasgis::Ui_anagrafica::<API key></a>
, <a class="el" href="<API key>.html#<API key>">mmasgis::Ui_risultati::<API key></a>
</li>
<li>Wsq
: <a class="el" href="<API key>.html#<API key>">mmasgis::interrogazioni::MainWindowQuery</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)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="<API key>">
<iframe src="" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Tue Apr 17 2012 16:46:02 for plugin_mmasgis by 
<a href="http:
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>
|
# <API key>
A light and easy to use notifications library for Angular 2 & 4. It features both regular page notifications (toasts) and push notifications.
Forked From [<API key>](http://flauc.github.io/<API key>)
Updates: Compatible with Angular 2 & Angular 4. Removed animations module.
## Example
Take a look at the live demo here: [Live Demo](http://flauc.github.io/<API key>)
## Setup
Download the library with npm
npm install --save <API key>
## Documentation
import { <API key> } from '<API key>';
|
package lab;
public class IntArrayWorker
{
/** two dimensional matrix */
private int[][] matrix = null;
/** set the matrix to the passed one
* @param theMatrix the one to use
*/
public void setMatrix(int[][] theMatrix)
{
matrix = theMatrix;
}
/**
* Method to return the total
* @return the total of the values in the array
*/
public int getTotal()
{
int total = 0;
for (int row = 0; row < matrix.length; row++)
{
for (int col = 0; col < matrix[0].length; col++)
{
total = total + matrix[row][col];
}
}
return total;
}
/**
* Method to return the total using a nested for-each loop
* @return the total of the values in the array
*/
public int getTotalNested()
{
int total = 0;
for (int[] rowArray : matrix)
{
for (int item : rowArray)
{
total = total + item;
}
}
return total;
}
/**
* Method to fill with an increasing count
*/
public void fillCount()
{
int numCols = matrix[0].length;
int count = 1;
for (int row = 0; row < matrix.length; row++)
{
for (int col = 0; col < numCols; col++)
{
matrix[row][col] = count;
count++;
}
}
}
/**
* print the values in the array in rows and columns
*/
public void print()
{
for (int row = 0; row < matrix.length; row++)
{
for (int col = 0; col < matrix[0].length; col++)
{
System.out.print( matrix[row][col] + " " );
}
System.out.println();
}
System.out.println();
}
public int getCount(int num){
int count = 0;
for(int row = 0; row < matrix.length; row++)
for(int col = 0; col < matrix[0].length; col++)
if(matrix[row][col] == num)
count++;
return count;
}
public int getColTotal(int col){
int total = 0;
for(int row = 0; row < matrix.length; row++)
total += matrix[row][col];
return total;
}
public int getLargest(){
int largest = matrix[0][0];
for(int row = 0; row < matrix.length; row++)
for(int col = 0; col < matrix[0].length; col++)
if(matrix[row][col] > largest)
largest = matrix[row][col];
return largest;
}
/**
* fill the array with a pattern
*/
public void fillPattern1()
{
for (int row = 0; row < matrix.length; row++)
{
for (int col = 0; col < matrix[0].length;
col++)
{
if (row < col)
matrix[row][col] = 1;
else if (row == col)
matrix[row][col] = 2;
else
matrix[row][col] = 3;
}
}
}
}
|
# Contributing
**Mule** is open source software; contributions from the community are encouraged. Please take a moment to read these guidelines before submitting changes.
Code style
All PHP code must adhere to the [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/<API key>.md) standard.
Branching and pull requests
As a guideline, please follow this process:
1. [Fork the repository](https://help.github.com/articles/fork-a-repo).
2. Create a topic branch for the change:
* New features should branch from **develop**.
* Bug fixes to existing versions should branch from **master**.
* Please ensure the branch is clearly labelled as a feature or fix.
3. Make the relevant changes.
4. [Squash](http://git-scm.com/book/en/<API key>#<API key>) commits if necessary.
4. Submit a pull request to the **develop** branch.
Please note this is a general guideline only.
For more information on the branching structure please see the [git-flow cheatsheet](http://danielkummer.github.com/git-flow-cheatsheet/).
|
<meta charset="utf-8">
<title>{% if page.title %}{{ page.title }} – {% endif %}{{ site.title }}</title>
<meta name="description" content="{{ page.description }}">
<meta name="keywords" content="{{ page.tags | join: ', ' }}">
<meta property="og:locale" content="en_US">
<meta property="og:title" content="{% if page.title %}{{ page.title }} – {% endif %}{{ site.title }}">
<meta property="og:description" content="{% if page.description %}{{ page.description | strip_html | strip_newlines | truncate: 120 }}{% else %}{{ page.content | strip_html | strip_newlines | truncate: 120 }}{% endif %}">
<meta property="og:url" content="{{ site.url }}{{ page.url }}">
<meta property="og:site_name" content="{{ site.title }}">
<link href="{{ site.url }}/feed.xml" type="application/atom+xml" rel="alternate" title="{{ site.title }} Feed">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Type -->
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Crimson+Text:400,400italic,700,700italic" rel='stylesheet' type='text/css' />
<link href="//fonts.googleapis.com/css?family=Source+Sans+Pro:400,700" rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="{{ site.url }}/assets/css/entypo.css" media="all">
<!-- In order to use Calendas Plus, you must first purchase it. Then, create a font-face package using FontSquirrel.
<link rel='stylesheet' href='{{ site.url }}/assets/cal.css' media='all' />
<!-- For all browsers -->
<link rel="stylesheet" href="{{ site.url }}/assets/css/i.css">
<!-- Fresh Squeezed jQuery -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<meta http-equiv="cleartype" content="on">
<!-- Load Modernizr -->
<script src="{{ site.url }}/assets/js/vendor/modernizr-2.6.2.custom.min.js"></script>
<!-- Icons -->
<!-- 16x16 -->
<link rel="shortcut icon" href="{{ site.url }}/favicon.ico">
<div id="bump">
<body class="">
<header class="site-header darken">
<div class="wrap">
<hgroup>
<h1><a href="/">{{ site.title }}</a></h1>
</hgroup>
<a href="#nav" class="menu"><span class='icons'></span></a>
<nav role="navigation">
<ul>
<li class="timer">
<span>30</span>
<i>:</i>
<span>00</span>
<svg version="1.1" id="timer" xmlns="http:
<polygon id="timerBackground" style="fill:#292929;" points="221.564,505.721 5.054,380.78 5,130.808 221.457,5.773 437.967,130.714 438.021,380.687 "/>
<path id="timerBorder" style="fill:#3B3B3B;" d="M221.565,511.494L0.055,383.668L0,127.922L221.456,0l221.51,127.826l0.057,255.746L221.565,511.494z M10.054,377.893l211.509,122.055l211.458-122.146l-0.053-244.199L221.458,11.547L10.001,133.693L10.054,377.893z"/>
<g id="timerPause" style="display:none;">
<rect x="131.477" y="159.077" style="display:inline;fill:#F7DD46;" width="61" height="196"/>
<rect x="251.477" y="159.077" style="display:inline;fill:#F7DD46;" width="61" height="196"/>
</g>
<polygon id="timerPlay" style="fill:#F7DD46;" points="151.477,151.574 333.284,256.542 151.477,361.508 "/>
<!-- <polygon id="timerPosition" style="fill:#F7DD46;" points="433.003,133.65 433.056,377.849 433.038,377.859 443.005,383.651 443.058,383.62 443.001,127.875 442.946,127.843 432.985,133.64 "/> -->
</svg>
</li>
<li>
<a href="/" title="{{ site.title }}">Home</a>
</li>
{% for link in site.links %}
<li><a href="{% if link.external %}{{ link.url }}{% else %}{{ site.url }}{{ link.url }}{% endif %}" {% if link.external %}target="_blank"{% endif %}>{{ link.title }}</a></li>
{% endfor %}
</ul>
</nav>
</div>
</header>
|
#include <bits/stdc++.h>
using namespace std;
vector<int> adj[143];
int n; bool seen[143];
int dfs(int u) {
seen[u] = true;
int result = 0;
for (int v: adj[u])
if (!seen[v])
result += dfs(v) + 1;
return result;
}
int main() {
ios_base::sync_with_stdio(0);cin.tie(0);
while (cin >> n && n) {
for (int i=0, sz; i<n; ++i) {
cin >> sz;
adj[i].resize(sz);
for (int j=0; j<sz; ++j) {
cin >> adj[i][j];
--adj[i][j];
}
}
int mx=-1, mxi;
for (int i=0; i<n; ++i) {
memset(seen, 0, n);
int c = dfs(i);
if (mx < c) {
mx = c;
mxi = i;
}
}
cout << mxi+1 << "\n";
}
}
|
<?php
namespace SergeiK\izVladimiraBundle\Admin;
use Sonata\AdminBundle\Admin\Admin;
use Sonata\AdminBundle\Datagrid\DatagridMapper;
use Sonata\AdminBundle\Datagrid\ListMapper;
use Sonata\AdminBundle\Form\FormMapper;
use Sonata\AdminBundle\Show\ShowMapper;
class CarAdmin extends Admin
{
/**
* @param DatagridMapper $datagridMapper
*/
protected function <API key>(DatagridMapper $datagridMapper)
{
$datagridMapper
->add('title', null, array(
'label' => 'Название'
))
->add('publish', null, array(
'label' => 'Опубликованно'
))
->add('seats', null, array(
'label' => 'Колличество посадочных мест'
))
;
}
/**
* @param ListMapper $listMapper
*/
protected function configureListFields(ListMapper $listMapper)
{
$listMapper
->add('id')
->add('title', null, array(
'label' => 'Название'
))
->add('seats', null, array(
'label' => 'Колличество посадочных мест'
))
->add('publish', null, array(
'label' => 'Опубликованно'
))
->add('_action', 'actions', array(
'actions' => array(
'edit' => array(),
'delete' => array(),
)
))
;
}
/**
* @param FormMapper $formMapper
*/
protected function configureFormFields(FormMapper $formMapper)
{
$formMapper
->add('title', null, array(
'label' => 'Название'
))
->add('seats', null, array(
'label' => 'Колличество посадочных мест'
))
->add('adds', 'textarea', array(
'label' => 'Дополнительная информация',
'attr' => array(
'class' => 'ckeditor'
)
))
->add('images', '<API key>', array(
'required' => false,
'by_reference' => false,
'label' => 'Фото'
), array(
'edit' => 'inline',
'inline' => 'table',
'sortable' => 'position'
)
)
->add('publish', null, array(
'label' => 'Опубликовать'
))
;
}
/**
* @param ShowMapper $showMapper
*/
protected function configureShowFields(ShowMapper $showMapper)
{
$showMapper
->add('id')
->add('title', null, array(
'label' => 'Название'
))
->add('seats', null, array(
'label' => 'Колличество посадочных мест'
))
->add('adds', null, array(
'label' => 'Дополнительная информация'
))
;
}
public function prePersist($car){
foreach($car->getImages() as $image){
$image->setCar($car);
}
}
public function preUpdate($car){
foreach($car->getImages() as $image){
$image->setCar($car);
}
}
}
|
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Text;
namespace NAudio.Lame
{
<summary>
Decoder for ID3v2 tags
</summary>
public static class ID3Decoder
{
<summary>
Read an ID3v2 Tag from the current position in a stream.
</summary>
<param name="stream"><see cref="Stream"/> positioned at start of ID3v2 Tag.</param>
<returns><see cref="ID3TagData"/> with tag content.</returns>
public static ID3TagData Decode(Stream stream)
{
byte[] header = new byte[10];
int rc = stream.Read(header, 0, 10);
if (rc != 10 || !ValidateTagHeader(header))
throw new <API key>("Bad ID3 Tag Header");
// decode size field and confirm range
int size = DecodeHeaderSize(header, 6);
if (size < 10 || size >= (1 << 28))
throw new <API key>($"ID3 header size '{size:#,0}' out of range.");
// Load entire tag into buffer and parse
var buffer = new byte[10 + size];
#pragma warning disable IDE0059 // Unnecessary assignment of a value
rc = stream.Read(buffer, 0, buffer.Length);
#pragma warning restore IDE0059 // Unnecessary assignment of a value
return InternalDecode(buffer, 0, size, header[5]);
}
<summary>
Read an ID3v2 Tag from the supplied array.
</summary>
<param name="buffer">Array containing complete ID3v2 Tag.</param>
<returns><see cref="ID3TagData"/> with tag content.</returns>
public static ID3TagData Decode(byte[] buffer)
{
// Check header
if (!ValidateTagHeader(buffer))
throw new <API key>("Bad ID3 Tag Header");
// decode size field and confirm range
int size = DecodeHeaderSize(buffer, 6);
if (size < 10 || size > (buffer.Length - 10))
throw new <API key>($"ID3 header size '{size:#,0}' out of range.");
// Decode tag content
return InternalDecode(buffer, 10, size, buffer[5]);
}
<summary>
Decode frames from ID3 tag
</summary>
<param name="buffer"></param>
<param name="offset"></param>
<param name="size"></param>
<param name="flags"></param>
<returns></returns>
private static ID3TagData InternalDecode(byte[] buffer, int offset, int size, byte flags)
{
// copy tag body data into array and remove unsynchronization padding if present
byte[] bytes = new byte[size];
Array.Copy(buffer, offset, bytes, 0, size);
if ((flags & 0x80) != 0)
bytes = UnsyncBytes(bytes);
var res = new ID3TagData();
int pos = 0;
// skip extended header if present
if ((flags & 0x40) != 0)
{
var ehSize = DecodeBEInt32(bytes, pos);
pos += ehSize + 4;
}
// load all frames from the tag buffer
for (var frame = ID3FrameData.ReadFrame(bytes, pos, out int frameSize); frameSize > 0 && frame != null; frame = ID3FrameData.ReadFrame(bytes, pos, out frameSize))
{
switch (frame.FrameID)
{
case "TIT2":
res.Title = frame.ParseString();
break;
case "TPE1":
res.Artist = frame.ParseString();
break;
case "TALB":
res.Album = frame.ParseString();
break;
case "TYER":
res.Year = frame.ParseString();
break;
case "COMM":
res.Comment = frame.ParseCommentText();
break;
case "TCON":
res.Genre = frame.ParseString();
break;
case "TRCK":
res.Track = frame.ParseString();
break;
case "TIT3":
res.Subtitle = frame.ParseString();
break;
case "TPE2":
res.AlbumArtist = frame.ParseString();
break;
case "TXXX":
{
var udt = frame.<API key>();
res.UserDefinedText[udt.Key] = udt.Value;
break;
}
case "APIC":
{
var pic = frame.ParseAPIC();
res.AlbumArt = pic?.ImageBytes;
break;
}
default:
break;
}
pos += frameSize;
}
return res;
}
<summary>
Check ID3v2 tag header is correctly formed
</summary>
<param name="buffer">Array containing ID3v2 header</param>
<returns>True if checks pass, else false</returns>
private static bool ValidateTagHeader(byte[] buffer)
=> buffer?.Length >= 4 && buffer[0] == 'I' && buffer[1] == 'D' && buffer[2] == '3' && buffer[3] == 3 && buffer[4] == 0;
<summary>
Decode a 28-bit integer stored in the low 7 bits of 4 bytes at the offset, most-significant bits first (big-endian).
</summary>
<param name="buffer">Array containing value to decode.</param>
<param name="offset">Offset in array of the 4 bytes containing the value.</param>
<returns>Decoded value.</returns>
private static int DecodeHeaderSize(byte[] buffer, int offset)
=> (int)(
((uint)buffer[offset] << 21) |
((uint)buffer[offset + 1] << 14) |
((uint)buffer[offset + 2] << 7) |
buffer[offset + 3]
);
<summary>
Read 16-bit integer from <paramref name="buffer"/> as 2 big-endian bytes at <paramref name="offset"/>.
</summary>
<param name="buffer">Byte array containing value.</param>
<param name="offset">Offset in byte array to start of value.</param>
<returns>16-bit integer value.</returns>
private static short DecodeBEInt16(byte[] buffer, int offset)
=> (short)((buffer[offset] << 8) | buffer[offset + 1]);
<summary>
Read 32-bit integer from <paramref name="buffer"/> as 4 big-endian bytes at <paramref name="offset"/>.
</summary>
<param name="buffer">Byte array containing value.</param>
<param name="offset">Offset in byte array to start of value.</param>
<returns>32-bit integer value.</returns>
private static int DecodeBEInt32(byte[] buffer, int offset)
=> ((buffer[offset] << 24) | (buffer[offset + 1] << 16) | (buffer[offset + 2] << 8) | (buffer[offset + 3]));
<summary>
Remove NUL bytes inserted by 'unsynchronisation' of data buffer.
</summary>
<param name="buffer">Buffer with 'unsynchronized' data.</param>
<returns>New array with insertions removed.</returns>
private static byte[] UnsyncBytes(IEnumerable<byte> buffer)
{
IEnumerable<byte> ProcessBuffer()
{
byte prev = 0;
foreach (var b in buffer)
{
if (b != 0 || prev != 0xFF)
yield return b;
prev = b;
}
}
return ProcessBuffer().ToArray();
}
<summary>
Represents an ID3 frame read from the tag.
</summary>
private class ID3FrameData
{
<summary>
Four-character Frame ID.
</summary>
public readonly string FrameID;
<summary>
Size of the frame in bytes, not including the header. Should equal the size of the Data buffer.
</summary>
public readonly int Size;
<summary>
Frame header flags.
</summary>
public readonly short Flags;
<summary>
Frame content as bytes.
</summary>
public readonly byte[] Data;
// private constructor
private ID3FrameData(string frameID, int size, short flags, byte[] data)
{
FrameID = frameID;
Size = size;
Flags = flags;
Data = data;
}
<summary>
Read an ID3v2 content frame from the supplied buffer.
</summary>
<param name="buffer">Array containing content frame data.</param>
<param name="offset">Offset of start of content frame data.</param>
<param name="size">Output: total bytes consumed by frame, including header, or -1 if no frame available.</param>
<returns><see cref="ID3FrameData"/> with frame, or null if no frame available.</returns>
public static ID3FrameData ReadFrame(byte[] buffer, int offset, out int size)
{
size = -1;
if ((buffer.Length - offset) <= 10)
return null;
// Extract header data
string frameID = Encoding.ASCII.GetString(buffer, offset, 4);
int frameLength = DecodeBEInt32(buffer, offset + 4);
short frameFlags = DecodeBEInt16(buffer, offset + 8);
// copy frame content to byte array
byte[] content = new byte[frameLength];
Array.Copy(buffer, offset + 10, content, 0, frameLength);
// Decompress if necessary
if ((frameFlags & 0x80) != 0)
{
using (var ms = new MemoryStream())
using (var dec = new DeflateStream(new MemoryStream(content), CompressionMode.Decompress))
{
dec.CopyTo(ms);
content = ms.ToArray();
}
}
// return frame
size = 10 + frameLength;
return new ID3FrameData(frameID, frameLength, frameFlags, content);
}
<summary>
Read an ASCII string from an array, NUL-terminated or optionally end of buffer.
</summary>
<param name="buffer">Array containing ASCII string.</param>
<param name="offset">Start of string in array.</param>
<param name="requireTerminator">If true then fail if no terminator found.</param>
<returns>String from buffer, string.Empty if 0-length, null on failure.</returns>
private static string GetASCIIString(byte[] buffer, ref int offset, bool requireTerminator)
{
int start = offset;
int position = offset;
for (; position < buffer.Length && buffer[position] != 0; position++) ;
if (requireTerminator && position >= buffer.Length)
return null;
int length = position - start;
offset = position + 1;
return length < 1 ? string.Empty : Encoding.ASCII.GetString(buffer, start, length);
}
<summary>
Read a Unicode string from an array, NUL-terminated or optionally end of buffer.
</summary>
<param name="buffer">Array containing ASCII string.</param>
<param name="offset">Start of string in array.</param>
<param name="requireTerminator">If true then fail if no terminator found.</param>
<returns>String from buffer, string.Empty if 0-length, null on failure.</returns>
private static string GetUnicodeString(byte[] buffer, ref int offset, bool requireTerminator = true)
{
int start = offset;
int position = offset;
for (; position < buffer.Length - 1 && (buffer[position] != 0 || buffer[position + 1] != 0); position += 2) ;
if (requireTerminator && position >= buffer.Length)
return null;
int length = position - start;
offset = position + 2;
string res = LameDLLWrap.UCS2.GetString(buffer, start, length);
return res;
}
delegate string delGetString(byte[] buffer, ref int offset, bool requireTeminator);
private delGetString GetGetString()
{
byte encoding = Data[0];
if (encoding == 0)
return GetASCIIString;
if (encoding == 1)
return GetUnicodeString;
throw new <API key>($"Invalid string encoding: {encoding}");
}
<summary>
Parse the frame content as a string.
</summary>
<returns>String content, string.Empty if 0-length.</returns>
<exception cref="<API key>">Invalid string encoding.</exception>
public string ParseString()
{
int position = 1;
return GetGetString()(Data, ref position, false);
}
<summary>
Parse the frame content as a Comment (COMM) frame, return comment text only.
</summary>
<returns>Comment text only. Language and short description omitted.</returns>
public string ParseCommentText()
{
var getstr = GetGetString();
int position = 1;
string language = Encoding.ASCII.GetString(Data, position, 3);
position += 3;
string shortdesc = getstr(Data, ref position, true);
string comment = getstr(Data, ref position, false);
return comment;
}
<summary>
Parse the frame content as a User-Defined Text Information (TXXX) frame.
</summary>
<returns><see cref="KeyValuePair{TKey, TValue}"/> with content, or exception on error.</returns>
public KeyValuePair<string, string> <API key>()
{
byte encoding = Data[0];
delGetString getstring;
if (encoding == 0)
getstring = GetASCIIString;
else if (encoding == 1)
getstring = GetUnicodeString;
else
throw new <API key>($"Unknown string encoding: {encoding}");
int position = 1;
string description = getstring(Data, ref position, true);
string value = getstring(Data, ref position, false);
return new KeyValuePair<string, string>(description, value);
}
<summary>
Parse the frame content as an attached picture (APIC) frame.
</summary>
<returns><see cref="APICData"/> object </returns>
public APICData ParseAPIC()
{
if (FrameID != "APIC")
return null;
var getstr = GetGetString();
// get attributes
int position = 1;
string mime = getstr(Data, ref position, true);
byte type = Data[position++];
string description = getstr(Data, ref position, true);
// get image content
int datalength = Data.Length - position;
byte[] imgdata = new byte[datalength];
Array.Copy(Data, position, imgdata, 0, datalength);
return new APICData
{
MIMEType = mime,
ImageType = type,
Description = description,
ImageBytes = imgdata,
};
}
<summary>
Data for an Attached Picture (APIC) frame.
</summary>
public class APICData
{
<summary>
MIME type of contained image
</summary>
public string MIMEType;
<summary>
Type of image. Refer to http://id3.org/id3v2.3.0#Attached_picture for list of values.
</summary>
public byte ImageType;
<summary>
Picture description.
</summary>
public string Description;
<summary>
Picture file content.
</summary>
public byte[] ImageBytes;
}
}
}
}
|
// <API key>.h
// CORKit
#import <UIKit/UIKit.h>
typedef void (^<API key>)();
@interface <API key> : UIViewController
- (void)<API key>:(UIViewController *)viewController animated:(BOOL)animated completion:(<API key>)completion;
- (void)<API key>:(BOOL)animated completion:(<API key>)completion;
@end
|
import {ListRange} from '@angular/cdk/collections';
import {
<API key>,
ChangeDetectorRef,
Component,
ElementRef,
Inject,
Input,
NgZone,
OnDestroy,
OnInit,
ViewChild,
ViewEncapsulation,
} from '@angular/core';
import {DomSanitizer, SafeStyle} from '@angular/platform-browser';
import {<API key>, fromEvent, Observable, Subject} from 'rxjs';
import {sampleTime, take, takeUntil} from 'rxjs/operators';
import {CdkVirtualForOf} from './virtual-for-of';
import {<API key>, <API key>} from './<API key>';
/** Checks if the given ranges are equal. */
function rangesEqual(r1: ListRange, r2: ListRange): boolean {
return r1.start == r2.start && r1.end == r2.end;
}
/** A viewport that virtualizes it's scrolling with the help of `CdkVirtualForOf`. */
@Component({
moduleId: module.id,
selector: '<API key>',
templateUrl: '<API key>.html',
styleUrls: ['<API key>.css'],
host: {
'class': '<API key>',
'[class.<API key>]': 'orientation === "horizontal"',
'[class.<API key>]': 'orientation === "vertical"',
},
encapsulation: ViewEncapsulation.None,
changeDetection: <API key>.OnPush,
})
export class <API key> implements OnInit, OnDestroy {
/** Emits when the viewport is detached from a CdkVirtualForOf. */
private _detachedSubject = new Subject<void>();
/** Emits when the rendered range changes. */
private <API key> = new Subject<ListRange>();
/** The direction the viewport scrolls. */
@Input() orientation: 'horizontal' | 'vertical' = 'vertical';
/** The element that wraps the rendered content. */
@ViewChild('contentWrapper') _contentWrapper: ElementRef;
/** A stream that emits whenever the rendered range changes. */
renderedRangeStream: Observable<ListRange> = this.<API key>.asObservable();
/**
* The total size of all content (in pixels), including content that is not currently rendered.
*/
_totalContentSize = 0;
/** The transform used to offset the rendered content wrapper element. */
<API key>: SafeStyle;
/** The raw string version of the rendered content transform. */
private <API key>: string;
/** The currently rendered range of indices. */
private _renderedRange: ListRange = {start: 0, end: 0};
/** The length of the data bound to this viewport (in number of items). */
private _dataLength = 0;
/** The size of the viewport (in pixels). */
private _viewportSize = 0;
/** The pending scroll offset to be applied during the next change detection cycle. */
private <API key>: number | null;
/** the currently attached CdkVirtualForOf. */
private _forOf: CdkVirtualForOf<any> | null;
/** The last rendered content offset that was set. */
private <API key> = 0;
/**
* Whether the last rendered content offset was to the end of the content (and therefore needs to
* be rewritten as an offset to the start of the content).
*/
private <API key> = false;
/** Observable that emits when the viewport is destroyed. */
private _destroyed = new Subject<void>();
/** Whether there is a pending change detection cycle. */
private <API key> = false;
/** A list of functions to run after the next change detection cycle. */
private <API key>: Function[] = [];
constructor(public elementRef: ElementRef, private _changeDetectorRef: ChangeDetectorRef,
private _ngZone: NgZone, private _sanitizer: DomSanitizer,
@Inject(<API key>) private _scrollStrategy: <API key>) {}
ngOnInit() {
// It's still too early to measure the viewport at this point. Deferring with a promise allows
// the Viewport to be rendered with the correct size before we measure. We run this outside the
// zone to avoid causing more change detection cycles. We handle the change detection loop
// ourselves instead.
this._ngZone.runOutsideAngular(() => Promise.resolve().then(() => {
this.<API key>();
this._scrollStrategy.attach(this);
fromEvent(this.elementRef.nativeElement, 'scroll')
// Sample the scroll stream at every animation frame. This way if there are multiple
// scroll events in the same frame we only need to recheck our layout once.
.pipe(sampleTime(0, <API key>), takeUntil(this._destroyed))
.subscribe(() => this._scrollStrategy.onContentScrolled());
this.<API key>();
}));
}
ngOnDestroy() {
this.detach();
this._scrollStrategy.detach();
this._destroyed.next();
// Complete all subjects
this.<API key>.complete();
this._detachedSubject.complete();
this._destroyed.complete();
}
/** Attaches a `CdkVirtualForOf` to this viewport. */
attach(forOf: CdkVirtualForOf<any>) {
if (this._forOf) {
throw Error('<API key> is already attached.');
}
// Subscribe to the data stream of the CdkVirtualForOf to keep track of when the data length
// changes. Run outside the zone to avoid triggering change detection, since we're managing the
// change detection loop ourselves.
this._ngZone.runOutsideAngular(() => {
this._forOf = forOf;
this._forOf.dataStream.pipe(takeUntil(this._detachedSubject)).subscribe(data => {
const newLength = data.length;
if (newLength !== this._dataLength) {
this._dataLength = newLength;
this._scrollStrategy.onDataLengthChanged();
}
});
});
}
/** Detaches the current `CdkVirtualForOf`. */
detach() {
this._forOf = null;
this._detachedSubject.next();
}
/** Gets the length of the data bound to this viewport (in number of items). */
getDataLength(): number {
return this._dataLength;
}
/** Gets the size of the viewport (in pixels). */
getViewportSize(): number {
return this._viewportSize;
}
// TODO(mmalerba): This is technically out of sync with what's really rendered until a render
// cycle happens. I'm being careful to only call it after the render cycle is complete and before
// setting it to something else, but its error prone and should probably be split into
// `pendingRange` and `renderedRange`, the latter reflecting whats actually in the DOM.
/** Get the current rendered range of items. */
getRenderedRange(): ListRange {
return this._renderedRange;
}
/**
* Sets the total size of all content (in pixels), including content that is not currently
* rendered.
*/
setTotalContentSize(size: number) {
if (this._totalContentSize !== size) {
this._totalContentSize = size;
this.<API key>();
}
}
/** Sets the currently rendered range of indices. */
setRenderedRange(range: ListRange) {
if (!rangesEqual(this._renderedRange, range)) {
this.<API key>.next(this._renderedRange = range);
this.<API key>(() => this._scrollStrategy.onContentRendered());
}
}
/**
* Gets the offset from the start of the viewport to the start of the rendered data (in pixels).
*/
<API key>(): number | null {
return this.<API key> ? null : this.<API key>;
}
/**
* Sets the offset from the start of the viewport to either the start or end of the rendered data
* (in pixels).
*/
<API key>(offset: number, to: 'to-start' | 'to-end' = 'to-start') {
const axis = this.orientation === 'horizontal' ? 'X' : 'Y';
let transform = `translate${axis}(${Number(offset)}px)`;
this.<API key> = offset;
if (to === 'to-end') {
// TODO(mmalerba): The viewport should rewrite this as a `to-start` offset on the next render
// cycle. Otherwise elements will appear to expand in the wrong direction (e.g.
// `mat-expansion-panel` would expand upward).
transform += ` translate${axis}(-100%)`;
this.<API key> = true;
}
if (this.<API key> != transform) {
// We know this value is safe because we parse `offset` with `Number()` before passing it
// into the string.
this.<API key> = transform;
this.<API key> = this._sanitizer.<API key>(transform);
this.<API key>(() => {
if (this.<API key>) {
this.<API key> -= this.<API key>();
this.<API key> = false;
this.<API key>(this.<API key>);
} else {
this._scrollStrategy.<API key>();
}
});
}
}
/** Sets the scroll offset on the viewport. */
setScrollOffset(offset: number) {
// Rather than setting the offset immediately, we batch it up to be applied along with other DOM
// writes during the next change detection cycle.
this.<API key> = offset;
this.<API key>();
}
/** Gets the current scroll offset of the viewport (in pixels). */
measureScrollOffset(): number {
return this.orientation === 'horizontal' ?
this.elementRef.nativeElement.scrollLeft : this.elementRef.nativeElement.scrollTop;
}
/** Measure the combined size of all of the rendered items. */
<API key>(): number {
const contentEl = this._contentWrapper.nativeElement;
return this.orientation === 'horizontal' ? contentEl.offsetWidth : contentEl.offsetHeight;
}
/**
* Measure the total combined size of the given range. Throws if the range includes items that are
* not rendered.
*/
measureRangeSize(range: ListRange): number {
if (!this._forOf) {
return 0;
}
return this._forOf.measureRangeSize(range, this.orientation);
}
/** Update the viewport dimensions and re-render. */
checkViewportSize() {
// TODO: Cleanup later when add logic for handling content resize
this.<API key>();
this._scrollStrategy.onDataLengthChanged();
}
/** Measure the viewport size. */
private <API key>() {
const viewportEl = this.elementRef.nativeElement;
this._viewportSize = this.orientation === 'horizontal' ?
viewportEl.clientWidth : viewportEl.clientHeight;
}
/** Queue up change detection to run. */
private <API key>(runAfter?: Function) {
if (runAfter) {
this.<API key>.push(runAfter);
}
// Use a Promise to batch together calls to `_doChangeDetection`. This way if we set a bunch of
// properties sequentially we only have to run `_doChangeDetection` once at the end.
if (!this.<API key>) {
this.<API key> = true;
this._ngZone.runOutsideAngular(() => Promise.resolve().then(() => {
if (this._ngZone.isStable) {
this._doChangeDetection();
} else {
this._ngZone.onStable.pipe(take(1)).subscribe(() => this._doChangeDetection());
}
}));
}
}
/** Run change detection. */
private _doChangeDetection() {
this.<API key> = false;
// Apply changes to Angular bindings.
this._ngZone.run(() => this._changeDetectorRef.detectChanges());
// Apply the pending scroll offset separately, since it can't be set up as an Angular binding.
if (this.<API key> != null) {
if (this.orientation === 'horizontal') {
this.elementRef.nativeElement.scrollLeft = this.<API key>;
} else {
this.elementRef.nativeElement.scrollTop = this.<API key>;
}
}
for (let fn of this.<API key>) {
fn();
}
this.<API key> = [];
}
}
|
module Devise
module Hooks
# A small warden proxy so we can remember, forget and
# sign out users from hooks.
class Proxy #:nodoc:
include Devise::Controllers::Rememberable
include Devise::Controllers::SignInOut
attr_reader :warden
delegate :cookies, :env, :to => :warden
def initialize(warden)
@warden = warden
end
def session
warden.request.session
end
end
end
end
|
import array
import numbers
real_types = [numbers.Real]
int_types = [numbers.Integral]
iterable_types = [set, list, tuple, array.array]
try:
import numpy
except ImportError:
pass
else:
real_types.extend([numpy.float32, numpy.float64])
int_types.extend([numpy.int32, numpy.int64])
iterable_types.append(numpy.ndarray)
# use these with isinstance to test for various types that include builtins
# and numpy types (if numpy is available)
real_types = tuple(real_types)
int_types = tuple(int_types)
iterable_types = tuple(iterable_types)
|
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width initial-scale=1" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
<meta name="description" content="{{ site.description }}">
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}">
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript" src="{{ site.baseurl }}/js/jquery.backstretch.min.js"></script>
</head>
|
import React, { Component, PropTypes } from 'react';
import { connect } from 'react-redux';
import moment from 'moment';
import { toggleSelect } from '../actions/users';
import { createLink } from '../../utils';
class User extends Component {
render() {
const <API key> = this.props.user.<API key> ? this.props.user.<API key>.replace('normal', 'bigger') : '';
const <API key> = this.props.user.<API key> ? this.props.user.<API key>.replace('normal', 'mini') : '';
var description = this.props.user.description;
if(description) {
description = description.replace(/@[A-Za-z_0-9]+/g, id => createLink(`https://twitter.com/${id.substring(1)}`, id));
this.props.user.entities.description.urls.forEach(url => description = description.replace(new RegExp(url.url, 'g'), createLink(url.expanded_url, url.expanded_url)));
}
return this.props.settings.showMode === 'card' ? (
<li className={'responsive-card ' + (this.props.user.select ? '<API key>' : '')}>
<input type="checkbox" checked={this.props.user.select} className="user__select" onChange={this.props.toggleSelect} />
<div alt="" className="card-img-top" style={{
backgroundImage: this.props.user.profile_banner_url ? `url(${this.props.user.profile_banner_url + '/600x200'})` : 'none',
backgroundColor: !this.props.user.profile_banner_url ? `#${this.props.user.profile_link_color}` : 'transparent'
}} onClick={this.props.toggleSelect}></div>
<div className="card-block">
<div className="media">
<div className="media-left">
<img src={<API key>} width="73" height="73" className="media-left__icon" />
</div>
<div className="media-body">
<div className="card-title">
<div className="card-title__name">
{this.props.user.name}
</div>
<div className="<API key>">
<small>
<a href={`https://twitter.com/${this.props.user.screen_name}`} target="_new" title={this.props.user.id_str}>@{this.props.user.screen_name}</a>
{this.props.user.protected ? (
<span>
<i className="fa fa-lock"></i>
</span>
) : null}
</small>
</div>
</div>
</div>
</div>
</div>
<ul className="list-group list-group-flush">
{
this.props.user.entities && this.props.user.entities.url ? (
<li className="list-group-item">
<a href={this.props.user.entities.url.urls[0].url} target="_new">
<i className="fa fa-link fa-fw"></i> {this.props.user.entities.url.urls[0].expanded_url ? this.props.user.entities.url.urls[0].expanded_url : this.props.user.entities.url.urls[0].url}</a>
</li>
) : null
}
{
this.props.user.location ? (
<li className="list-group-item">
<i className="fa fa-map-marker fa-fw"></i>
{this.props.user.location}
</li>
) : null
}
</ul>
{this.props.user.entities && !this.props.user.entities.url && !this.props.user.location ? <hr /> : null}
<div className="card-block">
<p className="card-text" <API key>={{__html: description}}>
</p>
</div>
</li>
) : (
<tr onClick={e => {
if(['A', 'INPUT'].includes(e.target.tagName)) {
e.stopPropagation();
} else {
this.props.toggleSelect();
}
}}>
<td className="<API key> <API key>">
<input type="checkbox" checked={this.props.user.select} onChange={this.props.toggleSelect} />
</td>
<td className="<API key> <API key>"><img src={<API key>} width="24" height="24" /> {this.props.user.name}</td>
<td>
<a href={`https://twitter.com/${this.props.user.screen_name}`} target="_new">{this.props.user.screen_name}</a>
{this.props.user.protected ? (
<span>
<i className="fa fa-lock"></i>
</span>
) : null}
</td>
<td>{this.props.user.friends_count}</td>
<td>{this.props.user.followers_count}</td>
<td>{this.props.user.status ? moment(new Date(this.props.user.status.created_at)).format('YYYY/MM/DD HH:mm:ss') : null}</td>
</tr>
);
}
}
User.propTypes = {
userId: PropTypes.string.isRequired,
user: PropTypes.object.isRequired,
settings: PropTypes.object.isRequired
};
User.defaultProps = {
userId: '0',
user: {},
settings: {}
};
function mapStateToProps(state, ownProps) {
return {
user: state.users.users.allUserInfo[ownProps.userId],
settings: state.settings
};
}
function mapDispatchToProps(dispatch, ownProps) {
return {
toggleSelect() {
dispatch(toggleSelect(ownProps.userId));
}
};
}
export default connect(mapStateToProps, mapDispatchToProps)(User);
|
<?php
namespace PPICacheModule\Cache\Driver;
use PPICacheModule\Cache\CacheInterface;
class MemoryCache implements CacheInterface
{
/**
* @var array $data
*/
protected $data = array();
/**
* {@inheritdoc}
*/
public function get($key)
{
return isset($this->data[$key]) ? new CacheItem($key, $this->data[$key]) : false;
}
/**
* {@inheritdoc}
*/
public function set($key, $value, $ttl = null)
{
$this->data[$key] = $value;
return true;
}
/**
* {@inheritdoc}
*/
public function remove($key)
{
unset($this->data[$key]);
return true;
}
/**
* {@inheritdoc}
*/
public function getMultiple($keys)
{
$items = array();
foreach ($keys as $key) {
$items[$key] = $this->get($key);
}
return $items;
}
/**
* {@inheritdoc}
*/
public function setMultiple($items, $ttl = null)
{
$results = array();
foreach ($items as $key => $item) {
$this->data[$key] = $item;
$results[$key] = true;
}
return $results;
}
/**
* {@inheritdoc}
*/
public function removeMultiple($keys)
{
$results = array();
foreach ($keys as $key) {
unset($this->data[$key]);
$results[$key] = true;
}
return $results;
}
/**
* {@inheritdoc}
*/
public function clear()
{
$this->data = array();
return true;
}
}
|
/**
* Style for forms
*/
label {
font-size: smaller;
}
input[type=text],
input[type=password] {
font-size: 1.2em;
width: 300px;
}
input[type=submit],
input[type=reset] {
font-size: 1.2em;
}
textarea {
font-size: 1.2em;
width: 300px;
min-height: 200px;
}
p.buttons {
padding-top: 22px;
padding-bottom: 22px;
}
.forms{
width: 700px;
background-color: #eee;
}
.cform-columns-2 .cform-column-1,
.cform-columns-2 .cform-column-2 {
background-color: #eee;
float: left; width: 50%;
}
.cform-columns-2 .cform-buttonbar {
clear: both;
background-color: #eee;
padding: 1em;
border: 1px solid #aaa;
}
.cform-columns-2 .cform-buttonbar p {
margin-bottom: 0;
}
|
package com.smartbit8.laravelstorm.run;
import com.intellij.execution.ExecutionException;
import com.intellij.execution.Executor;
import com.intellij.execution.configurations.*;
import com.intellij.execution.process.*;
import com.intellij.execution.runners.<API key>;
import com.intellij.ide.browsers.*;
import com.intellij.openapi.options.SettingsEditor;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.<API key>;
import com.intellij.openapi.util.Key;
import com.intellij.openapi.util.<API key>;
import com.intellij.util.xmlb.<API key>;
import com.intellij.util.xmlb.XmlSerializer;
import com.jetbrains.php.config.interpreters.PhpInterpreter;
import com.jetbrains.php.config.interpreters.<API key>;
import com.smartbit8.laravelstorm.ui.<API key>;
import org.jdom.Element;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.io.File;
public class LaravelRunConf extends <API key> {
private Project project;
private String host = "localhost";
private int port = 8000;
private String route = "/";
private WebBrowser browser;
private PhpInterpreter interpreter;
LaravelRunConf(@NotNull Project project, @NotNull <API key> factory, String name) {
super(project, factory, name);
this.project = project;
}
@Override
public void <API key>(<API key> manager, ProcessHandler startedProcess) {
LogTab logTab = new LogTab(getProject());
manager.<API key>(logTab, "Laravel.log");
startedProcess.addProcessListener(new ProcessAdapter() {
@Override
public void startNotified(ProcessEvent event) {
logTab.start();
}
@Override
public void processTerminated(ProcessEvent event) {
startedProcess.<API key>(this);
}
});
}
@Override
public void readExternal(Element element) throws <API key> {
super.readExternal(element);
Settings settings = XmlSerializer.deserialize(element, Settings.class);
this.host = settings.host;
this.port = settings.port;
this.route = settings.route;
this.browser = WebBrowserManager.getInstance().findBrowserById(settings.browser);
this.interpreter = <API key>.getInstance(getProject()).findInterpreter(settings.interpreterName);
}
@Override
public void writeExternal(Element element) throws <API key> {
Settings settings = new Settings();
settings.host = this.host;
settings.port = this.port;
settings.route = this.route;
if (this.browser != null)
settings.browser = this.browser.getId().toString();
else
settings.browser = "";
if (this.interpreter != null)
settings.interpreterName = this.interpreter.getName();
else
settings.interpreterName = "";
XmlSerializer.serializeInto(settings, element, new <API key>());
super.writeExternal(element);
}
@NotNull
@Override
public SettingsEditor<? extends RunConfiguration> <API key>() {
return new <API key>(getProject());
}
@Override
public void checkConfiguration() throws <API key> {}
@Nullable
@Override
public RunProfileState getState(@NotNull Executor executor, @NotNull <API key> <API key>) throws ExecutionException {
return new CommandLineState(<API key>) {
@NotNull
@Override
protected ProcessHandler startProcess() throws ExecutionException {
String phpExec = (interpreter != null? interpreter.<API key>():"php");
GeneralCommandLine cmd = new GeneralCommandLine(phpExec, "artisan", "serve", "--host=" + host, "--port="+ port);
cmd.setWorkDirectory(project.getBasePath());
OSProcessHandler handler = new OSProcessHandler(cmd);
handler.addProcessListener(new ProcessAdapter() {
@Override
public void onTextAvailable(ProcessEvent event, Key outputType) {
String text = event.getText();
if (text != null){
if (text.startsWith("Laravel development server started:")){
BrowserLauncher.getInstance().browse("http://" + host + ":" + port +
(route.startsWith("/") ? route : "/" + route), browser);
handler.<API key>(this);
}
}
}
});
// new LaravelRunMgr(handler, new File(getProject().getBasePath()+("/storage/logs/laravel.log")));
return handler;
}
};
}
public int getPort() {
return port;
}
public String getHost() {
return host;
}
public void setPort(int port) {
this.port = port;
}
public void setHost(String host) {
this.host = host;
}
public String getRoute() {
return route;
}
public void setRoute(String route) {
this.route = route;
}
public WebBrowser getBrowser() {
return browser;
}
public void setBrowser(WebBrowser browser) {
this.browser = browser;
}
public PhpInterpreter getInterpreter() {
return interpreter;
}
public void setInterpreter(PhpInterpreter interpreter) {
this.interpreter = interpreter;
}
public static class Settings {
public String host;
public int port;
public String route;
public String browser;
public String interpreterName;
}
}
|
# WiseFriend
User (mentee) can create an account
User can log in
When creating account, user will fill out profile and answer questions to be matched
User can browse a list of resources
After being matched - user can fill out surveys once per month in order to assess the quality of the match.
Mentor can create an account
When creating account, mentor will fill out profile and answer questions
Mentor can log in
After being approved, mentor will be offered a suggested match
They can accept or decline
After being matched - user can fill out surveys once per month in order to assess the quality of the match.
Mentors and mentees can message each other
Mentee:
first name
last name (optional)
location
age
gender
preference for mentor gender
top 5 challenges
Email
Phone (optional)
How do you prefer to communicate?
How did you hear about us?
Tell us about yourself
Mentor:
First name
last name
location
age
gender
preference for mentee gender
areas of expertise
Email
Phone
How do you prefer to communicate?
LinkedIn (optional)
How did you hear about us?
Tell us about yourself
Mentorship
mentor_id
mentee_id
accepted_by_mentor
match_score
mentor_surveys
mentor_id
how_satisfied
plan_to_continue?
comments
mentee_surveys
mentee_id
how_satisfied
plan_to_continue?
comments
|
FactoryGirl.define do
factory :question do
sq_no '2'
query 'What is Ruby?'
question_type "Hard"
association :level
association :content
after(:build) do |question|
FactoryGirl.create(:correct, :question => question)
2.times {|i| FactoryGirl.create(:incorrect, :question => question)}
end
end
end
|
$.preload = function(){
var tmp = [], i = arguments.length;
// reverse loop run faster
for( ; i-- ; ) tmp.push( $( '<img />' ).attr( 'src', arguments[ i ] ));
};
|
/*jshint indent: 4, browser:true*/
/*global L*/
/*
* L.TimeDimension.Player
*/
//'use strict';
L.TimeDimension.Player = (L.Layer || L.Class).extend({
includes: (L.Evented || L.Mixin.Events),
initialize: function(options, timeDimension) {
L.setOptions(this, options);
this._timeDimension = timeDimension;
this._paused = false;
this._buffer = this.options.buffer || 5;
this._minBufferReady = this.options.minBufferReady || 1;
this._waitingForBuffer = false;
this._loop = this.options.loop || false;
this._steps = 1;
this._timeDimension.on('timeload', (function(data) {
this.release(); // free clock
this._waitingForBuffer = false; // reset buffer
}).bind(this));
this.setTransitionTime(this.options.transitionTime || 1000);
this._timeDimension.on('limitschanged <API key> timeload', (function(data) {
this._timeDimension.prepareNextTimes(this._steps, this._minBufferReady, this._loop);
}).bind(this));
},
_tick: function() {
var maxIndex = this._getMaxIndex();
var maxForward = (this._timeDimension.getCurrentTimeIndex() >= maxIndex) && (this._steps > 0);
var maxBackward = (this._timeDimension.getCurrentTimeIndex() == 0) && (this._steps < 0);
if (maxForward || maxBackward) {
// we reached the last step
if (!this._loop) {
this.pause();
this.stop();
this.fire('animationfinished');
return;
}
}
if (this._paused) {
return;
}
var <API key> = 0,
buffer = this._bufferSize;
if (this._minBufferReady > 0) {
<API key> = this._timeDimension.<API key>(this._steps, buffer, this._loop);
// If the player was waiting, check if all times are loaded
if (this._waitingForBuffer) {
if (<API key> < buffer) {
console.log('Waiting until buffer is loaded. ' + <API key> + ' of ' + buffer + ' loaded');
this.fire('waiting', {
buffer: buffer,
available: <API key>
});
return;
} else {
// all times loaded
console.log('Buffer is fully loaded!');
this.fire('running');
this._waitingForBuffer = false;
}
} else {
// check if player has to stop to wait and force to full all the buffer
if (<API key> < this._minBufferReady) {
console.log('Force wait for load buffer. ' + <API key> + ' of ' + buffer + ' loaded');
this._waitingForBuffer = true;
this._timeDimension.prepareNextTimes(this._steps, buffer, this._loop);
this.fire('waiting', {
buffer: buffer,
available: <API key>
});
return;
}
}
}
this.pause();
this._timeDimension.nextTime(this._steps, this._loop);
if (buffer > 0) {
this._timeDimension.prepareNextTimes(this._steps, buffer, this._loop);
}
},
_getMaxIndex: function(){
return Math.min(this._timeDimension.getAvailableTimes().length - 1,
this._timeDimension.getUpperLimitIndex() || Infinity);
},
start: function(numSteps) {
if (this._intervalID) return;
this._steps = numSteps || 1;
this._waitingForBuffer = false;
var startedOver = false;
if (this.options.startOver){
if (this._timeDimension.getCurrentTimeIndex() === this._getMaxIndex()){
this._timeDimension.setCurrentTimeIndex(this._timeDimension.getLowerLimitIndex() || 0);
startedOver = true;
}
}
this.release();
this._intervalID = window.setInterval(
L.bind(this._tick, this),
this._transitionTime);
if (!startedOver)
this._tick();
this.fire('play');
this.fire('running');
},
stop: function() {
if (!this._intervalID) return;
clearInterval(this._intervalID);
this._intervalID = null;
this._waitingForBuffer = false;
this.fire('stop');
},
pause: function() {
this._paused = true;
},
release: function () {
this._paused = false;
},
getTransitionTime: function() {
return this._transitionTime;
},
isPlaying: function() {
return this._intervalID ? true : false;
},
isWaiting: function() {
return this._waitingForBuffer;
},
isLooped: function() {
return this._loop;
},
setLooped: function(looped) {
this._loop = looped;
this.fire('loopchange', {
loop: looped
});
},
setTransitionTime: function(transitionTime) {
this._transitionTime = transitionTime;
if (typeof this._buffer === 'function') {
this._bufferSize = this._buffer.call(this, this._transitionTime, this._minBufferReady, this._loop);
console.log('Buffer size changed to ' + this._bufferSize);
} else {
this._bufferSize = this._buffer;
}
if (this._intervalID) {
this.stop();
this.start(this._steps);
}
this.fire('speedchange', {
transitionTime: transitionTime,
buffer: this._bufferSize
});
},
getSteps: function() {
return this._steps;
}
});
|
<?php
namespace pagosBundle\Entity;
use Doctrine\ORM\EntityRepository;
use Doctrine\DBAL\DriverManager;
class pagoRepository extends EntityRepository
{
public function facturar($lineas,$entidad,$cuenta) {
$datos=array('serie'=>'',
'folio'=>'',
'empresa_id'=>'',
'observaciones'=>'',
'fecha'=>'',
'cliente_id'=>$entidad->getClienteId(),
'receptor_nombre'=>$entidad->getRazonSocial(),
'receptor_rfc'=>$entidad->getRfc(),
'calle'=>$entidad->getCalle(),
'no_exterior'=>$entidad->getNoExterior(),
'no_interior'=>$entidad->getNoInterior(),
'referencia'=>$entidad->getReferencia(),
'colonia'=>$entidad->getColonia(),
'municipio'=>$entidad->getMunicipio(),
'codigo_postal'=>$entidad->getCodigoPostal(),
'localidad'=>$entidad->getLocalidad(),
'estado'=>$entidad->getEstado(),
'pais'=>$entidad->getPais(),
'forma_de_pago'=>'Pago en una sola exhibición',
'condiciones_de_pago'=>'',
'moneda_id'=>'MXN',
'tipo_cambio'=>'1',
'metodo_de_pago'=>'targeta',
'num_cuenta_pago'=>$cuenta,
'fecha_vencimiento'=>date('d/m/Y'),
'vendedor_id'=>'',
'vendedor_nombre'=>'',
'opReq1'=>'ventas:facturas_venta:facturas_venta:Add','operaciones'=>'2');
$x=0;
foreach ($lineas as $linea ) {
$masDatos[]=array(
'conceptos['.$x.'][sku]'=>'SERVICIO',
'conceptos['.$x.'][cantidad]'=>$linea->getCantidad(),
'conceptos['.$x.'][no_identificacion]'=>'',
'conceptos['.$x.'][<API key>]'=>'',
'conceptos['.$x.'][precio_unitario]'=>$linea->getTotal(),
'conceptos['.$x.'][precio_lista]'=>$linea->getTotal(),
'conceptos['.$x.'][descuento]'=>'0',
'conceptos['.$x.'][tipo_descuento]'=>'F',
'conceptos['.$x.'][factor_descuento]'=>'0',
'conceptos['.$x.'][<API key>]'=>$linea->getTotal(),
'conceptos['.$x.'][importe]'=>$linea->getTotal(),
'conceptos['.$x.'][importe_ieps]'=>'0',
'conceptos['.$x.'][observaciones]'=>'',
'conceptos['.$x.'][unidad_id]'=>'PZ',
'conceptos['.$x.'][usa_lotes]'=>'N',
'conceptos['.$x.'][usa_series]'=>'N',
'conceptos['.$x.'][es_paquete]'=>'N',
'conceptos['.$x.'][almacenable]'=>'N',
'conceptos['.$x.'][costo]'=>'0',
'conceptos['.$x.'][impuestos_traslados][0][<API key>]'=>'IVA_GENERAL',
'conceptos['.$x.'][impuestos_traslados][0][impuesto]'=>'IVA',
'conceptos['.$x.'][impuestos_traslados][0][aplicacion]'=>'T',
'conceptos['.$x.'][impuestos_traslados][0][tasa]'=>'16.0000',
'conceptos['.$x.'][impuestos_traslados][0][num_impuesto]'=>'1',
'conceptos['.$x.'][impuestos_traslados][0][importe]'=>'0.16',
'conceptos['.$x.'][pedido_serie]'=>'',
'conceptos['.$x.'][pedido_folio]'=>'',
'conceptos['.$x.'][pedido_item]'=>'',
'conceptos['.$x.'][<API key>]'=>'',
'conceptos['.$x.'][lista_precios_id]'=>'',
'conceptos['.$x.'][descripcion]'=>'SERVICIO'
);
$x++;
}
$req='';
$req1='';
foreach ($datos as $key => $value)
{
$fullipnA[$key] = $value;
$encodedvalue = urlencode(stripslashes($value));
$req .= "&$key=$encodedvalue";
}
for($i=0;$i<count($masDatos); $i++){
foreach ($masDatos[$i] as $key => $value)
{
$fullipnA[$key] = $value;
$encodedvalue = urlencode(stripslashes($value));
$req1 .= "&$key=$encodedvalue";
}
}
// echo $req;
$url='https://e.sisnet.mx:7443/SisnetV3/php/responseweb.php';
$curl_result=$curl_err='';
$varPost="&workspace=default&usuario=demo&contrasena=demo&sucursal=aps_01|MATRIZ|43&resultType=xml";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_CERTINFO,true);
curl_setopt($ch, <API key>, false);
curl_setopt($ch,<API key>, false);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$varPost.$req.$req1);
curl_setopt($ch, <API key>, true);
$datos= curl_exec ($ch);
curl_close ($ch);
//echo $datos;
$resultado=explode('||', $datos);
$max_int_length = strlen((string) PHP_INT_MAX) - 1;
$<API key> = preg_replace('/:\s*(-?\d{'.$max_int_length.',})/', ': "$1"', $resultado[1]);
// echo $<API key>;
$elarrid = json_decode($<API key>,true, 512);
return $elarrid['record'];
}
public function sellar($datos,$usuario){
$valores=array('opReq1'=>'ventas:facturas_venta:facturas_venta:OpenCFD',
'empresa_id'=>$datos['empresa_id'],
'serie'=>$datos['serie'],
'folio'=>$datos['folio'],
'preview'=>'true',
'opReq2'=>'ventas:facturas_venta:facturas_venta:SendMail',
'nombre'=>$usuario->getNombre(),
'correo'=>$usuario->getEmail(),'operaciones'=>'3');
$req='';
foreach ($valores as $key => $value)
{
$fullipnA[$key] = $value;
$encodedvalue = urlencode(stripslashes($value));
$req .= "&$key=$encodedvalue";
}
$url='https://e.sisnet.mx:7443/SisnetV3/php/responseweb.php';
$curl_result=$curl_err='';
$varPost="&workspace=default&usuario=demo&contrasena=demo&sucursal=aps_01|MATRIZ|43&resultType=xml";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_CERTINFO,true);
curl_setopt($ch, <API key>, false);
curl_setopt($ch,<API key>, false);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$varPost.$req);
curl_setopt($ch, <API key>, true);
//$datos= curl_exec ($ch);
curl_close ($ch);
echo $datos;
$resultado=explode('||', $datos);
/*$max_int_length = strlen((string) PHP_INT_MAX) - 1;
$<API key> = preg_replace('/:\s*(-?\d{'.$max_int_length.',})/', ': "$1"', $resultado[1]);
// echo $<API key>;
$elarrid = json_decode($<API key>,true, 512);*/
}
public function addMonth($dates,$num = 1,$format='d/m/Y')
{
$date = $dates->format('Y-n-j');
list($y, $m, $d) = explode('-', $date);
$m += $num;
while ($m > 12)
{
$m -= 12;
$y++;
}
$last_day = date('t', strtotime("$y-$m-1"));
if ($d > $last_day)
{
$d = $last_day;
}
$dates->setDate($y, $m, $d);
return $dates->format($format);
}
}
|
package com.bitdubai.fermat_bnk_api.layer.bnk_wallet.bank_money.exceptions;
import com.bitdubai.fermat_api.FermatException;
public class <API key> extends FermatException {
public static final String DEFAULT_MESSAGE = "Falled To Get Bank Transaction Wallet Bank Money.";
public <API key>(String message, Exception cause, String context, String possibleReason) {
super(message, cause, context, possibleReason);
}
}
|
<?php
namespace SMARTASK\HomeBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use SMARTASK\UserBundle\Entity\User ;
use FOS\ElasticaBundle\Configuration\Search;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Task
*
* @ORM\Table(name="task")
* @Search(repositoryClass="SMARTASK\HomeBundle\Repository\TaskRepository")
* @ORM\Entity(repositoryClass="SMARTASK\HomeBundle\Repository\TaskRepository")
*/
class Task
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* Many Tasks have Many Users.
* @ORM\ManyToMany(targetEntity="SMARTASK\UserBundle\Entity\User", mappedBy="tasks")
*/
private $users;
/**
* @var string
*
* @ORM\Column(name="titre", type="string", length=255, unique=true)
* @Assert\Length(min=5)
* @Assert\NotBlank()
*/
private $titre;
/**
* @var string
*
* @ORM\Column(name="localisation", type="string", length=255, nullable=true)
*/
private $localisation;
/**
* One Task has One Groupe.
* @ORM\ManyToOne(targetEntity="SMARTASK\HomeBundle\Entity\Groupe")
* @ORM\JoinColumn(name="group_id", <API key>="id")
* @Assert\NotBlank()
*/
private $group;
/**
* One Task has One resp.
* @ORM\ManyToOne(targetEntity="SMARTASK\UserBundle\Entity\User")
* @ORM\JoinColumn(name="resp_id", <API key>="id")
* @Assert\NotBlank()
*/
private $resp;
/**
* One Task has One Manager.
* @ORM\ManyToOne(targetEntity="SMARTASK\UserBundle\Entity\User")
* @ORM\JoinColumn(name="manager_id", <API key>="id")
* @Assert\NotBlank()
*/
private $manager;
/**
* @var datetime
*
* @ORM\Column(name="date", type="date", nullable=true)
*/
private $date;
/**
* @var time
*
* @ORM\Column(name="time", type="time", nullable=true)
* @Assert\DateTime()
*/
private $time;
/**
* @var string
*
* @ORM\Column(name="description", type="string", length=255, nullable=true)
*/
private $description;
/**
* @var int
*
* @ORM\Column(name="isalarmeon", type="integer", nullable=true)
*/
private $isalarmeon;
/**
* Get id
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Set titre
*
* @param string $titre
*
* @return Task
*/
public function setTitre($titre)
{
$this->titre = $titre;
return $this;
}
/**
* Get titre
*
* @return string
*/
public function getTitre()
{
return $this->titre;
}
/**
* Set localisation
*
* @param string $localisation
*
* @return Task
*/
public function setLocalisation($localisation)
{
$this->localisation = $localisation;
return $this;
}
/**
* Get localisation
*
* @return string
*/
public function getLocalisation()
{
return $this->localisation;
}
/**
* Set group
*
* @param Group $group
*
* @return Task
*/
public function setGroup($group)
{
$this->group = $group;
return $this;
}
/**
* Get group
*
* @return Group
*/
public function getGroup()
{
return $this->group;
}
/**
* Set resp
*
* @param Contact $resp
*
* @return Task
*/
public function setResp($resp)
{
$this->resp = $resp;
return $this;
}
/**
* Get manager
*
* @return User
*/
public function getManager()
{
return $this->manager;
}
/**
* Set manager
*
* @param Contact $manager
*
* @return Task
*/
public function setManager($manager)
{
$this->manager = $manager;
return $this;
}
/**
* Get resp
*
* @return Contact
*/
public function getResp()
{
return $this->resp;
}
/**
* Set date
*
* @param date $datetime
*
* @return Task
*/
public function setDate($date)
{
$this->date = $date;
return $this;
}
/**
* Get datetime
*
* @return datetime
*/
public function getDate()
{
return $this->date;
}
/**
* Set description
*
* @param time $time
*
* @return Task
*/
public function setTime($time)
{
$this->time = $time;
return $this;
}
/**
* Get time
*
* @return time
*/
public function getTime()
{
return $this->time;
}
/**
* Set description
*
* @param string $description
*
* @return Task
*/
public function setDescription($description)
{
$this->description = $description;
return $this;
}
/**
* Get description
*
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* Set isalarmeon
*
* @param integer $isalarmeon
*
* @return Task
*/
public function setIsalarmeon($isalarmeon)
{
$this->isalarmeon = $isalarmeon;
return $this;
}
/**
* Get isalarmeon
*
* @return int
*/
public function getIsalarmeon()
{
return $this->isalarmeon;
}
public function getUsers() {
return $this->users;
}
public function setUsers($users) {
$this->users = $users;
return $this;
}
}
|
package modelo;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
*
* @author Deivis
*/
public class Cotacao {
private int id;
private Date data;
private Double valor;
private TipoMoeda tipoMoeda;
public TipoMoeda getTipoMoeda() {
return tipoMoeda;
}
public void setTipoMoeda(TipoMoeda tipoMoeda) {
this.tipoMoeda = tipoMoeda;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public Date getData() {
return data;
}
public String getDataString() {
if (this.data != null) {
DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
return df.format(this.data);
} else {
return null;
}
}
public String getDataStringBr() {
if (this.data != null) {
DateFormat df = new SimpleDateFormat("dd/MM/yyyy");
return df.format(this.data);
} else {
return null;
}
}
public void setData(String data) throws ParseException {
if (!"".equals(data)) {
DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
this.data = df.parse(data);
} else {
this.data = null;
}
}
public void setDataBr(String data) throws ParseException {
if (!"".equals(data)) {
DateFormat df = new SimpleDateFormat("dd/MM/yyyy");
this.data = df.parse(data);
} else {
this.data = null;
}
}
public void setDataString(String data) throws ParseException {
if (!"".equals(data)) {
DateFormat df = new SimpleDateFormat("dd/MM/yyyy");
this.data = df.parse(data);
} else {
this.data = null;
}
}
public Double getValor() {
return valor;
}
public String getValorString() {
return valor.toString();
}
public void setValor(String valor) {
if (!"".equals(valor)) {
this.valor = Double.parseDouble(valor.replace(",", "."));
} else {
this.valor = null;
}
}
}
|
<?php
namespace MM\Util\Dummy;
trigger_error("simulating php error/warining");
class Dummy2 {
}
|
<?php
/*
Safe sample
input : Uses popen to read the file /tmp/tainted.txt using cat command
sanitize : settype (float)
construction : use of sprintf via a %d
*/
$handle = popen('/bin/cat /tmp/tainted.txt', 'r');
$tainted = fread($handle, 4096);
pclose($handle);
if(settype($tainted, "float"))
$tainted = $tainted ;
else
$tainted = 0.0 ;
$query = sprintf("SELECT Trim(a.FirstName) & ' ' & Trim(a.LastName) AS employee_name, a.city, a.street & (' ' +a.housenum) AS address FROM Employees AS a WHERE a.supervisor=%d", $tainted);
$conn = mysql_connect('localhost', 'mysql_user', 'mysql_password'); // Connection to the database (address, user, password)
mysql_select_db('dbname') ;
echo "query : ". $query ."<br /><br />" ;
$res = mysql_query($query); //execution
while($data =mysql_fetch_array($res)){
print_r($data) ;
echo "<br />" ;
}
mysql_close($conn);
?>
|
// EFDataSource.h
// Pods
#import <Foundation/Foundation.h>
@class EFCellModel;
@protocol EFDataSource <NSObject>
@required
- (NSInteger)count;
- (EFCellModel *)objectAtIndex:(NSInteger)index;
- (void)add:(EFCellModel *)object;
- (void)removeAtIndex:(NSInteger)index;
- (void)updateAtIndex:(NSInteger)index model:(EFCellModel *)model;
- (id)<API key>:(NSUInteger)idx;
- (NSArray *)allObjects;
@end
|
'use strict';
angular.module('mean.settings').config(['$stateProvider',
function($stateProvider) {
var checkLoggedin = function($q, $timeout, $http, $location) {
// Initialize a new promise
var deferred = $q.defer();
// Make an AJAX call to check if the user is logged in
$http.get('/loggedin').success(function(user) {
// Authenticated
if (user !== '0') $timeout(deferred.resolve);
// Not Authenticated
else {
$timeout(deferred.reject);
$location.url('/');
}
});
return deferred.promise;
};
$stateProvider.state('settings', {
url: '/settings',
templateUrl: 'settings/views/index.html',
resolve: {
loggedin: checkLoggedin
}
});
}
]);
|
<!-- Modal ADD -->
<div class="modal fade" id="modal-form" role="dialog">
<div class="modal-dialog modal-lg">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title"><small></small></h4>
</div>
<div class="modal-body">
<?php echo form_open('', 'id="form" class="form-horizontal"'); ?> <!-- form login -->
<div style="width: auto" align="center">
<h3>RSIA. LOMBOK DUA DUA</h3>
<h5>RINCIAN BIAYA</h5>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label">Nama Pasien</label>
<div class="col-sm-9">
<input type="text" class="form-control" name="nama_pasien" placeholder="Nama pasien" required>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label">Kode Transaksi</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="kode_transaksi" value="<?= date('ymdhis') ?>" disabled="">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label">Nama Suami</label>
<div class="col-sm-9">
<input type="text" class="form-control" name="nama_suami" placeholder="Nama suami" required>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label">Alamat</label>
<div class="col-sm-9">
<input type="text" class="form-control" name="alamat" placeholder="Alamat" required>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label">No Telp</label>
<div class="col-sm-9">
<input type="text" class="form-control" name="telp" placeholder="No Telp" required>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-3 control-label">Tgl Masuk</label>
<div class="col-sm-9">
<input type="text" class="form-control" name="tgl_masuk" value="<?= date('Y/m/d') ?>" disabled="">
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label">Tgl Keluar</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="tgl_keluar" data-inputmask="'alias': 'yyyy/mm/dd'" data-mask required placeholder="Tanggal Keluar">
</div>
</div>
</div>
</div>
<hr>
<div class="form-group">
<label class="col-sm-2 control-label">Dokter Utama</label>
<div class="col-sm-4">
<input type="text" class="form-control" name="dokter_utama" placeholder="Dokter utama" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Perincian Biaya</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="title" placeholder="Keterangan" required>
</div>
</div>
<hr>
<div style="margin: 40px">
<table class="table">
<tr>
<td><b><i>Keterangan</b></i></td>
<td width="20%"><b><i>Jumlah</b></i></td>
</tr>
<tr>
<td>Kartu Pasien</td>
<td><input type="number" class="form-control" name="kartu_pasien" placeholder="" required></td>
</tr>
<tr>
<td>Administrasi</td>
<td><input type="number" class="form-control" name="administrasi" placeholder="" required></td>
</tr>
<tr>
<td>Komponen OK Alat Anastesi</td>
<td><input type="number" class="form-control" name="komponen_ok" placeholder="" required></td>
</tr>
</table>
<hr><strong>Pemakaian Kamar</strong>
<table class="table">
<td>Jasa Pelayanan</td>
<td style="width: 20%"><input type="number" class="form-control" name="jasa_pelayanan" placeholder="" ></td>
</tr>
<tr>
<td>Kamar Inap</td>
<td><input type="number" class="form-control" name="kamar_inap" placeholder="" ></td>
</tr>
<tr>
<td>Kamar Operasi</td>
<td><input type="number" class="form-control" name="kamar_operasi" placeholder="" ></td>
</tr>
<tr>
<td>Kamar Bersalin</td>
<td><input type="number" class="form-control" name="kamar_bersali" placeholder="" ></td>
</tr>
</table>
<hr><strong>Penunjang Medis</strong>
<table class="table">
<td>Laboratorium</td>
<td style="width: 20%"><input type="number" class="form-control" name="laboratorium" placeholder="" ></td>
</tr>
</table>
<hr><strong>Pemakaian Obat dan Alkes</strong>
<table class="table">
<td>Luar Paket (Obat Dengan Resep)</td>
<td style="width: 20%"><input type="number" class="form-control" name="luar_paket" placeholder="" ></td>
</tr>
<tr>
<td>di Kamar Rawat Inap</td>
<td><input type="number" class="form-control" name="di_kamar_rawat_inap" placeholder="" ></td>
</tr>
<tr>
<td>di Kamar Operasi</td>
<td><input type="number" class="form-control" name="di_kamar_operasi" placeholder="" ></td>
</tr>
<tr>
<td>di Kamar Bersalin</td>
<td><input type="number" class="form-control" name="di_kamar_bersali" placeholder="" ></td>
</tr>
</table>
<hr><strong>Rincian Biaya Tindakan</strong>
<table class="table">
<td>NST</td>
<td style="width: 20%"><input type="number" class="form-control" name="nst" placeholder="" ></td>
</tr>
</table>
<hr><strong>Tindakan dan HR Dokter</strong>
<hr><strong>Lain - Lain</strong>
<table class="table">
<td>Lain - Lain</td>
<td style="width: 20%"><input type="number" class="form-control" name="lain_lain" placeholder="" ></td>
</tr>
</table>
</div>
<div class="box-footer">
<div class="pull-right">
<button type="reset" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="submit" class="btn btn-success">Simpan</button>
</div>
</div><!-- /.box-footer -->
<?php echo form_close(); ?> <!-- form close -->
</div><!-- /.form-box -->
</div><!-- /.register-box -->
</div>
</div>
|
#Attribute set in both superclass and subclass
class C(object):
def __init__(self):
self.var = 0
class D(C):
def __init__(self):
self.var = 1 # self.var will be overwritten
C.__init__(self)
#Attribute set in both superclass and subclass
class E(object):
def __init__(self):
self.var = 0 # self.var will be overwritten
class F(E):
def __init__(self):
E.__init__(self)
self.var = 1
|
#include <iostream>
#include <fftw3.h>
#include <omp.h>
#include <cstdlib>
#include <sweet/SimulationVariables.hpp>
class TestFFTPlans
{
public:
bool importWisdom(int <API key>)
{
static const char *wisdom_file = "sweet_fftw";
std::cout << "<API key>(" << wisdom_file << ")" << std::endl;
int wisdom_plan_loaded = <API key>(wisdom_file);
if (wisdom_plan_loaded == 0)
{
std::cerr << "Failed to load FFTW wisdom from file '" << wisdom_file << "'" << std::endl;
if (<API key> == 2)
exit(1);
}
std::cout << "WISDOM: " << <API key>() << std::endl;
return true;
}
bool exportWisdom()
{
static const char *wisdom_file = "sweet_fftw";
std::cout << "<API key>(" << wisdom_file << ")" << std::endl;
int wisdom_plan_stored = <API key>(wisdom_file);
if (wisdom_plan_stored == 0)
{
std::cerr << "Failed to store FFTW wisdom to file " << wisdom_file << std::endl;
exit(1);
}
std::cout << "WISDOM: " << <API key>() << std::endl;
return true;
}
bool printWisdom()
{
std::cout << "WISDOM: " << <API key>() << std::endl;
return true;
}
int run(
int <API key>,
int i_res[2],
int i_nthreads
)
{
#if SWEET_THREADING
std::cout << "fftw_init_threads()" << std::endl;
int retval = fftw_init_threads();
if (retval == 0)
{
std::cerr << "ERROR: fftw_init_threads()" << std::endl;
exit(1);
}
std::cout << "<API key>(" << i_nthreads << ")" << std::endl;
<API key>(i_nthreads);
#endif
importWisdom(<API key>);
unsigned int num_cells = i_res[0]*i_res[1];
unsigned flags = 0;
if (<API key> == -1)
{
flags |= FFTW_ESTIMATE;
}
else
{
// estimation base don workload
if (num_cells < 32*32)
//flags |= FFTW_EXHAUSTIVE;
num_cells |= FFTW_MEASURE;
else if (num_cells < 128*128)
num_cells |= FFTW_MEASURE;
else
num_cells |= FFTW_PATIENT;
if (<API key> == 2)
{
std::cout << "Enforcing to use Wisdom" << std::endl;
flags |= FFTW_WISDOM_ONLY;
}
}
// allocate more data than necessary for spectral space
fftw_complex *data_spectral = (fftw_complex*)fftw_malloc(sizeof(fftw_complex) * i_res[0]*i_res[1]);
// physical space data
double *data_physical = (double*)fftw_malloc(sizeof(double)*2 * i_res[0]*i_res[1]);
std::cout << "<API key>(...)" << std::endl;
fftw_plan fftw_plan_forward;
fftw_plan_forward =
<API key>(
i_res[1],
i_res[0],
data_physical,
(fftw_complex*)data_spectral,
flags
);
printWisdom();
if (fftw_plan_forward == nullptr)
{
std::cout << "Wisdom: " << <API key>() << std::endl;
std::cerr << "Failed to get forward plan dft_r2c fftw" << std::endl;
exit(-1);
}
exportWisdom();
#if SWEET_THREADING
<API key>();
#endif
fftw_cleanup();
return 0;
}
};
int main(int i_argc, char **i_argv)
{
SimulationVariables simVars;
simVars.<API key>(i_argc, i_argv, nullptr, true);
simVars.outputConfig();
#if SWEET_THREADING
int nthreads = omp_get_max_threads();
std::cout << " + nthreads: " << nthreads << std::endl;
#else
int nthreads = 0;
#endif
TestFFTPlans t;
t.run(simVars.misc.<API key>, simVars.disc.space_res_physical, nthreads);
std::cout << "FIN" << std::endl;
return 0;
}
|
<form id="formCopyMove">
<fieldset>
<div class="modal-body">
<label>{{i18n.select_destination}}:</label>
<div id="copyMoveTree"><div class="text-center"><span class="icon icon-spin5 animate-spin"></span></div></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" id="copyButton">{{i18n.copy}}</button>
<button type="button" class="btn btn-default" id="moveButton">{{i18n.move}}</button>
<button type="button" class="btn btn-default" id="cancelButton">{{i18n.cancel}}</button>
</div>
</fieldset>
</form>
|
class Comment < Sequel::Model
many_to_one :post
include Splam
splammable :body do |splam|
splam.threshold = 40
splam.rules = [:bad_words, :html, :bbcode, :href, :chinese, :line_length, :russian]
end
def before_save
return false if super == false
self.published = !self.splam?
true
end
end
|
#pragma once
#define FILE_NAME_MAX 512
#define FILE_PATH_MAX 512
typedef struct linked_list_s linked_list;
typedef struct list_item_s list_item;
typedef struct meta_info_s {
char name[0x100];
char compatible[0x10];
char description[0x200];
char developer[0x100];
char devsite[0x100];
char added[0x100];
u32 texture;
char version[0xA];
char pic[0x100];
u32 pictexture;
u32 id;
} meta_info;
typedef struct ntrdb_info_s {
char titleId[0xAA];
meta_info meta;
char downloadURL[0x100];
} ntrdb_info;
typedef enum data_op_e {
DATAOP_COPY,
DATAOP_DELETE
} data_op;
typedef struct data_op_data_s {
void* data;
data_op op;
// Copy
u32 copyBufferSize;
bool copyEmpty;
u32 copyBytesPerSecond;
u32 processed;
u32 total;
u64 currProcessed;
u64 currTotal;
Result (*isSrcDirectory)(void* data, u32 index, bool* isDirectory);
Result (*makeDstDirectory)(void* data, u32 index);
Result (*openSrc)(void* data, u32 index, u32* handle);
Result (*closeSrc)(void* data, u32 index, bool succeeded, u32 handle);
Result (*getSrcSize)(void* data, u32 handle, u64* size);
Result (*readSrc)(void* data, u32 handle, u32* bytesRead, void* buffer, u64 offset, u32 size);
Result (*openFile)(void* data, u32 index, void* initialReadBlock, u64 size, u32* handle);
Result (*closeFile)(void* data, u32 index, bool succeeded, u32 handle);
Result (*writeFile)(void* data, u32 handle, u32* bytesWritten, void* buffer, u64 offset, u32 size);
Result (*suspendCopy)(void* data, u32 index, u32* srcHandle, u32* dstHandle);
Result (*restoreCopy)(void* data, u32 index, u32* srcHandle, u32* dstHandle);
// Delete
Result (*delete)(void* data, u32 index);
// Suspend
Result (*suspend)(void* data, u32 index);
Result (*restore)(void* data, u32 index);
// Errors
bool (*error)(void* data, u32 index, Result res);
// General
volatile bool finished;
Result result;
Handle cancelEvent;
} data_op_data;
typedef struct <API key> {
linked_list* items;
volatile bool finished;
Result result;
Handle cancelEvent;
} populate_ntrdb_data;
typedef struct <API key> {
linked_list* items;
void* userData;
bool (*filter)(void* data, u64 titleId, FS_MediaType mediaType);
int (*compare)(void* data, const void* p1, const void* p2);
volatile bool finished;
Result result;
Handle cancelEvent;
} <API key>;
typedef struct title_info_s {
FS_MediaType mediaType;
u64 titleId;
char productCode[0x10];
u16 version;
u64 installedSize;
bool twl;
bool hasMeta;
meta_info meta;
} title_info;
void task_init();
void task_exit();
bool task_is_quit_all();
Handle <API key>();
Handle <API key>();
Result task_data_op(data_op_data* data);
void task_free_ntrdb(list_item* item);
void task_clear_ntrdb(linked_list* items);
Result task_populate_ntrdb(populate_ntrdb_data* data);
|
namespace EVTC_Log_Parser.Model
{
public class Interval
{
public int Start { get; set; }
public int End { get; set; }
}
}
|
package br.com.dbsoft.rest.dados;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;
import com.fasterxml.jackson.annotation.<API key>;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import br.com.dbsoft.rest.interfaces.IStatus;
@JsonInclude(value=Include.NON_NULL)
@JsonTypeInfo(use = JsonTypeInfo.Id.NONE)
@<API key>(ignoreUnknown = true)
@JsonAutoDetect(getterVisibility = Visibility.NONE, setterVisibility = Visibility.NONE)
public class DadosStatus implements IStatus {
private static final long serialVersionUID = -<API key>;
@JsonProperty("status")
private Boolean wStatus;
@Override
public Boolean getStatus() {
return wStatus;
}
@Override
public void setStatus(Boolean pStatus) {
wStatus = pStatus;
}
}
|
import PropTypes from 'prop-types'
import React from 'react'
import block from 'bem-cn-lite'
import { Field, reduxForm } from 'redux-form'
import { compose } from 'underscore'
import { connect } from 'react-redux'
import { renderTextInput } from '../text_input'
import { renderCheckboxInput } from '../checkbox_input'
import { signUp, update<API key> } from '../../client/actions'
import { GDPRMessage } from 'desktop/components/react/gdpr/GDPRCheckbox'
function validate(values) {
const { <API key>, email, name, password } = values
const errors = {}
if (!name) errors.name = 'Required'
if (!email) errors.email = 'Required'
if (!password) errors.password = 'Required'
if (!<API key>)
errors.<API key> = 'Please agree to our terms to continue'
return errors
}
function SignUp(props) {
const {
error,
handleSubmit,
isLoading,
signUpAction,
update<API key>,
} = props
const b = block('<API key>')
return (
<div className={b()}>
<div className={b('title')}>Create an Account</div>
<div className={b('subtitle')}>
Already have an account?{' '}
<span
className={b('clickable')}
onClick={() => update<API key>('logIn')}
>
Log in
</span>.
</div>
<form className={b('form')} onSubmit={handleSubmit(signUpAction)}>
<div className={b('row')}>
<div className={b('row-item')}>
<Field
name="name"
component={renderTextInput}
item={'name'}
label={'Full Name'}
autofocus
/>
</div>
</div>
<div className={b('row')}>
<div className={b('row-item')}>
<Field
name="email"
component={renderTextInput}
item={'email'}
label={'Email'}
type={'email'}
/>
</div>
</div>
<div className={b('row')}>
<div className={b('row-item')}>
<Field
name="password"
component={renderTextInput}
item={'password'}
label={'Password'}
type={'password'}
/>
</div>
</div>
<div className={b('row')}>
<div className={b('row-item')}>
<Field
name="<API key>"
component={renderCheckboxInput}
item={'<API key>'}
label={<GDPRMessage />}
value={false}
/>
</div>
</div>
<button
className={b
.builder()('sign-up-button')
.mix('<API key>')()}
type="submit"
>
{isLoading ? <div className="<API key>" /> : 'Submit'}
</button>
{error && <div className={b('error')}>{error}</div>}
</form>
</div>
)
}
const mapStateToProps = state => {
return {
error: state.submissionFlow.error,
isLoading: state.submissionFlow.isLoading,
}
}
const mapDispatchToProps = {
signUpAction: signUp,
update<API key>: update<API key>,
}
SignUp.propTypes = {
error: PropTypes.string,
handleSubmit: PropTypes.func.isRequired,
isLoading: PropTypes.bool.isRequired,
signUpAction: PropTypes.func.isRequired,
update<API key>: PropTypes.func.isRequired,
}
export default compose(
reduxForm({
form: 'signUp', // a unique identifier for this form
validate,
}),
connect(mapStateToProps, mapDispatchToProps)
)(SignUp)
|
using System.Collections.Generic;
using DotSpatial.Data;
namespace DotSpatial.Symbology
{
<summary>
Interface for LayerProvider.
</summary>
public interface ILayerProvider
{
#region Properties
<summary>
Gets a basic description of what your provider does.
</summary>
string Description { get; }
<summary>
Gets a dialog read filter that lists each of the file type descriptions and file extensions, delimeted
by the | symbol. Each will appear in DotSpatial's open file dialog filter, preceeded by the name provided
on this object.
</summary>
string DialogReadFilter { get; }
<summary>
Gets a dialog filter that lists each of the file type descriptions and extensions for a Save File Dialog.
Each will appear in DotSpatial's open file dialog filter, preceeded by the name provided on this object.
</summary>
string DialogWriteFilter { get; }
<summary>
Gets a prefereably short name that identifies this data provider. Example might be GDAL.
This will be prepended to each of the DialogReadFilter members from this plugin.
</summary>
string Name { get; }
#endregion
#region Methods
<summary>
This open method is only called if this plugin has been given priority for one
of the file extensions supported in the DialogReadFilter property supplied by
this control. Failing to provide a DialogReadFilter will result in this plugin
being added to the list of DataProviders being supplied under the Add Other Data
option in the file menu.
</summary>
<param name="fileName">A string specifying the complete path and extension of the file to open.</param>
<param name="inRam">A boolean that, if ture, will request that the data be loaded into memory</param>
<param name="container">Any valid IContainer that should have the new layer automatically added to it</param>
<param name="progressHandler">An IProgressHandler interface for status messages</param>
<returns>A List of IDataSets to be added to the Map. These can also be groups of datasets.</returns>
ILayer OpenLayer(string fileName, bool inRam, ICollection<ILayer> container, IProgressHandler progressHandler);
#endregion
}
}
|
using System.Runtime.Serialization;
namespace PushbulletSharp.Models.Responses.Ephemerals
{
[DataContract]
public class DismissalEphemeral : IEphemeral
{
<summary>
Gets or sets the type.
</summary>
<value>
The type.
</value>
[DataMember(Name = "type")]
public string Type { get; set; }
<summary>
Gets or sets the name of the package.
</summary>
<value>
The name of the package.
</value>
[DataMember(Name = "package_name")]
public string PackageName { get; set; }
<summary>
Gets or sets the source user iden.
</summary>
<value>
The source user iden.
</value>
[DataMember(Name = "source_user_iden")]
public string SourceUserIden { get; set; }
<summary>
Gets or sets the notification identifier.
</summary>
<value>
The notification identifier.
</value>
[DataMember(Name = "notification_id")]
public string NotificationId { get; set; }
<summary>
Gets or sets the notification tag.
</summary>
<value>
The notification tag.
</value>
[DataMember(Name = "notification_tag")]
public string NotificationTag { get; set; }
<summary>
Gets or sets the source device iden.
</summary>
<value>
The source device iden.
</value>
[DataMember(Name = "source_device_iden")]
public string SourceDeviceIden { get; set; }
}
}
|
<!DOCTYPE HTML PUBLIC "-
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_02) on Mon Apr 25 06:16:42 CEST 2016 -->
<meta http-equiv="Content-Type" content="text/html" charset="utf-8">
<title>org.gradle.api.plugins.jetty (Gradle API 2.13)</title>
<meta name="date" content="2016-04-25">
<link rel="stylesheet" type="text/css" href="../../../../../javadoc.css" title="Style">
</head>
<body>
<h1 class="bar"><a href="../../../../../org/gradle/api/plugins/jetty/package-summary.html" target="classFrame">org.gradle.api.plugins.jetty</a></h1>
<div class="indexContainer">
<h2 title="Classes">Classes</h2>
<ul title="Classes">
<li><a href="<API key>.html" title="class in org.gradle.api.plugins.jetty" target="classFrame"><API key></a></li>
<li><a href="JettyPlugin.html" title="class in org.gradle.api.plugins.jetty" target="classFrame">JettyPlugin</a></li>
<li><a href="<API key>.html" title="class in org.gradle.api.plugins.jetty" target="classFrame"><API key></a></li>
<li><a href="JettyRun.html" title="class in org.gradle.api.plugins.jetty" target="classFrame">JettyRun</a></li>
<li><a href="JettyRunWar.html" title="class in org.gradle.api.plugins.jetty" target="classFrame">JettyRunWar</a></li>
<li><a href="JettyStop.html" title="class in org.gradle.api.plugins.jetty" target="classFrame">JettyStop</a></li>
<li><a href="ScanTargetPattern.html" title="class in org.gradle.api.plugins.jetty" target="classFrame">ScanTargetPattern</a></li>
</ul>
</div>
</body>
</html>
|
* {
margin: 0;
padding: 0;
}
h2 {
font-family: verdana, sans-serif;
font-size: 18px;
margin: 10px 5px;
}
.box h2 {
background:#ddd;
color:black;
padding:5px;
font-size: 14px;
margin: 0;
}
.box p { color:#333; padding:5px; font-size: 14px}
.box, .box-v {
border:1px solid #ddd;
background: lightyellow;
width: 250px;
margin: 5px;
float:left;
border-radius:5px;
font-family: Helvetica, sans-serif;
}
.box-v {
float: None;
}
.box p {
text-align: center;
}
.box img {
margin: 5px 35px;
}
.column {
margin-right: 20px;
float: left;
}
p.timestamp {
font: 12px "Helvetica Neue",Helvetica,Arial,sans-serif;
font-style: italic;
}
|
package com.landenlabs.all_flipanimation;
import android.animation.ObjectAnimator;
import android.app.Activity;
import android.graphics.Camera;
import android.graphics.Matrix;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.animation.Animation;
import android.view.animation.AnimationSet;
import android.view.animation.LinearInterpolator;
import android.view.animation.Transformation;
import android.widget.CheckBox;
import android.widget.TextView;
public class <API key> extends Activity {
View mView1;
View mView2;
View mClickView;
DrawView mDrawView;
TextView mAngle1;
TextView mAngle2;
float mCameraZ = -25;
Flip3dAnimation mRotation1;
Flip3dAnimation mRotation2;
boolean mRotateYaxis = true;
boolean mIsForward = true;
boolean mAutoMode = false;
MediaPlayer mSoundClick;
MediaPlayer mSoundShut;
private Handler m_handler = new Handler();
private int mDurationMsec = 3000;
private Runnable <API key> = new Runnable() {
public void run() {
animateIt();
m_handler.postDelayed(this, mDurationMsec); // Re-execute after msec
}
};
/**
* Called when the activity is first created.
*/
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.rot_animation);
mView1 = Ui.viewById(this, R.id.view1);
mView2 = Ui.viewById(this, R.id.view2);
// Create a new 3D rotation with the supplied parameter
mRotation1 = new Flip3dAnimation();
mRotation2 = new Flip3dAnimation();
Ui.<TextView>viewById(this, R.id.side_title).setText("Rotating Animation");
setupUI();
}
/**
* Start animation.
*/
public void animateIt() {
ObjectAnimator.ofFloat(mClickView, View.ALPHA, mClickView.getAlpha(), 0).start();
final float end = 90.0f;
if (mIsForward) {
mRotation1.mFromDegrees = 0.0f;
mRotation1.mToDegrees = end;
mRotation2.mFromDegrees = -end;
mRotation2.mToDegrees = 0.0f;
} else {
mRotation1.mFromDegrees = end;
mRotation1.mToDegrees = 0.0f;
mRotation2.mFromDegrees = 0.0f;
mRotation2.mToDegrees = -end;
}
mIsForward = !mIsForward;
if (mRotateYaxis) {
mRotation1.mCenterX = mView1.getWidth();
mRotation1.mCenterY = mView1.getHeight() / 2.0f;
mRotation2.mCenterX = 0.0f;
mRotation2.mCenterY = mView2.getHeight() / 2.0f;
} else {
mRotation1.mCenterY = 0.0f; // mView1.getHeight();
mRotation1.mCenterX = mView1.getWidth() / 2.0f;
mRotation2.mCenterY = mView1.getHeight(); // 0.0f;
mRotation2.mCenterX = mView2.getWidth() / 2.0f;
}
mRotation1.reset(mView1, mDurationMsec, mCameraZ);
mRotation2.reset(mView2, mDurationMsec, mCameraZ);
mRotation2.<API key>(new Animation.AnimationListener() {
@Override public void onAnimationStart(Animation animation) { }
@Override public void onAnimationEnd(Animation animation) {
mSoundShut.start();
}
@Override public void onAnimationRepeat(Animation animation) { }
});
// Run both animations in parallel.
AnimationSet animationSet = new AnimationSet(true);
animationSet.setInterpolator(new LinearInterpolator());
animationSet.addAnimation(mRotation1);
animationSet.addAnimation(mRotation2);
animationSet.start();
}
public class Flip3dAnimation extends Animation {
float mFromDegrees;
float mToDegrees;
float mCenterX = 0;
float mCenterY = 0;
float mCameraZ = -8;
Camera mCamera;
View mView;
public Flip3dAnimation() {
setFillEnabled(true);
setFillAfter(true);
setFillBefore(true);
}
public void reset(View view, int durationMsec, float cameraZ) {
mCameraZ = cameraZ;
setDuration(durationMsec);
view.clearAnimation(); // This is very important to get 2nd..nth run to work.
view.setAnimation(this);
mView = view;
}
@Override
public void initialize(int width, int height, int parentWidth, int parentHeight) {
super.initialize(width, height, parentWidth, parentHeight);
mCamera = new Camera();
}
@Override
protected void applyTransformation(float interpolatedTime, Transformation trans) {
final float fromDegrees = mFromDegrees;
float degrees = fromDegrees + ((mToDegrees - fromDegrees) * interpolatedTime);
final Camera camera = mCamera;
final Matrix matrix = trans.getMatrix();
camera.save();
camera.setLocation(0, 0, mCameraZ);
if (mRotateYaxis)
camera.rotateY(degrees);
else
camera.rotateX(degrees);
camera.getMatrix(matrix);
camera.restore();
matrix.preTranslate(-mCenterX, -mCenterY);
matrix.postTranslate(mCenterX, mCenterY);
final float degree3 = degrees;
if (mView == mView1) {
mDrawView.setAngle1(degree3);
mAngle1.setText(String.format("%.0f°", degree3));
} else {
mDrawView.setAngle2(degree3);
mAngle2.setText(String.format("%.0f°", degree3));
}
}
}
/**
* Build User Interface - setup callbacks.
*/
private void setupUI() {
mSoundClick = MediaPlayer.create(this, R.raw.click);
// mSoundClick.setVolume(0.5f, 0.5f);
mSoundShut = MediaPlayer.create(this, R.raw.shut);
// mSoundShut.setVolume(0.3f, 0.3f);
final TextView title = (TextView) this.findViewById(R.id.title);
mClickView = this.findViewById(R.id.click_view);
mClickView.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
mSoundClick.start();
animateIt();
}
});
final SlideBar seekspeedSB = new SlideBar(this.findViewById(R.id.seekSpeed), "Delay:");
seekspeedSB.setValueChanged(new SlideBar.ValueChanged() {
@Override
public float onValueChanged(View v, float value) {
mDurationMsec = (int) (value = 100 + value * 100);
title.setText(String.format("Delay:%d CameraZ:%.0f", mDurationMsec, mCameraZ));
return value;
}
});
final SlideBar cameraZpos = new SlideBar(this.findViewById(R.id.cameraZpos), "CamZ:");
cameraZpos.setProgress((int) (mCameraZ / -2 + 50));
cameraZpos.setValueChanged(new SlideBar.ValueChanged() {
@Override
public float onValueChanged(View v, float value) {
mCameraZ = value = (50 - value) * 2.0f;
title.setText(String.format("Delay:%d CameraZ:%.0f", mDurationMsec, mCameraZ));
return value;
}
});
final CheckBox autoFlipCb = Ui.viewById(this, R.id.autoflip);
autoFlipCb.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
mAutoMode = ((CheckBox) v).isChecked();
if (mAutoMode) {
m_handler.postDelayed(<API key>, 0);
} else {
m_handler.removeCallbacks(<API key>);
}
}
});
final CheckBox yaxisCb = Ui.viewById(this, R.id.yaxis);
mRotateYaxis = yaxisCb.isChecked();
yaxisCb.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
boolean autoMode = mAutoMode;
if (autoMode)
autoFlipCb.performClick(); // Stop automatic animation.
mRotateYaxis = ((CheckBox) v).isChecked();
if (autoMode)
autoFlipCb.performClick(); // Restart automatic animation.
}
});
mDrawView = Ui.viewById(this, R.id.drawView);
mAngle1 = Ui.viewById(this, R.id.angle1);
mAngle2 = Ui.viewById(this, R.id.angle2);
}
}
|
I am an unordered list. I am typically used for unnumbered lists
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DesktopCharacter.Model.Locator;
using DesktopCharacter.ViewModel.SettingTab;
namespace DesktopCharacter.ViewModel
{
class SettingViewModel : Livet.ViewModel
{
public <API key> LauncherSetting { set; private get; }
public <API key> CharacterSetting { set; private get; }
public <TwitterConsumerkey> TwitterSetting { set; private get; }
public <API key> CodicSettingTab { set; private get; }
public <API key> SlackSetting { set; private get; }
public SettingViewModel()
{
}
public void ClosedEvent()
{
TwitterSetting.OnClose();
CodicSettingTab.OnClose();
CharacterSetting.OnClose();
SlackSetting.OnClose();
LauncherSetting.OnClose();
ServiceLocator.Instance.<API key>();
}
}
}
|
.style-target {
font-family: Arial, sans-serif;
}
|
<?php
declare(strict_types=1);
namespace LooplineSystems\CloseIoApiWrapper\Model;
use LooplineSystems\CloseIoApiWrapper\Library\Exception\<API key>;
use LooplineSystems\CloseIoApiWrapper\Library\Exception\InvalidUrlException;
use LooplineSystems\CloseIoApiWrapper\Library\<API key>;
use LooplineSystems\CloseIoApiWrapper\Library\<API key>;
class Lead implements \JsonSerializable
{
const <API key> = 'Potential';
const LEAD_STATUS_BAD_FIT = 'Bad Fit';
const <API key> = 'Qualified';
const <API key> = 'Customer';
use <API key>;
use <API key>;
/**
* @var string
*/
private $id;
/*
* @var string
*/
private $status_id;
/**
* @var string
*/
private $status;
/*
* @var string
*/
private $status_label;
/**
* @var string
*/
private $description;
/**
* @var string
*/
private $display_name;
/**
* @var Address[]
*/
private $addresses;
/**
* @var string
*/
private $organization;
/**
* @var string
*/
private $created_by;
/**
* @var string
*/
private $url;
/**
* @var Task[]
*/
private $tasks;
/**
* @var string
*/
private $name;
/**
* @var Contact[]
*/
private $contacts;
/**
* @var string
*/
private $date_created;
/**
* @var array
*/
private $custom;
/**
* @var string
*/
private $updated_by_name;
/**
* @var string
*/
private $created_by_name;
/**
* @var Opportunity[]
*/
private $opportunities;
/**
* @var string
*/
private $html_url;
/**
* @var string
*/
private $updated_by;
/**
* @var string
*/
private $date_updated;
/**
* @var string
*/
private $organization_id;
/**
* @param array $data
*
* @throws <API key>
*/
public function __construct(array $data = null)
{
if ($data) {
// custom is not a class and should be set separately
if (isset($data['custom'])) {
$this->setCustom($data['custom']);
unset($data['custom']);
}
// child objects
$nestedObjects = ['contacts', 'tasks', 'addresses', 'opportunities', 'custom'];
$this->hydrate($data, $nestedObjects);
}
}
/**
* @return string
*/
public function getId()
{
return $this->id;
}
/**
* @param string $id
*
* @return $this
*/
public function setId($id)
{
$this->id = $id;
return $this;
}
/**
* @return Address[]
*/
public function getAddresses()
{
return $this->addresses;
}
/**
* @param Address $address
*
* @return $this
*/
public function addAddress(Address $address)
{
$this->addresses[] = $address;
return $this;
}
/**
* @param Address[] $addresses
*
* @return $this
*/
public function setAddresses(array $addresses)
{
$this->addresses = $addresses;
return $this;
}
/**
* @return Contact[]
*/
public function getContacts()
{
return $this->contacts;
}
/**
* @param Contact $contact
*
* @return $this
*/
public function addContact(Contact $contact)
{
$this->contacts[] = $contact;
return $this;
}
/**
* @param Contact[] $contacts
*
* @return $this
*/
public function setContacts(array $contacts)
{
$this->contacts = $contacts;
return $this;
}
/**
* @return string
*/
public function getCreatedBy()
{
return $this->created_by;
}
/**
* @param string $created_by
*
* @return $this
*/
public function setCreatedBy($created_by)
{
$this->created_by = $created_by;
return $this;
}
/**
* @return array
*/
public function getCustom()
{
return $this->custom;
}
/**
* @param array $custom
*
* @return $this
*/
public function setCustom($custom)
{
$this->custom = $custom;
return $this;
}
/**
* Sets the value of a custom field. By passing a `null` value the field
* will be unset from the lead.
*
* @param string $name The name or ID of the field
* @param mixed $value The value
*
* @return $this
*/
public function setCustomField(string $name, $value)
{
$this->custom[$name] = $value;
return $this;
}
/**
* @return string
*/
public function getDateCreated()
{
return $this->date_created;
}
/**
* @param string $date_created
*
* @return $this
*/
public function setDateCreated($date_created)
{
$this->date_created = $date_created;
return $this;
}
/**
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* @param string $description
*
* @return $this
*/
public function setDescription($description)
{
$this->description = $description;
return $this;
}
/**
* @return string
*/
public function getDisplayName()
{
return $this->display_name;
}
/**
* @param string $display_name
*
* @return $this
*/
public function setDisplayName($display_name)
{
$this->display_name = $display_name;
return $this;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* @param string $name
*
* @return $this
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* @return Opportunity[]
*/
public function getOpportunities()
{
return $this->opportunities;
}
/**
* @param Opportunity[] $opportunities
*
* @return $this
*/
public function setOpportunities(array $opportunities)
{
$this->opportunities = $opportunities;
return $this;
}
/**
* @return string
*/
public function getOrganization()
{
return $this->organization;
}
/**
* @param string $organization
*
* @return $this
*/
public function setOrganization($organization)
{
$this->organization = $organization;
return $this;
}
/**
* @return string
*/
public function getStatusId()
{
return $this->status_id;
}
/**
* @param string $status
*
* @return $this
*/
public function setStatusId($status)
{
$this->status_id = $status;
return $this;
}
/**
* @return string
*/
public function getStatus()
{
return $this->status;
}
/**
* @param string $status
*/
public function setStatus($status)
{
$this->status = $status;
return $this;
}
/**
* @return string
*/
public function getStatusLabel()
{
return $this->status_label;
}
/**
* @param string $status_label
*
* @return $this
*/
public function setStatusLabel($status_label)
{
$this->status_label = $status_label;
return $this;
}
/**
* @return Task[]
*/
public function getTasks()
{
return $this->tasks;
}
/**
* @param Task[] $tasks
*
* @return $this
*/
public function setTasks($tasks)
{
$this->tasks = $tasks;
return $this;
}
/**
* @return string
*/
public function getUrl()
{
return $this->url;
}
/**
* @param string $url
*
* @return $this
*
* @throws InvalidUrlException
*/
public function setUrl($url)
{
// validate url
if (filter_var($url, FILTER_VALIDATE_URL)) {
$this->url = $url;
} else {
throw new InvalidUrlException('"' . $url . '" is not a valid URL');
}
return $this;
}
/**
* @return string
*/
public function getCreatedByName()
{
return $this->created_by_name;
}
/**
* @param string $created_by_name
*
* @return $this
*/
public function setCreatedByName($created_by_name)
{
$this->created_by_name = $created_by_name;
return $this;
}
/**
* @return string
*/
public function getDateUpdated()
{
return $this->date_updated;
}
/**
* @param string $date_updated
*
* @return $this
*/
public function setDateUpdated($date_updated)
{
$this->date_updated = $date_updated;
return $this;
}
/**
* @return string
*/
public function getHtmlUrl()
{
return $this->html_url;
}
/**
* @param string $html_url
*
* @return $this
*/
public function setHtmlUrl($html_url)
{
$this->html_url = $html_url;
return $this;
}
/**
* @return string
*/
public function getOrganizationId()
{
return $this->organization_id;
}
/**
* @param string $organization_id
*
* @return $this
*/
public function setOrganizationId($organization_id)
{
$this->organization_id = $organization_id;
return $this;
}
/**
* @return string
*/
public function getUpdatedBy()
{
return $this->updated_by;
}
/**
* @param string $updated_by
*
* @return $this
*/
public function setUpdatedBy($updated_by)
{
$this->updated_by = $updated_by;
return $this;
}
/**
* @return string
*/
public function getUpdatedByName()
{
return $this->updated_by_name;
}
/**
* @param string $updated_by_name
*
* @return $this
*/
public function setUpdatedByName($updated_by_name)
{
$this->updated_by_name = $updated_by_name;
return $this;
}
public function __set(string $name, $value)
{
if (strpos($name, 'custom.') === 0) {
@trigger_error('Setting a custom field using the $object->$fieldName syntax is deprecated since version 0.8. Use the setCustomField() method instead.', E_USER_DEPRECATED);
$this->custom[substr($name, 7)] = $value;
} else {
$this->$name = $value;
}
}
}
|
package com.example.apahlavan1.top10downloader;
import android.app.Application;
import android.test.ApplicationTestCase;
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
}
|
#ifndef BLOWFISH_H
#define BLOWFISH_H
// ** NOTICE **
// The following resources are required by this module (or submodules):
#define BLOWFISHDATA 21000
// Since this is a reusable class, we don't have access to a resource file.
// 1) Make sure that the above defines are "rolled into" your project's
// resource file. Select "Resource Set Includes" on the View menu and add
// this header file to the "Read-only symbol directives" listbox.
// 2) Make sure your project includes the associated resources in its
// resource file.
// Also...
// BLOWFISHDATA BINARY MOVEABLE PURE "<path>Blowfish\\BLOWFISH.DAT"
// This line should be added to the project's resource file, in a
// custom section called "BINARY" (or you can cut and paste the item
// using the resource viewer, and then edit the path in its properties.)
// Or just import a resource, use BINARY type, and browse for the file, then
// rename the resource from IDR_... to BLOWFISHDATA.
// We want to exclude the remainder of the include file when dealing with App Studio.
#ifndef RC_INVOKED
#include "..\..\StandardTypes.h" // For uHuge type
// Max key size for algorithms is 56 bytes/448 bits.
const short MAXKEYBYTES = 56;
// N represents the number of iterations through F()
// for each encrypted block. 16 is extremely secure.
const short N = 16;
typedef struct {
unsigned long P[N + 2];
unsigned long S[4][256];
} BLOWFISH_SUBKEYS;
class BlowFish {
protected:
BLOWFISH_SUBKEYS SubKeys;
inline unsigned long F(unsigned long x);
inline void Encipher(
unsigned long *xl,
unsigned long *xr
);
inline void Decipher(
unsigned long *xl,
unsigned long *xr
);
public:
BlowFish()
:
// Init vars.
bInitialized( false )
{}
~BlowFish() {}
// Make sure that key is UNSIGNED!
bool InitializeSubKeys(
unsigned char* pszKey,
unsigned int nKeyLen
);
bool bInitialized;
bool Encrypt(
void* pBuffer,
int nBufferLength
);
bool Decrypt(
void* pBuffer,
int nBufferLength
);
bool StreamEncrypt(
void* pBuffer,
int nBufferLength
);
bool StreamDecrypt(
void* pBuffer,
int nBufferLength
);
};
#endif // RC_INVOKED
#endif // BLOWFISH
|
# Agenda
_A monthly event manager_
Check out the [DEMO](http://danielemeli.com/agenda)
## Setup
The project is already compiled in the /dist folder. By the way, it you want to compile it by yourself, here is the 3 steps.
- Install [Node.js](https:
- In the root folder run `npm i` then `gulp build`
- Run a php server and go into the dist folder with your browser
## Dependencies
Agenda is based on [Vue.js](https:
## Notes
- Written in HTML5, SASS, ES6 and compiled using gulp. Use `gulp watch` to development purpose. Use `gulp build` to compile for prod.
- The calendar moves automatically to the current month and the single day view automatically move to the current hour
|
import pymongo
def connect ():
'''
Create the connection to the MongoDB and create 3 collections needed
'''
try:
# Create the connection to the local host
conn = pymongo.MongoClient()
print 'MongoDB Connection Successful'
except pymongo.errors.ConnectionFailure, err:
print 'MongoDB Connection Unsuccessful'
return False
# This is the name of the database -'GtownTwitter'
db = conn['GtownTwitter_PROD']
return db
|
/* Customized CSS for jQuery UI: simple info button and box. */
.ui-widget-content
{
font-family: Verdana,Arial,sans-serif;
font-size:11px;
}
/* trim space around info button */
.ui-button-text-only .ui-button-text
{ padding: 0px; }
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default
{ border: 0px solid #000000; }
/* changing dialog close button */
.<API key>
{
outline-width: 0px !important;
background-color: transparent !important;
background-image: url('images/icon-close-16.png') !important;
background-repeat:no-repeat !important;
}
/* changing dialog close button */
.<API key>:hover,
.<API key>:focus
{
background-color: transparent !important;
background-image: url('images/icon-close-16.png') !important;
background-repeat:no-repeat !important;
}
/* hide the default "x" close image */
.<API key> span
{ display:none !important; }
/* translucent background */
.ui-dialog
{
opacity: .90;
width:600px;
}
|
<div class="commune_descr limited">
<p>
Bettainvillers est
un village
situé dans le département de Meurthe-et-Moselle en Lorraine. Elle totalisait 194 habitants en 2008.</p>
<p>Si vous pensez venir habiter à Bettainvillers, vous pourrez aisément trouver une maison à acheter. </p>
<p>Le nombre de logements, à Bettainvillers, était réparti en 2011 en dix appartements et 101 maisons soit
un marché plutôt équilibré.</p>
<p>À coté de Bettainvillers sont localisées les villes de
<a href="{{VLROOT}}/immobilier/<API key>/">Mont-Bonvillers</a> située à 5 km, 960 habitants,
<a href="{{VLROOT}}/immobilier/anderny_54015/">Anderny</a> localisée à 2 km, 303 habitants,
<a href="{{VLROOT}}/immobilier/avril_54036/">Avril</a> à 4 km, 764 habitants,
<a href="{{VLROOT}}/immobilier/sancy_54491/">Sancy</a> située à 5 km, 345 habitants,
<a href="{{VLROOT}}/immobilier/mancieulles_54342/">Mancieulles</a> localisée à 2 km, 1 546 habitants,
<a href="{{VLROOT}}/immobilier/tucquegnieux_54536/">Tucquegnieux</a> localisée à 1 km, 2 649 habitants,
entre autres. De plus, Bettainvillers est située à seulement 28 km de <a href="{{VLROOT}}/immobilier/metz_57463/">Metz</a>.</p>
</div>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.