code
stringlengths 3
1.05M
| repo_name
stringlengths 4
116
| path
stringlengths 3
942
| language
stringclasses 30
values | license
stringclasses 15
values | size
int32 3
1.05M
|
|---|---|---|---|---|---|
# dialer
A simple firebase.io reminder web app.
|
felixcriv/dialer
|
README.md
|
Markdown
|
mit
| 48
|
<!doctype html>
<!--
Minimal Mistakes Jekyll Theme 4.5.0 by Michael Rose
Copyright 2017 Michael Rose - mademistakes.com | @mmistakes
Free for personal and commercial use under the MIT license
https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE.txt
-->
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<!-- begin SEO -->
<title>Geospatial - carlvlew.is</title>
<meta name="description" content="">
<meta name="author" content="Carl V. Lewis">
<meta property="og:locale" content="en">
<meta property="og:site_name" content="carlvlew.is">
<meta property="og:title" content="geospatial">
<link rel="canonical" href="http://localhost:4000/tag/geospatial/">
<meta property="og:url" content="http://localhost:4000/tag/geospatial/">
<meta name="twitter:site" content="@carlvlewis">
<meta name="twitter:title" content="geospatial">
<meta name="twitter:description" content="">
<meta name="twitter:url" content="http://localhost:4000/tag/geospatial/">
<meta name="twitter:card" content="summary">
<meta name="twitter:creator" content="@Carl V. Lewis">
<script type="application/ld+json">
{
"@context" : "http://schema.org",
"@type" : "Person",
"name" : "@carlvlewis",
"url" : "http://localhost:4000",
"sameAs" : null
}
</script>
<!-- end SEO -->
<link href="http://localhost:4000/feed.xml" type="application/atom+xml" rel="alternate" title="carlvlew.is Feed">
<!-- http://t.co/dKP3o1e -->
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script>
document.documentElement.className = document.documentElement.className.replace(/\bno-js\b/g, '') + ' js ';
</script>
<!-- For all browsers -->
<link rel="stylesheet" href="http://localhost:4000/assets/css/main.css">
<!--[if lte IE 9]>
<style>
/* old IE unsupported flexbox fixes */
.greedy-nav .site-title {
padding-right: 3em;
}
.greedy-nav button {
position: absolute;
top: 0;
right: 0;
height: 100%;
}
</style>
<![endif]-->
<meta http-equiv="cleartype" content="on">
<!-- start custom head snippets -->
<link rel="stylesheet" type="text/css" href="https://cloud.typography.com/7917556/6301972/css/fonts.css" />
<!-- Global Site Tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-102583563-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments)};
gtag('js', new Date());
gtag('config', 'UA-102583563-1');
</script>
<!-- insert favicons. use http://realfavicongenerator.net/ -->
<!-- end custom head snippets -->
</head>
<body class="layout--tags">
<!--[if lt IE 9]>
<div class="notice--danger align-center" style="margin: 0;">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</div>
<![endif]-->
<div class="masthead">
<div class="masthead__inner-wrap">
<div class="masthead__menu">
<nav id="site-nav" class="greedy-nav">
<a class="site-title" href="http://localhost:4000/">carlvlew.is</a>
<ul class="visible-links">
<li class="masthead__menu-item"><a href="http://localhost:4000/about/">About</a></li>
<li class="masthead__menu-item"><a href="http://localhost:4000/reporting/">News Writing</a></li>
<li class="masthead__menu-item"><a href="http://localhost:4000/portfolio/">Portfolio</a></li>
<li class="masthead__menu-item"><a href="http://localhost:4000/testimonials/">Testimonials</a></li>
<li class="masthead__menu-item"><a href="http://localhost:4000/resources/">Resources</a></li>
<li class="masthead__menu-item"><a href="http://localhost:4000/research/">Research</a></li>
<li class="masthead__menu-item"><a href="http://cv.carlvlewis.net">CV</a></li>
<li class="masthead__menu-item"><a href="http://localhost:4000/other-projects/">Other Projects</a></li>
</ul>
<button><div class="navicon"></div></button>
<ul class="hidden-links hidden"></ul>
</nav>
</div>
</div>
</div>
<div id="main" role="main">
<div class="sidebar sticky">
<div itemscope itemtype="http://schema.org/Person">
<div class="author__avatar">
<img src="http://cvlassets.s3.amazonaws.com/1697569.jpg" alt="Carl V. Lewis" itemprop="image">
</div>
<div class="author__content">
<h3 class="author__name" itemprop="name">Carl V. Lewis</h3>
<p class="author__bio" itemprop="description">
data visualization, civic-tech, digital humanities, media futurism.
</p>
</div>
<div class="author__urls-wrapper">
<button class="btn btn--inverse">Follow</button>
<ul class="author__urls social-icons">
<li itemprop="homeLocation" itemscope itemtype="http://schema.org/Place">
<i class="fa fa-fw fa-map-marker" aria-hidden="true"></i> <span itemprop="name">38.627003, -90.1999</span>
</li>
<li>
<a href="mailto:hello@carlvlew.is">
<meta itemprop="email" content="hello@carlvlew.is" />
<i class="fa fa-fw fa-envelope-square" aria-hidden="true"></i> Email
</a>
</li>
<li>
<a href="https://keybase.io/carlvlewis" itemprop="sameAs">
<i class="fa fa-fw fa-key" aria-hidden="true"></i> Keybase
</a>
</li>
<li>
<a href="https://github.com/carlvlewis" itemprop="sameAs">
<i class="fa fa-fw fa-github" aria-hidden="true"></i> GitHub
</a>
</li>
<li>
<a href="https://twitter.com/carlvlewis" itemprop="sameAs">
<i class="fa fa-fw fa-twitter-square" aria-hidden="true"></i> Twitter
</a>
</li>
<li>
<a href="https://plus.google.com/+carlvlewis" itemprop="sameAs">
<i class="fa fa-fw fa-google-plus-square" aria-hidden="true"></i> Google+
</a>
</li>
<li>
<a href="https://www.linkedin.com/in/carlvlewis" itemprop="sameAs">
<i class="fa fa-fw fa-linkedin-square" aria-hidden="true"></i> LinkedIn
</a>
</li>
<li>
<a href="https://quora.com/profile/carl-v-lewis-1" itemprop="sameAs">
<i class="fa fa-fw fa-quora" aria-hidden="true"></i> Quora
</a>
</li>
<li>
<a href="https://opendata.stackexchange.com/users/14970/carl-v-lewis" itemprop="sameAs">
<i class="fa fa-fw fa-stack-exchange" aria-hidden="true"></i> StackExchange
</a>
</li>
<li>
<a href="https://www.codepen.io/carlvlewis" itemprop="sameAs">
<i class="fa fa-fw fa-codepen" aria-hidden="true"></i> Codepen
</a>
</li>
<li>
<a href="https://instagram.com/carlvlewis" itemprop="sameAs">
<i class="fa fa-fw fa-instagram" aria-hidden="true"></i> Instagram
</a>
</li>
<li>
<a href="https://www.pinterest.com/carlvlewis" itemprop="sameAs">
<i class="fa fa-fw fa-pinterest" aria-hidden="true"></i> Pinterest
</a>
</li>
<li>
<a href="https://bl.ocks.org/carlvlewis" itemprop="sameAs">
<i class="fa fa-fw fa-cubes" aria-hidden="true"></i> Bl.ocks
</a></li>
<li>
<a href="https://meetup.com/opensavannah" itemprop="sameAs">
<i class="fa fa-fw fa-meetup" aria-hidden="true"></i> Meetup
</a></li>
<li>
<a href="https://slideshare.com/opensavannah" itemprop="sameAs">
<i class="fa fa-fw fa-slideshare" aria-hidden="true"></i> Slideshare
</a></li>
<li>
<a href="https://medium.com/@carlvlewis" itemprop="sameAs">
<i class="fa fa-fw fa-medium" aria-hidden="true"></i> Medium
</a></li>
</ul>
</div>
</div>
</div>
<div class="archive">
<h1 class="page__title">geospatial</h1>
<h3 class="archive__subtitle">Recent Posts</h3>
<div class="list__item">
<article class="archive__item" itemscope itemtype="http://schema.org/CreativeWork">
<h2 class="archive__item-title" itemprop="headline">
<a href="http://localhost:4000/using-cartodb-2-0-geocode-private-prisons-comparison-state-state-incarceration-rates/" rel="permalink">Using CartoDB to visualize the relationship between private prisons and incarceration rates
</a>
</h2>
<p class="page__meta">
<span><i class="fa fa-clock-o" aria-hidden="true"></i>
7 minute read
</span>,
Posted on
<span>April 17, 2017</span>,
by <span>Carl V. Lewis</span>
</p>
<p class="archive__item-excerpt" itemprop="description">
The last post I wrote about CartoDB used the CartoDB API and Leaflet.js to produce a hover tooltip map of census data. Looking back, while it’s quite useful to learn CartoDB’s API, it’s now possible to achieve those same visual cues and interactivity without spending time wading through complex, undocumented JavaScript.
</p>
</article>
</div>
</div>
</div>
<div class="page__footer">
<footer>
<!-- start custom footer snippets -->
<!-- end custom footer snippets -->
<div class="page__footer-follow">
<ul class="social-icons">
<li><strong>Follow:</strong></li>
<li><a href="https://twitter.com/carlvlewis"><i class="fa fa-fw fa-twitter-square" aria-hidden="true"></i> Twitter</a></li>
<li><a href="http://github.com/carlvlewis"><i class="fa fa-fw fa-github" aria-hidden="true"></i> GitHub</a></li>
<li><a href="http://localhost:4000/feed.xml"><i class="fa fa-fw fa-rss-square" aria-hidden="true"></i> Feed</a></li>
</ul>
</div>
<div class="page__footer-copyright">© 2019 @carlvlewis. Powered by <a href="http://jekyllrb.com" rel="nofollow">Jekyll</a> & <a href="https://mademistakes.com/work/minimal-mistakes-jekyll-theme/" rel="nofollow">Minimal Mistakes</a>.</div>
</footer>
</div>
<script src="http://localhost:4000/assets/js/main.min.js"></script>
</body>
</html>
|
carlvlewis/carlvlewis.github.io
|
_site/tag/geospatial/index.html
|
HTML
|
mit
| 11,436
|
const { validateLocaleId } = require("..");
describe("validateLocaleId", () => {
it("validateLocaleId", () => {
validateLocaleId("en").should.eql(true);
validateLocaleId(null).should.eql(true);
});
});
|
node-opcua/node-opcua
|
packages/node-opcua-basic-types/test/test_locale_id.js
|
JavaScript
|
mit
| 227
|
---
layout: podcast
title: Episode 33
number: 33
subtitle:
summary:
date: 1999-12-31
location: https://dl.dropboxusercontent.com/s/lsuri9lcdmwirzj/watir_podcast_33.mp3?dl=0
size: 34,596,698
duration: 1:12:04
---
|
watir/watir.github.io
|
_podcasts/33.md
|
Markdown
|
mit
| 215
|
.row {
width: 100%;
}
.project {
width: 100%;
overflow: auto;
float: left;
border: 2px solid grey;
background: rgba(250,250,250,0.9);
margin: 2px;
}
.caption {
padding: 10px;
}
.project .thumbnail {
max-height: 300px;
overflow: hidden;
}
.project .thumbnail img {
width: 100%;
}
a[role="button"] {
border: 1px solid grey;
padding: 2px;
}
@media all and (min-width: 600px) {
.project {
width: 45%;
}
}
@media all and (min-width: 1024px) {
.project {
width: 300px;
height: 450px;
}
}
|
vietanhdev/beNice17
|
assets/stylesheets/project-page.css
|
CSS
|
mit
| 573
|
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Lucca Front</title>
<link rel="icon" type="image/png" href="lucca.png">
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,600,700" rel="stylesheet">
<link rel="stylesheet" href="./lucca-front.css">
<link rel="stylesheet" href="./demo.css">
</head>
<body class="demo-body">
<aside class="demo-nav" w3-include-html="includes/demo-menu.html"></aside>
<section class="container mod-demo" w3-include-html="includes/demo-main-content.html"></section>
<script src="https://www.w3schools.com/lib/w3.js"></script>
<script src="demo.js"></script>
<script>w3.includeHTML(afterIncludeHTML);</script>
</body>
</html>
|
LuccaSA/lucca-front
|
to-migrate/scss/index.html
|
HTML
|
mit
| 803
|
# Ruby/Rails Dev Environment (gewo/ruby)
FROM gewo/ruby-dependencies
MAINTAINER Gebhard Wöstemeyer <g.woestemeyer@gmail.com>
ENV APP_RUBY_VERSION 2.2.3
RUN rvm install ruby-${APP_RUBY_VERSION} --default
CMD ["/bin/bash"]
|
gewo/living-in-a-box
|
docker_images/ruby-2.2.3/Dockerfile
|
Dockerfile
|
mit
| 223
|
var Q = require('q');
/*
**
@param [object | array] object: is the object that needs to be iterated, can be an Object or an array
@param [integer] index: is the index of argument obtained from the object element and to be added to asyncFunc arguments, starting from 1
@param [function] asyncFunc: is the asynchronous function that needs to be called at every iteration.
**
*/
var iterate = function(object, index, asyncFunc /* 1...n args */){
var item = null;
var args = Array.prototype.slice.call(arguments, 3);
if(Object.prototype.toString.call(object) === "[object Array]"){
asyncIterateArray(object, 0, asyncFunc, args, index);
}else if(Object.prototype.toString.call(object) === "[object Object]"){
asyncIterateObjectKeys(object, 0, asyncFunc, args, index);
}
}
function asyncIterateObjectKeys(object, i, func, args, index){
var keys = Object.keys(object);
if( i < keys.length){
var tmpargs = args.slice();
tmpargs.splice(index - 1, 0, object[keys[i]]);
Q.fcall(asyncRun, func, tmpargs)
.then(function() {
asyncIterateObjectKeys(object, i = i+ 1, func, args, index);
})
.catch(function(err){
console.log(err);
});
}
}
function asyncIterateArray(object, i, func, args, index){
if(i < object.length){
var tmpargs = args.slice();
tmpargs.splice(index - 1, 0, object[i]);
Q.fcall(asyncRun, func, tmpargs)
.then(function() {
asyncIterateArray(object, i = i+ 1, func, args, index);
})
.catch(function(err){
console.log(err);
});
}
}
function asyncRun(asyncFunc, args){
var def = Q.defer();
Q.fcall(function(){
return asyncFunc.apply(this, args)
})
.then(function(ret){
def.resolve(ret);
})
.catch(function(err){
def.reject(err);
});
return def.promise;
}
module.exports = iterate;
|
m-arch/for-async
|
index.js
|
JavaScript
|
mit
| 1,825
|
package name.reidmiller.iesoreports.client;
import java.io.IOException;
import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import ca.ieso.reports.schema.nislshadowprices.DocBody;
import ca.ieso.reports.schema.nislshadowprices.DocHeader;
import ca.ieso.reports.schema.nislshadowprices.Document;
public class NetInterchangeSchedulingLimitClient extends DailyReportClient {
private Logger logger = LogManager.getLogger(this.getClass());
public NetInterchangeSchedulingLimitClient(String defaultUrlString, String jaxb2ContextPath) {
super.setDefaultUrlString(defaultUrlString);
super.setJaxb2ContextPath(jaxb2ContextPath);
}
/**
* Unmarshals XML text from {@link #getDefaultUrlString()} into a
* {@link Document} using JAXB2. This method is a wrapper around
* {@link #getDocument(String)}.
*
* @return {@link Document}
* @throws MalformedURLException
* @throws IOException
*
*/
public Document getDefaultDocument() throws MalformedURLException,
IOException, ClassCastException {
return this.getDocument(super.getDefaultUrlString());
}
/**
* This method uses {@link #getDefaultUrlString()} to request the current
* (default) {@link DocBody}.
*
* @return {@link DocBody} for the current (default) report.
* @throws MalformedURLException
*
* @throws IOException
*/
public DocBody getDefaultDocBody() throws MalformedURLException,
IOException {
Document document = this.getDefaultDocument();
return this.getDocBody(document);
}
/**
* This method uses {@link #getDefaultUrlString()} to request the current
* (default) {@link DocHeader}.
*
* @return {@link DocHeader} for the current (default) report.
* @throws MalformedURLException
* @throws IOException
*/
public DocHeader getDefaultDocHeader() throws MalformedURLException,
IOException {
Document document = this.getDefaultDocument();
return this.getDocHeader(document);
}
/**
* Returns only the {@link DocBody} portion of the {@link Document}.
*
* @param document
* {@link Document} comprised of two parts: {@link DocHeader} and
* {@link DocBody}.
* @return {@link DocBody}
*/
public DocBody getDocBody(Document document) {
List<Object> docHeaderAndDocBody = document.getDocHeaderAndDocBody();
return super.getDocPart(docHeaderAndDocBody, DocBody.class);
}
/**
* Get a {@link DocBody} for a date in past.
*
* @param historyDate
* Date in the past that a report is being requested for.
* @return Returns the {@link DocBody} of a past report.
* @throws MalformedURLException
* @throws IOException
*/
public DocBody getDocBodyForDate(Date historyDate)
throws MalformedURLException, IOException {
Document document = super.getDocumentForDate(historyDate,
Document.class);
return this.getDocBody(document);
}
/**
* Makes a request for each Date in the provided range (inclusive) building
* out a {@link List} of {@link DocBody} objects.
*
* @param startDate
* Start point (inclusive) of the date range (ie. date furthest
* in the past).
* @param endDate
* End point (inclusive) of the date range (ie. date closest to
* present).
* @return If the startDate is in the future, a one-item {@link List} of
* {@link DocBody} Objects will be returned. If endDate is in the
* future the {@link List} will stop at the current (default)
* report.
* @throws MalformedURLException
* @throws IOException
*/
public List<DocBody> getDocBodiesInDateRange(Date startDate, Date endDate)
throws MalformedURLException, IOException {
List<DocBody> docBodies = new ArrayList<DocBody>();
List<Document> documents = super.getDocumentsInDateRange(startDate,
endDate, Document.class);
for (Document document : documents) {
docBodies.add(this.getDocBody(document));
}
return docBodies;
}
/**
* Returns only the {@link DocHeader} portion of the {@link Document}.
*
* @param document
* {@link Document} comprised of two parts: {@link DocHeader} and
* {@link DocBody}.
*
* @return {@link DocHeader}
*/
public DocHeader getDocHeader(Document document) {
List<Object> docHeaderAndDocBody = document.getDocHeaderAndDocBody();
return super.getDocPart(docHeaderAndDocBody, DocHeader.class);
}
/**
* Get a {@link DocHeader} for a date in past.
*
* @param historyDate
* Date in the past that a report header is being requested for.
* @return Returns the {@link DocHeader} of a past report.
* @throws MalformedURLException
*
* @throws IOException
*/
public DocHeader getDocHeaderForDate(Date historyDate)
throws MalformedURLException, IOException {
Document document = super.getDocumentForDate(historyDate,
Document.class);
return this.getDocHeader(document);
}
/**
* Makes a request for each Date in the provided range (inclusive) building
* out a {@link List} of {@link DocHeader} Objects.
*
* @param startDate
* Start point (inclusive) of the date range (ie. date furthest
* in the past).
* @param endDate
* End point (inclusive) of the date range (ie. date closest to
* present).
* @return If the startDate is in the future, a one-item {@link List} of
* {@link DocHeader} Objects will be returned. If endDate is in the
* future the {@link List} will stop at the current (default)
* report.
* @throws MalformedURLException
* @throws IOException
*/
public List<DocHeader> getDocHeadersInDateRange(Date startDate, Date endDate)
throws MalformedURLException, IOException {
List<DocHeader> docHeaders = new ArrayList<DocHeader>();
List<Document> documents = super.getDocumentsInDateRange(startDate,
endDate, Document.class);
for (Document document : documents) {
docHeaders.add(this.getDocHeader(document));
}
return docHeaders;
}
/**
* Unmarshals XML text into a {@link Document} using JAXB2, into the package
* name specified by {@link #getJaxb2ContextPath()}.
*
* @param urlString
* The URL that will be unmarshalled into a {@link Document}.
* @return {@link Document}
* @throws MalformedURLException
* @throws IOException
*
*/
private Document getDocument(String urlString)
throws MalformedURLException, IOException {
return super.getDocument(urlString, Document.class);
}
}
|
r24mille/IesoPublicReportBindings
|
src/main/java/name/reidmiller/iesoreports/client/NetInterchangeSchedulingLimitClient.java
|
Java
|
mit
| 6,803
|
# -*- encoding: utf-8 -*-
# The MIT License (MIT)
#
# Copyright (c) 2014-2015 Haltu Oy, http://haltu.fi
#
# 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.
import csv
import codecs
from optparse import make_option
from collections import OrderedDict
from django.core.management.base import BaseCommand, CommandError
from django.db import IntegrityError
from django.core.exceptions import ObjectDoesNotExist
from authdata.models import User, Role, Attribute, UserAttribute, Municipality, School, Attendance, Source
class Command(BaseCommand):
help = """Imports data from CSV file to the database.
Do not put any header to the CSV file. Only provide data separated by commas and quoted with \".
You need to provide at least two arguments: the name of the input file and list of attributes for the User.
For example: manage.py csv_import file.csv dreamschool,facebook,twitter,linkedin,mepin
"""
args = '<csvfile> <attr1,attr2...>'
option_list = BaseCommand.option_list + (
make_option('--source',
action='store',
dest='source',
default='manual',
help='Source value for this run'),
make_option('--municipality',
action='store',
dest='municipality',
default='-',
help='Source value for this run'),
make_option('--run',
action='store_true',
dest='really_do_this',
default=False,
help='Really run the command'),
make_option('--verbose',
action='store_true',
dest='verbose',
default=False,
help='Verbose'),
)
def handle(self, *args, **options):
if len(args) != 2:
raise CommandError('Wrong parameters, try reading --help')
self.verbose = options['verbose']
self.municipality = options['municipality']
# Create needed Attribute objects to the database
# These are the attributes which can be used to query for User objects in the API
# attribute names are defined in the commandline as the second parameter
# for example: manage.py csv_import file.csv dreamschool,facebook,twitter,linkedin,mepin
self.attribute_names = OrderedDict()
for key in args[1].split(','):
self.attribute_names[key], _ = Attribute.objects.get_or_create(name=key)
self.source, _ = Source.objects.get_or_create(name=options['source'])
# If you need more roles, add them here
self.role_names = OrderedDict()
for r in ['teacher', 'student']:
self.role_names[r], _ = Role.objects.get_or_create(name=r)
csv_data = csv.reader(codecs.open(args[0], 'rb'), delimiter=',', quotechar='"')
for r in csv_data:
# These are the fixed fields for the User. These are returned from the API.
data = {
'username': r[0], # OID
'school': r[1], # School
'group': r[2], # Class
'role': r[3], # Role
'first_name': r[4], # First name
'last_name': r[5], # Last name
}
# This is not mandatory, but it would be nice. Can be changed to error by terminating the script here.
if data['role'] not in self.role_names.keys():
print 'WARNING, role not in:', repr(self.role_names.keys())
attributes = {}
i = 6 # Next csv_data row index is 6 :)
for a in self.attribute_names:
attributes[a] = r[i]
i = i + 1
try:
if self.verbose:
print repr(data)
print repr(attributes)
if options['really_do_this']:
self.really_do_this(data.copy(), attributes.copy())
except IntegrityError, e:
print "ERR IE", e
print repr(data)
print repr(attributes)
except ObjectDoesNotExist, e:
print "ERR ODN", e
print repr(data)
print repr(attributes)
def really_do_this(self, d, a):
# Create User
# User is identified from username and other fields are updated
user, _ = User.objects.get_or_create(username=d['username'])
user.first_name = d['first_name']
user.last_name = d['last_name']
user.save()
# Assign attributes for User
# There can be multiple attributes with the same name and different value.
# This is one of the reasons we have the source parameter to tell where the data came from.
for k, v in a.iteritems():
UserAttribute.objects.get_or_create(user=user, attribute=self.attribute_names[k], value=v, source=self.source)
# Create Municipality
# If you leave this empty on the CLI it will default to '-'
municipality, _ = Municipality.objects.get_or_create(name=self.municipality)
# Create School
# School data is not updated after it is created. Data can be then changed in the admin.
school, _ = School.objects.get_or_create(school_id=d['school'], defaults={'municipality': municipality, 'name': d['school']})
# Create Attendance object for User. There can be more than one Attendance per User.
Attendance.objects.get_or_create(user=user, school=school, role=self.role_names[d['role']], group=d['group'], source=self.source)
# vim: tabstop=2 expandtab shiftwidth=2 softtabstop=2
|
educloudalliance/eca-auth-data
|
authdata/management/commands/csv_import.py
|
Python
|
mit
| 6,066
|
/*
* Author: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
* Copyright (c) 2014 Intel Corporation.
* Copyright (c) 2015 Linaro Limited.
*
* Copied from src/arm/banana.c
*
* 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.
*/
#include <mraa/common.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#include "arm/96boards.h"
#include "common.h"
#define DT_BASE "/proc/device-tree"
#define PLATFORM_NAME_BBGUM "BBGUM"
#define PLATFORM_NAME_DB410C "DB410C"
#define PLATFORM_NAME_DB820C "DB820C"
#define PLATFORM_NAME_HIKEY "HIKEY"
#define PLATFORM_NAME_HIKEY960 "HIKEY960"
#define PLATFORM_NAME_ROCK960 "ROCK960"
#define PLATFORM_NAME_ULTRA96 "ULTRA96"
#define MAX_SIZE 64
#define MMAP_PATH "/dev/mem"
#define DB410C_MMAP_REG 0x01000000
// Bubblegum-96
int bbgum_ls_gpio_pins[MRAA_96BOARDS_LS_GPIO_COUNT] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 155, 154 };
const char* bbgum_serialdev[MRAA_96BOARDS_LS_UART_COUNT] = { "/dev/ttyS3", "/dev/ttyS5" };
// Dragonboard410c
int db410c_ls_gpio_pins[MRAA_96BOARDS_LS_GPIO_COUNT] = {
36, 12, 13, 69, 115, 4, 24, 25, 35, 34, 28, 33,
};
int db410c_chardev_map[MRAA_96BOARDS_LS_GPIO_COUNT][2] = {
{ 0, 36 }, { 0, 12 }, { 0, 13 }, { 0, 69 }, { 0, 115 }, { 2, 3 },
{ 0, 24 }, { 0, 25 }, { 0, 35 }, { 0, 34 }, { 0, 28 }, { 0, 33 },
};
const char* db410c_serialdev[MRAA_96BOARDS_LS_UART_COUNT] = { "/dev/ttyMSM0", "/dev/ttyMSM1" };
const char* db410c_led[MRAA_96BOARDS_LED_COUNT] = { "user1", "user2", "user3",
"user4", "bt", "wlan" };
// Dragonboard820c
int db820c_ls_gpio_pins[MRAA_96BOARDS_LS_GPIO_COUNT] = {
80, 29, 124, 24, 62, 507, 10, 8, 25, 26, 23, 133,
};
int db820c_chardev_map[MRAA_96BOARDS_LS_GPIO_COUNT][2] = {
{ 0, 80 }, { 0, 29 }, { 0, 125 }, { 0, 24 }, { 0, 62 }, { 1, 4 },
{ 0, 10 }, { 0, 8 }, { 0, 25 }, { 0, 26 }, { 0, 23 }, { 0, 133 },
};
const char* db820c_serialdev[MRAA_96BOARDS_LS_UART_COUNT] = { "/dev/ttyMSM0", "/dev/ttyMSM1" };
// HiKey
int hikey_ls_gpio_pins[MRAA_96BOARDS_LS_GPIO_COUNT] = {
488, 489, 490, 491, 492, 415, 463, 495, 426, 433, 427, 434,
};
int hikey_chardev_map[MRAA_96BOARDS_LS_GPIO_COUNT][2] = {
{ 2, 0 }, { 2, 1 }, { 2, 2 }, { 2, 3 }, { 2, 4 }, { 12, 7 },
{ 6, 7 }, { 2, 7 }, { 10, 2 }, { 9, 1 }, { 10, 3 }, { 9, 2 },
};
const char* hikey_serialdev[MRAA_96BOARDS_LS_UART_COUNT] = { "/dev/ttyAMA2", "/dev/ttyAMA3" };
// HiKey960
int hikey960_chardev_map[MRAA_96BOARDS_LS_GPIO_COUNT][2] = {
{ 26, 0 }, { 26, 1 }, { 26, 2 }, { 26, 3 }, { 26, 4 }, { 22, 6 },
{ 2, 7 }, { 5, 0 }, { 6, 4 }, { 2, 3 }, { 9, 3 }, { 2, 5 },
};
const char* hikey960_serialdev[MRAA_96BOARDS_LS_UART_COUNT] = { "/dev/ttyAMA3", "/dev/ttyAMA6" };
// Rock960
int rock960_ls_gpio_pins[MRAA_96BOARDS_LS_GPIO_COUNT] = { 1006, 1002, 1041, 1042, 1121, 1128,
1124, 1131, 1125, 1132, 1050, 1055 };
const char* rock960_serialdev[MRAA_96BOARDS_LS_UART_COUNT] = { "/dev/ttyS3", "/dev/ttyS4" };
// Ultra96
int ultra96_chardev_map[MRAA_96BOARDS_LS_GPIO_COUNT][2] = {
{ 0, 36 }, { 0, 37 }, { 0, 39 }, { 0, 40 }, { 0, 44 }, { 0, 45 },
{ 0, 78 }, { 0, 79 }, { 0, 80 }, { 0, 81 }, { 0, 82 }, { 0, 83 },
};
const char* ultra96_serialdev[MRAA_96BOARDS_LS_UART_COUNT] = { "/dev/ttyPS0", "/dev/ttyS0" };
// MMAP
static uint8_t* mmap_reg = NULL;
static int mmap_fd = 0;
static int mmap_size = 0x00120004;
static unsigned int mmap_count = 0;
void
mraa_96boards_pininfo(mraa_board_t* board, int index, int sysfs_pin, int is_gpio, char* fmt, ...)
{
va_list arg_ptr;
if (index > board->phy_pin_count)
return;
mraa_pininfo_t* pininfo = &board->pins[index];
va_start(arg_ptr, fmt);
vsnprintf(pininfo->name, MRAA_PIN_NAME_SIZE, fmt, arg_ptr);
if (is_gpio) {
// skip the read argument
va_arg(arg_ptr, int);
pininfo->gpio.gpio_chip = va_arg(arg_ptr, int);
pininfo->gpio.gpio_line = va_arg(arg_ptr, int);
pininfo->capabilities = (mraa_pincapabilities_t){ 1, 1, 0, 0, 0, 0, 0, 0 };
} else {
pininfo->capabilities = (mraa_pincapabilities_t){ 0, 0, 0, 0, 0, 0, 0, 0 };
}
va_end(arg_ptr);
pininfo->gpio.pinmap = sysfs_pin;
pininfo->gpio.mux_total = 0;
}
static mraa_result_t
mraa_db410c_mmap_unsetup()
{
if (mmap_reg == NULL) {
syslog(LOG_WARNING, "db410c mmap: null register nothing to unsetup");
return MRAA_ERROR_INVALID_RESOURCE;
}
munmap(mmap_reg, mmap_size);
mmap_reg = NULL;
close(mmap_fd);
return MRAA_SUCCESS;
}
mraa_result_t
mraa_db410c_mmap_write(mraa_gpio_context dev, int value)
{
uint32_t offset = (0x1000 * dev->pin);
if (value) {
*(volatile uint32_t*) (mmap_reg + offset + 0x04) |= (uint32_t)(1 << 1);
} else {
*(volatile uint32_t*) (mmap_reg + offset + 0x04) &= ~(uint32_t)(1 << 1);
}
return MRAA_SUCCESS;
}
int
mraa_db410c_mmap_read(mraa_gpio_context dev)
{
uint32_t value;
uint32_t offset = (0x1000 * dev->pin);
value = *(volatile uint32_t*) (mmap_reg + offset + 0x04);
if (value & (uint32_t)(1 << 0)) {
return 1;
}
return 0;
}
mraa_result_t
mraa_db410c_mmap_setup(mraa_gpio_context dev, mraa_boolean_t en)
{
if (dev == NULL) {
syslog(LOG_ERR, "db410c mmap: context not valid");
return MRAA_ERROR_INVALID_HANDLE;
}
/* disable mmap if already enabled */
if (en == 0) {
if (dev->mmap_write == NULL && dev->mmap_read == NULL) {
syslog(LOG_ERR, "db410c mmap: can't disable disabled mmap gpio");
return MRAA_ERROR_INVALID_PARAMETER;
}
dev->mmap_write = NULL;
dev->mmap_read = NULL;
mmap_count--;
if (mmap_count == 0) {
return mraa_db410c_mmap_unsetup();
}
return MRAA_SUCCESS;
}
if (dev->mmap_write != NULL && dev->mmap_read != NULL) {
syslog(LOG_ERR, "db410c mmap: can't enable enabled mmap gpio");
return MRAA_ERROR_INVALID_PARAMETER;
}
if (mmap_reg == NULL) {
if ((mmap_fd = open(MMAP_PATH, O_RDWR)) < 0) {
syslog(LOG_ERR, "db410c mmap: unable to open /dev/mem");
return MRAA_ERROR_INVALID_HANDLE;
}
mmap_reg = mmap(NULL, mmap_size, PROT_READ | PROT_WRITE, MAP_SHARED, mmap_fd, DB410C_MMAP_REG);
if (mmap_reg == MAP_FAILED) {
syslog(LOG_ERR, "db410c mmap: failed to mmap");
mmap_reg = NULL;
close(mmap_fd);
return MRAA_ERROR_NO_RESOURCES;
}
}
dev->mmap_write = &mraa_db410c_mmap_write;
dev->mmap_read = &mraa_db410c_mmap_read;
mmap_count++;
return MRAA_SUCCESS;
}
mraa_board_t*
mraa_96boards()
{
int i;
int* ls_gpio_pins = NULL;
int(*chardev_map)[MRAA_96BOARDS_LS_GPIO_COUNT][2] = NULL;
mraa_board_t* b = (mraa_board_t*) calloc(1, sizeof(mraa_board_t));
if (b == NULL) {
return NULL;
}
b->adv_func = (mraa_adv_func_t*) calloc(1, sizeof(mraa_adv_func_t));
if (b->adv_func == NULL) {
free(b);
return NULL;
}
// pin mux for buses are setup by default by kernel so tell mraa to ignore them
b->no_bus_mux = 1;
b->phy_pin_count = MRAA_96BOARDS_LS_PIN_COUNT + 1;
if (mraa_file_exist(DT_BASE "/model")) {
// We are on a modern kernel, great!!!!
if (mraa_file_contains(DT_BASE "/model", "s900")) {
b->platform_name = PLATFORM_NAME_BBGUM;
ls_gpio_pins = bbgum_ls_gpio_pins;
b->uart_dev[0].device_path = (char*) bbgum_serialdev[0];
b->uart_dev[1].device_path = (char*) bbgum_serialdev[1];
} else if (mraa_file_contains(DT_BASE "/model",
"Qualcomm Technologies, Inc. APQ 8016 SBC")) {
b->platform_name = PLATFORM_NAME_DB410C;
ls_gpio_pins = db410c_ls_gpio_pins;
chardev_map = &db410c_chardev_map;
b->uart_dev[0].device_path = (char*) db410c_serialdev[0];
b->uart_dev[1].device_path = (char*) db410c_serialdev[1];
b->led_dev[0].name = (char*) db410c_led[0];
b->led_dev[1].name = (char*) db410c_led[1];
b->led_dev[2].name = (char*) db410c_led[2];
b->led_dev[3].name = (char*) db410c_led[3];
b->led_dev[4].name = (char*) db410c_led[4];
b->led_dev[5].name = (char*) db410c_led[5];
b->led_dev_count = MRAA_96BOARDS_LED_COUNT;
b->adv_func->gpio_mmap_setup = &mraa_db410c_mmap_setup;
b->chardev_capable = 1;
} else if (mraa_file_contains(DT_BASE "/model", "Qualcomm Technologies, Inc. DB820c")) {
b->platform_name = PLATFORM_NAME_DB820C;
ls_gpio_pins = db820c_ls_gpio_pins;
chardev_map = &db820c_chardev_map;
b->uart_dev[0].device_path = (char*) db820c_serialdev[0];
b->uart_dev[1].device_path = (char*) db820c_serialdev[1];
b->chardev_capable = 1;
} else if (mraa_file_contains(DT_BASE "/model", "HiKey Development Board")) {
b->platform_name = PLATFORM_NAME_HIKEY;
ls_gpio_pins = hikey_ls_gpio_pins;
chardev_map = &hikey_chardev_map;
b->uart_dev[0].device_path = (char*) hikey_serialdev[0];
b->uart_dev[1].device_path = (char*) hikey_serialdev[1];
b->chardev_capable = 1;
} else if (mraa_file_contains(DT_BASE "/model", "HiKey960")) {
b->platform_name = PLATFORM_NAME_HIKEY960;
chardev_map = &hikey960_chardev_map;
b->uart_dev[0].device_path = (char*) hikey960_serialdev[0];
b->uart_dev[1].device_path = (char*) hikey960_serialdev[1];
b->chardev_capable = 1;
} else if (mraa_file_contains(DT_BASE "/model", "ROCK960")) {
b->platform_name = PLATFORM_NAME_ROCK960;
ls_gpio_pins = rock960_ls_gpio_pins;
b->uart_dev[0].device_path = (char*) rock960_serialdev[0];
b->uart_dev[1].device_path = (char*) rock960_serialdev[1];
} else if ((mraa_file_contains(DT_BASE "/model", "ZynqMP ZCU100 RevC")) ||
(mraa_file_contains(DT_BASE "/model", "Avnet Ultra96 Rev1"))) {
b->platform_name = PLATFORM_NAME_ULTRA96;
chardev_map = &ultra96_chardev_map;
b->uart_dev[0].device_path = (char*) ultra96_serialdev[0];
b->uart_dev[1].device_path = (char*) ultra96_serialdev[1];
b->chardev_capable = 1;
}
}
// UART
b->uart_dev_count = MRAA_96BOARDS_LS_UART_COUNT;
b->def_uart_dev = 0;
// I2C
if (strncmp(b->platform_name, PLATFORM_NAME_BBGUM, MAX_SIZE) == 0) {
b->i2c_bus_count = MRAA_96BOARDS_LS_I2C_COUNT;
b->def_i2c_bus = 0;
b->i2c_bus[0].bus_id = 1;
b->i2c_bus[1].bus_id = 2;
} else if (strncmp(b->platform_name, PLATFORM_NAME_ROCK960, MAX_SIZE) == 0) {
b->i2c_bus_count = MRAA_96BOARDS_LS_I2C_COUNT;
b->def_i2c_bus = 0;
b->i2c_bus[0].bus_id = 6;
b->i2c_bus[1].bus_id = 1;
} else if (strncmp(b->platform_name, PLATFORM_NAME_ULTRA96, MAX_SIZE) == 0) {
b->i2c_bus_count = MRAA_96BOARDS_LS_I2C_COUNT;
b->def_i2c_bus = 0;
b->i2c_bus[0].bus_id = 2;
b->i2c_bus[1].bus_id = 3;
} else {
b->i2c_bus_count = MRAA_96BOARDS_LS_I2C_COUNT;
b->def_i2c_bus = 0;
b->i2c_bus[0].bus_id = 0;
b->i2c_bus[1].bus_id = 1;
}
// SPI
b->spi_bus_count = MRAA_96BOARDS_LS_SPI_COUNT;
b->spi_bus[0].bus_id = 0;
b->def_spi_bus = 0;
b->pins = (mraa_pininfo_t*) malloc(sizeof(mraa_pininfo_t) * b->phy_pin_count);
if (b->pins == NULL) {
free(b->adv_func);
free(b);
return NULL;
}
mraa_96boards_pininfo(b, 0, -1, 0, "INVALID");
mraa_96boards_pininfo(b, 1, -1, 0, "GND");
mraa_96boards_pininfo(b, 2, -1, 0, "GND");
mraa_96boards_pininfo(b, 3, -1, 0, "UART0_CTS");
mraa_96boards_pininfo(b, 4, -1, 0, "PWR_BTN_N");
mraa_96boards_pininfo(b, 5, -1, 0, "UART0_TXD");
mraa_96boards_pininfo(b, 6, -1, 0, "RST_BTN_N");
mraa_96boards_pininfo(b, 7, -1, 0, "UART0_RXD");
mraa_96boards_pininfo(b, 8, -1, 0, "SPI0_SCLK");
mraa_96boards_pininfo(b, 9, -1, 0, "UART0_RTS");
mraa_96boards_pininfo(b, 10, -1, 0, "SPI0_DIN");
mraa_96boards_pininfo(b, 11, -1, 0, "UART1_TXD");
// On DB410c, configure the SPI0_CS pin as GPIO for enabling the
// user to control it manually without adding chip select property
// in Devicetree.
if (strncmp(b->platform_name, PLATFORM_NAME_DB410C, MAX_SIZE) == 0) {
mraa_96boards_pininfo(b, 12, 18, 1, "SPI0_CS", -1, 0, 18);
} else {
mraa_96boards_pininfo(b, 12, -1, 0, "SPI0_CS");
}
mraa_96boards_pininfo(b, 13, -1, 0, "UART1_RXD");
mraa_96boards_pininfo(b, 14, -1, 0, "SPI0_DOUT");
mraa_96boards_pininfo(b, 15, -1, 0, "I2C0_SCL");
mraa_96boards_pininfo(b, 16, -1, 0, "PCM_FS");
mraa_96boards_pininfo(b, 17, -1, 0, "I2C0_SDA");
mraa_96boards_pininfo(b, 18, -1, 0, "PCM_CLK");
mraa_96boards_pininfo(b, 19, -1, 0, "I2C1_SCL");
mraa_96boards_pininfo(b, 20, -1, 0, "PCM_DO");
mraa_96boards_pininfo(b, 21, -1, 0, "I2C1_SDA");
mraa_96boards_pininfo(b, 22, -1, 0, "PCM_DI");
// GPIOs are labelled "GPIO-A" through "GPIO-L"
for (i = 0; i < MRAA_96BOARDS_LS_GPIO_COUNT; i++) {
mraa_96boards_pininfo(b, 23 + i, ls_gpio_pins ? ls_gpio_pins[i] : -1, 1, "GPIO-%c", 'A' + i,
chardev_map ? (*chardev_map)[i][0] : -1,
chardev_map ? (*chardev_map)[i][1] : -1);
}
mraa_96boards_pininfo(b, 35, -1, 0, "1.8v");
mraa_96boards_pininfo(b, 36, -1, 0, "SYS_DCIN");
mraa_96boards_pininfo(b, 37, -1, 0, "5v");
mraa_96boards_pininfo(b, 38, -1, 0, "SYS_DCIN");
mraa_96boards_pininfo(b, 39, -1, 0, "GND");
mraa_96boards_pininfo(b, 40, -1, 0, "GND");
// On DB410c, SPI0_CS pin is used as GPIO
if (strncmp(b->platform_name, PLATFORM_NAME_DB410C, MAX_SIZE) == 0) {
b->gpio_count = MRAA_96BOARDS_LS_GPIO_COUNT + 1;
} else {
b->gpio_count = MRAA_96BOARDS_LS_GPIO_COUNT;
}
b->aio_count = 0;
b->adc_raw = 0;
b->adc_supported = 0;
return b;
}
|
KurtE/mraa
|
src/arm/96boards.c
|
C
|
mit
| 15,394
|
package br.ifcibirama.dell_pc.javaisfun;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
public class Objetos2 extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_objetos2);
setTitle("Orientação à Objetos");
}
@Override
public void onBackPressed() {
super.onBackPressed();
overridePendingTransition( R.anim.rigth_in, R.anim.rigth_out);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_go_back_red, menu);
return super.onCreateOptionsMenu(menu);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()){
case R.id.menu_go:
Intent intent = new Intent(this, Objetos3.class);
startActivity(intent);
overridePendingTransition(R.anim.left_in, R.anim.left_out);
finishAffinity();
return true;
case R.id.menu_home:
AlertDialog.Builder builder;
builder = new AlertDialog.Builder(this);
builder.setTitle("Home")
.setMessage("Você tem certeza que quer voltar ao menu principal?")
.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
Intent intent = new Intent(Objetos2.this, MainActivity.class);
startActivity(intent);
finishAffinity();
overridePendingTransition( R.anim.rigth_in, R.anim.rigth_out);
}
})
.setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
dialog.cancel();
}
})
.setIcon(R.drawable.warning)
.show();
return true;
case R.id.menu_back:
Intent intent2 = new Intent(this, Objetos.class);
startActivity(intent2);
overridePendingTransition(R.anim.rigth_in, R.anim.rigth_out);
finishAffinity();
return true;
default:
return super.onOptionsItemSelected(item);
}
}
}
|
jvbeltra/JavaIsFun
|
app/src/main/java/br/ifcibirama/dell_pc/javaisfun/Objetos2.java
|
Java
|
mit
| 2,904
|
package ru.otus.java_2017_04.golovnin.hw11.Cache;
public interface CacheEngine<K, V> {
void put(K key, V element);
V get(K key);
int getHitCount();
int getMissCount();
void dispose();
}
|
vladimir-golovnin/otus-java-2017-04-golovnin
|
hw11/src/main/java/ru/otus/java_2017_04/golovnin/hw11/Cache/CacheEngine.java
|
Java
|
mit
| 207
|
# こっちのURLで放送予定の番組情報取得できるけど視聴者数ないので使わない
# http://live.nicovideo.jp/rss
require File.expand_path('./lib/readers/channel_list_reader')
class NicoOfficialReader < ChannelListReader
def read_rows
@doc.css('#rank .active .detail')
end
def read_channel_name(row)
row.css('p a').text.slice(0, 10)
end
def read_contact_url(row)
'http://live.nicovideo.jp/' << row.css('p a')[0][:href]
end
def read_genre(row)
'【ニコ生公式】'
end
def read_detail(row)
row.css('p a').text
end
# 10分あたりの平均コメ数を返す
def read_listener_count(row)
hour, min = read_elapsed_hour_and_min(row)
elapsed_minutes = (hour.to_i * 60) + min.to_i
comment_count = row.css('.count .coment').text.gsub!(/\s|,/, '').to_i
(comment_count / (elapsed_minutes / 10)).to_i
rescue ZeroDivisionError
0
end
def read_relay_count(row)
row.css('.count .audience').text.gsub!(/\s|,/, '').to_i
end
def read_time(row)
hour, min = read_elapsed_hour_and_min(row)
sprintf('%02d', hour) + ':' + sprintf('%02d', min)
end
def read_elapsed_hour_and_min(row)
unless @hour && @min
time = row.css('.time').text
if time.include?('時間')
time = time.split('時間')
@hour = time[0]
@min = time[1].sub('分', '')
else
@hour = '00'
@min = time.sub('分', '')
end
end
return @hour, @min
end
end
|
masu-kawa/nyp
|
lib/readers/nico_official_reader.rb
|
Ruby
|
mit
| 1,554
|
FROM golang:1.6.2-alpine
RUN apk update && apk upgrade && apk add git
RUN mkdir -p /go/src/github.com/jessemillar
ADD . /go/src/github.com/jessemillar/byudzhet
WORKDIR /go/src/github.com/jessemillar/byudzhet
RUN go get -d -v
RUN go install -v
CMD ["/go/bin/byudzhet"]
EXPOSE 80
|
jessemillar/byudzhet
|
Dockerfile
|
Dockerfile
|
mit
| 283
|
'use strict';
var kraken = require('kraken-js'),
app = require('express')(),
options = require('./lib/spec')(app),
port = process.env.PORT || 8000;
app.use(kraken(options));
app.listen(port, function(err) {
console.log('[%s] Listening on http://localhost:%d', app.settings.env, port);
});
|
NaveenAttri/TestProject
|
index.js
|
JavaScript
|
mit
| 310
|
# [AngularJS Store](http://angular-store.herokuapp.com/)
<img src=http://gruntjs.com/img/grunt-logo.png width=200/> <img src=http://angularjs.org/img/AngularJS-large.png width=250 /> <img src=http://lesscss.org/public/img/logo.png />
[](https://travis-ci.org/isRuslan/angular-shopping-cart)
An simple frontend kickstarter based on [AngularJS](http://angularjs.org), [Grunt](http://gruntjs.org) and [LESS](http://lesscss.org) for online store.<br/>
* [ngBoilerplate](http://joshdmiller.github.com/ng-boilerplate) was taken as skeleton project.
* [Heroku](https://heroku.com) is using for [production demo](http://angular-store.herokuapp.com/)
* It is just a fork of [A-Shopping-Cart-Application-Built-with-AngularJS](http://www.codeproject.com/Articles/576246/A-Shopping-Cart-Application-Built-with-AngularJS)
## Quick Start
Install Node.js and then:
```sh
$ git clone git@github.com:bu-bu/angular-shopping-cart.git
$ cd angular-shopping-cart
$ sudo npm -g install grunt-cli karma bower
$ npm install
$ bower install
$ grunt
```
## Grunt commands
* `grunt` or `grunt watch` - build developer project (build dir)
* `grunt prod` - build production project (prod dir)
* `grunt test` - run tests
## Tools
* [AngularJS](http://angularjs.org) - Base framework
* [Grunt](http://gruntjs.org) - Build tool
* [LESS](http://lesscss.org) - CSS, but smth more
* [Animate.css](http://daneden.github.io/animate.css/) - Animation library, use with ng-animate
* [Numeral.js](http://numeraljs.com/) - Work with numbers, use with filter
## Learn
### Overall Directory Structure
At a high level, the structure looks roughly like this:
```
angular-shopping-cart/
|- karma/
|- src/
| |- app/
| | |- <app logic>
| |- assets/
| | |- <static files>
| |- common/
| | |- <reusable code>
| |- less/
| | |- main.less
|- vendor/
| |- angular/
| |- bootstrap/
| |- etc ..
|- .bowerrc
|- bower.json
|- build.config.js
|- Gruntfile.js
|- module.prefix
|- module.suffix
|- package.json
```
What follows is a brief description of each entry, but most directories contain
their own `README.md` file with additional documentation, so browse around to
learn more.
- `karma/` - test configuration.
- `src/` - our application sources. [Read more »](src/README.md)
- `vendor/` - third-party libraries. [Bower](http://bower.io) will install
packages here. Anything added to this directory will need to be manually added
to `build.config.js` and `karma/karma-unit.js` to be picked up by the build
system.
- `.bowerrc` - the Bower configuration file. This tells Bower to install
components into the `vendor/` directory.
- `bower.json` - this is our project configuration for Bower and it contains the
list of Bower dependencies we need.
- `build.config.js` - our customizable build settings; see "The Build System"
below.
- `Gruntfile.js` - our build script; see "The Build System" below.
- `module.prefix` and `module.suffix` - our compiled application script is
wrapped in these, which by default are used to place the application inside a
self-executing anonymous function to ensure no clashes with other libraries.
- `package.json` - metadata about the app, used by NPM and our build script. Our
NPM dependencies are listed here.
### The Build System
The best way to learn about the build system is by familiarizing yourself with
Grunt and then reading through the heavily documented build script,
`Gruntfile.js`. But you don't need to do that to be very productive with
`ngBoilerplate`. What follows in this section is a quick introduction to the
tasks provided and should be plenty to get you started.
The driver of the process is the `delta` multi-task, which watches for file
changes using `grunt-contrib-watch` and executes one of nine tasks when a file
changes:
* `delta:gruntfile` - When `Gruntfile.js` changes, this task runs the linter
(`jshint`) on that one file and reloads the configuration.
* `delta:assets` - When any file within `src/assets/` changes, all asset files
are copied to `build/assets/`.
* `delta:html` - When `src/index.html` changes, it is compiled as a Grunt
template, so script names, etc., are dynamically replaced with the correct
values configured dynamically by Grunt.
* `delta:less` - When any `*.less` file within `src/` changes, the
`src/less/main.less` file is linted and copied into
`build/assets/ng-boilerplate.css`.
* `delta:jssrc` - When any JavaScript file within `src/` that does not end in
`.spec.js` changes, all JavaScript sources are linted, all unit tests are run,
and the all source files are re-copied to `build/src`.
* `delta:coffeesrc` - When any `*.coffee` file in `src/` that doesn't match
`*.spec.coffee` changes, the Coffee scripts are compiled independently into
`build/src` in a structure mirroring where they were in `src/` so it's easy to
locate problems. For example, the file
`src/common/titleService/titleService.coffee` is compiled to
`build/src/common/titleService/titleService.js`.
* `delta:tpls` - When any `*.tpl.html` file within `src/` changes, all templates
are put into strings in a JavaScript file (technically two, one for
`src/common/` and another for `src/app/`) that will add the template to
AngularJS's
[`$templateCache`](http://docs.angularjs.org/api/ng.$templateCache) so
template files are part of the initial JavaScript payload and do not require
any future XHR. The template cache files are `build/template-app.js` and
`build/template-common.js`.
* `delta:jsunit` - When any `*.spec.js` file in `src/` changes, the test files
are linted and the unit tests are executed.
* `delta:coffeeunit` - When any `*.spec.coffee` file in `src/` changes, the test
files are linted, compiled their tests executed.
As covered in the previous section, `grunt watch` will execute a full build
up-front and then run any of the aforementioned `delta:*` tasks as needed to
ensure the fastest possible build. So whenever you're working on your project,
start with:
```sh
$ grunt
```
And everything will be done automatically!
When you're ready to push your app into production, just run the `prod`
command:
```sh
$ grunt prod
```
This will concatenate and minify your sources and place them by default into the
`prod/` directory. There will only be three files: `index.html`,
`your-app-name.js`, and `your-app-name.css`. All of the vendor dependencies like
Bootstrap styles and AngularJS itself have been added to them for super-easy
deploying. If you use any assets (`src/assets/`) then they will be copied to
`prod/` as is.
|
isRuslan/angular-shopping-cart
|
README.md
|
Markdown
|
mit
| 6,696
|
<?php
return array (
'id' => 'kddi_sn3q_ver1',
'fallback' => 'kddi_sn3p_ver1',
'capabilities' =>
array (
'model_name' => 'S005',
'release_date' => '2010_november',
'max_image_width' => '234',
'resolution_height' => '854',
'resolution_width' => '480',
'max_image_height' => '375',
'flash_lite_version' => '3_0',
),
);
|
cuckata23/wurfl-data
|
data/kddi_sn3q_ver1.php
|
PHP
|
mit
| 356
|
<?php
namespace daVerona\Texting\Contracts;
interface TextingRequest
{
public function getSender();
public function getReceiver();
}
|
daverona/texting
|
src/Contracts/TextingRequest.php
|
PHP
|
mit
| 148
|
/* global __phantom_writeFile */
(function(global) {
var UNDEFINED,
exportObject;
if (typeof module !== "undefined" && module.exports) {
exportObject = exports;
} else {
exportObject = global.jasmineReporters = global.jasmineReporters || {};
}
function trim(str) { return str.replace(/^\s+/, "" ).replace(/\s+$/, "" ); }
function elapsed(start, end) { return (end - start)/1000; }
function isFailed(obj) { return obj.status === "failed"; }
function isSkipped(obj) { return obj.status === "pending"; }
function isDisabled(obj) { return obj.status === "disabled"; }
function pad(n) { return n < 10 ? '0'+n : n; }
function extend(dupe, obj) { // performs a shallow copy of all props of `obj` onto `dupe`
for (var prop in obj) {
if (obj.hasOwnProperty(prop)) {
dupe[prop] = obj[prop];
}
}
return dupe;
}
function ISODateString(d) {
return d.getFullYear() + '-' +
pad(d.getMonth()+1) + '-' +
pad(d.getDate()) + 'T' +
pad(d.getHours()) + ':' +
pad(d.getMinutes()) + ':' +
pad(d.getSeconds());
}
function escapeInvalidXmlChars(str) {
return str.replace(/</g, "<")
.replace(/\>/g, ">")
.replace(/\"/g, """)
.replace(/\'/g, "'")
.replace(/\&/g, "&");
}
function getQualifiedFilename(path, filename, separator) {
if (path && path.substr(-1) !== separator && filename.substr(0) !== separator) {
path += separator;
}
return path + filename;
}
function log(str) {
var con = global.console || console;
if (con && con.log) {
con.log(str);
}
}
/**
* Generates JUnit XML for the given spec run. There are various options
* to control where the results are written, and the default values are
* set to create as few .xml files as possible. It is possible to save a
* single XML file, or an XML file for each top-level `describe`, or an
* XML file for each `describe` regardless of nesting.
*
* Usage:
*
* jasmine.getEnv().addReporter(new jasmineReporters.JUnitXmlReporter(options);
*
* @param {object} [options]
* @param {string} [savePath] directory to save the files (default: '')
* @param {boolean} [consolidateAll] whether to save all test results in a
* single file (default: true)
* NOTE: if true, {filePrefix} is treated as the full filename (excluding
* extension)
* @param {boolean} [consolidate] whether to save nested describes within the
* same file as their parent (default: true)
* NOTE: true does nothing if consolidateAll is also true.
* NOTE: false also sets consolidateAll to false.
* @param {boolean} [useDotNotation] whether to separate suite names with
* dots instead of spaces, ie "Class.init" not "Class init" (default: true)
* @param {string} [filePrefix] is the string value that is prepended to the
* xml output file (default: junitresults-)
* NOTE: if consolidateAll is true, the default is simply "junitresults" and
* this becomes the actual filename, ie "junitresults.xml"
*/
exportObject.JUnitXmlReporter = function(options) {
var self = this;
self.started = false;
self.finished = false;
// sanitize arguments
options = options || {};
self.savePath = options.savePath || '';
self.consolidate = options.consolidate === UNDEFINED ? true : options.consolidate;
self.consolidateAll = self.consolidate !== false && (options.consolidateAll === UNDEFINED ? true : options.consolidateAll);
self.useDotNotation = options.useDotNotation === UNDEFINED ? true : options.useDotNotation;
self.filePrefix = options.filePrefix || (self.consolidateAll ? 'junitresults' : 'junitresults-');
var suites = [],
currentSuite = null,
totalSpecsExecuted = 0,
totalSpecsDefined,
// when use use fit, jasmine never calls suiteStarted / suiteDone, so make a fake one to use
fakeFocusedSuite = {
id: 'focused',
description: 'focused specs',
fullName: 'focused specs'
};
var __suites = {}, __specs = {};
function getSuite(suite) {
__suites[suite.id] = extend(__suites[suite.id] || {}, suite);
return __suites[suite.id];
}
function getSpec(spec) {
__specs[spec.id] = extend(__specs[spec.id] || {}, spec);
return __specs[spec.id];
}
self.jasmineStarted = function(summary) {
totalSpecsDefined = summary && summary.totalSpecsDefined || NaN;
exportObject.startTime = new Date();
self.started = true;
};
self.suiteStarted = function(suite) {
suite = getSuite(suite);
suite._startTime = new Date();
suite._specs = [];
suite._suites = [];
suite._failures = 0;
suite._skipped = 0;
suite._disabled = 0;
suite._parent = currentSuite;
if (!currentSuite) {
suites.push(suite);
} else {
currentSuite._suites.push(suite);
}
currentSuite = suite;
};
self.specStarted = function(spec) {
if (!currentSuite) {
// focused spec (fit) -- suiteStarted was never called
self.suiteStarted(fakeFocusedSuite);
}
spec = getSpec(spec);
spec._startTime = new Date();
spec._suite = currentSuite;
currentSuite._specs.push(spec);
};
self.specDone = function(spec) {
spec = getSpec(spec);
spec._endTime = new Date();
if (isSkipped(spec)) { spec._suite._skipped++; }
if (isDisabled(spec)) { spec._suite._disabled++; }
if (isFailed(spec)) { spec._suite._failures++; }
totalSpecsExecuted++;
};
self.suiteDone = function(suite) {
suite = getSuite(suite);
if (suite._parent === UNDEFINED) {
// disabled suite (xdescribe) -- suiteStarted was never called
self.suiteStarted(suite);
}
suite._endTime = new Date();
currentSuite = suite._parent;
};
self.jasmineDone = function() {
if (currentSuite) {
// focused spec (fit) -- suiteDone was never called
self.suiteDone(fakeFocusedSuite);
}
var output = '';
for (var i = 0; i < suites.length; i++) {
output += self.getOrWriteNestedOutput(suites[i]);
}
// if we have anything to write here, write out the consolidated file
if (output) {
wrapOutputAndWriteFile(self.filePrefix, output);
}
//log("Specs skipped but not reported (entire suite skipped or targeted to specific specs)", totalSpecsDefined - totalSpecsExecuted + totalSpecsDisabled);
self.finished = true;
// this is so phantomjs-testrunner.js can tell if we're done executing
exportObject.endTime = new Date();
};
self.getOrWriteNestedOutput = function(suite) {
var output = suiteAsXml(suite);
for (var i = 0; i < suite._suites.length; i++) {
output += self.getOrWriteNestedOutput(suite._suites[i]);
}
if (self.consolidateAll || self.consolidate && suite._parent) {
return output;
} else {
// if we aren't supposed to consolidate output, just write it now
wrapOutputAndWriteFile(generateFilename(suite), output);
return '';
}
};
self.writeFile = function(filename, text) {
var errors = [];
var path = self.savePath;
function phantomWrite(path, filename, text) {
// turn filename into a qualified path
filename = getQualifiedFilename(path, filename, window.fs_path_separator);
// write via a method injected by phantomjs-testrunner.js
__phantom_writeFile(filename, text);
}
function nodeWrite(path, filename, text) {
var fs = require("fs");
var nodejs_path = require("path");
require("mkdirp").sync(path); // make sure the path exists
var filepath = nodejs_path.join(path, filename);
var xmlfile = fs.openSync(filepath, "w");
fs.writeSync(xmlfile, text, 0);
fs.closeSync(xmlfile);
return;
}
// Attempt writing with each possible environment.
// Track errors in case no write succeeds
try {
phantomWrite(path, filename, text);
return;
} catch (e) { errors.push(' PhantomJs attempt: ' + e.message); }
try {
nodeWrite(path, filename, text);
return;
} catch (f) { errors.push(' NodeJS attempt: ' + f.message); }
// If made it here, no write succeeded. Let user know.
log("Warning: writing junit report failed for '" + path + "', '" +
filename + "'. Reasons:\n" +
errors.join("\n")
);
};
/******** Helper functions with closure access for simplicity ********/
function generateFilename(suite) {
return self.filePrefix + getFullyQualifiedSuiteName(suite, true) + '.xml';
}
function getFullyQualifiedSuiteName(suite, isFilename) {
var fullName;
if (self.useDotNotation || isFilename) {
fullName = suite.description;
for (var parent = suite._parent; parent; parent = parent._parent) {
fullName = parent.description + '.' + fullName;
}
} else {
fullName = suite.fullName;
}
// Either remove or escape invalid XML characters
if (isFilename) {
var fileName = "",
rFileChars = /[\w\.]/,
chr;
while (fullName.length) {
chr = fullName[0];
fullName = fullName.substr(1);
if (rFileChars.test(chr)) {
fileName += chr;
}
}
return fileName;
} else {
return escapeInvalidXmlChars(fullName);
}
}
function suiteAsXml(suite) {
var xml = '\n <testsuite name="' + getFullyQualifiedSuiteName(suite) + '"';
xml += ' timestamp="' + ISODateString(suite._startTime) + '"';
xml += ' hostname="localhost"'; // many CI systems like Jenkins don't care about this, but junit spec says it is required
xml += ' time="' + elapsed(suite._startTime, suite._endTime) + '"';
xml += ' errors="0"';
xml += ' tests="' + suite._specs.length + '"';
xml += ' skipped="' + suite._skipped + '"';
xml += ' disabled="' + suite._disabled + '"';
// Because of JUnit's flat structure, only include directly failed tests (not failures for nested suites)
xml += ' failures="' + suite._failures + '"';
xml += '>';
for (var i = 0; i < suite._specs.length; i++) {
xml += specAsXml(suite._specs[i]);
}
xml += '\n </testsuite>';
return xml;
}
function specAsXml(spec) {
var xml = '\n <testcase classname="' + getFullyQualifiedSuiteName(spec._suite) + '"';
xml += ' name="' + escapeInvalidXmlChars(spec.description) + '"';
xml += ' time="' + elapsed(spec._startTime, spec._endTime) + '"';
xml += '>';
if (isSkipped(spec) || isDisabled(spec)) {
xml += '<skipped />';
} else if (isFailed(spec)) {
for (var i = 0, failure; i < spec.failedExpectations.length; i++) {
failure = spec.failedExpectations[i];
xml += '\n <failure type="' + (failure.matcherName || "exception") + '"';
xml += ' message="' + trim(escapeInvalidXmlChars(failure.message))+ '"';
xml += '>';
xml += '<![CDATA[' + trim(failure.stack || failure.message) + ']]>';
xml += '\n </failure>';
}
}
xml += '\n </testcase>';
return xml;
}
// To remove complexity and be more DRY about the silly preamble and <testsuites> element
var prefix = '<?xml version="1.0" encoding="UTF-8" ?>';
prefix += '\n<testsuites>';
var suffix = '\n</testsuites>';
function wrapOutputAndWriteFile(filename, text) {
if (filename.substr(-4) !== '.xml') { filename += '.xml'; }
self.writeFile(filename, (prefix + text + suffix));
}
};
})(this);
|
Zack-Tillotson/open-door-the-game
|
node_modules/jasmine-reporters/src/junit_reporter.js
|
JavaScript
|
mit
| 13,510
|
<?php
$textImage = imagecreate(200,100);
$white = imagecolorallocate($textImage, 255, 255, 255);
$black = imagecolorallocate($textImage, 0, 0, 0);
$yOffset = 0;
for ($i = 1; $i <=5; $i++) {
imagestring($textImage, $i, 5, $yOffset, "This is system font $i", $black);
$yOffset += imagefontheight($i);
}
header("Content-type: image/png");
imagepng($textImage);
imagedestroy($textImage);
?>
|
inest-us/php
|
PHP5/Ch16/drawstring.php
|
PHP
|
mit
| 389
|
---
layout: page
title: Street Air Executive Retreat
date: 2016-05-24
author: Beverly Glover
tags: weekly links, java
status: published
summary: Sed vel laoreet neque. Vivamus.
banner: images/banner/leisure-01.jpg
booking:
startDate: 05/05/2016
endDate: 05/10/2016
ctyhocn: YYZHSHX
groupCode: SAER
published: true
---
Suspendisse libero nisi, dapibus id dolor non, dapibus iaculis enim. Fusce consectetur eros mollis ipsum dapibus pulvinar maximus non diam. Quisque ut tempor nibh, id aliquam nunc. Curabitur consectetur et dui eget luctus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Quisque condimentum egestas facilisis. Donec augue dui, blandit ac elementum ut, auctor nec odio.
Fusce felis mi, varius eget aliquam nec, tristique ac tortor. Quisque vel venenatis tellus. Nam gravida pretium erat eget convallis. Ut luctus, nisi sed ultricies molestie, est sapien volutpat urna, a porta leo ante a arcu. Mauris vel ullamcorper ex, euismod aliquam turpis. Suspendisse quis elit finibus, laoreet enim a, iaculis risus. Quisque posuere sem nunc, non malesuada nulla pretium a. In porttitor velit ut mi feugiat feugiat. Sed non ligula placerat erat dignissim ornare a vitae lorem. Aliquam vel eros orci. Suspendisse feugiat, erat non condimentum sollicitudin, metus leo tempor dui, quis tempor nunc nisl nec urna. Donec vel tincidunt dui.
* Nulla et nulla elementum, ullamcorper purus a, porttitor massa
* Vestibulum maximus eros quis iaculis vulputate
* Cras condimentum leo eget magna malesuada, ut iaculis orci pretium
* Phasellus eget velit elementum, porttitor diam sit amet, ultricies arcu
* Nullam lacinia nisl in est efficitur, a fermentum magna pretium.
Morbi ipsum mi, lacinia quis rutrum vitae, egestas nec libero. Suspendisse potenti. Integer justo tellus, eleifend sit amet bibendum vel, bibendum id diam. Vestibulum mattis ipsum turpis, et consequat quam pellentesque eu. Cras et metus in urna pharetra ultrices sit amet quis urna. Integer vulputate nec ligula nec interdum. Suspendisse a interdum turpis. Nam quis mi quam. Etiam in consequat augue. Aenean maximus elementum bibendum. Curabitur at lacus odio.
|
KlishGroup/prose-pogs
|
pogs/Y/YYZHSHX/SAER/index.md
|
Markdown
|
mit
| 2,151
|
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { Injectable } from '@angular/core';
@Injectable()
export class Service386Service {
constructor() { }
}
|
angular/angular-cli-stress-test
|
src/app/services/service-386.service.ts
|
TypeScript
|
mit
| 320
|
/**
* Copyright (c) 2015-2018, CJ Hare All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted
* provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this list of conditions
* and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other materials provided with
* the distribution.
*
* * Neither the name of [project] nor the names of its contributors may be used to endorse or
* promote products derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package com.systematic.trading.backtest.output.elastic.dao;
import javax.ws.rs.client.Entity;
import javax.ws.rs.core.Response;
import com.systematic.trading.backtest.BacktestBatchId;
import com.systematic.trading.backtest.output.elastic.model.ElasticIndexName;
/**
* Connectivity to Elastic search.
*
* @author CJ Hare
*/
public interface ElasticDao {
Response index( ElasticIndexName indexName );
Response mapping( ElasticIndexName indexName, BacktestBatchId id );
void postTypes( ElasticIndexName indexName, Entity<?> requestBody );
void putMapping( ElasticIndexName indexName, BacktestBatchId id, Entity<?> requestBody );
void put( ElasticIndexName indexName, Entity<?> requestBody );
void putSetting( ElasticIndexName indexName, Entity<?> requestBody );
}
|
CjHare/systematic-trading
|
systematic-trading-backtest-output-elastic/src/main/java/com/systematic/trading/backtest/output/elastic/dao/ElasticDao.java
|
Java
|
mit
| 2,322
|
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CodeFixes;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Diagnostics;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Composition;
using System.Linq;
namespace FluentAssertions.Analyzers
{
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public class StringShouldNotBeNullOrWhiteSpaceAnalyzer : StringAnalyzer
{
public const string DiagnosticId = Constants.Tips.Strings.StringShouldNotBeNullOrWhiteSpace;
public const string Category = Constants.Tips.Category;
public const string Message = "Use .Should() followed by .NotBeNullOrWhiteSpace() instead.";
protected override DiagnosticDescriptor Rule => new DiagnosticDescriptor(DiagnosticId, Title, Message, Category, DiagnosticSeverity.Info, true);
protected override IEnumerable<FluentAssertionsCSharpSyntaxVisitor> Visitors
{
get
{
yield return new StringShouldNotBeNullOrWhiteSpaceSyntaxVisitor();
}
}
public class StringShouldNotBeNullOrWhiteSpaceSyntaxVisitor : FluentAssertionsCSharpSyntaxVisitor
{
public StringShouldNotBeNullOrWhiteSpaceSyntaxVisitor() : base(new MemberValidator("IsNullOrWhiteSpace"), MemberValidator.Should, new MemberValidator("BeFalse"))
{
}
}
}
[ExportCodeFixProvider(LanguageNames.CSharp, Name = nameof(StringShouldNotBeNullOrWhiteSpaceCodeFix)), Shared]
public class StringShouldNotBeNullOrWhiteSpaceCodeFix : FluentAssertionsCodeFixProvider
{
public override ImmutableArray<string> FixableDiagnosticIds => ImmutableArray.Create(StringShouldNotBeNullOrWhiteSpaceAnalyzer.DiagnosticId);
protected override ExpressionSyntax GetNewExpression(ExpressionSyntax expression, FluentAssertionsDiagnosticProperties properties)
{
var remove = NodeReplacement.RemoveAndExtractArguments("IsNullOrWhiteSpace");
var newExpression = GetNewExpression(expression, remove);
var rename = NodeReplacement.Rename("BeFalse", "NotBeNullOrWhiteSpace");
newExpression = GetNewExpression(newExpression, rename);
var stringKeyword = newExpression.DescendantNodes().OfType<PredefinedTypeSyntax>().Single();
var subject = remove.Arguments.First().Expression;
return newExpression.ReplaceNode(stringKeyword, subject.WithTriviaFrom(stringKeyword));
}
}
}
|
fluentassertions/fluentassertions.analyzers
|
src/FluentAssertions.Analyzers/Tips/Strings/StringShouldNotBeNullOrWhiteSpace.cs
|
C#
|
mit
| 2,544
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>graph-basics: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="stylesheet">
<link href="../../../../../bootstrap-custom.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<script src="../../../../../moment.min.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="../..">clean / released</a></li>
<li class="active"><a href="">8.6 / graph-basics - 8.7.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
graph-basics
<small>
8.7.0
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2022-01-18 12:47:20 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-01-18 12:47:20 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-num base Num library distributed with the OCaml compiler
base-threads base
base-unix base
camlp5 7.14 Preprocessor-pretty-printer of OCaml
conf-findutils 1 Virtual package relying on findutils
conf-perl 1 Virtual package relying on perl
coq 8.6 Formal proof management system
num 0 The Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.04.2 The OCaml compiler (virtual package)
ocaml-base-compiler 4.04.2 Official 4.04.2 release
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.1 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "Hugo.Herbelin@inria.fr"
homepage: "https://github.com/coq-contribs/graph-basics"
license: "LGPL 2.1"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/GraphBasics"]
depends: [
"ocaml"
"coq" {>= "8.7" & < "8.8~"}
]
tags: [ "keyword: graph theory" "keyword: Curry-Howard's isomorphism" "keyword: inductive definitions" "category: Mathematics/Combinatorics and Graph Theory" "date: April 2001" ]
authors: [ "Jean Duprat" ]
bug-reports: "https://github.com/coq-contribs/graph-basics/issues"
dev-repo: "git+https://github.com/coq-contribs/graph-basics.git"
synopsis: "A Coq toolkit for graph theory"
description: """
This library offers inductive definitions of basics
in graph theory. The goal is to offer the possibility to write proofs
and programs on graphs in the same formalism : the Coq language.
It now contains : vertices, arcs, edges, degrees, graphs, directed
graphs,
paths, acyclic graphs, connected graphs and tree."""
flags: light-uninstall
url {
src: "https://github.com/coq-contribs/graph-basics/archive/v8.7.0.tar.gz"
checksum: "md5=b0766caf69228e485bd2445c748eff1e"
}
</pre>
<h2>Lint</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Dry install 🏜️</h2>
<p>Dry install with the current Coq version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam install -y --show-action coq-graph-basics.8.7.0 coq.8.6</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.6).
The following dependencies couldn't be met:
- coq-graph-basics -> coq >= 8.7 -> ocaml >= 4.05.0
base of this switch (use `--unlock-base' to force)
Your request can't be satisfied:
- No available version of coq satisfies the constraints
No solution found, exiting
</pre></dd>
</dl>
<p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-graph-basics.8.7.0</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install 🚀</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Missing removes</dt>
<dd>
none
</dd>
<dt>Wrong removes</dt>
<dd>
none
</dd>
</dl>
</div>
</div>
</div>
<hr/>
<div class="footer">
<p class="text-center">
Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
|
coq-bench/coq-bench.github.io
|
clean/Linux-x86_64-4.04.2-2.0.5/released/8.6/graph-basics/8.7.0.html
|
HTML
|
mit
| 7,326
|
package com.pedanov.departments.dao;
/**
* Created by Anfel on 16.02.2017.
*/
public class DepartmentDao {
}
|
anfel4life/departments
|
src/main/java/com/pedanov/departments/dao/DepartmentDao.java
|
Java
|
mit
| 112
|
package intersectables;
import base.HitRecord;
import base.Intersectable;
import base.Material;
import base.Ray;
/**
* Any Primitive Geometry is an intersectable and has a certain material assigned to.
* Created by simplaY on 06.01.2015.
*/
public abstract class PrimitiveGeometry implements Intersectable {
// material assigned to any PrimitiveGeometry.
// NB: Cannot be set after initialization.
protected final Material material;
/**
* Material that should be set to Geometry.
*
* @param material
*/
public PrimitiveGeometry(Material material) {
this.material = material;
}
public Material getMaterial() {
return material;
}
@Override
public abstract HitRecord intersect(Ray ray);
}
|
simplay/aptRenderer
|
src/main/java/intersectables/PrimitiveGeometry.java
|
Java
|
mit
| 771
|
var Handlebars = require("handlebars");
export default class Lean {
constructor() {
this.name = this.constructor.name;
this.id = `${this.name}-${Lean.INCREMENTAL_ID++}`;
this.children = {};
this.props = {};
this.element = null;
this.view = this.name;
Lean.registerInstance(this);
}
render() {
return Lean.Templates[this.view](this);
}
postrender() {
this.element = document.getElementById(this.id);
this.element.self = this;
this.postrenderRecursive(this.children);
}
postrenderRecursive(component) {
if(!component) {
return;
}
else if(typeof component.postrender === "function") {
component.postrender();
}
else if(Array.isArray(component)) {
component.forEach(this.postrenderRecursive.bind(this));
}
else if(typeof component === "object" && component !== null) {
for(let childName in component) {
this.postrenderRecursive(component[childName]);
}
}
}
rerender(selector) {
if(selector) {
var wrapperElement = document.createElement("div");
wrapperElement.innerHTML = this.render();
this.element.querySelector(selector).outerHTML = wrapperElement.querySelector(selector).outerHTML;
}
else {
this.element.outerHTML = this.render();
this.postrender();
}
}
static precompileAllInPage() {
var allTemplates = document.querySelectorAll('script[type="text/x-handlebars-template"]');
for (let i = 0; i < allTemplates.length; i++) {
let template = allTemplates[i], isPartial = false;
if(template.classList.contains("partial")) {
isPartial = true;
}
Lean.precompile(template.id, template.innerHTML, isPartial);
}
}
static precompileAllFiles(baseDir, extension, templates, partials, done) {
var promises = [];
for (let i = 0; i < templates.length; i++) {
let
template = templates[i],
templateName = Lean.getBaseName(template),
isPartial = partials.indexOf(templateName) > -1 ? true : false;
promises.push(Lean.precompileFile(baseDir + template + extension, templateName, isPartial));
}
$.when.apply($, promises).done(done);
}
static precompileFile(templatePath, templateName, isPartial) {
return $.get(templatePath).done((data) => {
Lean.precompile(templateName, data, isPartial);
});
}
static precompile(id, innerHTML, isPartial) {
Lean.Templates[id] = Handlebars.compile(innerHTML);
if(isPartial) {
Handlebars.registerPartial(id, Lean.Templates[id]);
}
}
static registerInstance(instance) {
Lean.AllInstances[instance.id] = instance;
}
static findInstance(id) {
return document.getElementById(id).self;
}
static getBaseName(str) {
var base = new String(str).substring(str.lastIndexOf('/') + 1);
if(base.lastIndexOf(".") != -1) {
base = base.substring(0, base.lastIndexOf("."));
}
return base;
}
}
Lean.INCREMENTAL_ID = 0;
Lean.Templates = {};
Handlebars.registerHelper("render", (template) => {
if(template && typeof template.render === "function") {
return template.render();
}
else {
return ""
}
});
Handlebars.registerHelper("call", (context, func, ...params) => {
return func.apply(context, params);
});
|
amirmohsen/lean
|
lib/Lean.js
|
JavaScript
|
mit
| 3,109
|
# Changed the semantics of writing values to custom attributes to ensure that they
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
describe Snowflake::Node do
describe "Custom Attributes" do
it "indicates whether an attribute name represents a custom attribute" do
TestNodeWithCustomAttributes.custom_attribute?( :counter ).should be_true
TestNodeWithCustomAttributes.custom_attribute?( :stuff ).should be_true
TestNodeWithCustomAttributes.custom_attribute?( :name ).should be_false
TestNodeWithCustomAttributes.custom_attribute?( :foo ).should be_false
end
it "retrieves a list of all custom attributes" do
TestNodeWithCustomAttributes.custom_attributes.should == Set.new([:counter, :stuff])
end
it "will overwrite and persist custom attribute values" do
@test_node = TestNodeWithCustomAttributes.create(:name => 'rolly', :mood => 'Awesome')
@test_node.should be_valid
@test_node.stuff = ['foo', 'bar']
@test_node.should be_valid
@test_node = TestNodeWithCustomAttributes.get( @test_node.key )
@test_node.stuff.to_set.should == Set.new(['foo', 'bar'])
end
it "will raise an exception if errors occur when overwriting custom attribute values with the wrong format" do
@test_node = TestNodeWithCustomAttributes.create(:name => 'rolly', :mood => 'Awesome')
@test_node.should be_valid
lambda {
@test_node.stuff = "Yo"
}.should raise_error(Snowflake::CouldNotPersistCustomAttributeError)
@test_node = TestNodeWithCustomAttributes.get( @test_node.key )
@test_node.stuff.to_set.should == Set.new
end
it "will not allow custom attributes to be overwritten when there are existing errors" do
@test_node = TestNodeWithCustomAttributes.create(:name => 'rolly', :mood => 'Awesome')
@test_node.should be_valid
@test_node.name = nil
lambda {
@test_node.stuff = ['foo', 'bar']
}.should raise_error(Snowflake::CustomAttributeError)
end
end
end
|
luma/snowflake
|
spec/public/node_custom_attributes_spec.rb
|
Ruby
|
mit
| 2,072
|
---
layout: page
title: Cube Chemical Executive Retreat
date: 2016-05-24
author: Raymond Vance
tags: weekly links, java
status: published
summary: Quisque eu bibendum libero. Donec tempor viverra.
banner: images/banner/leisure-05.jpg
booking:
startDate: 11/30/2016
endDate: 12/03/2016
ctyhocn: VORHEHX
groupCode: CCER
published: true
---
Nulla mattis velit sit amet quam pharetra, eu volutpat orci elementum. Phasellus convallis odio magna, vitae rutrum felis venenatis ut. Mauris malesuada congue tristique. Mauris vestibulum felis sit amet enim tempor, quis tristique augue fringilla. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas lobortis enim ac lorem imperdiet porta. Aliquam pharetra vulputate semper. Donec vel sem porttitor, tempor nisi et, ornare lacus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Proin eu consectetur elit, et ornare massa. Nunc tincidunt congue sapien nec maximus. Aliquam sem ex, commodo in tortor sed, gravida laoreet velit. Fusce egestas felis ut ultricies mollis. Suspendisse vitae nunc vel metus tempor laoreet vitae nec nibh. Donec tristique odio sed molestie porta.
* Pellentesque non nulla vel diam ullamcorper dignissim
* Quisque lacinia lorem vel lorem vestibulum interdum.
Nam sollicitudin tellus vel mauris semper, ac dapibus ligula lobortis. Vestibulum lobortis lobortis quam id cursus. Nulla in condimentum enim. Suspendisse consectetur sed ipsum non porta. Mauris quis molestie dui. Fusce feugiat quis risus ut iaculis. Ut auctor et risus porttitor ullamcorper. Duis eleifend eu dolor a ultrices. Maecenas viverra, orci hendrerit accumsan pretium, mauris urna volutpat ligula, ut dignissim ante velit a orci. Duis facilisis tellus quis lorem pharetra volutpat. Quisque et sollicitudin ipsum.
Cras ut arcu luctus, tempor ipsum eget, congue nibh. Suspendisse dignissim, nunc in ornare interdum, sapien magna pulvinar ex, non feugiat nibh dui et metus. Sed consectetur et massa eget pellentesque. Sed id risus hendrerit massa bibendum tempus. Sed ultrices vitae nulla ac tempus. Proin nec diam tincidunt, dapibus turpis ut, laoreet est. Maecenas elit turpis, feugiat eget tellus a, suscipit iaculis metus. Pellentesque ac nunc in nisl sollicitudin rhoncus ut vel massa. Donec vel laoreet lacus, nec eleifend lectus. Duis sit amet nunc urna. Suspendisse a odio justo. Pellentesque sed fringilla nulla. Aliquam erat volutpat. In congue ipsum in elementum cursus.
|
KlishGroup/prose-pogs
|
pogs/V/VORHEHX/CCER/index.md
|
Markdown
|
mit
| 2,504
|
using System;
using System.Collections.Generic;
using System.Net;
using System.Net.Sockets;
using System.Threading;
namespace SocketLibrary
{
/// <summary>
/// SocketµÄ¿Í»§¶Ë
/// </summary>
public class Client : SocketBase
{
//ÊÇ·ñÐÄÌø¼ì²â
private const bool _isSendHeartbeat = true;
/// <summary>
/// ³¬Ê±Ê±¼ä
/// </summary>
///
public const int CONNECTTIMEOUT = 10;
private TcpClient client;
private IPAddress ipAddress;
private int port;
private Thread _listenningClientThread;
private string _clientName;
/// <summary>
/// Á¬½ÓµÄKey
/// </summary>
public string ClientName
{
get { return _clientName; }
}
/// <summary>
/// ³õʼ»¯
/// </summary>
/// <param name="ipaddress">µØÖ·</param>
/// <param name="port">¶Ë¿Ú</param>
public Client(string ipaddress, int port)
: this(IPAddress.Parse(ipaddress), port)
{
}
/// <summary>
///³õʼ»¯
/// </summary>
/// <param name="ipaddress">µØÖ·</param>
/// <param name="port">¶Ë¿Ú</param>
public Client(IPAddress ipaddress, int port) : base(_isSendHeartbeat)
{
this.ipAddress = ipaddress;
this.port = port;
this._clientName = ipAddress + ":" + port;
}
/// <summary>
/// ´ò¿ªÁ´½Ó
/// </summary>
public void StartClient()
{
_listenningClientThread = new Thread(new ThreadStart(Start));
_listenningClientThread.Start();
}
/// <summary>
/// ¹Ø±ÕÁ¬½Ó²¢ÊÍ·Å×ÊÔ´
/// </summary>
public void StopClient()
{
this.EndListenAndSend();
//ȱÉÙ֪ͨ¸ø·þÎñ¶Ë ×Ô¼ºÖ÷¶¯¹Ø±ÕÁË
_listenningClientThread.Abort();
}
/// <summary>
/// »ñȡָ¶¨Á¬½ÓÃûµÄÁ¬½Ó,²éѯ²»µ½·µ»Ønull
/// </summary>
/// <returns></returns>
public Connection GetConnection()
{
Connection connection = null;
this.Connections.TryGetValue(this.ClientName, out connection);
return connection;
}
private void Start()
{
while (true)
{
if (!this.Connections.ContainsKey(this._clientName))
{
try
{
client = new TcpClient();
client.SendTimeout = CONNECTTIMEOUT;
client.ReceiveTimeout = CONNECTTIMEOUT;
client.Connect(ipAddress, port);
Connection conn = new Connection(client, this._clientName);
this.Connections.TryAdd(this._clientName, conn);
this.OnConnected(this, conn);
}
catch (Exception ex)
{
this.connClose(this._clientName, new List<Message>() { }, ex);
}
}
//½ÓÊÕÊý¾Ý¡¢·¢ËÍÊý¾Ý ÐÄÌø¼ì²â
this.SenRecMsg();
Thread.Sleep(1000);
}
}
}
}
|
Harbour9354/Socket.Harbour
|
SocketLibrary/Client.cs
|
C#
|
mit
| 3,300
|
<?php
/**
* This file is part of ClassMocker.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @package JSiefer\ClassMocker
*/
namespace JSiefer\ClassMocker\Footprint;
/**
* Class ClassFootprintTest
*
* @covers \JSiefer\ClassMocker\Footprint\ClassFootprint
*/
class ClassFootprintTest extends \PHPUnit_Framework_TestCase
{
/**
* Test type methods
*
* @return void
* @test
*/
public function testType()
{
$footprint = new ClassFootprint();
$this->assertEquals(
ClassFootprint::TYPE_CLASS,
$footprint->getType(),
'Class should be the default type'
);
$this->assertFalse(
$footprint->isInterface(),
'Should not be an interface by default'
);
$footprint->setType(ClassFootprint::TYPE_INTERFACE);
$this->assertTrue(
$footprint->isInterface(),
'Should be an interface'
);
}
/**
* Test Parent Setter and Getter
*
* @return void
* @test
*/
public function testParentSetter()
{
$footprint = new ClassFootprint();
$footprint->setParent('');
$this->assertNull(
$footprint->getParent(),
'Empty parent class must result in NULL'
);
$footprint->setParent('Test');
$this->assertEquals(
'\Test',
$footprint->getParent(),
'Add root back-slash if missing'
);
$footprint->setParent('\Test');
$this->assertEquals(
'\Test',
$footprint->getParent(),
'Only add root back-slash if missing'
);
}
/**
* Test interface setter methods
*
* @return void
* @test
*/
public function testInterfaceSetter()
{
$footprint = new ClassFootprint();
$footprint->setInterfaces(['InterfaceA', '\InterfaceB']);
$this->assertEquals(
['\InterfaceA', '\InterfaceB'],
$footprint->getInterfaces(),
'Add root back-slash if missing'
);
$footprint->setInterfaces(['Foobar']);
$this->assertEquals(
['\Foobar'],
$footprint->getInterfaces(),
'Set must overwrite existing interfaces'
);
$footprint->addInterface('Barfoo');
$this->assertEquals(
['\Foobar', '\Barfoo'],
$footprint->getInterfaces(),
'Add must NOT overwrite existing interfaces'
);
$footprint->addInterface('');
$this->assertEquals(
['\Foobar', '\Barfoo'],
$footprint->getInterfaces(),
'Add must ignore empty interfaces'
);
}
/**
* Test constant setter methods
*
* @return void
* @test
*/
public function testConstantSetter()
{
$footprint = new ClassFootprint();
$footprint->setConstants(['FOO' => 'foo', 'TWO' => '2']);
$this->assertSame(
['FOO' => 'foo', 'TWO' => 2.0],
$footprint->getConstants(),
'Strings must be checked vor number values'
);
$footprint->setConstants(['FOO' => 'foo']);
$this->assertEquals(
['FOO' => 'foo'],
$footprint->getConstants(),
'Set must replace existing constants'
);
$footprint->addConstant('BAR', 'bar');
$this->assertEquals(
['FOO' => 'foo', 'BAR' => 'bar'],
$footprint->getConstants(),
'Add must NOT replace existing constants'
);
}
/**
* Simple export and import test
*
* Footprint can be exported to simple arrays and then
* re-imported
*
* The exported footprint data should be as small as possible
* to later easily create small json reference files
*
* @return void
* @test
*/
public function testExportAndImport()
{
$source = new ClassFootprint();
$source->setType(ClassFootprint::TYPE_INTERFACE);
$source->setParent('Test');
$source->addConstant('A', '1');
$source->addConstant('B', '1.5');
$source->addConstant('C', 'test');
$source->setInterfaces(['InterfaceA', 'InterfaceB']);
$data = $source->export();
$this->assertInternalType(
'array',
$data,
'Exported data should be an array'
);
$target = new ClassFootprint($data);
$this->assertSame(
$target->getType(),
$source->getType(),
'Should have copied type'
);
$this->assertSame(
$target->getParent(),
$source->getParent(),
'Should have copied parent class'
);
$this->assertSame(
$target->getConstants(),
$source->getConstants(),
'Should have copied constants'
);
$this->assertSame(
$target->getInterfaces(),
$source->getInterfaces(),
'Should have copied interface'
);
}
/**
* Should fail on invalid data
*
* The footprint data must be an array of size 4
*
* @test
* @expectedException \InvalidArgumentException
* @expectedExceptionMessage Invalid footprint array
*/
public function shouldFailOnInvalidData()
{
new ClassFootprint([0,0]);
}
}
|
jsiefer/class-mocker
|
tests/Footprint/ClassFootprintTest.php
|
PHP
|
mit
| 5,555
|
export GOPATH="${HOME}/.go"
export GOROOT="$(brew --prefix golang)/libexec"
path=("${GOPATH}/bin:${GOROOT}/bin" $path)
|
cheremushki/dotfiles
|
golang/path.zsh
|
Shell
|
mit
| 119
|
<table width="100%" class="table table-striped shadow_panel">
<tr>
<th colspan="1">
Repositories
</th>
</tr>
<tr>
<td>
<div class="panel-group" id="qs_menu">
<div class="panel panel-default">
<div id="menu1" class="panel-collapse list-group">
<a href="https://github.com/KoreaHTML5/quickstart-angularjs" class="list-group-item">Angularjs</a>
<a href="https://github.com/KoreaHTML5/quickstart-backbonejs" class="list-group-item">Backbonejs</a>
<a href="https://github.com/KoreaHTML5/quickstart-bootstrap" class="list-group-item">Bootstrap</a>
<a href="https://github.com/KoreaHTML5/quickstart-d3" class="list-group-item">D3</a>
<a href="https://github.com/KoreaHTML5/quickstart-expressjs" class="list-group-item">Expressjs</a>
<a href="https://github.com/KoreaHTML5/quickstart-extjs" class="list-group-item">ExtJs</a>
<a href="https://github.com/KoreaHTML5/quickstart-foundation" class="list-group-item">Foundation</a>
<a href="https://github.com/KoreaHTML5/quickstart-jquery" class="list-group-item">jQuery</a>
<a href="https://github.com/KoreaHTML5/quickstart-meteor" class="list-group-item">Meteor</a>
<a href="https://github.com/KoreaHTML5/quickstart-react" class="list-group-item">React</a>
<a href="https://github.com/KoreaHTML5/quickstart-uiBootstrap" class="list-group-item">UI Bootstrap</a>
</div>
</div>
</td>
</tr>
</table>
|
jeado/dev.koreahtml5.kr
|
contents/_includes/qs_menu.html
|
HTML
|
mit
| 1,733
|
---
title: "On news addiction and reading good things not more things."
subtitle:
summary:
authors:
- admin
math: true
markup: mmark
tags:
- Academic
categories:
date: "2019-03-26"
lastmod:
featured: false
draft: false
# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder.
# Placement options: 1 = Full column width, 2 = Out-set, 3 = Screen-width
# Focal point options: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight
image:
placement: 2
caption:
focal_point: ""
preview_only: false
# Projects (optional).
# Associate this post with one or more of your projects.
# Simply enter your project's folder or file name without extension.
# E.g. `projects = ["internal-project"]` references `content/project/deep-learning/index.md`.
# Otherwise, set `projects = []`.
projects: []
---
Patterns that reduce uncertainty about some aspect of the world are called information. Open your curtains in the morning, see a certain amount of light. Opening your window gives you some information about what time of the morning it is. More light is a pretty reliable way of approximating the time during sunrise.
Speaking generally, it always seems right that more information is a good thing. If getting more information reduces our uncertainty and we want to be more certain, then collect as much information as possible. This feels right. In fact, it feels so right that it is the default operating mode for most people. Reading news daily or watching news hourly is a pretty common pasttime. The goal here must be to reduce the uncertainty we have about the world. When the news isn't out with a straighforward mission to decieve us we'll be getting some good nuggets of information that we can store away for later use in our quest to understand the world. Sure, some of those nuggets will be worse than others but we believe that information accumulates so we'll take what we can get.
Is more information always a good thing? In some circumstances it surely is. Here is a common scenario. There is a fixed pool of information sources that vary in their quality. If we sample them all and then combine them in a rational way then the total information will always be greater with more sources. So that is +1 for the more information camp. The cable news addicts.
Change the setup a little bit. I'm going to change it in a way that is a little more realistic (not much) for how we actually use information.
Let's say that there is fixed pool of information bearing samples. The samples vary in their quality, some are low information some are high. Then let's say that we can't sample all the sources -- we can only sample a fixed subset of those samples. Think of this like having a large collection of memories about the world but only a couple of them can be recalled in a given instant while we're thinking about something. Furthermore, for simplicity, assume that which samples form the subset are random. This is also kind of consistent with how memory works. There is obviously some structure to which events appear in memory, but there is also a arbitrary random quality to them as well. Now, once this subset of samples has been encoded we combine them in a rational way. This is a case where more information is not always better.
If the low quality samples increase in proportion to the high quality samples then the probability of selecting a high quality information sample goes down. The result is that the overall information is lower. If all you have access to is good information then total information will be good.
We can compare these two situations exactly using a simple simulation. The code is at the bottom of the page.
For situation 1 set n.good equal to total.samples. Set p.bad to 0. This means there are only good samples. Information increases.
Information is not clearly defined here. It is not in "bits" or "nats" -- units that result from a typical definition of information. The units here are related to how well a binary stimulus can be classified. Larger numbers mean we have more information to classify with. These units could be converted into Shannon information and we would get the same result.
For situation 2 set n.good to some number and set total.samples to some value lower than that. Then increase p.bad and see what happens. What this does is increase the proportion of low information samples relative to high information samples. The figures show what happens.
In the following, the proportion of bad samples increases and information goes down.

Next, the total number of samples increase and all are sampled, and the information goes up.

~~~ R
g <- function(n.good, p.bad, total.samples) {
n.good <- n.good
n.bad <- p.bad * n.good
mu.snr.bad <- -log2(.99)
mu.snr.good <- 1/sqrt(10)
snr.vector <- c(rep(mu.snr.bad, times = round(n.bad)), rep(mu.snr.good, round(n.good)))
f <- function(n.samples) {
info.sample <- sample(snr.vector, n.samples, replace = F)
}
info.samples <- replicate(1000, f(total.samples))
mean(sqrt(colSums(info.samples^2)))
}
out.vals <- lapply(seq(0, 1, .01), FUN = function(x) g(100, x, 10))
snr.frame <- data.frame(x = seq(0, 1, .01), y = unlist(out.vals))
~~~
|
calenwalshe/calenwalshe.github.io
|
content/post/information/index.md
|
Markdown
|
mit
| 5,343
|
/**
* File: Command.java<br/>
* Author: Peter M. Corcoran, pmcorcor@uab.edu<br/>
* Assignment: EE433 Research Project<br/>
* Version: 1.0.0 11/27/2015 pmc - initial coding<br/>
* Structure Component: Abstract Command Object
*/
package ee433.behavior.command;
public abstract class Command {
public abstract void execute();
}
|
corcoranp/ee433
|
src/ee433/behavior/command/Command.java
|
Java
|
mit
| 337
|
class BitsInterpreter < ActiveRecord::Base
validates_presence_of :name, :length
validates_numericality_of :length, :only_integer => true
validates_inclusion_of :length, :in => [16, 32, 48, 64, 1024], :message => "valid value [16, 32, 48, 64, 1024]"
validates_length_of :name, :maximum => 255
validates_uniqueness_of :name
validates_length_of :description, :maximum => 255, :allow_nil => true
has_many :bits_segments, -> {order :start_bit}
def validate
name.strip!
end
end
|
rli9/vims
|
app/models/bits_interpreter.rb
|
Ruby
|
mit
| 498
|
---
layout: attachment
title: DSC_0239
date:
type: attachment
published: false
status: inherit
categories: []
tags: []
meta:
_wp_attached_file: /home/wpcom/public_html/wp-content/blogs.dir/892/5468064/files/2010/12/dsc_0239.jpg
_wp_attachment_metadata: a:5:{s:5:"width";s:4:"1280";s:6:"height";s:3:"850";s:14:"hwstring_small";s:23:"height='85'
width='128'";s:4:"file";s:83:"/home/wpcom/public_html/wp-content/blogs.dir/892/5468064/files/2010/12/dsc_0239.jpg";s:10:"image_meta";a:10:{s:8:"aperture";s:1:"0";s:6:"credit";s:0:"";s:6:"camera";s:0:"";s:7:"caption";s:0:"";s:17:"created_timestamp";s:1:"0";s:9:"copyright";s:0:"";s:12:"focal_length";s:1:"0";s:3:"iso";s:1:"0";s:13:"shutter_speed";s:1:"0";s:5:"title";s:0:"";}}
author:
login: pdft
email: padfoot.tgz@gmail.com
display_name: piko
first_name: herpiko
last_name: dwi aguno
---
|
herpiko/herpiko.github.io
|
_attachments/dsc_0239.html
|
HTML
|
mit
| 853
|
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
//
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require jquery_ujs
//= require twitter/bootstrap
//= require 'icheck'
//= require highcharts
//= require highcharts/highcharts-more
//= require_tree .
function icheck(){
if($(".icheck-me").length > 0){
$(".icheck-me").each(function(){
var $el = $(this);
var skin = ($el.attr('data-skin') !== undefined) ? "_" + $el.attr('data-skin') : "",
color = ($el.attr('data-color') !== undefined) ? "-" + $el.attr('data-color') : "";
var opt = {
checkboxClass: 'icheckbox' + skin + color,
radioClass: 'iradio' + skin + color,
}
$el.iCheck(opt);
});
}
}
$(function(){
icheck();
})
|
MaSys/natumex
|
app/assets/javascripts/application.js
|
JavaScript
|
mit
| 1,227
|
<?php
namespace Tests\DependencyInjectorTests;
return [
ServiceWithDependency::class,
TestService::class,
BaseService::class,
ExtendedService::class
];
|
martinbrom/trip-hatch
|
tests/DependencyInjectorTests/service_list.php
|
PHP
|
mit
| 170
|
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pymatgen.electronic_structure.bandstructure module — pymatgen 2020.1.10 documentation</title>
<link rel="shortcut icon" href="_static/favicon.ico"/>
<link rel="canonical" href="https://pymatgen.orgpymatgen.electronic_structure.bandstructure.html"/>
<script type="text/javascript" src="_static/js/modernizr.min.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/language_data.js"></script>
<script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="pymatgen.electronic_structure.boltztrap module" href="pymatgen.electronic_structure.boltztrap.html" />
<link rel="prev" title="pymatgen.electronic_structure package" href="pymatgen.electronic_structure.html" />
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-33990148-1']);
_gaq.push(['_trackPageview']);
</script>
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" style="background: linear-gradient(0deg, rgba(23,63,162,1) 0%, rgba(0,70,192,1) 100%)" >
<a href="index.html" class="icon icon-home"> pymatgen
</a>
<div class="version">
2020.1.10
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="introduction.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="change_log.html">Change log</a></li>
<li class="toctree-l1"><a class="reference internal" href="usage.html">Usage</a></li>
<li class="toctree-l1"><a class="reference internal" href="team.html">Development Team</a></li>
<li class="toctree-l1"><a class="reference internal" href="references.html">References</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="modules.html">API Docs</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="pymatgen.html">pymatgen package</a><ul class="current">
<li class="toctree-l3 current"><a class="reference internal" href="pymatgen.html#subpackages">Subpackages</a><ul class="current">
<li class="toctree-l4"><a class="reference internal" href="pymatgen.alchemy.html">pymatgen.alchemy package</a></li>
<li class="toctree-l4"><a class="reference internal" href="pymatgen.analysis.html">pymatgen.analysis package</a></li>
<li class="toctree-l4"><a class="reference internal" href="pymatgen.apps.html">pymatgen.apps package</a></li>
<li class="toctree-l4"><a class="reference internal" href="pymatgen.cli.html">pymatgen.cli package</a></li>
<li class="toctree-l4"><a class="reference internal" href="pymatgen.command_line.html">pymatgen.command_line package</a></li>
<li class="toctree-l4"><a class="reference internal" href="pymatgen.core.html">pymatgen.core package</a></li>
<li class="toctree-l4 current"><a class="reference internal" href="pymatgen.electronic_structure.html">pymatgen.electronic_structure package</a></li>
<li class="toctree-l4"><a class="reference internal" href="pymatgen.entries.html">pymatgen.entries package</a></li>
<li class="toctree-l4"><a class="reference internal" href="pymatgen.ext.html">pymatgen.ext package</a></li>
<li class="toctree-l4"><a class="reference internal" href="pymatgen.io.html">pymatgen.io package</a></li>
<li class="toctree-l4"><a class="reference internal" href="pymatgen.optimization.html">pymatgen.optimization package</a></li>
<li class="toctree-l4"><a class="reference internal" href="pymatgen.phonon.html">pymatgen.phonon package</a></li>
<li class="toctree-l4"><a class="reference internal" href="pymatgen.symmetry.html">pymatgen.symmetry package</a></li>
<li class="toctree-l4"><a class="reference internal" href="pymatgen.transformations.html">pymatgen.transformations package</a></li>
<li class="toctree-l4"><a class="reference internal" href="pymatgen.util.html">pymatgen.util package</a></li>
<li class="toctree-l4"><a class="reference internal" href="pymatgen.vis.html">pymatgen.vis package</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="pymatgen.html#submodules">Submodules</a></li>
<li class="toctree-l3"><a class="reference internal" href="pymatgen.html#module-pymatgen">Module contents</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">pymatgen</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content style-external-links">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> »</li>
<li><a href="modules.html">pymatgen</a> »</li>
<li><a href="pymatgen.html">pymatgen package</a> »</li>
<li><a href="pymatgen.electronic_structure.html">pymatgen.electronic_structure package</a> »</li>
<li>pymatgen.electronic_structure.bandstructure module</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/materialsproject/pymatgen/blob/master/docs_rst/pymatgen.electronic_structure.bandstructure.rst" class="fa fa-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="module-pymatgen.electronic_structure.bandstructure">
<span id="pymatgen-electronic-structure-bandstructure-module"></span><h1>pymatgen.electronic_structure.bandstructure module<a class="headerlink" href="#module-pymatgen.electronic_structure.bandstructure" title="Permalink to this headline">¶</a></h1>
<p>This module provides classes to define everything related to band structures.</p>
<dl class="class">
<dt id="pymatgen.electronic_structure.bandstructure.BandStructure">
<em class="property">class </em><code class="sig-name descname">BandStructure</code><span class="sig-paren">(</span><em class="sig-param">kpoints</em>, <em class="sig-param">eigenvals</em>, <em class="sig-param">lattice</em>, <em class="sig-param">efermi</em>, <em class="sig-param">labels_dict=None</em>, <em class="sig-param">coords_are_cartesian=False</em>, <em class="sig-param">structure=None</em>, <em class="sig-param">projections=None</em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py#L133-L649"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.BandStructure" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>This is the most generic band structure data possible
it’s defined by a list of kpoints + energies for each of them</p>
<dl class="attribute">
<dt>
<code class="sig-name descname">kpoints:</code></dt>
<dt>
<code class="sig-name descname">the list of kpoints (as Kpoint objects) in the band structure</code></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="pymatgen.electronic_structure.bandstructure.BandStructure.lattice_rec">
<code class="sig-name descname">lattice_rec</code><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.BandStructure.lattice_rec" title="Permalink to this definition">¶</a></dt>
<dd><p>the reciprocal lattice of the band structure.</p>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.electronic_structure.bandstructure.BandStructure.efermi">
<code class="sig-name descname">efermi</code><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.BandStructure.efermi" title="Permalink to this definition">¶</a></dt>
<dd><p>the fermi energy</p>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.electronic_structure.bandstructure.BandStructure.is_spin_polarized">
<code class="sig-name descname">is_spin_polarized</code><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.BandStructure.is_spin_polarized" title="Permalink to this definition">¶</a></dt>
<dd><p>True if the band structure is spin-polarized, False otherwise</p>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.electronic_structure.bandstructure.BandStructure.bands">
<code class="sig-name descname">bands</code><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.BandStructure.bands" title="Permalink to this definition">¶</a></dt>
<dd><p>The energy eigenvalues as a {spin: ndarray}. Note that the use of an
ndarray is necessary for computational as well as memory efficiency
due to the large amount of numerical data. The indices of the ndarray
are [band_index, kpoint_index].</p>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.electronic_structure.bandstructure.BandStructure.nb_bands">
<code class="sig-name descname">nb_bands</code><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.BandStructure.nb_bands" title="Permalink to this definition">¶</a></dt>
<dd><p>returns the number of bands in the band structure</p>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.electronic_structure.bandstructure.BandStructure.structure">
<code class="sig-name descname">structure</code><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.BandStructure.structure" title="Permalink to this definition">¶</a></dt>
<dd><p>returns the structure</p>
</dd></dl>
<dl class="attribute">
<dt id="pymatgen.electronic_structure.bandstructure.BandStructure.projections">
<code class="sig-name descname">projections</code><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.BandStructure.projections" title="Permalink to this definition">¶</a></dt>
<dd><p>The projections as a {spin: ndarray}. Note that the use of an
ndarray is necessary for computational as well as memory efficiency
due to the large amount of numerical data. The indices of the ndarray
are [band_index, kpoint_index, orbital_index, ion_index].</p>
</dd></dl>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>kpoints</strong> – list of kpoint as numpy arrays, in frac_coords of the
given lattice by default</p></li>
<li><p><strong>eigenvals</strong> – dict of energies for spin up and spin down
{Spin.up:[][],Spin.down:[][]}, the first index of the array
[][] refers to the band and the second to the index of the
kpoint. The kpoints are ordered according to the order of the
kpoints array. If the band structure is not spin polarized, we
only store one data set under Spin.up</p></li>
<li><p><strong>lattice</strong> – The reciprocal lattice as a pymatgen Lattice object.
Pymatgen uses the physics convention of reciprocal lattice vectors
WITH a 2*pi coefficient</p></li>
<li><p><strong>efermi</strong> – fermi energy</p></li>
<li><p><strong>labels_dict</strong> – (dict) of {} this links a kpoint (in frac coords or
cartesian coordinates depending on the coords) to a label.</p></li>
<li><p><strong>coords_are_cartesian</strong> – Whether coordinates are cartesian.</p></li>
<li><p><strong>structure</strong> – The crystal structure (as a pymatgen Structure object)
associated with the band structure. This is needed if we
provide projections to the band structure</p></li>
<li><p><strong>projections</strong> – dict of orbital projections as {spin: ndarray}. The
indices of the ndarrayare [band_index, kpoint_index, orbital_index,
ion_index].If the band structure is not spin polarized, we only
store one data set under Spin.up.</p></li>
</ul>
</dd>
</dl>
<dl class="method">
<dt id="pymatgen.electronic_structure.bandstructure.BandStructure.as_dict">
<code class="sig-name descname">as_dict</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py#L541-L580"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.BandStructure.as_dict" title="Permalink to this definition">¶</a></dt>
<dd><p>Json-serializable dict representation of BandStructureSymmLine.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.electronic_structure.bandstructure.BandStructure.from_dict">
<em class="property">classmethod </em><code class="sig-name descname">from_dict</code><span class="sig-paren">(</span><em class="sig-param">d</em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py#L582-L610"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.BandStructure.from_dict" title="Permalink to this definition">¶</a></dt>
<dd><p>Create from dict.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>dict with all data for a band structure object.</strong> (<em>A</em>) – </p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>A BandStructure object</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.electronic_structure.bandstructure.BandStructure.from_old_dict">
<em class="property">classmethod </em><code class="sig-name descname">from_old_dict</code><span class="sig-paren">(</span><em class="sig-param">d</em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py#L612-L649"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.BandStructure.from_old_dict" title="Permalink to this definition">¶</a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>d</strong> (<em>dict</em>) – A dict with all data for a band structure symm line
object.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>A BandStructureSymmLine object</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.electronic_structure.bandstructure.BandStructure.get_band_gap">
<code class="sig-name descname">get_band_gap</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py#L429-L459"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.BandStructure.get_band_gap" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns band gap data.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>“energy”: band gap energy
“direct”: A boolean telling if the gap is direct or not
“transition”: kpoint labels of the transition (e.g., “\Gamma-X”)</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>A dict {“energy”,”direct”,”transition”}</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.electronic_structure.bandstructure.BandStructure.get_cbm">
<code class="sig-name descname">get_cbm</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py#L368-L427"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.BandStructure.get_cbm" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns data about the CBM.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>{“band_index”,”kpoint_index”,”kpoint”,”energy”}
- “band_index”: A dict with spin keys pointing to a list of the
indices of the band containing the VBM (please note that you
can have several bands sharing the VBM) {Spin.up:[],
Spin.down:[]}
- “kpoint_index”: The list of indices in self.kpoints for the
kpoint vbm. Please note that there can be several
kpoint_indices relating to the same kpoint (e.g., Gamma can
occur at different spots in the band structure line plot)
- “kpoint”: The kpoint (as a kpoint object)
- “energy”: The energy of the VBM
- “projections”: The projections along sites and orbitals of the
VBM if any projection data is available (else it is an empty
dictionnary). The format is similar to the projections field in
BandStructure: {spin:{‘Orbital’: [proj]}} where the array
[proj] is ordered according to the sites in structure</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.electronic_structure.bandstructure.BandStructure.get_direct_band_gap">
<code class="sig-name descname">get_direct_band_gap</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py#L488-L498"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.BandStructure.get_direct_band_gap" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the direct band gap.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>the value of the direct band gap</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.electronic_structure.bandstructure.BandStructure.get_direct_band_gap_dict">
<code class="sig-name descname">get_direct_band_gap_dict</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py#L461-L486"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.BandStructure.get_direct_band_gap_dict" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a dictionary of information about the direct
band gap</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>a dictionary of the band gaps indexed by spin
along with their band indices and k-point index</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.electronic_structure.bandstructure.BandStructure.get_kpoint_degeneracy">
<code class="sig-name descname">get_kpoint_degeneracy</code><span class="sig-paren">(</span><em class="sig-param">kpoint</em>, <em class="sig-param">cartesian=False</em>, <em class="sig-param">tol=0.01</em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py#L526-L539"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.BandStructure.get_kpoint_degeneracy" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns degeneracy of a given k-point based on structure symmetry
:param kpoint: coordinate of the k-point
:type kpoint: 1x3 array
:param cartesian: kpoint is in cartesian or fractional coordinates
:type cartesian: bool
:param tol: tolerance below which coordinates are considered equal
:type tol: float</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>degeneracy or None if structure is not available</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>(int or None)</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.electronic_structure.bandstructure.BandStructure.get_projection_on_elements">
<code class="sig-name descname">get_projection_on_elements</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py#L234-L255"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.BandStructure.get_projection_on_elements" title="Permalink to this definition">¶</a></dt>
<dd><p>Method returning a dictionary of projections on elements.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>[][{Element:values}],
Spin.down:[][{Element:values}]} format
if there is no projections in the band structure
returns an empty dict</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>a dictionary in the {Spin.up</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.electronic_structure.bandstructure.BandStructure.get_projections_on_elements_and_orbitals">
<code class="sig-name descname">get_projections_on_elements_and_orbitals</code><span class="sig-paren">(</span><em class="sig-param">el_orb_spec</em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py#L257-L293"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.BandStructure.get_projections_on_elements_and_orbitals" title="Permalink to this definition">¶</a></dt>
<dd><p>Method returning a dictionary of projections on elements and specific
orbitals</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>el_orb_spec</strong> – A dictionary of Elements and Orbitals for which we want
to have projections on. It is given as: {Element:[orbitals]},
e.g., {‘Cu’:[‘d’,’s’]}</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>A dictionary of projections on elements in the
{Spin.up:[][{Element:{orb:values}}],
Spin.down:[][{Element:{orb:values}}]} format
if there is no projections in the band structure returns an empty
dict.</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.electronic_structure.bandstructure.BandStructure.get_sym_eq_kpoints">
<code class="sig-name descname">get_sym_eq_kpoints</code><span class="sig-paren">(</span><em class="sig-param">kpoint</em>, <em class="sig-param">cartesian=False</em>, <em class="sig-param">tol=0.01</em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py#L500-L524"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.BandStructure.get_sym_eq_kpoints" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a list of unique symmetrically equivalent k-points.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>kpoint</strong> (<em>1x3 array</em>) – coordinate of the k-point</p></li>
<li><p><strong>cartesian</strong> (<em>bool</em>) – kpoint is in cartesian or fractional coordinates</p></li>
<li><p><strong>tol</strong> (<em>float</em>) – tolerance below which coordinates are considered equal</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>if structure is not available returns None</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>([1x3 array] or None)</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.electronic_structure.bandstructure.BandStructure.get_vbm">
<code class="sig-name descname">get_vbm</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py#L310-L366"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.BandStructure.get_vbm" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns data about the VBM.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>dict as {“band_index”,”kpoint_index”,”kpoint”,”energy”}
- “band_index”: A dict with spin keys pointing to a list of the
indices of the band containing the VBM (please note that you
can have several bands sharing the VBM) {Spin.up:[],
Spin.down:[]}
- “kpoint_index”: The list of indices in self.kpoints for the
kpoint vbm. Please note that there can be several
kpoint_indices relating to the same kpoint (e.g., Gamma can
occur at different spots in the band structure line plot)
- “kpoint”: The kpoint (as a kpoint object)
- “energy”: The energy of the VBM
- “projections”: The projections along sites and orbitals of the
VBM if any projection data is available (else it is an empty
dictionnary). The format is similar to the projections field in
BandStructure: {spin:{‘Orbital’: [proj]}} where the array
[proj] is ordered according to the sites in structure</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.electronic_structure.bandstructure.BandStructure.is_metal">
<code class="sig-name descname">is_metal</code><span class="sig-paren">(</span><em class="sig-param">efermi_tol=0.0001</em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py#L295-L308"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.BandStructure.is_metal" title="Permalink to this definition">¶</a></dt>
<dd><p>Check if the band structure indicates a metal by looking if the fermi
level crosses a band.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>True if a metal, False if not</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="pymatgen.electronic_structure.bandstructure.BandStructureSymmLine">
<em class="property">class </em><code class="sig-name descname">BandStructureSymmLine</code><span class="sig-paren">(</span><em class="sig-param">kpoints</em>, <em class="sig-param">eigenvals</em>, <em class="sig-param">lattice</em>, <em class="sig-param">efermi</em>, <em class="sig-param">labels_dict</em>, <em class="sig-param">coords_are_cartesian=False</em>, <em class="sig-param">structure=None</em>, <em class="sig-param">projections=None</em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py#L652-L960"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.BandStructureSymmLine" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.electronic_structure.bandstructure.BandStructure" title="pymatgen.electronic_structure.bandstructure.BandStructure"><code class="xref py py-class docutils literal notranslate"><span class="pre">pymatgen.electronic_structure.bandstructure.BandStructure</span></code></a>, <code class="xref py py-class docutils literal notranslate"><span class="pre">monty.json.MSONable</span></code></p>
<p>This object stores band structures along selected (symmetry) lines in the
Brillouin zone. We call the different symmetry lines (ex: \Gamma to Z)
“branches”.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>kpoints</strong> – list of kpoint as numpy arrays, in frac_coords of the
given lattice by default</p></li>
<li><p><strong>eigenvals</strong> – dict of energies for spin up and spin down
{Spin.up:[][],Spin.down:[][]}, the first index of the array
[][] refers to the band and the second to the index of the
kpoint. The kpoints are ordered according to the order of the
kpoints array. If the band structure is not spin polarized, we
only store one data set under Spin.up.</p></li>
<li><p><strong>lattice</strong> – The reciprocal lattice.
Pymatgen uses the physics convention of reciprocal lattice vectors
WITH a 2*pi coefficient</p></li>
<li><p><strong>efermi</strong> – fermi energy</p></li>
<li><p><strong>label_dict</strong> – (dict) of {} this link a kpoint (in frac coords or
cartesian coordinates depending on the coords).</p></li>
<li><p><strong>coords_are_cartesian</strong> – Whether coordinates are cartesian.</p></li>
<li><p><strong>structure</strong> – The crystal structure (as a pymatgen Structure object)
associated with the band structure. This is needed if we
provide projections to the band structure.</p></li>
<li><p><strong>projections</strong> – dict of orbital projections as {spin: ndarray}. The
indices of the ndarrayare [band_index, kpoint_index, orbital_index,
ion_index].If the band structure is not spin polarized, we only
store one data set under Spin.up.</p></li>
</ul>
</dd>
</dl>
<dl class="method">
<dt id="pymatgen.electronic_structure.bandstructure.BandStructureSymmLine.apply_scissor">
<code class="sig-name descname">apply_scissor</code><span class="sig-paren">(</span><em class="sig-param">new_band_gap</em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py#L780-L841"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.BandStructureSymmLine.apply_scissor" title="Permalink to this definition">¶</a></dt>
<dd><p>Apply a scissor operator (shift of the CBM) to fit the given band gap.
If it’s a metal. We look for the band crossing the fermi level
and shift this one up. This will not work all the time for metals!</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>new_band_gap</strong> – the band gap the scissor band structure need to have.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a BandStructureSymmLine object with the applied scissor shift</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.electronic_structure.bandstructure.BandStructureSymmLine.as_dict">
<code class="sig-name descname">as_dict</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py#L843-L886"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.BandStructureSymmLine.as_dict" title="Permalink to this definition">¶</a></dt>
<dd><p>Json-serializable dict representation of BandStructureSymmLine.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.electronic_structure.bandstructure.BandStructureSymmLine.from_dict">
<em class="property">classmethod </em><code class="sig-name descname">from_dict</code><span class="sig-paren">(</span><em class="sig-param">d</em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py#L888-L920"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.BandStructureSymmLine.from_dict" title="Permalink to this definition">¶</a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>d</strong> (<em>dict</em>) – A dict with all data for a band structure symm line
object.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>A BandStructureSymmLine object</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.electronic_structure.bandstructure.BandStructureSymmLine.from_old_dict">
<em class="property">classmethod </em><code class="sig-name descname">from_old_dict</code><span class="sig-paren">(</span><em class="sig-param">d</em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py#L922-L960"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.BandStructureSymmLine.from_old_dict" title="Permalink to this definition">¶</a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>d</strong> (<em>dict</em>) – A dict with all data for a band structure symm line
object.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>A BandStructureSymmLine object</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.electronic_structure.bandstructure.BandStructureSymmLine.get_branch">
<code class="sig-name descname">get_branch</code><span class="sig-paren">(</span><em class="sig-param">index</em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py#L756-L778"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.BandStructureSymmLine.get_branch" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns in what branch(es) is the kpoint. There can be several
branches.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>index</strong> – the kpoint index</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>A list of dictionaries [{“name”,”start_index”,”end_index”,”index”}]
indicating all branches in which the k_point is. It takes into
account the fact that one kpoint (e.g., \Gamma) can be in several
branches</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.electronic_structure.bandstructure.BandStructureSymmLine.get_equivalent_kpoints">
<code class="sig-name descname">get_equivalent_kpoints</code><span class="sig-paren">(</span><em class="sig-param">index</em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py#L729-L754"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.BandStructureSymmLine.get_equivalent_kpoints" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the list of kpoint indices equivalent (meaning they are the
same frac coords) to the given one.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>index</strong> – the kpoint index</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a list of equivalent indices</p>
</dd>
</dl>
<p>TODO: now it uses the label we might want to use coordinates instead
(in case there was a mislabel)</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="pymatgen.electronic_structure.bandstructure.Kpoint">
<em class="property">class </em><code class="sig-name descname">Kpoint</code><span class="sig-paren">(</span><em class="sig-param">coords</em>, <em class="sig-param">lattice</em>, <em class="sig-param">to_unit_cell=False</em>, <em class="sig-param">coords_are_cartesian=False</em>, <em class="sig-param">label=None</em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py#L33-L130"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.Kpoint" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">monty.json.MSONable</span></code></p>
<p>Class to store kpoint objects. A kpoint is defined with a lattice and frac
or cartesian coordinates syntax similar than the site object in
pymatgen.core.structure.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>coords</strong> – coordinate of the kpoint as a numpy array</p></li>
<li><p><strong>lattice</strong> – A pymatgen.core.lattice.Lattice lattice object representing
the reciprocal lattice of the kpoint</p></li>
<li><p><strong>to_unit_cell</strong> – Translates fractional coordinate to the basic unit
cell, i.e., all fractional coordinates satisfy 0 <= a < 1.
Defaults to False.</p></li>
<li><p><strong>coords_are_cartesian</strong> – Boolean indicating if the coordinates given are
in cartesian or fractional coordinates (by default fractional)</p></li>
<li><p><strong>label</strong> – the label of the kpoint if any (None by default)</p></li>
</ul>
</dd>
</dl>
<dl class="method">
<dt id="pymatgen.electronic_structure.bandstructure.Kpoint.a">
<em class="property">property </em><code class="sig-name descname">a</code><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.Kpoint.a" title="Permalink to this definition">¶</a></dt>
<dd><p>Fractional a coordinate of the kpoint</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.electronic_structure.bandstructure.Kpoint.as_dict">
<code class="sig-name descname">as_dict</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py#L122-L130"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.Kpoint.as_dict" title="Permalink to this definition">¶</a></dt>
<dd><p>Json-serializable dict representation of a kpoint</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.electronic_structure.bandstructure.Kpoint.b">
<em class="property">property </em><code class="sig-name descname">b</code><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.Kpoint.b" title="Permalink to this definition">¶</a></dt>
<dd><p>Fractional b coordinate of the kpoint</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.electronic_structure.bandstructure.Kpoint.c">
<em class="property">property </em><code class="sig-name descname">c</code><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.Kpoint.c" title="Permalink to this definition">¶</a></dt>
<dd><p>Fractional c coordinate of the kpoint</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.electronic_structure.bandstructure.Kpoint.cart_coords">
<em class="property">property </em><code class="sig-name descname">cart_coords</code><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.Kpoint.cart_coords" title="Permalink to this definition">¶</a></dt>
<dd><p>The cartesian coordinates of the kpoint as a numpy array</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.electronic_structure.bandstructure.Kpoint.frac_coords">
<em class="property">property </em><code class="sig-name descname">frac_coords</code><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.Kpoint.frac_coords" title="Permalink to this definition">¶</a></dt>
<dd><p>The fractional coordinates of the kpoint as a numpy array</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.electronic_structure.bandstructure.Kpoint.label">
<em class="property">property </em><code class="sig-name descname">label</code><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.Kpoint.label" title="Permalink to this definition">¶</a></dt>
<dd><p>The label associated with the kpoint</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.electronic_structure.bandstructure.Kpoint.lattice">
<em class="property">property </em><code class="sig-name descname">lattice</code><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.Kpoint.lattice" title="Permalink to this definition">¶</a></dt>
<dd><p>The lattice associated with the kpoint. It’s a
pymatgen.core.lattice.Lattice object</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="pymatgen.electronic_structure.bandstructure.LobsterBandStructureSymmLine">
<em class="property">class </em><code class="sig-name descname">LobsterBandStructureSymmLine</code><span class="sig-paren">(</span><em class="sig-param">kpoints</em>, <em class="sig-param">eigenvals</em>, <em class="sig-param">lattice</em>, <em class="sig-param">efermi</em>, <em class="sig-param">labels_dict</em>, <em class="sig-param">coords_are_cartesian=False</em>, <em class="sig-param">structure=None</em>, <em class="sig-param">projections=None</em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py#L963-L1135"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.LobsterBandStructureSymmLine" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#pymatgen.electronic_structure.bandstructure.BandStructureSymmLine" title="pymatgen.electronic_structure.bandstructure.BandStructureSymmLine"><code class="xref py py-class docutils literal notranslate"><span class="pre">pymatgen.electronic_structure.bandstructure.BandStructureSymmLine</span></code></a></p>
<p>Lobster subclass of BandStructure with customized functions.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>kpoints</strong> – list of kpoint as numpy arrays, in frac_coords of the
given lattice by default</p></li>
<li><p><strong>eigenvals</strong> – dict of energies for spin up and spin down
{Spin.up:[][],Spin.down:[][]}, the first index of the array
[][] refers to the band and the second to the index of the
kpoint. The kpoints are ordered according to the order of the
kpoints array. If the band structure is not spin polarized, we
only store one data set under Spin.up.</p></li>
<li><p><strong>lattice</strong> – The reciprocal lattice.
Pymatgen uses the physics convention of reciprocal lattice vectors
WITH a 2*pi coefficient</p></li>
<li><p><strong>efermi</strong> – fermi energy</p></li>
<li><p><strong>label_dict</strong> – (dict) of {} this link a kpoint (in frac coords or
cartesian coordinates depending on the coords).</p></li>
<li><p><strong>coords_are_cartesian</strong> – Whether coordinates are cartesian.</p></li>
<li><p><strong>structure</strong> – The crystal structure (as a pymatgen Structure object)
associated with the band structure. This is needed if we
provide projections to the band structure.</p></li>
<li><p><strong>projections</strong> – dict of orbital projections as {spin: ndarray}. The
indices of the ndarrayare [band_index, kpoint_index, orbital_index,
ion_index].If the band structure is not spin polarized, we only
store one data set under Spin.up.</p></li>
</ul>
</dd>
</dl>
<dl class="method">
<dt id="pymatgen.electronic_structure.bandstructure.LobsterBandStructureSymmLine.as_dict">
<code class="sig-name descname">as_dict</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py#L968-L1011"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.LobsterBandStructureSymmLine.as_dict" title="Permalink to this definition">¶</a></dt>
<dd><p>Json-serializable dict representation of BandStructureSymmLine.</p>
</dd></dl>
<dl class="method">
<dt id="pymatgen.electronic_structure.bandstructure.LobsterBandStructureSymmLine.from_dict">
<em class="property">classmethod </em><code class="sig-name descname">from_dict</code><span class="sig-paren">(</span><em class="sig-param">d</em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py#L1013-L1045"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.LobsterBandStructureSymmLine.from_dict" title="Permalink to this definition">¶</a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>d</strong> (<em>dict</em>) – A dict with all data for a band structure symm line
object.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>A BandStructureSymmLine object</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.electronic_structure.bandstructure.LobsterBandStructureSymmLine.from_old_dict">
<em class="property">classmethod </em><code class="sig-name descname">from_old_dict</code><span class="sig-paren">(</span><em class="sig-param">d</em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py#L1047-L1076"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.LobsterBandStructureSymmLine.from_old_dict" title="Permalink to this definition">¶</a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>d</strong> (<em>dict</em>) – A dict with all data for a band structure symm line
object.</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>A BandStructureSymmLine object</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.electronic_structure.bandstructure.LobsterBandStructureSymmLine.get_projection_on_elements">
<code class="sig-name descname">get_projection_on_elements</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py#L1078-L1100"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.LobsterBandStructureSymmLine.get_projection_on_elements" title="Permalink to this definition">¶</a></dt>
<dd><p>Method returning a dictionary of projections on elements.
It sums over all available orbitals for each element.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>[][{Element:values}],
Spin.down:[][{Element:values}]} format
if there is no projections in the band structure
returns an empty dict</p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>a dictionary in the {Spin.up</p>
</dd>
</dl>
</dd></dl>
<dl class="method">
<dt id="pymatgen.electronic_structure.bandstructure.LobsterBandStructureSymmLine.get_projections_on_elements_and_orbitals">
<code class="sig-name descname">get_projections_on_elements_and_orbitals</code><span class="sig-paren">(</span><em class="sig-param">el_orb_spec</em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py#L1102-L1135"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.LobsterBandStructureSymmLine.get_projections_on_elements_and_orbitals" title="Permalink to this definition">¶</a></dt>
<dd><p>Method returning a dictionary of projections on elements and specific
orbitals</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>el_orb_spec</strong> – A dictionary of Elements and Orbitals for which we want
to have projections on. It is given as: {Element:[orbitals]},
e.g., {‘Si’:[‘3s’,‘3p’]} or {‘Si’:[‘3s’,‘3p_x’, ‘3p_y’, ‘3p_z’]} depending on input files</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>A dictionary of projections on elements in the
{Spin.up:[][{Element:{orb:values}}],
Spin.down:[][{Element:{orb:values}}]} format
if there is no projections in the band structure returns an empty
dict.</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="function">
<dt id="pymatgen.electronic_structure.bandstructure.get_reconstructed_band_structure">
<code class="sig-name descname">get_reconstructed_band_structure</code><span class="sig-paren">(</span><em class="sig-param">list_bs</em>, <em class="sig-param">efermi=None</em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/v2020.1.10/pymatgen/electronic_structure/bandstructure.py#L1138-L1195"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.electronic_structure.bandstructure.get_reconstructed_band_structure" title="Permalink to this definition">¶</a></dt>
<dd><p>This method takes a list of band structures and reconstructs
one band structure object from all of them.</p>
<p>This is typically very useful when you split non self consistent
band structure runs in several independent jobs and want to merge back
the results</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>list_bs</strong> – A list of BandStructure or BandStructureSymmLine objects.</p></li>
<li><p><strong>efermi</strong> – The Fermi energy of the reconstructed band structure. If
None is assigned an average of all the Fermi energy in each
object in the list_bs is used.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>A BandStructure or BandStructureSymmLine object (depending on
the type of the list_bs objects)</p>
</dd>
</dl>
</dd></dl>
</div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
© Copyright 2011, Pymatgen Development Team
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
<div class="footer">This page uses <a href="http://analytics.google.com/">
Google Analytics</a> to collect statistics. You can disable it by blocking
the JavaScript coming from www.google-analytics.com.
<script type="text/javascript">
(function() {
var ga = document.createElement('script');
ga.src = ('https:' == document.location.protocol ?
'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
ga.setAttribute('async', 'true');
document.documentElement.firstChild.appendChild(ga);
})();
</script>
</div>
</body>
</html>
|
fraricci/pymatgen
|
docs/pymatgen.electronic_structure.bandstructure.html
|
HTML
|
mit
| 56,402
|
using System.Xml.Serialization;
namespace WebApiDavExtension.CalDav
{
[XmlRoot("href", Namespace = "DAV:")]
public class HRef
{
public HRef()
{
}
public HRef(string reference)
{
Reference = reference;
}
[XmlText]
public string Reference { get; set; }
}
}
|
medocheck/WebApiDavExtension
|
WebApiDavExtension/CalDav/HRef.cs
|
C#
|
mit
| 353
|
<!DOCTYPE html>
<html lang="en" prefix="og: http://ogp.me/ns# fb: https://www.facebook.com/2008/fbml">
<head>
<!-- ****** faviconit.com favicons ****** -->
<link rel="shortcut icon" href="/favicon.ico">
<link rel="icon" sizes="16x16 32x32 64x64" href="/favicon.ico">
<link rel="icon" type="image/png" sizes="196x196" href="/favicon-192.png">
<link rel="icon" type="image/png" sizes="160x160" href="/favicon-160.png">
<link rel="icon" type="image/png" sizes="96x96" href="/favicon-96.png">
<link rel="icon" type="image/png" sizes="64x64" href="/favicon-64.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16.png">
<link rel="apple-touch-icon" href="/favicon-57.png">
<link rel="apple-touch-icon" sizes="114x114" href="/favicon-114.png">
<link rel="apple-touch-icon" sizes="72x72" href="/favicon-72.png">
<link rel="apple-touch-icon" sizes="144x144" href="/favicon-144.png">
<link rel="apple-touch-icon" sizes="60x60" href="/favicon-60.png">
<link rel="apple-touch-icon" sizes="120x120" href="/favicon-120.png">
<link rel="apple-touch-icon" sizes="76x76" href="/favicon-76.png">
<link rel="apple-touch-icon" sizes="152x152" href="/favicon-152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/favicon-180.png">
<meta name="msapplication-TileColor" content="#FFFFFF">
<meta name="msapplication-TileImage" content="/favicon-144.png">
<meta name="msapplication-config" content="/browserconfig.xml">
<!-- ****** faviconit.com favicons ****** -->
<title>QR Sticker Code generator for QL-700 - Nathan Harrington</title>
<!-- Using the latest rendering mode for IE -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="/posts/qr-sticker-code-generator-for-ql-700.html">
<meta name="author" content="Nathan Harrington" />
<meta name="keywords" content="wasatch photonics" />
<meta name="description" content="Web service to create qr codes, short links and QL-700 shaped stickers for device serialization . Live demo available at waspho.com. This is used by the CookBook spectrometer tracking system. Requires the apparently defunct PyQRNative project with the wasatch fork to compile on linux. Available on GitHub" />
<meta property="og:site_name" content="Nathan Harrington" />
<meta property="og:type" content="article"/>
<meta property="og:title" content="QR Sticker Code generator for QL-700"/>
<meta property="og:url" content="/posts/qr-sticker-code-generator-for-ql-700.html"/>
<meta property="og:description" content="Web service to create qr codes, short links and QL-700 shaped stickers for device serialization . Live demo available at waspho.com. This is used by the CookBook spectrometer tracking system. Requires the apparently defunct PyQRNative project with the wasatch fork to compile on linux. Available on GitHub"/>
<meta property="article:published_time" content="2015-11-11" />
<meta property="article:section" content="articles" />
<meta property="article:tag" content="wasatch photonics" />
<meta property="article:author" content="Nathan Harrington" />
<!-- Bootstrap -->
<link rel="stylesheet" href="/theme/css/bootstrap.min.css" type="text/css"/>
<link href="/theme/css/font-awesome.min.css" rel="stylesheet">
<link href="/theme/css/pygments/native.css" rel="stylesheet">
<link rel="stylesheet" href="/theme/css/style.css" type="text/css"/>
</head>
<body>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<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">
Nathan Harrington </a>
</div>
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav">
<li><a href="/pages/about.html">
About
</a></li>
<li><a href="/pages/standing-invitation.html">
Standing Invitation
</a></li>
<!-- custom link to blog roll/articles -->
<li><a href="/category/articles.html">Blog</a></li>
<!--
Don't display categories on menu
<li class="active">
<a href="/category/articles.html">Articles</a>
</li>
<li >
<a href="/category/patents.html">Patents</a>
</li>
-->
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="/archives.html"><i class="fa fa-th-list"></i><span class="icon-label">Archives</span></a></li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
</div> <!-- /.navbar -->
<!-- Banner -->
<!-- End Banner -->
<div class="container">
<div class="row">
<div class="col-sm-9">
<section id="content">
<article>
<div class="entry-content">
<div style="padding-bottom:20px">
<img src="/images/wasatch-images/sticker_code_thumbnail.gif"></img>
</div>
<p>Web service to create qr codes, short links and <a href="http://www.brother-usa.com/LabelPrinter/ModelDetail/23/ql700/Overview">QL-700</a> shaped
stickers for device serialization .
Live demo available at <a href="http://waspho.com:8083/">waspho.com</a>.
This is used by the <a href="http://waspho.com">CookBook</a> spectrometer
tracking system. Requires the apparently defunct
<a href="https://github.com/b45ch1/pyqrnative">PyQRNative</a>
project with the <a href="https://github.com/WasatchPhotonics/pyqrnative">wasatch
fork</a> to compile on linux.</p>
<p>Available on <a href="https://github.com/WasatchPhotonics/StickerCode">GitHub</a></p>
<div class="panel">
<div class="panel-body">
<footer class="post-info">
<span class="label label-default">Date</span>
<span class="published">
<i class="fa fa-calendar"></i><time datetime="2015-11-11T00:00:00-05:00"> Wed 11 November 2015</time>
</span>
<span class="label label-default">Tags</span>
<a href="/tag/wasatch-photonics.html">wasatch photonics</a>
</footer><!-- /.post-info --> </div>
</div>
</div>
<!-- /.entry-content -->
</article>
</section>
</div>
<div class="col-sm-3" id="sidebar">
<aside>
<section class="well well-sm">
<ul class="list-group list-group-flush">
<li class="list-group-item"><h4><i class="fa fa-home fa-lg"></i><span class="icon-label">Social</span></h4>
<ul class="list-group" id="social">
<li class="list-group-item"><a href="http://github.com/NathanHarrington"><i class="fa fa-github-square fa-lg"></i> github</a></li>
<li class="list-group-item"><a href="https://www.linkedin.com/in/harringtonnathan"><i class="fa fa-linkedin-square fa-lg"></i> linkedin</a></li>
<li class="list-group-item"><a href="https://plus.google.com/100412424991063551562"><i class="fa fa-google-plus-square fa-lg"></i> google-plus</a></li>
</ul>
</li>
</ul>
</section>
</aside>
</div>
</div>
</div>
<footer>
<div class="container">
<hr>
<div class="row">
<div class="col-xs-10">© 2021 Nathan Harrington
· Powered by <a href="https://github.com/getpelican/pelican-themes/tree/master/pelican-bootstrap3" target="_blank">pelican-bootstrap3</a>,
<a href="http://docs.getpelican.com/" target="_blank">Pelican</a>,
<a href="http://getbootstrap.com" target="_blank">Bootstrap</a> </div>
<div class="col-xs-2"><p class="pull-right"><i class="fa fa-arrow-up"></i> <a href="#">Back to top</a></p></div>
</div>
</div>
</footer>
<script src="/theme/js/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="/theme/js/bootstrap.min.js"></script>
<!-- Enable responsive features in IE8 with Respond.js (https://github.com/scottjehl/Respond) -->
<script src="/theme/js/respond.min.js"></script>
<!-- Google Analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-4602287-2']);
_gaq.push(['_trackPageview']);
(function () {
var ga = document.createElement('script');
ga.type = 'text/javascript';
ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
})();
</script>
<!-- End Google Analytics Code -->
</body>
</html>
|
NathanHarrington/NathanHarrington.github.io
|
posts/qr-sticker-code-generator-for-ql-700.html
|
HTML
|
mit
| 9,563
|
import asyncio
import rocat.message
import rocat.actor
import rocat.globals
class BaseActorRef(object):
def tell(self, m, *, sender=None):
raise NotImplementedError
def ask(self, m, *, timeout=None):
raise NotImplementedError
def error(self, e):
raise NotImplementedError
class LocalActorRef(BaseActorRef):
def __init__(self, q, loop):
self._q = q
self._loop = loop
def _send(self, envel):
self._loop.call_soon_threadsafe(self._q.put_nowait, envel)
def tell(self, m, *, sender=None):
if sender is None:
sender = _guess_current_sender()
self._send(rocat.message.Envelope.for_tell(m, sender=sender))
async def ask(self, m, *, timeout=None):
fut = asyncio.get_event_loop().create_future()
sender = FunctionRef(fut, asyncio.get_event_loop())
self._send(rocat.message.Envelope.for_ask(m, sender=sender))
if timeout is None:
timeout = _guess_default_timeout()
if timeout > 0:
reply = await asyncio.wait_for(fut, timeout)
else:
reply = await fut
if reply.is_error:
raise reply.msg
return reply.msg
def error(self, e):
raise NotImplementedError('You can tell error only when you reply')
class FunctionRef(BaseActorRef):
def __init__(self, fut, loop):
self._fut = fut
self._loop = loop
def _send(self, envel):
self._loop.call_soon_threadsafe(self._try_set_future, envel)
def _try_set_future(self, result):
if not self._fut.done():
self._fut.set_result(result)
def tell(self, m, *, sender=None):
if sender is None:
sender = _guess_current_sender()
self._send(rocat.message.Envelope.for_ask(m, sender=sender))
def ask(self, m, *, sender=None, timeout=None):
raise NotImplementedError('You cannot ask back to ask request')
def error(self, e):
self._send(rocat.message.Envelope.for_error(e))
def _guess_current_sender():
current_ctx = rocat.actor.ActorContext.current()
if current_ctx is not None:
return current_ctx.sender
def _guess_default_timeout():
current_ctx = rocat.actor.ActorContext.current()
if current_ctx is not None:
return current_ctx.default_timeout or -1
return -1
|
chongkong/rocat
|
rocat/ref.py
|
Python
|
mit
| 2,370
|
//
// This source file is part of appleseed.
// Visit https://appleseedhq.net/ for additional information and resources.
//
// This software is released under the MIT license.
//
// Copyright (c) 2017-2018 Esteban Tovagliari, The appleseedhq Organization
//
// 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.
//
// Interface header.
#include "plasticbrdf.h"
// appleseed.renderer headers.
#include "renderer/kernel/lighting/scatteringmode.h"
#include "renderer/kernel/shading/directshadingcomponents.h"
#include "renderer/kernel/shading/shadingpoint.h"
#include "renderer/modeling/bsdf/bsdf.h"
#include "renderer/modeling/bsdf/bsdfsample.h"
#include "renderer/modeling/bsdf/bsdfwrapper.h"
#include "renderer/modeling/bsdf/fresnel.h"
#include "renderer/modeling/bsdf/microfacethelper.h"
#include "renderer/utility/paramarray.h"
// appleseed.foundation headers.
#include "foundation/containers/dictionary.h"
#include "foundation/math/basis.h"
#include "foundation/math/dual.h"
#include "foundation/math/fresnel.h"
#include "foundation/math/microfacet.h"
#include "foundation/math/sampling/mappings.h"
#include "foundation/math/vector.h"
#include "foundation/utility/api/specializedapiarrays.h"
#include "foundation/utility/makevector.h"
// Standard headers.
#include <algorithm>
#include <cmath>
#include <cstddef>
#include <string>
// Forward declarations.
namespace foundation { class IAbortSwitch; }
namespace renderer { class Assembly; }
namespace renderer { class Project; }
using namespace foundation;
namespace renderer
{
namespace
{
//
// Plastic BRDF.
//
// References:
//
// [1] A Physically-Based Reflectance Model Combining Reflection and Diffraction
// https://hal.inria.fr/hal-01386157
//
// [2] Mitsuba renderer
// https://github.com/mitsuba-renderer/mitsuba
//
const char* Model = "plastic_brdf";
class PlasticBRDFImpl
: public BSDF
{
public:
PlasticBRDFImpl(
const char* name,
const ParamArray& params)
: BSDF(name, Reflective, ScatteringMode::Diffuse | ScatteringMode::Glossy | ScatteringMode::Specular, params)
{
m_inputs.declare("diffuse_reflectance", InputFormatSpectralReflectance);
m_inputs.declare("diffuse_reflectance_multiplier", InputFormatFloat, "1.0");
m_inputs.declare("specular_reflectance", InputFormatSpectralReflectance);
m_inputs.declare("specular_reflectance_multiplier", InputFormatFloat, "1.0");
m_inputs.declare("roughness", InputFormatFloat, "0.15");
m_inputs.declare("ior", InputFormatFloat, "1.5");
m_inputs.declare("internal_scattering", InputFormatFloat, "1.0");
}
void release() override
{
delete this;
}
const char* get_model() const override
{
return Model;
}
size_t compute_input_data_size() const override
{
return sizeof(InputValues);
}
void prepare_inputs(
Arena& arena,
const ShadingPoint& shading_point,
void* data) const override
{
InputValues* values = static_cast<InputValues*>(data);
// Apply multipliers to input values.
values->m_specular_reflectance *= values->m_specular_reflectance_multiplier;
values->m_diffuse_reflectance *= values->m_diffuse_reflectance_multiplier;
values->m_roughness = std::max(values->m_roughness, shading_point.get_ray().m_min_roughness);
new (&values->m_precomputed) InputValues::Precomputed();
const float outside_ior = shading_point.get_ray().get_current_ior();
values->m_precomputed.m_eta = outside_ior / values->m_ior;
values->m_precomputed.m_specular_weight = std::max(max_value(values->m_specular_reflectance), 0.0f);
values->m_precomputed.m_diffuse_weight = std::max(max_value(values->m_diffuse_reflectance), 0.0f);
}
void sample(
SamplingContext& sampling_context,
const void* data,
const bool adjoint,
const bool cosine_mult,
const LocalGeometry& local_geometry,
const Dual3f& outgoing,
const int modes,
BSDFSample& sample) const override
{
const InputValues* values = static_cast<const InputValues*>(data);
const float alpha = microfacet_alpha_from_roughness(values->m_roughness);
// Compute the microfacet normal by sampling the MDF.
const Vector3f wo = local_geometry.m_shading_basis.transform_to_local(outgoing.get_value());
sampling_context.split_in_place(3, 1);
const Vector3f s = sampling_context.next2<Vector3f>();
const Vector3f m =
alpha == 0.0f
? Vector3f(0.0f, 1.0f, 0.0f)
: GGXMDF::sample(wo, Vector2f(s[0], s[1]), alpha);
const float F = fresnel_reflectance(wo, m, values->m_precomputed.m_eta);
const float specular_probability = choose_specular_probability(*values, F);
Vector3f wi;
// Choose between specular/glossy and diffuse.
if (ScatteringMode::has_glossy(modes) &&
(!ScatteringMode::has_diffuse(modes) || s[2] < specular_probability))
{
wi = improve_normalization(reflect(wo, m));
if (wi.y <= 0.0f)
return;
if (alpha == 0.0f)
{
if (!ScatteringMode::has_specular(modes))
return;
sample.set_to_scattering(ScatteringMode::Specular, DiracDelta);
sample.m_value.m_glossy = values->m_specular_reflectance;
sample.m_value.m_glossy *= F;
sample.m_value.m_beauty = sample.m_value.m_glossy;
sample.m_incoming = Dual3f(local_geometry.m_shading_basis.transform_to_parent(wi));
sample.m_min_roughness = values->m_roughness;
sample.compute_glossy_reflected_differentials(local_geometry, values->m_roughness, outgoing);
}
else
{
const float probability = specular_pdf(alpha, wo, m) * specular_probability;
assert(probability >= 0.0f);
if (probability > 1.0e-6f)
{
sample.set_to_scattering(ScatteringMode::Glossy, probability);
sample.m_incoming = Dual3f(local_geometry.m_shading_basis.transform_to_parent(wi));
sample.m_min_roughness = values->m_roughness;
evaluate_specular(
values->m_specular_reflectance,
alpha,
wi,
wo,
m,
F,
sample.m_value.m_glossy);
sample.m_value.m_beauty = sample.m_value.m_glossy;
sample.compute_glossy_reflected_differentials(local_geometry, values->m_roughness, outgoing);
}
}
}
else
{
wi = sample_hemisphere_cosine(Vector2f(s[0], s[1]));
const float probability = wi.y * RcpPi<float>() * (1.0f - specular_probability);
assert(probability > 0.0f);
if (probability > 1.0e-6f)
{
sample.set_to_scattering(ScatteringMode::Diffuse, probability);
sample.m_incoming = Dual3f(local_geometry.m_shading_basis.transform_to_parent(wi));
sample.m_min_roughness = values->m_roughness;
const float Fi = fresnel_reflectance(wi, m, values->m_precomputed.m_eta);
evaluate_diffuse(
values->m_diffuse_reflectance,
values->m_precomputed.m_eta,
values->m_internal_scattering,
F,
Fi,
sample.m_value.m_diffuse);
sample.m_value.m_beauty = sample.m_value.m_diffuse;
sample.m_aov_components.m_albedo = values->m_diffuse_reflectance;
sample.compute_diffuse_differentials(outgoing);
}
}
}
float evaluate(
const void* data,
const bool adjoint,
const bool cosine_mult,
const LocalGeometry& local_geometry,
const Vector3f& outgoing,
const Vector3f& incoming,
const int modes,
DirectShadingComponents& value) const override
{
const InputValues* values = static_cast<const InputValues*>(data);
const float alpha = microfacet_alpha_from_roughness(values->m_roughness);
const Vector3f wo = local_geometry.m_shading_basis.transform_to_local(outgoing);
const Vector3f wi = local_geometry.m_shading_basis.transform_to_local(incoming);
const Vector3f m =
alpha == 0.0f
? Vector3f(0.0f, 1.0f, 0.0f)
: normalize(wi + wo);
const float Fo = fresnel_reflectance(wo, m, values->m_precomputed.m_eta);
const float Fi = fresnel_reflectance(wi, m, values->m_precomputed.m_eta);
const float specular_probability = choose_specular_probability(*values, Fo);
float pdf_glossy = 0.0f, pdf_diffuse = 0.0f;
if (ScatteringMode::has_glossy(modes))
{
evaluate_specular(
values->m_specular_reflectance,
alpha,
wi,
wo,
m,
Fo,
value.m_glossy);
pdf_glossy = specular_pdf(alpha, wo, m);
}
if (ScatteringMode::has_diffuse(modes))
{
evaluate_diffuse(
values->m_diffuse_reflectance,
values->m_precomputed.m_eta,
values->m_internal_scattering,
Fo,
Fi,
value.m_diffuse);
pdf_diffuse = std::abs(wi.y) * RcpPi<float>();
}
value.m_beauty = value.m_diffuse;
value.m_beauty += value.m_glossy;
const float pdf =
ScatteringMode::has_diffuse_and_glossy(modes) ? lerp(pdf_diffuse, pdf_glossy, specular_probability) :
ScatteringMode::has_diffuse(modes) ? pdf_diffuse :
ScatteringMode::has_glossy(modes) ? pdf_glossy : 0.0f;
assert(pdf >= 0.0f);
return pdf;
}
float evaluate_pdf(
const void* data,
const bool adjoint,
const LocalGeometry& local_geometry,
const Vector3f& outgoing,
const Vector3f& incoming,
const int modes) const override
{
const InputValues* values = static_cast<const InputValues*>(data);
const float alpha = microfacet_alpha_from_roughness(values->m_roughness);
const Vector3f wo = local_geometry.m_shading_basis.transform_to_local(outgoing);
const Vector3f wi = local_geometry.m_shading_basis.transform_to_local(incoming);
const Vector3f m =
alpha == 0.0f
? Vector3f(0.0f, 1.0f, 0.0f)
: normalize(wi + wo);
const float F = fresnel_reflectance(wo, m, values->m_precomputed.m_eta);
const float specular_probability = choose_specular_probability(*values, F);
const float pdf_glossy =
ScatteringMode::has_glossy(modes)
? specular_pdf(alpha, wo, m)
: 0.0f;
const float pdf_diffuse =
ScatteringMode::has_diffuse(modes)
? std::abs(wi.y) * RcpPi<float>()
: 0.0f;
const float pdf =
ScatteringMode::has_diffuse_and_glossy(modes) ? lerp(pdf_diffuse, pdf_glossy, specular_probability) :
ScatteringMode::has_diffuse(modes) ? pdf_diffuse :
ScatteringMode::has_glossy(modes) ? pdf_glossy : 0.0f;
assert(pdf >= 0.0f);
return pdf;
}
private:
typedef PlasticBRDFInputValues InputValues;
static float choose_specular_probability(
const InputValues& values,
const float F)
{
const float specular_weight = F * values.m_precomputed.m_specular_weight;
const float diffuse_weight = (1.0f - F) * values.m_precomputed.m_diffuse_weight;
const float total_weight = specular_weight + diffuse_weight;
return total_weight == 0.0f ? 1.0f : specular_weight / total_weight;
}
static float fresnel_reflectance(
const Vector3f& w,
const Vector3f& m,
const float eta)
{
const float cos_wm(dot(w, m));
if (cos_wm < 0.0f)
return 0.0f;
float F;
fresnel_reflectance_dielectric(
F,
eta,
std::min(cos_wm, 1.0f));
return F;
}
static void evaluate_specular(
const Spectrum& specular_reflectance,
const float alpha,
const Vector3f& wi,
const Vector3f& wo,
const Vector3f& m,
const float F,
Spectrum& value)
{
if (alpha == 0.0f)
return;
const float denom = std::abs(4.0f * wo.y * wi.y);
if (denom == 0.0f)
{
value.set(0.0f);
return;
}
value = specular_reflectance;
const float D = GGXMDF::D(m, alpha);
const float G = GGXMDF::G(wi, wo, m, alpha);
value *= F * D * G / denom;
}
static float specular_pdf(
const float alpha,
const Vector3f& wo,
const Vector3f& m)
{
if (alpha == 0.0f)
return 0.0f;
const float cos_wom = dot(wo, m);
if (cos_wom == 0.0f)
return 0.0f;
const float jacobian = 1.0f / (4.0f * std::abs(cos_wom));
return jacobian * GGXMDF::pdf(wo, m, alpha, alpha);
}
static void evaluate_diffuse(
const Spectrum& diffuse_reflectance,
const float eta,
const float internal_scattering,
const float Fo,
const float Fi,
Spectrum& value)
{
const float eta2 = square(eta);
const float fdr = fresnel_internal_diffuse_reflectance(1.0f / eta);
const float T = (1.0f - Fo) * (1.0f - Fi);
for (size_t i = 0, e = Spectrum::size(); i < e; ++i)
{
const float pd = diffuse_reflectance[i];
const float non_linear_term = 1.0f - lerp(1.0f, pd, internal_scattering) * fdr;
value[i] = (T * pd * eta2 * RcpPi<float>()) / non_linear_term;
}
}
};
typedef BSDFWrapper<PlasticBRDFImpl> PlasticBRDF;
}
//
// PlasticBRDFFactory class implementation.
//
void PlasticBRDFFactory::release()
{
delete this;
}
const char* PlasticBRDFFactory::get_model() const
{
return Model;
}
Dictionary PlasticBRDFFactory::get_model_metadata() const
{
return
Dictionary()
.insert("name", Model)
.insert("label", "Plastic BRDF");
}
DictionaryArray PlasticBRDFFactory::get_input_metadata() const
{
DictionaryArray metadata;
metadata.push_back(
Dictionary()
.insert("name", "diffuse_reflectance")
.insert("label", "Diffuse Reflectance")
.insert("type", "colormap")
.insert("entity_types",
Dictionary()
.insert("color", "Colors")
.insert("texture_instance", "Texture Instances"))
.insert("use", "required")
.insert("default", "0.5"));
metadata.push_back(
Dictionary()
.insert("name", "diffuse_reflectance_multiplier")
.insert("label", "Diffuse Reflectance Multiplier")
.insert("type", "colormap")
.insert("entity_types",
Dictionary().insert("texture_instance", "Texture Instances"))
.insert("use", "optional")
.insert("default", "1.0"));
metadata.push_back(
Dictionary()
.insert("name", "specular_reflectance")
.insert("label", "Specular Reflectance")
.insert("type", "colormap")
.insert("entity_types",
Dictionary()
.insert("color", "Colors")
.insert("texture_instance", "Texture Instances"))
.insert("use", "required")
.insert("default", "1.0"));
metadata.push_back(
Dictionary()
.insert("name", "specular_reflectance_multiplier")
.insert("label", "Specular Reflectance Multiplier")
.insert("type", "colormap")
.insert("entity_types",
Dictionary().insert("texture_instance", "Texture Instances"))
.insert("use", "optional")
.insert("default", "1.0"));
metadata.push_back(
Dictionary()
.insert("name", "roughness")
.insert("label", "Roughness")
.insert("type", "colormap")
.insert("entity_types",
Dictionary()
.insert("color", "Colors")
.insert("texture_instance", "Texture Instances"))
.insert("use", "optional")
.insert("min",
Dictionary()
.insert("value", "0.0")
.insert("type", "hard"))
.insert("max",
Dictionary()
.insert("value", "1.0")
.insert("type", "hard"))
.insert("default", "0.15"));
metadata.push_back(
Dictionary()
.insert("name", "ior")
.insert("label", "Index of Refraction")
.insert("type", "numeric")
.insert("min",
Dictionary()
.insert("value", "1.0")
.insert("type", "hard"))
.insert("max",
Dictionary()
.insert("value", "2.5")
.insert("type", "hard"))
.insert("use", "required")
.insert("default", "1.5"));
metadata.push_back(
Dictionary()
.insert("name", "internal_scattering")
.insert("label", "Internal Scattering")
.insert("type", "numeric")
.insert("min",
Dictionary()
.insert("value", "0.0")
.insert("type", "hard"))
.insert("max",
Dictionary()
.insert("value", "1.0")
.insert("type", "hard"))
.insert("use", "optional")
.insert("default", "1.0"));
return metadata;
}
auto_release_ptr<BSDF> PlasticBRDFFactory::create(
const char* name,
const ParamArray& params) const
{
return auto_release_ptr<BSDF>(new PlasticBRDF(name, params));
}
} // namespace renderer
|
est77/appleseed
|
src/appleseed/renderer/modeling/bsdf/plasticbrdf.cpp
|
C++
|
mit
| 21,564
|
//
// RNZoomTransition.h
// RNCustomTransitionsExample
//
// Created by Robert Nadin on 28/08/2014.
// Copyright (c) 2014 Rob Nadin. All rights reserved.
//
#import "RNTransition.h"
@protocol RNZoomTransitionDelegate <NSObject>
- (CGPoint)zoomOrigin;
@end
@interface RNZoomTransition : RNTransition
@property (nonatomic) id<RNZoomTransitionDelegate> zoomTransitionDelegate;
@property (nonatomic) CGFloat springDampingRatio;
@property (nonatomic) CGFloat springVelocity;
@end
|
robnadin/RNCustomTransitions
|
RNCustomTransitions/RNZoomTransition.h
|
C
|
mit
| 487
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<base href="../../" />
<script src="list.js"></script>
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body>
<h1>[name]</h1>
<div class="desc">
Represents a box in 2D space.
</div>
<h2>Constructor</h2>
<h3>[name]( [param:Vector2 min], [param:Vector2 max] )</h3>
<div>
[page:Vector2 min] - (optional) [page:Vector2] representing the lower (x, y) boundary of the box.
Default is ( + Infinity, + Infinity ).<br>
[page:Vector2 max] - (optional) [page:Vector2] representing the lower upper (x, y) boundary of the box.
Default is ( - Infinity, - Infinity ).<br /><br />
Creates a [name] bounded by min and max.
</div>
<h2>Properties</h2>
<h3>[property:Vector2 min]</h3>
<div>
[page:Vector2] representing the lower (x, y) boundary of the box.<br />
Default is ( + Infinity, + Infinity ).
</div>
<h3>[property:Vector2 max]</h3>
<div>
[page:Vector2] representing the lower upper (x, y) boundary of the box.<br />
Default is ( - Infinity, - Infinity ).
</div>
<h2>Methods</h2>
<h3>[method:Vector2 clampPoint]( [param:Vector2 point], [param:Vector2 optionalTarget] )</h3>
<div>
[page:Vector2 point] - [page:Vector2] to clamp. <br>
[page:Vector2 optionalTarget] — (optional) if specified, the result will be copied into this Vector2,
otherwise a new Vector2 will be created. <br /><br />
[link:https://en.wikipedia.org/wiki/Clamping_(graphics) Clamps] the [page:Vector2 point] within the bounds of this box.<br />
</div>
<h3>[method:Box2 clone]()</h3>
<div>Returns a new [page:Box2] with the same [page:.min min] and [page:.max max] as this one.</div>
<h3>[method:Boolean containsBox]( [param:Box2 box] )</h3>
<div>
[page:Box2 box] - [page:Box2 Box2] to test for inclusion.<br /><br />
Returns true if this box includes the entirety of [page:Box2 box]. If this and [page:Box2 box] are identical, <br>
this function also returns true.
</div>
<h3>[method:Boolean containsPoint]( [param:Vector2 point] )</h3>
<div>
[page:Vector2 point] - [page:Vector2] to check for inclusion.<br /><br />
Returns true if the specified [page:Vector2 point] lies within or on the boundaries of this box.
</div>
<h3>[method:Box2 copy]( [param:Box2 box] )</h3>
<div>
Copies the [page:.min min] and [page:.max max] from [page:Box2 box] to this box.
</div>
<h3>[method:Float distanceToPoint]( [param:Vector2 point] )</h3>
<div>
[page:Vector2 point] - [page:Vector2] to measure distance to.<br /><br />
Returns the distance from any edge of this box to the specified point.
If the [page:Vector2 point] lies inside of this box, the distance will be 0.
</div>
<h3>[method:Boolean equals]( [param:Box2 box] )</h3>
<div>
[page:Box2 box] - Box to compare with this one.<br /><br />
Returns true if this box and [page:Box2 box] share the same lower and upper bounds.
</div>
<h3>[method:Box2 expandByPoint]( [param:Vector2 point] )</h3>
<div>
[page:Vector2 point] - [page:Vector2] that should be included in the box.<br /><br />
Expands the boundaries of this box to include [page:Vector2 point].
</div>
<h3>[method:Box2 expandByScalar]( [param:float scalar] )</h3>
<div>
[page:float scalar] - Distance to expand the box by.<br /><br />
Expands each dimension of the box by [page:float scalar]. If negative, the dimensions of the box
will be contracted.
</div>
<h3>[method:Box2 expandByVector]( [param:Vector2 vector] )</h3>
<div>
[page:Vector2 vector] - [page:Vector2] to expand the box by.<br /><br />
Expands this box equilaterally by [page:Vector2 vector]. The width of this box will be
expanded by the x component of [page:Vector2 vector] in both directions. The height of
this box will be expanded by the y component of [page:Vector2 vector] in both directions.
</div>
<h3>[method:Vector2 getCenter]( [param:Vector2 optionalTarget] )</h3>
<div>
[page:Vector2 optionalTarget] — (optional) if specified, the result will be copied into this Vector2,
otherwise a new Vector2 will be created. <br /><br />
Returns the center point of the box as a [page:Vector2].
</div>
<h3>[method:Vector2 getParameter]( [param:Vector2 point], [param:Vector2 optionalTarget] ) </h3>
<div>
[page:Vector2 point] - [page:Vector2].<br/>
[page:Vector2 optionalTarget] — (optional) if specified, the result will be copied into this Vector2,
otherwise a new Vector2 will be created. <br /><br />
Returns a point as a proportion of this box's width and height.
</div>
<h3>[method:Vector2 getSize]( [param:Vector2 optionalTarget] )</h3>
<div>
[page:Vector2 optionalTarget] — (optional) if specified, the result will be copied into this Vector2,
otherwise a new Vector2 will be created. <br /><br />
Returns the width and height of this box.
</div>
<h3>[method:Box2 intersect]( [param:Box2 box] )</h3>
<div>
[page:Box2 box] - Box to intersect with.<br /><br />
Returns the intersection of this and [page:Box2 box], setting the upper bound of this box to the lesser
of the two boxes' upper bounds and the lower bound of this box to the greater of the two boxes'
lower bounds.
</div>
<h3>[method:Boolean intersectsBox]( [param:Box2 box] )</h3>
<div>
[page:Box2 box] - Box to check for intersection against.<br /><br />
Determines whether or not this box intersects [page:Box2 box].
</div>
<h3>[method:Boolean isEmpty]()</h3>
<div>
Returns true if this box includes zero points within its bounds.<br>
Note that a box with equal lower and upper bounds still includes one point, the
one both bounds share.
</div>
<h3>[method:Box2 makeEmpty]()</h3>
<div>Makes this box empty.</div>
<h3>[method:Box2 set]( [param:Vector2 min], [param:Vector2 max] )</h3>
<div>
[page:Vector2 min] - (required ) [page:Vector2] representing the lower (x, y) boundary of the box. <br>
[page:Vector2 max] - (required) [page:Vector2] representing the lower upper (x, y) boundary of the box. <br /><br />
Sets the lower and upper (x, y) boundaries of this box.
</div>
<h3>[method:Box2 setFromCenterAndSize]( [param:Vector2 center], [param:Vector2 size] )</h3>
<div>
[page:Vector2 center] - Desired center position of the box ([page:Vector2]). <br>
[page:Vector2 size] - Desired x and y dimensions of the box ([page:Vector2]).<br /><br />
Centers this box on [page:Vector2 center] and sets this box's width and height to the values specified
in [page:Vector2 size].
</div>
<h3>[method:Box2 setFromPoints]( [param:Array points] )</h3>
<div>
[page:Array points] - Array of [page:Vector2 Vector2s] that the resulting box will contain.<br /><br />
Sets the upper and lower bounds of this box to include all of the points in [page:Array points].
</div>
<h3>[method:Box2 translate]( [param:Vector2 offset] )</h3>
<div>
[page:Vector2 offset] - Direction and distance of offset.<br /><br />
Adds [page:Vector2 offset] to both the upper and lower bounds of this box, effectively moving this box
[page:Vector2 offset] units in 2D space.
</div>
<h3>[method:Box2 union]( [param:Box2 box] )</h3>
<div>
[page:Box2 box] - Box that will be unioned with this box.<br /><br />
Unions this box with [page:Box2 box], setting the upper bound of this box to the greater of the
two boxes' upper bounds and the lower bound of this box to the lesser of the two boxes'
lower bounds.
</div>
<h2>Source</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</body>
</html>
|
nhalloran/three.js
|
docs/api/math/Box2.html
|
HTML
|
mit
| 7,688
|
Switch 开关
===
表示两种相互对立的状态间的切换,多用于触发「开/关」。选中时的内容支持响应式。
```jsx
import { Switch } from 'uiw';
// or
import Switch from '@uiw/react-switch';
```
### 基本用法
<!--rehype:bgWhite=true&codeSandbox=true&codePen=true-->
```jsx
import ReactDOM from 'react-dom';
import { Switch } from 'uiw';
const Demo = () => (
<div>
<Switch checked style={{ marginRight: 10 }} />
<Switch style={{ marginRight: 10 }} />
<Switch data-checked="开" data-unchecked="关">电源</Switch>
</div>
);
ReactDOM.render(<Demo />, _mount_);
```
### Form 中使用 Switch
<!--rehype:bgWhite=true&codeSandbox=true&codePen=true-->
```jsx
import ReactDOM from 'react-dom';
import { Form, Switch, Row, Col, Button, Notify } from 'uiw';
const Demo = () => (
<Form
onChange={({ initial, current }) => { }}
resetOnSubmit={false}
onSubmitError={(error) => error && error.filed ? { ...error.filed } : null}
onSubmit={({initial, current}) => {
console.log('switch::', initial, current)
const ErrObj = {};
if(Object.keys(ErrObj).length > 0) {
const err = new Error();
err.filed = ErrObj;
throw err;
}
}}
fields={{
switch: {
checked: true,
initialValue: true,
label: '请输入内容',
help: '必选选项!',
validator: value => !value ? '必填选项!' : null,
children: <Switch style={{ maxWidth: 200 }} />,
},
}}
>
{({ fields, state, canSubmit }) => {
return (
<div>
<Row>
<Col>{fields.switch}</Col>
</Row>
<Row>
<Col>
<Button disabled={!canSubmit()} type="primary" htmlType="submit">提交</Button>
</Col>
</Row>
<Row>
<Col>
<pre style={{ padding: 10, marginTop: 10 }}>
{JSON.stringify(state.current, null, 2)}
</pre>
</Col>
</Row>
</div>
);
}}
</Form>
);
ReactDOM.render(<Demo />, _mount_);
```
### 设置文字
<!--rehype:bgWhite=true&codeSandbox=true&codePen=true-->
```jsx
import ReactDOM from 'react-dom';
import { Switch } from 'uiw';
const Demo = () => (
<div>
<Switch
data-checked="开"
data-unchecked="关"
onChange={(e) => {
console.log('e', e.target.checked);
}}
style={{ marginRight: 10 }}
/>
</div>
);
ReactDOM.render(<Demo />, _mount_);
```
### 禁用状态
<!--rehype:bgWhite=true&codeSandbox=true&codePen=true-->
```jsx
import ReactDOM from 'react-dom';
import { Switch } from 'uiw';
const Demo = () => (
<div>
<Switch disabled checked style={{ marginRight: 10 }} />
<Switch disabled style={{ marginRight: 10 }} />
<Switch disabled data-checked="开" data-unchecked="关">电源</Switch>
</div>
);
ReactDOM.render(<Demo />, _mount_);
```
### 尺寸
<!--rehype:bgWhite=true&codeSandbox=true&codePen=true-->
```jsx
import ReactDOM from 'react-dom';
import { Switch } from 'uiw';
const Demo = () => (
<div>
<Switch size="large" style={{ marginRight: 10 }} data-checked="开" data-unchecked="关" />
<Switch size="large" checked style={{ marginRight: 10 }} />
<Switch style={{ marginRight: 10 }} />
<Switch style={{ marginRight: 10 }} data-checked="开" data-unchecked="关" />
<Switch size="small" data-checked="开" data-unchecked="关">电源</Switch>
</div>
);
ReactDOM.render(<Demo />, _mount_);
```
### 控制组件
通过 `checked` 属性改变 `Switch` 组件状态。
<!--rehype:bgWhite=true&codeSandbox=true&codePen=true-->
```jsx
import React from 'react';
import ReactDOM from 'react-dom';
import { Switch, Button } from 'uiw';
class Demo extends React.Component {
constructor(props) {
super(props);
this.state = {
checked: true
}
}
onChange(e) {
console.log('~~~:::');
this.setState({ checked: e.target.checked });
}
render() {
return (
<div style={{ backgroundColor: '#fff', margin: -15, padding: 15, borderRadius: '5px 5px 0 0' }}>
<Switch onChange={this.onChange.bind(this)} checked={this.state.checked} style={{ marginRight: 10 }} />
<Button
size="small"
type="primary"
onClick={() => {
this.setState({ checked: !this.state.checked });
}}
>
点击按钮改变 Switch 状态
</Button>
</div>
)
}
}
ReactDOM.render(<Demo />, _mount_);
```
## Switch
| 参数 | 说明 | 类型 | 默认值 |
|------ |-------- |---------- |-------- |
| value | 根据 value 进行比较,判断是否选中 | String/Number/Boolean | - |
| name | 用于表单对应的名称 | String | - |
| checked | 指定当前是否选中 | boolean | false |
| disabled | 是否禁用 | boolean | false |
| onChange | 变化时回调函数 | Function(e:Event) | - |
| data-checked | 选中时的内容 | string/ReactNode | - |
| data-unchecked | 非选中时的内容 | string/ReactNode | - |
| size | 开关大小,可选值:`large` `default` `small` | string | default |
|
uiw-react/uiw
|
packages/react-switch/README.md
|
Markdown
|
mit
| 5,159
|
#!/usr/bin/env python3.7
# coding=utf-8
"""Jerod Gawne, 2018.06.28
https://github.com/jerodg/hackerrank
"""
import sys
import traceback
if __name__ == '__main__':
try:
n, m = map(int, input().split())
for i in range(1, n, 2):
print(str('.|.') * i).center(m, '-')
print(str('WELCOME').center(m, '-'))
for i in range(n - 2, -1, -2):
print(str('.|.') * i).center(m, '-')
except Exception:
print(traceback.print_exception(*sys.exc_info()))
|
jerodg/hackerrank-python
|
python/02.Strings/08.DesignerDoorMat/solution1.py
|
Python
|
mit
| 510
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace TheWorld.Services
{
using System.Diagnostics;
public class DebugMailService : IMailService
{
public void SendMail(string to, string from, string subject, string body)
{
Debug.WriteLine($"Sending Mail: To {to}, From {from}, Subject {subject}");
}
}
}
|
tonyisaway/aspdotnetcore-efcore-bootstrap-angular-web-app
|
TheWorld/Services/DebugMailService.cs
|
C#
|
mit
| 414
|
'use strict';
const { ManyToManyModifyMixin } = require('./ManyToManyModifyMixin');
const SQLITE_BUILTIN_ROW_ID = '_rowid_';
// We need to override this mixin for sqlite because sqlite doesn't support
// multi-column where in statements with subqueries. We need to use the
// internal _rowid_ column instead.
const ManyToManySqliteModifyMixin = (Operation) => {
return class extends ManyToManyModifyMixin(Operation) {
applyModifyFilterForRelatedTable(builder) {
const tableRef = builder.tableRefFor(this.relation.relatedModelClass);
const rowIdRef = `${tableRef}.${SQLITE_BUILTIN_ROW_ID}`;
const subquery = this.modifyFilterSubquery.clone().select(rowIdRef);
return builder.whereInComposite(rowIdRef, subquery);
}
applyModifyFilterForJoinTable(builder) {
const joinTableOwnerRefs = this.relation.joinTableOwnerProp.refs(builder);
const tableRef = builder.tableRefFor(this.relation.getJoinModelClass(builder));
const rowIdRef = `${tableRef}.${SQLITE_BUILTIN_ROW_ID}`;
const ownerValues = this.owner.getProps(this.relation);
const subquery = this.modifyFilterSubquery.clone().select(rowIdRef);
return builder
.whereInComposite(rowIdRef, subquery)
.whereInComposite(joinTableOwnerRefs, ownerValues);
}
};
};
module.exports = {
ManyToManySqliteModifyMixin,
};
|
Vincit/objection.js
|
lib/relations/manyToMany/ManyToManySqliteModifyMixin.js
|
JavaScript
|
mit
| 1,361
|
@extends('layouts.default')
@section('content')
@include('game.partials.header')
<!-- game menu -->
<div class="row">
<div class="col-sm-5 movie-production">
<p>Current loan: {{ $currentLoan }} € (max. 2000000 €)</p>
{{ Form::open(['route' => 'takeLoan_path']) }}
<div class="form-group">
{{ Form::label('amount', 'Loan:') }}
{{ Form::input('number', 'amount', 0, ['class' => 'input-sm form-control', 'max' => (2000000 - $currentLoan), 'min' => 0, 'step' => 100000]) }}
</div>
<div class="form-group div-button-footer">
{{ link_to_route('menu_path', 'Go back', null, ['class' => 'btn btn-sm btn-default']) }}
{{ Form::submit('Take loan!', ['class' => 'btn btn-sm btn-success']) }}
</div>
{{ Form::close() }}
</div>
</div>
@stop
|
teruk/movbizz
|
app/views/loan/take.blade.php
|
PHP
|
mit
| 783
|
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>element-ui-project</title>
</head>
<body>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
|
longze/vue2-study-together
|
element-ui-project/index.html
|
HTML
|
mit
| 206
|
---
title: covidspeak
short_title: covidspeak
authors: open-aac
datemod: '2020-05-11T05:53:14Z'
download_url: 'https://www.covidspeak.org/'
project_url: 'https://github.com/open-aac/covidspeak'
tags:
- alternative-and-augmentative-communication
categories:
- software
description: 'Real-Time Video Chat with Non-Verbal Communication Supports'
original_url: 'https://github.com/open-aac/covidspeak'
license: MIT
image_download: 'https://github.githubassets.com/images/search-key-slash.svg'
date: '2020-05-12T04:10:09Z'
relayed_by_ip: 143.159.200.209
moderated: true
moderated_short_title: covidspeak
image_download_sha: 7e2d30caebb4fdfbbb2cdfbf93e1877d14f4fe7ab030c80b28e4973604a4c16e
thumb: items/covidspeak-thumb.png
image: items/covidspeak.png
---
Real-Time Video Chat with Non-Verbal Communication Supports
|
openassistive/OpenATFrontEnd
|
content/item/covidspeak-p1z.md
|
Markdown
|
mit
| 817
|
/*
Copyright (C) 2015 MariaDB Corporation AB
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA
*/
#include <ma_global.h>
#include <ma_sys.h>
#include <ma_errmsg.h>
#include <mysql.h>
#include <mysql/client_plugin.h>
#include <mariadb/ma_io.h>
#include <stdio.h>
#include <string.h>
#ifdef HAVE_REMOTEIO
struct st_mysql_client_plugin_REMOTEIO *rio_plugin= NULL;
#endif
/* {{{ ma_open */
MA_FILE *ma_open(const char *location, const char *mode, MYSQL *mysql)
{
int CodePage= -1;
FILE *fp= NULL;
MA_FILE *ma_file= NULL;
if (!location || !location[0])
return NULL;
#ifdef HAVE_REMOTEIO
if (strstr(location, "://"))
goto remote;
#endif
#ifdef _WIN32
if (mysql && mysql->charset)
CodePage= madb_get_windows_cp(mysql->charset->csname);
#endif
if (CodePage == -1)
{
if (!(fp= fopen(location, mode)))
{
return NULL;
}
}
#ifdef _WIN32
/* See CONC-44: we need to support non ascii filenames too, so we convert
current character set to wchar_t and try to open the file via _wsopen */
else
{
wchar_t *w_filename= NULL;
wchar_t *w_mode= NULL;
int len;
DWORD Length;
len= MultiByteToWideChar(CodePage, 0, location, (int)strlen(location), NULL, 0);
if (!len)
return NULL;
if (!(w_filename= (wchar_t *)calloc(1, (len + 1) * sizeof(wchar_t))))
{
my_set_error(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0);
return NULL;
}
Length= len;
len= MultiByteToWideChar(CodePage, 0, location, (int)strlen(location), w_filename, (int)Length);
if (!len)
{
/* todo: error handling */
free(w_filename);
return NULL;
}
len= (int)strlen(mode);
if (!(w_mode= (wchar_t *)calloc(1, (len + 1) * sizeof(wchar_t))))
{
my_set_error(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0);
free(w_filename);
return NULL;
}
Length= len;
len= MultiByteToWideChar(CodePage, 0, mode, (int)strlen(mode), w_mode, (int)Length);
if (!len)
{
/* todo: error handling */
free(w_filename);
free(w_mode);
return NULL;
}
fp= _wfopen(w_filename, w_mode);
free(w_filename);
free(w_mode);
}
#endif
if (fp)
{
ma_file= (MA_FILE *)malloc(sizeof(MA_FILE));
if (!ma_file)
{
my_set_error(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0);
return NULL;
}
ma_file->type= MA_FILE_LOCAL;
ma_file->ptr= (void *)fp;
}
return ma_file;
#ifdef HAVE_REMOTEIO
remote:
/* check if plugin for remote io is available and try
* to open location */
{
MYSQL mysql;
if (rio_plugin ||(rio_plugin= (struct st_mysql_client_plugin_REMOTEIO *)
mysql_client_find_plugin(&mysql, NULL, MARIADB_CLIENT_REMOTEIO_PLUGIN)))
return rio_plugin->methods->open(location, mode);
return NULL;
}
#endif
}
/* }}} */
/* {{{ ma_close */
int ma_close(MA_FILE *file)
{
int rc;
if (!file)
return -1;
switch (file->type) {
case MA_FILE_LOCAL:
rc= fclose((FILE *)file->ptr);
free(file);
break;
#ifdef HAVE_REMOTEIO
case MA_FILE_REMOTE:
rc= rio_plugin->methods->close(file);
break;
#endif
default:
return -1;
}
return rc;
}
/* }}} */
/* {{{ ma_feof */
int ma_feof(MA_FILE *file)
{
if (!file)
return -1;
switch (file->type) {
case MA_FILE_LOCAL:
return feof((FILE *)file->ptr);
break;
#ifdef HAVE_REMOTEIO
case MA_FILE_REMOTE:
return rio_plugin->methods->feof(file);
break;
#endif
default:
return -1;
}
}
/* }}} */
/* {{{ ma_read */
size_t ma_read(void *ptr, size_t size, size_t nmemb, MA_FILE *file)
{
size_t s= 0;
if (!file)
return -1;
switch (file->type) {
case MA_FILE_LOCAL:
s= fread(ptr, size, nmemb, (FILE *)file->ptr);
return s;
break;
#ifdef HAVE_REMOTEIO
case MA_FILE_REMOTE:
return rio_plugin->methods->read(ptr, size, nmemb, file);
break;
#endif
default:
return -1;
}
}
/* }}} */
/* {{{ ma_gets */
char *ma_gets(char *ptr, size_t size, MA_FILE *file)
{
if (!file)
return NULL;
switch (file->type) {
case MA_FILE_LOCAL:
return fgets(ptr, (int)size, (FILE *)file->ptr);
break;
#ifdef HAVE_REMOTEIO
case MA_FILE_REMOTE:
return rio_plugin->methods->gets(ptr, size, file);
break;
#endif
default:
return NULL;
}
}
/* }}} */
|
KhArtNJava/MySQLConnectorUE4Plugin
|
ThirdPartyLibs/mariadb-connector-c/libmariadb/ma_io.c
|
C
|
mit
| 5,015
|
class AddIsCommentToAnswers < ActiveRecord::Migration[4.2]
def change
add_column :answers, :is_comment, :boolean, default: false
end
end
|
wested/surveyor_gui
|
db/migrate/20140531012006_add_is_comment_to_answers.rb
|
Ruby
|
mit
| 145
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<title>Onboard Network - Advertise with Music Influencers</title>
<link type="text/css" rel="stylesheet" href="<?php echo asset_url();?>css/bootstrap.css" />
<link href="<?php echo asset_url();?>css/bootstrap-slider.css" rel="stylesheet">
<link href="<?php echo asset_url();?>css/style.css" type="text/css" rel="stylesheet" />
<link href='https://fonts.googleapis.com/css?family=Oswald:400,300,700' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,200,200italic,300,300italic,400italic,600,600italic,700,900,900italic,700italic' rel='stylesheet' type='text/css'>
<script type='text/javascript' src='http://code.jquery.com/jquery-1.8.3.js'></script>
<link type="text/css" rel="stylesheet" href="<?php echo asset_url();?>css/jquery.bxslider.css" />
<script src="<?php echo asset_url();?>js/bootstrap.js"></script>
<script>
$(document).ready(function (){
$("#frm_login").submit(function (e){
e.preventDefault();
var url = $(this).attr('action');
var method = $(this).attr('method');
var data = $(this).serialize();
console.log(data);
console.log(method);
console.log(url);
$.ajax({
url:url,
type:method,
data:data
}).done(function(data){
console.log(data);
if(data == false){
$("#error_section").html("Incorrect username/password");
} else {
window.location.href='<?php echo base_url() ?>Main/members';
}
});
});
$("#testt").on("click",function(){
var url = "http://maps.googleapis.com/maps/api/geocode/json?address=95123&sensor=true";
$.ajax({
url: url,
method: 'GET',
dataType: 'json',
success: function(result){
console.log(result);
}
})
});
$("#find_doctor").on("click",function(){
$("#modal_title").html("Please enter zipcode");
$("#modal_body").html('<div class="form-group"><div class="col-xs-3"></br><input type="zipCode" class="form-control" name="zipCode" id="zipCode" placeholder="Enter your zip code"></div></div><a href="<?php echo base_url() ?>Doctors"><button type="button" name="submit" class="btn btn-default">Submit</button></a>');
});
$("#find_clinic").on("click",function(){
$("#modal_title").html("Please enter zipcode");
$("#modal_body").html('<div class="form-group"><div class="col-xs-3"></br><input type="zipCode" class="form-control" name="zipCode" id="zipCode" placeholder="Enter your zip code"></div></div><a href="<?php echo base_url() ?>Clinics"><button type="button" name="submit" class="btn btn-default">Submit</button></a>');
});
// $("#sign_in").on("click", function(){
// $(".modal-title").html("Please sign in to your account.");
// $(".modal-body").html(' <div class="container"> <form method="post" id="frm_login" class="form-inline" role="form" accept-charset="utf-8" action="<?php echo base_url()?>Main/login_validation"> <div class="form-group"> <label for="email">Email:</label> <input type="email" class="form-control" name="email" id="email" placeholder="Enter email" value="<?php $this->input->post('email')?>"> </div> <div class="form-group"> <label for="pwd">Password:</label> <input type="password" class="form-control" name="password" id="password" placeholder="Enter password"> </div> <button type="submit" name="login_submit" class="btn btn-default">Submit</button> <a href="<?php echo base_url()?>main/signup"> Sign up!</a> <div class="form_validation_error" id="error_section"><?php echo validation_errors();?></div> </form> </div>');
// });
});
</script>
</head>
<body ng-app="fertility">
<section id="clinic">
</section>
<section id="header" class="inner clinic">
<div class="container">
<nav class="navbar navbar-default navbar-static-top responsive col-lg-12" role="navigation">
<div class="navbar-header responsive">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div id="logo" class="navbar-brand">
<a href="<?php echo base_url() ?>">FERTILITY COUNSELORS</a>
</div>
</div>
<div id="navbar" class="navbar-collapse text-right collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="<?php echo base_url() ?>">HOME</a></li>
<li><a href="#">ABOUT</a></li>
<li><a href="#">CONTACT</a></li>
<li><a data-toggle="modal" data-target="#myModal2" id="find_clinic">CLINICS</a></li>
<li><a data-toggle="modal" data-target="#myModal2" id="find_doctor">DOCTORS</a></li>
<li><a data-toggle="modal" data-target="#myModal">SIGN IN</a></li>
</ul>
</div><!--/.nav-collapse -->
</nav>
</div>
</section>
<!-- Modal -->
<div id="myModal" class="modal fade" role="dialog">
<div class="modal-dialog modal-lg">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header" style="background-color: #335764;color: white;">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Please sign in to your account.</h4>
</div>
<div class="modal-body">
<div class="container">
<form method="post" id="frm_login" class="form-inline" role="form" accept-charset="utf-8" action="<?php echo base_url()?>Main/login_validation">
<div class="form-group">
<label for="email">Email:</label>
<input type="email" class="form-control" name="email" id="email" placeholder="Enter email" value="<?php $this->input->post('email')?>">
</div>
<div class="form-group">
<label for="pwd">Password:</label>
<input type="password" class="form-control" name="password" id="password" placeholder="Enter password">
</div>
<button type="submit" name="login_submit" class="btn btn-default">Submit</button>
<a href="<?php echo base_url()?>main/signup"> Sign up!</a>
<div class="form_validation_error" id="error_section"><?php echo validation_errors();?></div>
</form>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Modal -->
<div id="myModal2" class="modal fade" role="dialog">
<div class="modal-dialog modal-lg">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header" style="background-color: #335764;color: white;">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title" id="modal_title"></h4>
</div>
<div class="modal-body" id="modal_body">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
|
shahin1986/fertility_dev
|
application/views/header2.php
|
PHP
|
mit
| 7,983
|
'use strict';
var Sequelize = require('sequelize');
var sq_config = require('../sequelize-config-mysql');
sq_config.database = 's06';
sq_config.options.sync.match = /s06/;
var sq = new Sequelize(sq_config.database, sq_config.username, sq_config.password, sq_config.options);
var models = {
entry: sq.define('entry', {
id: {
type: Sequelize.UUID,
defaultValue: Sequelize.UUIDV4,
validate: {
isUUID: 4
},
primaryKey: true
},
date: {
type: Sequelize.DATE,
allowNull: false,
validate: {
isDate: true,
}
},
body: {
type: Sequelize.TEXT,
allowNull: false,
validate: {
notEmpty: true,
}
}
}, {
}),
tag: sq.define('tag', {
id: {
type: Sequelize.UUID,
defaultValue: Sequelize.UUIDV4,
allowNull: false,
validate: {
isUUID: 4
},
primaryKey: true
},
value: {
type: Sequelize.STRING(255),
allowNull: false,
unique: true,
validate: {
}
}
}, {
})
};
models.tag.belongsToMany(models.entry, { through: 'entry_tag' });
models.entry.belongsToMany(models.tag, { through: 'entry_tag' });
sq.sync({ force: true })
.then(function() {
var hard_coded_tag_promises = Promise.all([
models.tag.create({value: 'foo'}),
models.tag.create({value: 'bar'}),
models.tag.create({value: 'baz'})
]);
var hard_coded_entry_promises = Promise.all([
models.entry.create({
body: 'This is entry 0. Here is some text.',
date: new Date(2015, 2, 10)
}), models.entry.create({
body: 'This is entry one. Here is some more text.',
date: new Date(2015, 2, 10)
}), models.entry.create({
body: 'This is entry tertius III. Here is interesting text.',
date: new Date(2015, 2, 12)
}), models.entry.create({
body: 'this is entry iv i dont know punctuation',
date: new Date(2015, 2, 11)
}), models.entry.create({
body: 'This is entry si4 with id 5 and a fullstop.',
date: new Date(2015, 2, 13)
}), models.entry.create({
body: 'This is entry hex. Should I be a magical curse?',
date: new Date(2015, 2, 14)
})
]);
return Promise.all([hard_coded_tag_promises, hard_coded_entry_promises]);
})
.spread(function(hard_coded_tags, hard_coded_entries) {
return Promise.all([
hard_coded_entries[0].setTags([hard_coded_tags[0], hard_coded_tags[1]]),
hard_coded_entries[1].setTags([hard_coded_tags[2]]),
hard_coded_entries[2].setTags([hard_coded_tags[1], hard_coded_tags[2]]),
hard_coded_entries[3].setTags([hard_coded_tags[0]]),
hard_coded_entries[4].setTags([hard_coded_tags[1]]),
hard_coded_entries[5].setTags([hard_coded_tags[0], hard_coded_tags[1], hard_coded_tags[2]])
]);
})
.then(function() {
sq.close();
})
.catch(function(err) {
console.warn('Rejected promise: ' + err);
console.warn(err.stack);
})
.done();
|
cfogelberg/sequelize-playground
|
tests/06-mysql-demo/01-populate-db.js
|
JavaScript
|
mit
| 2,940
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>compcert: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="stylesheet">
<link href="../../../../../bootstrap-custom.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<script src="../../../../../moment.min.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="../..">clean / released</a></li>
<li class="active"><a href="">8.7.1 / compcert - 3.0.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
compcert
<small>
3.0.0
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2021-12-05 19:37:45 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-05 19:37:45 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-num base Num library distributed with the OCaml compiler
base-threads base
base-unix base
camlp5 7.14 Preprocessor-pretty-printer of OCaml
conf-findutils 1 Virtual package relying on findutils
conf-perl 1 Virtual package relying on perl
coq 8.7.1 Formal proof management system
num 0 The Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.03.0 The OCaml compiler (virtual package)
ocaml-base-compiler 4.03.0 Official 4.03.0 release
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.1 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "Matej Košík <matej.kosik@inria.fr>"
homepage: "http://compcert.inria.fr/"
dev-repo: "git+https://github.com/AbsInt/CompCert.git"
bug-reports: "https://github.com/AbsInt/CompCert/issues"
license: "INRIA Non-Commercial License Agreement"
build: [
[
"./configure"
"ia32-linux" {os = "linux"}
"ia32-macosx" {os = "macos"}
"ia32-cygwin" {os = "cygwin"}
"-bindir"
"%{bin}%"
"-libdir"
"%{lib}%/compcert"
"-clightgen"
]
[make "-j%{jobs}%"]
]
install: [
[make "install"]
]
remove: [
["rm" "%{bin}%/ccomp"]
["rm" "%{bin}%/clightgen"]
["rm" "-R" "%{lib}%/compcert"]
["rm" "%{share}%/compcert.ini"]
["rm" "%{share}%/man/man1/ccomp.1"]
["sh" "-c" "rmdir -p %{share}%/man/man1 || true"]
]
depends: [
"ocaml"
"coq" {>= "8.5.2" & < "8.6~"}
"menhir" {>= "20160303" & < "20180530"}
]
synopsis: "The CompCert C compiler"
authors: "Xavier Leroy <xavier.leroy@inria.fr>"
url {
src: "https://github.com/AbsInt/CompCert/archive/v3.0.tar.gz"
checksum: "md5=8590239f6219f8bbc48c4e91f5d16921"
}
</pre>
<h2>Lint</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Dry install 🏜️</h2>
<p>Dry install with the current Coq version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam install -y --show-action coq-compcert.3.0.0 coq.8.7.1</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.7.1).
The following dependencies couldn't be met:
- coq-compcert -> coq < 8.6~ -> ocaml < 4.03.0
base of this switch (use `--unlock-base' to force)
Your request can't be satisfied:
- No available version of coq satisfies the constraints
No solution found, exiting
</pre></dd>
</dl>
<p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-compcert.3.0.0</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install 🚀</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Missing removes</dt>
<dd>
none
</dd>
<dt>Wrong removes</dt>
<dd>
none
</dd>
</dl>
</div>
</div>
</div>
<hr/>
<div class="footer">
<p class="text-center">
Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
|
coq-bench/coq-bench.github.io
|
clean/Linux-x86_64-4.03.0-2.0.5/released/8.7.1/compcert/3.0.0.html
|
HTML
|
mit
| 7,405
|
---
author: slowe
categories: Tutorial
comments: true
date: 2017-11-25T12:00:00Z
tags:
- Linux
- CLI
- Writing
- Fedora
title: Installing MultiMarkdown 6 on Fedora 27
url: /2017/11/25/installing-mmd6-on-fedora-27/
---
Long-time readers are probably aware that I'm a big fan of [Markdown][link-2]. Specifically, I prefer the MultiMarkdown variant that adds some additional extensions beyond "standard" Markdown. As such, I've long used Fletcher Penny's MultiMarkdown processor (the latest version, version 6, is [available on GitHub][link-1]). While Fletcher offers binary builds for Windows and macOS, the Linux binary has to be compiled from source. In this post, I'll provide the steps I followed to compile a MultiMarkdown binary for [Fedora][link-3] 27.<!--more-->
The ["How to Compile" page on the MMD-6 Wiki][link-4] is quite sparse, so a fair amount of trial-and-error was needed. To keep my main Fedora installation as clean as possible, I used [Vagrant][link-5] with the Libvirt provider to create a "build VM" based on the "fedora/27-cloud-base" box.
Once the VM was running, I installed the necessary packages to compile the source code. It turns out only the following packages were necessary:
sudo dnf install gcc make cmake gcc-c++
Then I downloaded the source code for MMD-6:
curl -LO https://github.com/fletcher/MultiMarkdown-6/archive/6.2.3.tar.gz
Unpacking the archive with `tar` created a `MultiMarkdown-6-6.2.3` directory. Changing into that directory, then the instructions from the Wiki page worked as expected:
make
cd build
make
I did _not_ run `make test`, though perhaps I should have to ensure the build worked as expected. In any case, once the second `make` command was done, I was left with a `multimarkdown` binary that I copied out to my Fedora 27 host system via `scp`. Done!
[link-1]: https://github.com/fletcher/MultiMarkdown-6/
[link-2]: https://daringfireball.net/projects/markdown/
[link-3]: https://getfedora.org
[link-4]: https://github.com/fletcher/MultiMarkdown-6/wiki/How-to-Compile
[link-5]: https://www.vagrantup.com/
|
lowescott/weblog
|
content/post/2017-11-25-installing-mmd6-on-fedora-27.md
|
Markdown
|
mit
| 2,095
|
<?php
/**
* This file is part of the Nette Framework (https://nette.org)
* Copyright (c) 2004 David Grudl (https://davidgrudl.com)
*/
namespace Nette\Templating;
use Nette;
use Latte;
use Nette\Utils\Strings;
/**
* @deprecated
*/
class Helpers extends Latte\Runtime\Filters
{
private static $helpers = array(
'normalize' => 'Nette\Utils\Strings::normalize',
'toascii' => 'Nette\Utils\Strings::toAscii',
'webalize' => 'Nette\Utils\Strings::webalize',
'padleft' => 'Nette\Utils\Strings::padLeft',
'padright' => 'Nette\Utils\Strings::padRight',
'reverse' => 'Nette\Utils\Strings::reverse',
'url' => 'rawurlencode',
);
/**
* Try to load the requested helper.
* @param string helper name
* @return callable
*/
public static function loader($helper)
{
trigger_error(__CLASS__ . ' is deprecated.', E_USER_DEPRECATED);
if (method_exists(__CLASS__, $helper)) {
return array(__CLASS__, $helper);
} elseif (isset(self::$helpers[$helper])) {
return self::$helpers[$helper];
}
}
/**
* Date/time modification.
* @param string|int|\DateTime
* @param string|int
* @param string
* @return Nette\Utils\DateTime
*/
public static function modifyDate($time, $delta, $unit = NULL)
{
return $time == NULL // intentionally ==
? NULL
: Nette\Utils\DateTime::from($time)->modify($delta . $unit);
}
/**
* Returns array of string length.
* @param mixed
* @return int
*/
public static function length($var)
{
return is_string($var) ? Strings::length($var) : count($var);
}
/**
* /dev/null.
* @param mixed
* @return string
*/
public static function null()
{
return '';
}
public static function optimizePhp($source, $lineLength = 80)
{
return Latte\Helpers::optimizePhp($source, $lineLength);
}
}
|
JanTvrdik/NetteComponentsExample
|
vendor/nette/deprecated/src/Templating/Helpers.php
|
PHP
|
mit
| 1,793
|
<?php
require_once('includes/config.php');
?>
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>
<?php echo SITENAME; ?>
</title>
<meta name="description" content="<?php echo DESCRIPTION ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<link rel="stylesheet" href="css/normalize.css" />
<link rel="stylesheet" href="css/main.css">
<link rel="alternate" href="rss.php" title="My RSS feed" type="application/rss+xml" />
<script type="text/javascript">
window.heap=window.heap||[],heap.load=function(e,t){window.heap.appid=e,window.heap.config=t=t||{};var n=t.forceSSL||"https:"===document.location.protocol,a=document.createElement("script");a.type="text/javascript",a.async=!0,a.src=(n?"https:":"http:")+"//cdn.heapanalytics.com/js/heap-"+e+".js";var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(a,o);for(var r=function(e){return function(){heap.push([e].concat(Array.prototype.slice.call(arguments,0)))}},p=["clearEventProperties","identify","setEventProperties","track","unsetEventProperty"],c=0;c<p.length;c++)heap[p[c]]=r(p[c])};
heap.load("14710187");
</script>
</head>
<body>
<!--[if lt IE 7]>
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="https://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<div id="wrapper">
<h1><?php echo SITENAME; ?></h1>
<div id="nav">
<ul>
<?php require_once('nav.php'); ?>
</div>
<div id='main'>
<?php
if(isset($_GET['month']) || isset($_GET['year'])) {
try {
//collect month and year data
$month = $_GET['month'];
$year = rtrim($_GET['year'], '.html');
//set from and to dates
$from = date('Y-m-01 00:00:00', strtotime("$year-$month"));
$to = date('Y-m-31 23:59:59', strtotime("$year-$month"));
$pages = new Paginator('5', 'p');
$stmt = $db->prepare('SELECT postID FROM blog_posts_seo WHERE postDate >= :from AND postDate <= :to AND published = 1');
$stmt->execute(array(
':from' => $from,
':to' => $to
));
//pass number of records to
$pages->set_total($stmt->rowCount());
$stmt = $db->prepare('SELECT p.postID, m.username, p.postTitle,
p.postDesc, p.postDate, p.postSlug FROM blog_posts_seo p,
blog_members m WHERE p.poster = m.memberID AND postDate
>= :from AND postDate <= :to AND published = 1 ORDER BY postID DESC ' .
$pages->get_limit());
$stmt->execute(array(
':from' => $from,
':to' => $to
));
while ($row = $stmt->fetch()) {
echo '<h1><a href="viewpost.php?id=' . $row['postID'] . '">' . $row['postTitle'] . '</a></h1>';
echo '<p>Posted on ' . date('jS M Y H:i:s', strtotime($row['postDate'])) . ' by <b>' . $row['username'] . '</b> in ';
$stmt2 = $db->prepare('SELECT catTitle, catSlug FROM blog_cats, blog_post_cats WHERE blog_cats.catID = blog_post_cats.catID AND blog_post_cats.postID = :postID');
$stmt2->execute(array(':postID' => $row['postID']));
$catRow = $stmt2->fetchAll(PDO::FETCH_ASSOC);
$links = array();
foreach ($catRow as $cat) {
$links[] = "<a href='c-" . $cat['catSlug'] . ".html'>" . $cat['catTitle'] . "</a>";
}
echo implode(", ", $links);
echo '</p>';
echo '<p>' . $row['postDesc'] . '</p>';
echo '<p><a href="' . $row["postSlug"] . '.html">Read More</a></p>';
}
echo $pages->page_links("a-$month-$year&");
} catch (PDOException $e) {
echo $e->getMessage();
}
} else {
echo('<p>Please choose a Month to view</p><ul>');
$stmt = $db->query("SELECT count(postDate) as Count, Month(postDate) as Month, Year(postDate) as Year FROM blog_posts_seo GROUP BY Month(postDate), Year(postDate) ORDER BY postDate DESC");
while($row = $stmt->fetch()){
$monthName = date("F", mktime(0, 0, 0, $row['Month'], 10));
$slug = 'a-'.$row['Month'].'-'.$row['Year'];
echo '<li><a href="' . $slug . '.html">' . $monthName . ' ' . $row['Year'] . ' (' . $row["Count"] . ' posts)</a></li>';
}
echo('</ul>');
}
?>
</div>
<div id='clear'></div>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.10.2.min.js"><\/script>')</script>
<script src="js/plugins.js"></script>
<script src="js/main.js"></script>
<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
_paq.push(["setCookieDomain", "*.marctowler.co.uk"]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u=(("https:" == document.location.protocol) ? "https" : "http") + "://marctowler.co.uk/piwik/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', 1]);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript';
g.defer=true; g.async=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<noscript><p><img src="https://www.marctowler.co.uk/piwik/piwik.php?idsite=1" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->
<!-- Google Analytics: change UA-XXXXX-X to be your site's ID. -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-37729517-1', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>
|
MarcTowler/blog
|
archives.php
|
PHP
|
mit
| 6,940
|
<?php
namespace AwsUpload\Tests;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Filesystem\Filesystem;
abstract class BaseTestCase extends TestCase
{
protected $main_external;
protected $main_aws_home;
/**
* The directory that contain the AWSUPLOAD_HOME.
*
* Foreach test we want this folder clean.
* So, each time we use the class to make it unique.
*
* @var string
*/
protected $aws_home;
/**
* The directory to simulate outside of AWSUPLOAD_HOME.
*
* @var string
*/
protected $external;
/**
* {@inheritdoc}
*/
public function setUp()
{
$uid = strtolower(get_class($this));
$uid = str_replace('\\', '-', $uid);
$this->main_aws_home = __DIR__ . '/../../aws_upload/';
$this->aws_home = $this->main_aws_home . $uid;
putenv("AWSUPLOAD_HOME=" . $this->aws_home);
$this->main_external = __DIR__ . '/../../external/';
$this->external = $this->main_external . $uid;
$filesystem = new Filesystem();
$filesystem->mkdir($this->aws_home);
$filesystem->mkdir($this->external);
}
/**
* {@inheritdoc}
*/
public function tearDown()
{
unset($_ENV['AWSUPLOAD_HOME']);
$filesystem = new Filesystem();
$filesystem->remove($this->main_aws_home);
$filesystem->remove($this->main_external);
}
/**
* Clear the $_SERVER['argv'] array
*/
public static function clearArgv()
{
$_SERVER['argv'] = array();
$_SERVER['argc'] = 0;
}
/**
* Add one or more element(s) at the end of the $_SERVER['argv'] array
*
* @param string[] $args Value to add to the argv array.
*/
public static function pushToArgv($args)
{
if (is_string($args)) {
$args = explode(' ', $args);
}
foreach ($args as $arg) {
array_push($_SERVER['argv'], $arg);
}
$_SERVER['argc'] += count($args);
}
}
|
borracciaBlu/aws-upload
|
tests/AwsUpload/BaseTestCase.php
|
PHP
|
mit
| 2,048
|
/*
* Copyright(c) Sophist Solutions, Inc. 1990-2022. All rights reserved
*/
#include "../StroikaPreComp.h"
#include "TimeOutException.h"
using namespace Stroika::Foundation;
using namespace Stroika::Foundation::Execution;
/*
********************************************************************************
********************************* TimeOutException *****************************
********************************************************************************
*/
#if qCompiler_cpp17InlineStaticMemberOfClassDoubleDeleteAtExit_Buggy
const TimeOutException TimeOutException::kThe;
#endif
TimeOutException::TimeOutException ()
: TimeOutException{L"Timeout Expired"sv}
{
}
TimeOutException::TimeOutException (error_code ec)
: TimeOutException{ec, L"Timeout Expired"sv}
{
}
TimeOutException::TimeOutException (const Characters::String& message)
: TimeOutException{make_error_code (errc::timed_out), message}
{
}
/*
********************************************************************************
************************ Execution::ThrowTimeOutException **********************
********************************************************************************
*/
void Execution::ThrowTimeOutException ()
{
Throw (TimeOutException::kThe);
}
|
SophistSolutions/Stroika
|
Library/Sources/Stroika/Foundation/Execution/TimeOutException.cpp
|
C++
|
mit
| 1,274
|
import { Component } from '@angular/core';
@Component({
templateUrl: './login.html'
})
export class Login {
}
|
aikin/ghsm
|
app/src/pages/login/login.ts
|
TypeScript
|
mit
| 117
|
<!DOCTYPE html>
<head>
<title>Note to Emily</title>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="your-stylesheet-link-here.css">
</head>
<main>
<h1>Note to Emily</h1>
<h2>Think about This</h2>
<h4>May 24, 2015</h4>
<section>
<p>
Just finished grueling WebDev week 1. Clearly they're looking to outsource onto us maximum advertising and educational tasks. What's frustrating is how useful thos skills are - we need them to show us how to sell out. Teaching yourself isn't selling out, but it's really lame when you're supposed to be hiring someone to help you, and they just point you to the right "link."
</p>
<p>
Things to keep in mind: research really f---ing matters. DATA IS REAL. Even though the media hype around it is totally disproportionate to its actual import, what it offers is real improvement. Even though the improvement is totally small, it's rock solid.
</p>
<p>
What am I doing?
</p>
<p>
If they don't let me into CAPP, it seems pretty hard to justify the Harris gig. Especially if they don't give me a discount. I can still wait to decide up until, I don't know, one or two weeks into the semester? Have to check.
</p>
<p>
Right now the tech is primarily a way to prove myself. It's good, I never thought of myself as being this intelligent, this capable. I'm smart as shit. I can handle hard shit, it's okay. Now the question is what on earth do I want to focus on.
</p>
<p>
Figuring out how to automate research is not a bad idea at all. Probably the best thing I can do. Jens is on board. Ask him for advice. He's a little better than Rayid about some things, he'll have good advice. Especially about good social science automated research. We could work on predictions together. We'll see - a good econ route.
</p>
<p>
I really am wedded to the clinton idea for next summer - next year.So I should do a bunch of Clinton research right now. Read the critics and the fans.
</p>
</section>
</main>
|
notetoemily/notetoemily.github.io
|
blog/may-24-2015.html
|
HTML
|
mit
| 2,071
|
class AppointmentCanceledNotification
attr_accessor :appointment
def initialize(appointment)
@appointment = appointment
end
def message
{
message: 'Seu horário foi cancelado :/',
data: {
appointment_id: appointment.id,
type: 'appointment_canceled'
}
}
end
def channel
"Customer_#{appointment.customer.token}"
end
end
|
BarberHour/barber-hour-api
|
app/notifications/appointment_canceled_notification.rb
|
Ruby
|
mit
| 385
|
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("uWebshop.DataAccess")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("uWebshop")]
[assembly: AssemblyProduct("uWebshop.DataAccess")]
[assembly: AssemblyCopyright("Copyright © uWebshop 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("df6aa836-1eb3-47b5-ac04-746221102822")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
[assembly: AssemblyVersion("2.6.1.0")]
[assembly: AssemblyFileVersion("2.6.1.0")]
|
uWebshop/uWebshop-Releases
|
Core/uWebshop.DataAccess/Properties/AssemblyInfo.cs
|
C#
|
mit
| 1,269
|
Liquid::Template.register_filter(YetAnotherTagCloud)
|
vaudoc/jk
|
vendor/plugins/yet_another_tag_cloud/init.rb
|
Ruby
|
mit
| 53
|
var searchData=
[
['bullet_2ecpp',['bullet.cpp',['../bullet_8cpp.html',1,'']]],
['bullet_2eh',['bullet.h',['../bullet_8h.html',1,'']]]
];
|
SineJunky/ascii-game
|
ASCII-Game/docs/html/search/files_62.js
|
JavaScript
|
mit
| 142
|
import React, { Component } from "react";
import { browserHistory, Link } from "react-router";
import update from "react-addons-update";
class AuthoredPost extends Component {
constructor(props) {
super(props);
this.state = {
isVisible: {
display: "block"
},
post: {}
};
}
handleChange(event) {
let newState = update(this.state, {
$merge: {
[event.target.name]: event.target.value
}
});
this.setState(newState);
}
handleDelete() {
fetch(`http://localhost:3000/posts/${this.props.id}/${this.props.user_id}`, {
method: "DELETE"
})
.then(() => {
this.setState({ isVisible: { display: "none"}});
browserHistory.push('/dashboard');
})
.catch((err) => {
console.log("ERROR:", err);
});
}
render() {
return(
<div key={this.props.id} style={this.state.isVisible}>
<div className="authored_posts">
<h3>{this.props.title}</h3>
<img src={this.props.image_url} width="250px" />
<p>{this.props.post_text}</p>
<div className="source-category">
<p><a href={this.props.source_url} target="_blank">Source URL</a></p>
<p className="dashboard-category-icon">{this.props.category}</p>
</div>
<div className="dashboard-button-container">
<Link to={`/${this.props.id}/edit`}>
<button>Edit Post</button>
</Link>
<Link to="/dashboard">
<button onClick={this.handleDelete.bind(this)}>×</button>
</Link>
</div>
</div>
</div>
);
}
}
export default AuthoredPost;
|
jeremypross/lcjr-frontend
|
src/components/Dashboard/AuthoredPost.js
|
JavaScript
|
mit
| 1,691
|
<?php
namespace Sokil\State;
class Transition
{
private $name;
/**
* @var string
*/
private $initialStateName;
/**
* @var string
*/
private $resultingStateName;
/**
* @var callable which checks if transition acceptable
*/
private $acceptConditionCallable;
/**
* @var array Transition metadata
*/
private $metadata;
public function __construct($name, $initialState, $resultingState, callable $acceptConditionCallable = null, array $metadata = [])
{
$this->name = $name;
$this->initialStateName = $initialState;
$this->resultingStateName = $resultingState;
$this->acceptConditionCallable = $acceptConditionCallable;
$this->metadata = $metadata;
}
public function getName()
{
return $this->name;
}
/**
* @return string
*/
public function getInitialStateName()
{
return $this->initialStateName;
}
/**
* @return string
*/
public function getResultingStateName()
{
return $this->resultingStateName;
}
public function isAcceptable()
{
if (!$this->acceptConditionCallable) {
return true;
}
return call_user_func($this->acceptConditionCallable);
}
public function getMetadata($key = null)
{
if (!$key) {
return $this->metadata;
}
if (!isset($this->metadata[$key])) {
return null;
}
return $this->metadata[$key];
}
public function __toString()
{
return $this->name;
}
}
|
sokil/php-state
|
src/Transition.php
|
PHP
|
mit
| 1,636
|
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
// タックル それは 自機と同じ当たり判定を持った自爆攻撃
public class Tackle : BulletBase
{
[SerializeField] GameObject hitEffectPrefab;
void Start()
{
OnStart();
}
void Update()
{
if (shooter == null)
{
Destroy(this.gameObject);
return;
}
if (trans == null) return;
// 敵と同じ位置に移動する
trans.localPosition = shooter.localPosition;
}
void OnTriggerEnter2D(Collider2D other)
{
if (hitEffectPrefab != null)
{
var go = GameObject.Instantiate(hitEffectPrefab);
var effectTrans = go.transform;
effectTrans.SetParent(transform.parent); // 弾は消えるので親オブジェクトに関連付ける
effectTrans.localPosition = transform.localPosition;
effectTrans.localScale = Vector3.one;
}
HitSE.Play();
Destroy(this.gameObject);
Hp hp = shooter.gameObject.GetComponent<Hp> ();
if (hp != null)
hp.OnDamage(hp.MaxHP);
else
Destroy(shooter.gameObject);
}
}
|
enpel/ggj2017-deliciousset
|
UnityProject/Assets/Scripts/Battle/Tackle.cs
|
C#
|
mit
| 1,051
|
#!/bin/bash
# This script is designed to work with ubuntu 16.04 LTS
# ensure system is updated and has basic build tools
# sudo apt-get update
# sudo apt-get --assume-yes upgrade
# sudo apt-get --assume-yes install tmux build-essential gcc g++ make binutils
# sudo apt-get --assume-yes install software-properties-common
# download and install GPU drivers
CUDA_REPO_PKG=http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
wget "$CUDA_REPO_PKG" -O cuda-repo.deb
sudo dpkg -i cuda-repo.deb && rm -f cuda-repo.deb
sudo apt-get update
sudo apt-get -y install cuda
sudo modprobe nvidia
nvidia-smi
# install and configure theano
pip install theano
echo "[global]
device = gpu
floatX = float32
[cuda]
root = /usr/local/cuda" > ~/.theanorc
# install and configure keras
pip install keras==1.2.2
mkdir ~/.keras
echo '{
"image_dim_ordering": "th",
"epsilon": 1e-07,
"floatx": "float32",
"backend": "theano"
}' > ~/.keras/keras.json
# install cudnn libraries
wget "http://platform.ai/files/cudnn.tgz" -O "cudnn.tgz"
tar -zxf cudnn.tgz
cd cuda
sudo cp lib64/* /usr/local/cuda/lib64/
sudo cp include/* /usr/local/cuda/include/
# alternative way to install cudnn from official resource but take more spaces
# ML_REPO_PKG=http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64/nvidia-machine-learning-repo-ubuntu1604_1.0.0-1_amd64.deb
# wget "$ML_REPO_PKG" -O ml-repo.deb
# sudo dpkg -i ml-repo.deb && rm -f ml-repo.deb
# sudo apt-get update
# sudo apt-get install digits # including cudnn
|
stevenliuyi/dotfiles
|
install/ubuntu_gpu.sh
|
Shell
|
mit
| 1,593
|
dependsOn("dependencyCircular2.js");
|
SoloVid/grunt-ordered-concat
|
test/fixtures/dependencyCircular1.js
|
JavaScript
|
mit
| 37
|
# Koinonia
[](https://codeclimate.com/github/SoftwareWise/Koinonia)
|
SoftwareWise/Koinonia
|
README.md
|
Markdown
|
mit
| 154
|
/* $Cambridge: exim/exim-src/src/lookups/nis.h,v 1.5 2009/11/16 19:50:38 nm4 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
*************************************************/
/* Copyright (c) University of Cambridge 1995 - 2009 */
/* See the file NOTICE for conditions of use and distribution. */
/* Header for the nis and nis0 lookups */
extern void *nis_open(uschar *, uschar **);
extern int nis_find(void *, uschar *, uschar *, int, uschar **, uschar **,
BOOL *);
extern int nis0_find(void *, uschar *, uschar *, int, uschar **, uschar **,
BOOL *);
/* End of lookups/nis.h */
|
KMU-embedded/mosbench-ext
|
exim/exim-4.71/src/lookups/nis.h
|
C
|
mit
| 682
|
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var aurelia_pal_1 = require("aurelia-pal");
function configure(config, spinnerConfig) {
config.globalResources(aurelia_pal_1.PLATFORM.moduleName('./spinner'));
config.container.registerInstance('spinner-config', spinnerConfig);
}
exports.configure = configure;
var spinner_config_1 = require("./spinner-config");
exports.spinnerViews = spinner_config_1.spinnerViews;
|
ne0guille/aurelia-spinner
|
dist/commonjs/index.js
|
JavaScript
|
mit
| 452
|
import {
FETCH_POSTS_REQUEST_VIDEO, FETCH_POSTS_SUCCESS_VIDEO,
FETCH_POSTS_FAILURE_VIDEO,
} from '../actions/VideoAction';
const initialState = {
videoAssets: [],
isFetching: false,
failure: false,
}
const fetchVideoAssets = (state = initialState, action) => {
switch (action.type) {
case FETCH_POSTS_REQUEST_VIDEO:
return { ...state, isFetching: true };
case FETCH_POSTS_SUCCESS_VIDEO:
return { ...state, isFetching: false, videoAssets: action.videoAssets };
case FETCH_POSTS_FAILURE_VIDEO:
return { ...state, failure: true };
default:
return state;
}
}
export default fetchVideoAssets;
|
sikamedia/idol
|
src/reducers/VideoReducer.js
|
JavaScript
|
mit
| 649
|
# What is LDA?
See Wikipedia, [Latent Dirichlet allocation](http://en.wikipedia.org/wiki/Latent_Dirichlet_allocation).
# What is HDP?
See Wikipedia, [Hierarchical Dirichlet process](http://en.wikipedia.org/wiki/Hierarchical_Dirichlet_process).
# System Requirements
* Compiler that supports C++11
* Boost C++ Libraries
\*NOTICE\* Boost C++ Libraries shoud be built with the C++11 compiler.
# Usage
See `--help`.
# Data Set
## Format
The 1st line: the number of docs
The 2nd line: the number of vocabulary
The 3rd line: the number of words (\*NOTICE\* not NNZ, the number of nonzero counts in the bag-of-words)
The following lines: docID wordID count
## Vocabulary
line number = wordID
## For example
[UCI Machine Learning Repository: Bag of Words Data Set](http://archive.ics.uci.edu/ml/datasets/Bag+of+Words)
# Licence
MIT License
Copyright (c) 2012 Tsukasa ŌMOTO([@henry0312](https://twitter.com/henry0312))
# Special Thanks To
* Mr. Shuyo Nakatani([@shuyo](https://twitter.com/shuyo)) / Cybozu Labs Inc.
I consulted his implementation, <https://github.com/shuyo/iir/tree/master/lda>.
* Mr. Hiroki Taniura([@boiled_sugar](https://twitter.com/boiled_sugar), <https://github.com/boiled-sugar>)
I had my Enlgish translation corrected.
* Mr. Jan Ekström([@jeebjp](https://twitter.com/jeebjp), <https://github.com/jeeb>)
English adviser
* Mr. Motofumi Oka([@mtfmk](https://twitter.com/mtfmk), <https://github.com/chikuzen>)
I referred to his configure and Makefile.
|
henry0312/LDA
|
README.md
|
Markdown
|
mit
| 1,516
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>scrollview-scrollbars - YUI 3</title>
<link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/build/cssgrids/cssgrids-min.css">
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
<link rel="shortcut icon" type="image/png" href="../assets/favicon.png">
<script src="http://yui.yahooapis.com/combo?3.9.1/build/yui/yui-min.js"></script>
</head>
<body class="yui3-skin-sam">
<div id="doc">
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="../assets/css/logo.png" title="YUI 3"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 3.17.2</em>
</div>
</div>
<div id="bd" class="yui3-g">
<div class="yui3-u-1-4">
<div id="docs-sidebar" class="sidebar apidocs">
<div id="api-list">
<h2 class="off-left">APIs</h2>
<div id="api-tabview" class="tabview">
<ul class="tabs">
<li><a href="#api-classes">Classes</a></li>
<li><a href="#api-modules">Modules</a></li>
</ul>
<div id="api-tabview-filter">
<input type="search" id="api-filter" placeholder="Type to filter APIs">
</div>
<div id="api-tabview-panel">
<ul id="api-classes" class="apis classes">
<li><a href="../classes/Anim.html">Anim</a></li>
<li><a href="../classes/App.html">App</a></li>
<li><a href="../classes/App.Base.html">App.Base</a></li>
<li><a href="../classes/App.Content.html">App.Content</a></li>
<li><a href="../classes/App.Transitions.html">App.Transitions</a></li>
<li><a href="../classes/App.TransitionsNative.html">App.TransitionsNative</a></li>
<li><a href="../classes/AreaSeries.html">AreaSeries</a></li>
<li><a href="../classes/AreaSplineSeries.html">AreaSplineSeries</a></li>
<li><a href="../classes/Array.html">Array</a></li>
<li><a href="../classes/ArrayList.html">ArrayList</a></li>
<li><a href="../classes/ArraySort.html">ArraySort</a></li>
<li><a href="../classes/AsyncQueue.html">AsyncQueue</a></li>
<li><a href="../classes/Attribute.html">Attribute</a></li>
<li><a href="../classes/AttributeCore.html">AttributeCore</a></li>
<li><a href="../classes/AttributeEvents.html">AttributeEvents</a></li>
<li><a href="../classes/AttributeExtras.html">AttributeExtras</a></li>
<li><a href="../classes/AttributeLite.html">AttributeLite</a></li>
<li><a href="../classes/AttributeObservable.html">AttributeObservable</a></li>
<li><a href="../classes/AutoComplete.html">AutoComplete</a></li>
<li><a href="../classes/AutoCompleteBase.html">AutoCompleteBase</a></li>
<li><a href="../classes/AutoCompleteFilters.html">AutoCompleteFilters</a></li>
<li><a href="../classes/AutoCompleteHighlighters.html">AutoCompleteHighlighters</a></li>
<li><a href="../classes/AutoCompleteList.html">AutoCompleteList</a></li>
<li><a href="../classes/Axis.html">Axis</a></li>
<li><a href="../classes/AxisBase.html">AxisBase</a></li>
<li><a href="../classes/BarSeries.html">BarSeries</a></li>
<li><a href="../classes/Base.html">Base</a></li>
<li><a href="../classes/BaseCore.html">BaseCore</a></li>
<li><a href="../classes/BaseObservable.html">BaseObservable</a></li>
<li><a href="../classes/BottomAxisLayout.html">BottomAxisLayout</a></li>
<li><a href="../classes/Button.html">Button</a></li>
<li><a href="../classes/ButtonCore.html">ButtonCore</a></li>
<li><a href="../classes/ButtonGroup.html">ButtonGroup</a></li>
<li><a href="../classes/Cache.html">Cache</a></li>
<li><a href="../classes/CacheOffline.html">CacheOffline</a></li>
<li><a href="../classes/Calendar.html">Calendar</a></li>
<li><a href="../classes/CalendarBase.html">CalendarBase</a></li>
<li><a href="../classes/CandlestickSeries.html">CandlestickSeries</a></li>
<li><a href="../classes/CanvasCircle.html">CanvasCircle</a></li>
<li><a href="../classes/CanvasDrawing.html">CanvasDrawing</a></li>
<li><a href="../classes/CanvasEllipse.html">CanvasEllipse</a></li>
<li><a href="../classes/CanvasGraphic.html">CanvasGraphic</a></li>
<li><a href="../classes/CanvasPath.html">CanvasPath</a></li>
<li><a href="../classes/CanvasPieSlice.html">CanvasPieSlice</a></li>
<li><a href="../classes/CanvasRect.html">CanvasRect</a></li>
<li><a href="../classes/CanvasShape.html">CanvasShape</a></li>
<li><a href="../classes/CartesianChart.html">CartesianChart</a></li>
<li><a href="../classes/CartesianSeries.html">CartesianSeries</a></li>
<li><a href="../classes/CategoryAxis.html">CategoryAxis</a></li>
<li><a href="../classes/CategoryAxisBase.html">CategoryAxisBase</a></li>
<li><a href="../classes/CategoryImpl.html">CategoryImpl</a></li>
<li><a href="../classes/Chart.html">Chart</a></li>
<li><a href="../classes/ChartBase.html">ChartBase</a></li>
<li><a href="../classes/ChartLegend.html">ChartLegend</a></li>
<li><a href="../classes/Circle.html">Circle</a></li>
<li><a href="../classes/CircleGroup.html">CircleGroup</a></li>
<li><a href="../classes/ClassNameManager.html">ClassNameManager</a></li>
<li><a href="../classes/ClickableRail.html">ClickableRail</a></li>
<li><a href="../classes/Color.html">Color</a></li>
<li><a href="../classes/Color.Harmony.html">Color.Harmony</a></li>
<li><a href="../classes/Color.HSL.html">Color.HSL</a></li>
<li><a href="../classes/Color.HSV.html">Color.HSV</a></li>
<li><a href="../classes/ColumnSeries.html">ColumnSeries</a></li>
<li><a href="../classes/ComboSeries.html">ComboSeries</a></li>
<li><a href="../classes/ComboSplineSeries.html">ComboSplineSeries</a></li>
<li><a href="../classes/config.html">config</a></li>
<li><a href="../classes/Console.html">Console</a></li>
<li><a href="../classes/ContentEditable.html">ContentEditable</a></li>
<li><a href="../classes/Controller.html">Controller</a></li>
<li><a href="../classes/Cookie.html">Cookie</a></li>
<li><a href="../classes/CurveUtil.html">CurveUtil</a></li>
<li><a href="../classes/CustomEvent.html">CustomEvent</a></li>
<li><a href="../classes/DataSchema.Array.html">DataSchema.Array</a></li>
<li><a href="../classes/DataSchema.Base.html">DataSchema.Base</a></li>
<li><a href="../classes/DataSchema.JSON.html">DataSchema.JSON</a></li>
<li><a href="../classes/DataSchema.Text.html">DataSchema.Text</a></li>
<li><a href="../classes/DataSchema.XML.html">DataSchema.XML</a></li>
<li><a href="../classes/DataSource.Function.html">DataSource.Function</a></li>
<li><a href="../classes/DataSource.Get.html">DataSource.Get</a></li>
<li><a href="../classes/DataSource.IO.html">DataSource.IO</a></li>
<li><a href="../classes/DataSource.Local.html">DataSource.Local</a></li>
<li><a href="../classes/DataSourceArraySchema.html">DataSourceArraySchema</a></li>
<li><a href="../classes/DataSourceCache.html">DataSourceCache</a></li>
<li><a href="../classes/DataSourceCacheExtension.html">DataSourceCacheExtension</a></li>
<li><a href="../classes/DataSourceJSONSchema.html">DataSourceJSONSchema</a></li>
<li><a href="../classes/DataSourceTextSchema.html">DataSourceTextSchema</a></li>
<li><a href="../classes/DataSourceXMLSchema.html">DataSourceXMLSchema</a></li>
<li><a href="../classes/DataTable.html">DataTable</a></li>
<li><a href="../classes/DataTable.Base.html">DataTable.Base</a></li>
<li><a href="../classes/DataTable.BodyView.html">DataTable.BodyView</a></li>
<li><a href="../classes/DataTable.BodyView.Formatters.html">DataTable.BodyView.Formatters</a></li>
<li><a href="../classes/DataTable.Column.html">DataTable.Column</a></li>
<li><a href="../classes/DataTable.ColumnWidths.html">DataTable.ColumnWidths</a></li>
<li><a href="../classes/DataTable.Core.html">DataTable.Core</a></li>
<li><a href="../classes/DataTable.HeaderView.html">DataTable.HeaderView</a></li>
<li><a href="../classes/DataTable.Highlight.html">DataTable.Highlight</a></li>
<li><a href="../classes/DataTable.KeyNav.html">DataTable.KeyNav</a></li>
<li><a href="../classes/DataTable.Message.html">DataTable.Message</a></li>
<li><a href="../classes/DataTable.Mutable.html">DataTable.Mutable</a></li>
<li><a href="../classes/DataTable.Paginator.html">DataTable.Paginator</a></li>
<li><a href="../classes/DataTable.Paginator.Model.html">DataTable.Paginator.Model</a></li>
<li><a href="../classes/DataTable.Paginator.View.html">DataTable.Paginator.View</a></li>
<li><a href="../classes/DataTable.Scrollable.html">DataTable.Scrollable</a></li>
<li><a href="../classes/DataTable.Sortable.html">DataTable.Sortable</a></li>
<li><a href="../classes/DataTable.TableView.html">DataTable.TableView</a></li>
<li><a href="../classes/Date.html">Date</a></li>
<li><a href="../classes/DD.DDM.html">DD.DDM</a></li>
<li><a href="../classes/DD.Delegate.html">DD.Delegate</a></li>
<li><a href="../classes/DD.Drag.html">DD.Drag</a></li>
<li><a href="../classes/DD.Drop.html">DD.Drop</a></li>
<li><a href="../classes/DD.Scroll.html">DD.Scroll</a></li>
<li><a href="../classes/Dial.html">Dial</a></li>
<li><a href="../classes/Do.html">Do</a></li>
<li><a href="../classes/Do.AlterArgs.html">Do.AlterArgs</a></li>
<li><a href="../classes/Do.AlterReturn.html">Do.AlterReturn</a></li>
<li><a href="../classes/Do.Error.html">Do.Error</a></li>
<li><a href="../classes/Do.Halt.html">Do.Halt</a></li>
<li><a href="../classes/Do.Method.html">Do.Method</a></li>
<li><a href="../classes/Do.Prevent.html">Do.Prevent</a></li>
<li><a href="../classes/DOM.html">DOM</a></li>
<li><a href="../classes/DOMEventFacade.html">DOMEventFacade</a></li>
<li><a href="../classes/Drawing.html">Drawing</a></li>
<li><a href="../classes/Easing.html">Easing</a></li>
<li><a href="../classes/EditorBase.html">EditorBase</a></li>
<li><a href="../classes/EditorSelection.html">EditorSelection</a></li>
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
<li><a href="../classes/EllipseGroup.html">EllipseGroup</a></li>
<li><a href="../classes/Escape.html">Escape</a></li>
<li><a href="../classes/Event.html">Event</a></li>
<li><a href="../classes/EventFacade.html">EventFacade</a></li>
<li><a href="../classes/EventHandle.html">EventHandle</a></li>
<li><a href="../classes/EventTarget.html">EventTarget</a></li>
<li><a href="../classes/Features.html">Features</a></li>
<li><a href="../classes/File.html">File</a></li>
<li><a href="../classes/FileFlash.html">FileFlash</a></li>
<li><a href="../classes/FileHTML5.html">FileHTML5</a></li>
<li><a href="../classes/Fills.html">Fills</a></li>
<li><a href="../classes/Frame.html">Frame</a></li>
<li><a href="../classes/Get.html">Get</a></li>
<li><a href="../classes/Get.Transaction.html">Get.Transaction</a></li>
<li><a href="../classes/GetNodeJS.html">GetNodeJS</a></li>
<li><a href="../classes/Graph.html">Graph</a></li>
<li><a href="../classes/Graphic.html">Graphic</a></li>
<li><a href="../classes/GraphicBase.html">GraphicBase</a></li>
<li><a href="../classes/Gridlines.html">Gridlines</a></li>
<li><a href="../classes/GroupDiamond.html">GroupDiamond</a></li>
<li><a href="../classes/GroupRect.html">GroupRect</a></li>
<li><a href="../classes/Handlebars.html">Handlebars</a></li>
<li><a href="../classes/Highlight.html">Highlight</a></li>
<li><a href="../classes/Histogram.html">Histogram</a></li>
<li><a href="../classes/HistoryBase.html">HistoryBase</a></li>
<li><a href="../classes/HistoryHash.html">HistoryHash</a></li>
<li><a href="../classes/HistoryHTML5.html">HistoryHTML5</a></li>
<li><a href="../classes/HorizontalLegendLayout.html">HorizontalLegendLayout</a></li>
<li><a href="../classes/ImgLoadGroup.html">ImgLoadGroup</a></li>
<li><a href="../classes/ImgLoadImgObj.html">ImgLoadImgObj</a></li>
<li><a href="../classes/InlineEditor.html">InlineEditor</a></li>
<li><a href="../classes/Intl.html">Intl</a></li>
<li><a href="../classes/IO.html">IO</a></li>
<li><a href="../classes/JSON.html">JSON</a></li>
<li><a href="../classes/JSONPRequest.html">JSONPRequest</a></li>
<li><a href="../classes/Lang.html">Lang</a></li>
<li><a href="../classes/LazyModelList.html">LazyModelList</a></li>
<li><a href="../classes/LeftAxisLayout.html">LeftAxisLayout</a></li>
<li><a href="../classes/Lines.html">Lines</a></li>
<li><a href="../classes/LineSeries.html">LineSeries</a></li>
<li><a href="../classes/Loader.html">Loader</a></li>
<li><a href="../classes/MarkerSeries.html">MarkerSeries</a></li>
<li><a href="../classes/Matrix.html">Matrix</a></li>
<li><a href="../classes/MatrixUtil.html">MatrixUtil</a></li>
<li><a href="../classes/Model.html">Model</a></li>
<li><a href="../classes/ModelList.html">ModelList</a></li>
<li><a href="../classes/ModelSync.Local.html">ModelSync.Local</a></li>
<li><a href="../classes/ModelSync.REST.html">ModelSync.REST</a></li>
<li><a href="../classes/Node.html">Node</a></li>
<li><a href="../classes/NodeList.html">NodeList</a></li>
<li><a href="../classes/Number.html">Number</a></li>
<li><a href="../classes/NumericAxis.html">NumericAxis</a></li>
<li><a href="../classes/NumericAxisBase.html">NumericAxisBase</a></li>
<li><a href="../classes/NumericImpl.html">NumericImpl</a></li>
<li><a href="../classes/Object.html">Object</a></li>
<li><a href="../classes/OHLCSeries.html">OHLCSeries</a></li>
<li><a href="../classes/Overlay.html">Overlay</a></li>
<li><a href="../classes/Paginator.html">Paginator</a></li>
<li><a href="../classes/Paginator.Core.html">Paginator.Core</a></li>
<li><a href="../classes/Paginator.Url.html">Paginator.Url</a></li>
<li><a href="../classes/Panel.html">Panel</a></li>
<li><a href="../classes/Parallel.html">Parallel</a></li>
<li><a href="../classes/Path.html">Path</a></li>
<li><a href="../classes/PieChart.html">PieChart</a></li>
<li><a href="../classes/PieSeries.html">PieSeries</a></li>
<li><a href="../classes/Pjax.html">Pjax</a></li>
<li><a href="../classes/PjaxBase.html">PjaxBase</a></li>
<li><a href="../classes/PjaxContent.html">PjaxContent</a></li>
<li><a href="../classes/Plots.html">Plots</a></li>
<li><a href="../classes/Plugin.Align.html">Plugin.Align</a></li>
<li><a href="../classes/Plugin.AutoComplete.html">Plugin.AutoComplete</a></li>
<li><a href="../classes/Plugin.Base.html">Plugin.Base</a></li>
<li><a href="../classes/Plugin.Button.html">Plugin.Button</a></li>
<li><a href="../classes/Plugin.Cache.html">Plugin.Cache</a></li>
<li><a href="../classes/Plugin.CalendarNavigator.html">Plugin.CalendarNavigator</a></li>
<li><a href="../classes/Plugin.ConsoleFilters.html">Plugin.ConsoleFilters</a></li>
<li><a href="../classes/Plugin.CreateLinkBase.html">Plugin.CreateLinkBase</a></li>
<li><a href="../classes/Plugin.DataTableDataSource.html">Plugin.DataTableDataSource</a></li>
<li><a href="../classes/Plugin.DDConstrained.html">Plugin.DDConstrained</a></li>
<li><a href="../classes/Plugin.DDNodeScroll.html">Plugin.DDNodeScroll</a></li>
<li><a href="../classes/Plugin.DDProxy.html">Plugin.DDProxy</a></li>
<li><a href="../classes/Plugin.DDWindowScroll.html">Plugin.DDWindowScroll</a></li>
<li><a href="../classes/Plugin.Drag.html">Plugin.Drag</a></li>
<li><a href="../classes/Plugin.Drop.html">Plugin.Drop</a></li>
<li><a href="../classes/Plugin.EditorBidi.html">Plugin.EditorBidi</a></li>
<li><a href="../classes/Plugin.EditorBR.html">Plugin.EditorBR</a></li>
<li><a href="../classes/Plugin.EditorLists.html">Plugin.EditorLists</a></li>
<li><a href="../classes/Plugin.EditorPara.html">Plugin.EditorPara</a></li>
<li><a href="../classes/Plugin.EditorParaBase.html">Plugin.EditorParaBase</a></li>
<li><a href="../classes/Plugin.EditorParaIE.html">Plugin.EditorParaIE</a></li>
<li><a href="../classes/Plugin.EditorTab.html">Plugin.EditorTab</a></li>
<li><a href="../classes/Plugin.ExecCommand.html">Plugin.ExecCommand</a></li>
<li><a href="../classes/Plugin.ExecCommand.COMMANDS.html">Plugin.ExecCommand.COMMANDS</a></li>
<li><a href="../classes/Plugin.Flick.html">Plugin.Flick</a></li>
<li><a href="../classes/Plugin.Host.html">Plugin.Host</a></li>
<li><a href="../classes/plugin.NodeFocusManager.html">plugin.NodeFocusManager</a></li>
<li><a href="../classes/Plugin.NodeFX.html">Plugin.NodeFX</a></li>
<li><a href="../classes/plugin.NodeMenuNav.html">plugin.NodeMenuNav</a></li>
<li><a href="../classes/Plugin.Pjax.html">Plugin.Pjax</a></li>
<li><a href="../classes/Plugin.Resize.html">Plugin.Resize</a></li>
<li><a href="../classes/Plugin.ResizeConstrained.html">Plugin.ResizeConstrained</a></li>
<li><a href="../classes/Plugin.ResizeProxy.html">Plugin.ResizeProxy</a></li>
<li><a href="../classes/Plugin.ScrollInfo.html">Plugin.ScrollInfo</a></li>
<li><a href="../classes/Plugin.ScrollViewList.html">Plugin.ScrollViewList</a></li>
<li><a href="../classes/Plugin.ScrollViewPaginator.html">Plugin.ScrollViewPaginator</a></li>
<li><a href="../classes/Plugin.ScrollViewScrollbars.html">Plugin.ScrollViewScrollbars</a></li>
<li><a href="../classes/Plugin.Shim.html">Plugin.Shim</a></li>
<li><a href="../classes/Plugin.SortScroll.html">Plugin.SortScroll</a></li>
<li><a href="../classes/Plugin.Tree.Lazy.html">Plugin.Tree.Lazy</a></li>
<li><a href="../classes/Plugin.WidgetAnim.html">Plugin.WidgetAnim</a></li>
<li><a href="../classes/Pollable.html">Pollable</a></li>
<li><a href="../classes/Promise.html">Promise</a></li>
<li><a href="../classes/Promise.Resolver.html">Promise.Resolver</a></li>
<li><a href="../classes/QueryString.html">QueryString</a></li>
<li><a href="../classes/Queue.html">Queue</a></li>
<li><a href="../classes/RangeSeries.html">RangeSeries</a></li>
<li><a href="../classes/Record.html">Record</a></li>
<li><a href="../classes/Recordset.html">Recordset</a></li>
<li><a href="../classes/RecordsetFilter.html">RecordsetFilter</a></li>
<li><a href="../classes/RecordsetIndexer.html">RecordsetIndexer</a></li>
<li><a href="../classes/RecordsetSort.html">RecordsetSort</a></li>
<li><a href="../classes/Rect.html">Rect</a></li>
<li><a href="../classes/Renderer.html">Renderer</a></li>
<li><a href="../classes/Resize.html">Resize</a></li>
<li><a href="../classes/RightAxisLayout.html">RightAxisLayout</a></li>
<li><a href="../classes/Router.html">Router</a></li>
<li><a href="../classes/ScrollView.html">ScrollView</a></li>
<li><a href="../classes/Selector.html">Selector</a></li>
<li><a href="../classes/SeriesBase.html">SeriesBase</a></li>
<li><a href="../classes/Shape.html">Shape</a></li>
<li><a href="../classes/ShapeGroup.html">ShapeGroup</a></li>
<li><a href="../classes/Slider.html">Slider</a></li>
<li><a href="../classes/SliderBase.html">SliderBase</a></li>
<li><a href="../classes/SliderValueRange.html">SliderValueRange</a></li>
<li><a href="../classes/Sortable.html">Sortable</a></li>
<li><a href="../classes/SplineSeries.html">SplineSeries</a></li>
<li><a href="../classes/StackedAreaSeries.html">StackedAreaSeries</a></li>
<li><a href="../classes/StackedAreaSplineSeries.html">StackedAreaSplineSeries</a></li>
<li><a href="../classes/StackedAxis.html">StackedAxis</a></li>
<li><a href="../classes/StackedAxisBase.html">StackedAxisBase</a></li>
<li><a href="../classes/StackedBarSeries.html">StackedBarSeries</a></li>
<li><a href="../classes/StackedColumnSeries.html">StackedColumnSeries</a></li>
<li><a href="../classes/StackedComboSeries.html">StackedComboSeries</a></li>
<li><a href="../classes/StackedComboSplineSeries.html">StackedComboSplineSeries</a></li>
<li><a href="../classes/StackedImpl.html">StackedImpl</a></li>
<li><a href="../classes/StackedLineSeries.html">StackedLineSeries</a></li>
<li><a href="../classes/StackedMarkerSeries.html">StackedMarkerSeries</a></li>
<li><a href="../classes/StackedSplineSeries.html">StackedSplineSeries</a></li>
<li><a href="../classes/StackingUtil.html">StackingUtil</a></li>
<li><a href="../classes/State.html">State</a></li>
<li><a href="../classes/StyleSheet.html">StyleSheet</a></li>
<li><a href="../classes/Subscriber.html">Subscriber</a></li>
<li><a href="../classes/SVGCircle.html">SVGCircle</a></li>
<li><a href="../classes/SVGDrawing.html">SVGDrawing</a></li>
<li><a href="../classes/SVGEllipse.html">SVGEllipse</a></li>
<li><a href="../classes/SVGGraphic.html">SVGGraphic</a></li>
<li><a href="../classes/SVGPath.html">SVGPath</a></li>
<li><a href="../classes/SVGPieSlice.html">SVGPieSlice</a></li>
<li><a href="../classes/SVGRect.html">SVGRect</a></li>
<li><a href="../classes/SVGShape.html">SVGShape</a></li>
<li><a href="../classes/SWF.html">SWF</a></li>
<li><a href="../classes/SWFDetect.html">SWFDetect</a></li>
<li><a href="../classes/SyntheticEvent.html">SyntheticEvent</a></li>
<li><a href="../classes/SyntheticEvent.Notifier.html">SyntheticEvent.Notifier</a></li>
<li><a href="../classes/SynthRegistry.html">SynthRegistry</a></li>
<li><a href="../classes/Tab.html">Tab</a></li>
<li><a href="../classes/TabView.html">TabView</a></li>
<li><a href="../classes/Template.html">Template</a></li>
<li><a href="../classes/Template.Micro.html">Template.Micro</a></li>
<li><a href="../classes/Test.ArrayAssert.html">Test.ArrayAssert</a></li>
<li><a href="../classes/Test.Assert.html">Test.Assert</a></li>
<li><a href="../classes/Test.AssertionError.html">Test.AssertionError</a></li>
<li><a href="../classes/Test.ComparisonFailure.html">Test.ComparisonFailure</a></li>
<li><a href="../classes/Test.Console.html">Test.Console</a></li>
<li><a href="../classes/Test.CoverageFormat.html">Test.CoverageFormat</a></li>
<li><a href="../classes/Test.DateAssert.html">Test.DateAssert</a></li>
<li><a href="../classes/Test.EventTarget.html">Test.EventTarget</a></li>
<li><a href="../classes/Test.Mock.html">Test.Mock</a></li>
<li><a href="../classes/Test.Mock.Value.html">Test.Mock.Value</a></li>
<li><a href="../classes/Test.ObjectAssert.html">Test.ObjectAssert</a></li>
<li><a href="../classes/Test.Reporter.html">Test.Reporter</a></li>
<li><a href="../classes/Test.Results.html">Test.Results</a></li>
<li><a href="../classes/Test.Runner.html">Test.Runner</a></li>
<li><a href="../classes/Test.ShouldError.html">Test.ShouldError</a></li>
<li><a href="../classes/Test.ShouldFail.html">Test.ShouldFail</a></li>
<li><a href="../classes/Test.TestCase.html">Test.TestCase</a></li>
<li><a href="../classes/Test.TestFormat.html">Test.TestFormat</a></li>
<li><a href="../classes/Test.TestNode.html">Test.TestNode</a></li>
<li><a href="../classes/Test.TestRunner.html">Test.TestRunner</a></li>
<li><a href="../classes/Test.TestSuite.html">Test.TestSuite</a></li>
<li><a href="../classes/Test.UnexpectedError.html">Test.UnexpectedError</a></li>
<li><a href="../classes/Test.UnexpectedValue.html">Test.UnexpectedValue</a></li>
<li><a href="../classes/Test.Wait.html">Test.Wait</a></li>
<li><a href="../classes/Text.AccentFold.html">Text.AccentFold</a></li>
<li><a href="../classes/Text.WordBreak.html">Text.WordBreak</a></li>
<li><a href="../classes/TimeAxis.html">TimeAxis</a></li>
<li><a href="../classes/TimeAxisBase.html">TimeAxisBase</a></li>
<li><a href="../classes/TimeImpl.html">TimeImpl</a></li>
<li><a href="../classes/ToggleButton.html">ToggleButton</a></li>
<li><a href="../classes/TopAxisLayout.html">TopAxisLayout</a></li>
<li><a href="../classes/Transition.html">Transition</a></li>
<li><a href="../classes/Tree.html">Tree</a></li>
<li><a href="../classes/Tree.Labelable.html">Tree.Labelable</a></li>
<li><a href="../classes/Tree.Node.html">Tree.Node</a></li>
<li><a href="../classes/Tree.Node.Labelable.html">Tree.Node.Labelable</a></li>
<li><a href="../classes/Tree.Node.Openable.html">Tree.Node.Openable</a></li>
<li><a href="../classes/Tree.Node.Selectable.html">Tree.Node.Selectable</a></li>
<li><a href="../classes/Tree.Node.Sortable.html">Tree.Node.Sortable</a></li>
<li><a href="../classes/Tree.Openable.html">Tree.Openable</a></li>
<li><a href="../classes/Tree.Selectable.html">Tree.Selectable</a></li>
<li><a href="../classes/Tree.Sortable.html">Tree.Sortable</a></li>
<li><a href="../classes/UA.html">UA</a></li>
<li><a href="../classes/Uploader.html">Uploader</a></li>
<li><a href="../classes/Uploader.Queue.html">Uploader.Queue</a></li>
<li><a href="../classes/UploaderFlash.html">UploaderFlash</a></li>
<li><a href="../classes/UploaderHTML5.html">UploaderHTML5</a></li>
<li><a href="../classes/ValueChange.html">ValueChange</a></li>
<li><a href="../classes/VerticalLegendLayout.html">VerticalLegendLayout</a></li>
<li><a href="../classes/View.html">View</a></li>
<li><a href="../classes/View.NodeMap.html">View.NodeMap</a></li>
<li><a href="../classes/VMLCircle.html">VMLCircle</a></li>
<li><a href="../classes/VMLDrawing.html">VMLDrawing</a></li>
<li><a href="../classes/VMLEllipse.html">VMLEllipse</a></li>
<li><a href="../classes/VMLGraphic.html">VMLGraphic</a></li>
<li><a href="../classes/VMLPath.html">VMLPath</a></li>
<li><a href="../classes/VMLPieSlice.html">VMLPieSlice</a></li>
<li><a href="../classes/VMLRect.html">VMLRect</a></li>
<li><a href="../classes/VMLShape.html">VMLShape</a></li>
<li><a href="../classes/Widget.html">Widget</a></li>
<li><a href="../classes/WidgetAutohide.html">WidgetAutohide</a></li>
<li><a href="../classes/WidgetButtons.html">WidgetButtons</a></li>
<li><a href="../classes/WidgetChild.html">WidgetChild</a></li>
<li><a href="../classes/WidgetModality.html">WidgetModality</a></li>
<li><a href="../classes/WidgetParent.html">WidgetParent</a></li>
<li><a href="../classes/WidgetPosition.html">WidgetPosition</a></li>
<li><a href="../classes/WidgetPositionAlign.html">WidgetPositionAlign</a></li>
<li><a href="../classes/WidgetPositionConstrain.html">WidgetPositionConstrain</a></li>
<li><a href="../classes/WidgetStack.html">WidgetStack</a></li>
<li><a href="../classes/WidgetStdMod.html">WidgetStdMod</a></li>
<li><a href="../classes/XML.html">XML</a></li>
<li><a href="../classes/YQL.html">YQL</a></li>
<li><a href="../classes/YQLRequest.html">YQLRequest</a></li>
<li><a href="../classes/YUI.html">YUI</a></li>
<li><a href="../classes/YUI~substitute.html">YUI~substitute</a></li>
</ul>
<ul id="api-modules" class="apis modules">
<li><a href="../modules/align-plugin.html">align-plugin</a></li>
<li><a href="../modules/anim.html">anim</a></li>
<li><a href="../modules/anim-base.html">anim-base</a></li>
<li><a href="../modules/anim-color.html">anim-color</a></li>
<li><a href="../modules/anim-curve.html">anim-curve</a></li>
<li><a href="../modules/anim-easing.html">anim-easing</a></li>
<li><a href="../modules/anim-node-plugin.html">anim-node-plugin</a></li>
<li><a href="../modules/anim-scroll.html">anim-scroll</a></li>
<li><a href="../modules/anim-shape.html">anim-shape</a></li>
<li><a href="../modules/anim-shape-transform.html">anim-shape-transform</a></li>
<li><a href="../modules/anim-xy.html">anim-xy</a></li>
<li><a href="../modules/app.html">app</a></li>
<li><a href="../modules/app-base.html">app-base</a></li>
<li><a href="../modules/app-content.html">app-content</a></li>
<li><a href="../modules/app-transitions.html">app-transitions</a></li>
<li><a href="../modules/app-transitions-native.html">app-transitions-native</a></li>
<li><a href="../modules/array-extras.html">array-extras</a></li>
<li><a href="../modules/array-invoke.html">array-invoke</a></li>
<li><a href="../modules/arraylist.html">arraylist</a></li>
<li><a href="../modules/arraylist-add.html">arraylist-add</a></li>
<li><a href="../modules/arraylist-filter.html">arraylist-filter</a></li>
<li><a href="../modules/arraysort.html">arraysort</a></li>
<li><a href="../modules/async-queue.html">async-queue</a></li>
<li><a href="../modules/attribute.html">attribute</a></li>
<li><a href="../modules/attribute-base.html">attribute-base</a></li>
<li><a href="../modules/attribute-complex.html">attribute-complex</a></li>
<li><a href="../modules/attribute-core.html">attribute-core</a></li>
<li><a href="../modules/attribute-extras.html">attribute-extras</a></li>
<li><a href="../modules/attribute-observable.html">attribute-observable</a></li>
<li><a href="../modules/autocomplete.html">autocomplete</a></li>
<li><a href="../modules/autocomplete-base.html">autocomplete-base</a></li>
<li><a href="../modules/autocomplete-filters.html">autocomplete-filters</a></li>
<li><a href="../modules/autocomplete-filters-accentfold.html">autocomplete-filters-accentfold</a></li>
<li><a href="../modules/autocomplete-highlighters.html">autocomplete-highlighters</a></li>
<li><a href="../modules/autocomplete-highlighters-accentfold.html">autocomplete-highlighters-accentfold</a></li>
<li><a href="../modules/autocomplete-list.html">autocomplete-list</a></li>
<li><a href="../modules/autocomplete-list-keys.html">autocomplete-list-keys</a></li>
<li><a href="../modules/autocomplete-plugin.html">autocomplete-plugin</a></li>
<li><a href="../modules/autocomplete-sources.html">autocomplete-sources</a></li>
<li><a href="../modules/axis.html">axis</a></li>
<li><a href="../modules/axis-base.html">axis-base</a></li>
<li><a href="../modules/axis-category.html">axis-category</a></li>
<li><a href="../modules/axis-category-base.html">axis-category-base</a></li>
<li><a href="../modules/axis-numeric.html">axis-numeric</a></li>
<li><a href="../modules/axis-numeric-base.html">axis-numeric-base</a></li>
<li><a href="../modules/axis-stacked.html">axis-stacked</a></li>
<li><a href="../modules/axis-stacked-base.html">axis-stacked-base</a></li>
<li><a href="../modules/axis-time.html">axis-time</a></li>
<li><a href="../modules/axis-time-base.html">axis-time-base</a></li>
<li><a href="../modules/base.html">base</a></li>
<li><a href="../modules/base-base.html">base-base</a></li>
<li><a href="../modules/base-build.html">base-build</a></li>
<li><a href="../modules/base-core.html">base-core</a></li>
<li><a href="../modules/base-observable.html">base-observable</a></li>
<li><a href="../modules/base-pluginhost.html">base-pluginhost</a></li>
<li><a href="../modules/button.html">button</a></li>
<li><a href="../modules/button-core.html">button-core</a></li>
<li><a href="../modules/button-group.html">button-group</a></li>
<li><a href="../modules/button-plugin.html">button-plugin</a></li>
<li><a href="../modules/cache.html">cache</a></li>
<li><a href="../modules/cache-base.html">cache-base</a></li>
<li><a href="../modules/cache-offline.html">cache-offline</a></li>
<li><a href="../modules/cache-plugin.html">cache-plugin</a></li>
<li><a href="../modules/calendar.html">calendar</a></li>
<li><a href="../modules/calendar-base.html">calendar-base</a></li>
<li><a href="../modules/calendarnavigator.html">calendarnavigator</a></li>
<li><a href="../modules/charts.html">charts</a></li>
<li><a href="../modules/charts-base.html">charts-base</a></li>
<li><a href="../modules/charts-legend.html">charts-legend</a></li>
<li><a href="../modules/classnamemanager.html">classnamemanager</a></li>
<li><a href="../modules/clickable-rail.html">clickable-rail</a></li>
<li><a href="../modules/collection.html">collection</a></li>
<li><a href="../modules/color.html">color</a></li>
<li><a href="../modules/color-base.html">color-base</a></li>
<li><a href="../modules/color-harmony.html">color-harmony</a></li>
<li><a href="../modules/color-hsl.html">color-hsl</a></li>
<li><a href="../modules/color-hsv.html">color-hsv</a></li>
<li><a href="../modules/console.html">console</a></li>
<li><a href="../modules/console-filters.html">console-filters</a></li>
<li><a href="../modules/content-editable.html">content-editable</a></li>
<li><a href="../modules/cookie.html">cookie</a></li>
<li><a href="../modules/createlink-base.html">createlink-base</a></li>
<li><a href="../modules/dataschema.html">dataschema</a></li>
<li><a href="../modules/dataschema-array.html">dataschema-array</a></li>
<li><a href="../modules/dataschema-base.html">dataschema-base</a></li>
<li><a href="../modules/dataschema-json.html">dataschema-json</a></li>
<li><a href="../modules/dataschema-text.html">dataschema-text</a></li>
<li><a href="../modules/dataschema-xml.html">dataschema-xml</a></li>
<li><a href="../modules/datasource.html">datasource</a></li>
<li><a href="../modules/datasource-arrayschema.html">datasource-arrayschema</a></li>
<li><a href="../modules/datasource-cache.html">datasource-cache</a></li>
<li><a href="../modules/datasource-function.html">datasource-function</a></li>
<li><a href="../modules/datasource-get.html">datasource-get</a></li>
<li><a href="../modules/datasource-io.html">datasource-io</a></li>
<li><a href="../modules/datasource-jsonschema.html">datasource-jsonschema</a></li>
<li><a href="../modules/datasource-local.html">datasource-local</a></li>
<li><a href="../modules/datasource-polling.html">datasource-polling</a></li>
<li><a href="../modules/datasource-textschema.html">datasource-textschema</a></li>
<li><a href="../modules/datasource-xmlschema.html">datasource-xmlschema</a></li>
<li><a href="../modules/datatable.html">datatable</a></li>
<li><a href="../modules/datatable-base.html">datatable-base</a></li>
<li><a href="../modules/datatable-body.html">datatable-body</a></li>
<li><a href="../modules/datatable-column-widths.html">datatable-column-widths</a></li>
<li><a href="../modules/datatable-core.html">datatable-core</a></li>
<li><a href="../modules/datatable-datasource.html">datatable-datasource</a></li>
<li><a href="../modules/datatable-foot.html">datatable-foot</a></li>
<li><a href="../modules/datatable-formatters.html">datatable-formatters</a></li>
<li><a href="../modules/datatable-head.html">datatable-head</a></li>
<li><a href="../modules/datatable-highlight.html">datatable-highlight</a></li>
<li><a href="../modules/datatable-keynav.html">datatable-keynav</a></li>
<li><a href="../modules/datatable-message.html">datatable-message</a></li>
<li><a href="../modules/datatable-mutable.html">datatable-mutable</a></li>
<li><a href="../modules/datatable-paginator.html">datatable-paginator</a></li>
<li><a href="../modules/datatable-scroll.html">datatable-scroll</a></li>
<li><a href="../modules/datatable-sort.html">datatable-sort</a></li>
<li><a href="../modules/datatable-table.html">datatable-table</a></li>
<li><a href="../modules/datatype.html">datatype</a></li>
<li><a href="../modules/datatype-date.html">datatype-date</a></li>
<li><a href="../modules/datatype-date-format.html">datatype-date-format</a></li>
<li><a href="../modules/datatype-date-math.html">datatype-date-math</a></li>
<li><a href="../modules/datatype-date-parse.html">datatype-date-parse</a></li>
<li><a href="../modules/datatype-number.html">datatype-number</a></li>
<li><a href="../modules/datatype-number-format.html">datatype-number-format</a></li>
<li><a href="../modules/datatype-number-parse.html">datatype-number-parse</a></li>
<li><a href="../modules/datatype-xml.html">datatype-xml</a></li>
<li><a href="../modules/datatype-xml-format.html">datatype-xml-format</a></li>
<li><a href="../modules/datatype-xml-parse.html">datatype-xml-parse</a></li>
<li><a href="../modules/dd.html">dd</a></li>
<li><a href="../modules/dd-constrain.html">dd-constrain</a></li>
<li><a href="../modules/dd-ddm.html">dd-ddm</a></li>
<li><a href="../modules/dd-ddm-base.html">dd-ddm-base</a></li>
<li><a href="../modules/dd-ddm-drop.html">dd-ddm-drop</a></li>
<li><a href="../modules/dd-delegate.html">dd-delegate</a></li>
<li><a href="../modules/dd-drag.html">dd-drag</a></li>
<li><a href="../modules/dd-drop.html">dd-drop</a></li>
<li><a href="../modules/dd-drop-plugin.html">dd-drop-plugin</a></li>
<li><a href="../modules/dd-gestures.html">dd-gestures</a></li>
<li><a href="../modules/dd-plugin.html">dd-plugin</a></li>
<li><a href="../modules/dd-proxy.html">dd-proxy</a></li>
<li><a href="../modules/dd-scroll.html">dd-scroll</a></li>
<li><a href="../modules/dial.html">dial</a></li>
<li><a href="../modules/dom.html">dom</a></li>
<li><a href="../modules/dom-base.html">dom-base</a></li>
<li><a href="../modules/dom-screen.html">dom-screen</a></li>
<li><a href="../modules/dom-style.html">dom-style</a></li>
<li><a href="../modules/dump.html">dump</a></li>
<li><a href="../modules/editor.html">editor</a></li>
<li><a href="../modules/editor-base.html">editor-base</a></li>
<li><a href="../modules/editor-bidi.html">editor-bidi</a></li>
<li><a href="../modules/editor-br.html">editor-br</a></li>
<li><a href="../modules/editor-inline.html">editor-inline</a></li>
<li><a href="../modules/editor-lists.html">editor-lists</a></li>
<li><a href="../modules/editor-para.html">editor-para</a></li>
<li><a href="../modules/editor-para-base.html">editor-para-base</a></li>
<li><a href="../modules/editor-para-ie.html">editor-para-ie</a></li>
<li><a href="../modules/editor-tab.html">editor-tab</a></li>
<li><a href="../modules/escape.html">escape</a></li>
<li><a href="../modules/event.html">event</a></li>
<li><a href="../modules/event-base.html">event-base</a></li>
<li><a href="../modules/event-contextmenu.html">event-contextmenu</a></li>
<li><a href="../modules/event-custom.html">event-custom</a></li>
<li><a href="../modules/event-custom-base.html">event-custom-base</a></li>
<li><a href="../modules/event-custom-complex.html">event-custom-complex</a></li>
<li><a href="../modules/event-delegate.html">event-delegate</a></li>
<li><a href="../modules/event-flick.html">event-flick</a></li>
<li><a href="../modules/event-focus.html">event-focus</a></li>
<li><a href="../modules/event-gestures.html">event-gestures</a></li>
<li><a href="../modules/event-hover.html">event-hover</a></li>
<li><a href="../modules/event-key.html">event-key</a></li>
<li><a href="../modules/event-mouseenter.html">event-mouseenter</a></li>
<li><a href="../modules/event-mousewheel.html">event-mousewheel</a></li>
<li><a href="../modules/event-move.html">event-move</a></li>
<li><a href="../modules/event-outside.html">event-outside</a></li>
<li><a href="../modules/event-resize.html">event-resize</a></li>
<li><a href="../modules/event-simulate.html">event-simulate</a></li>
<li><a href="../modules/event-synthetic.html">event-synthetic</a></li>
<li><a href="../modules/event-tap.html">event-tap</a></li>
<li><a href="../modules/event-touch.html">event-touch</a></li>
<li><a href="../modules/event-valuechange.html">event-valuechange</a></li>
<li><a href="../modules/exec-command.html">exec-command</a></li>
<li><a href="../modules/features.html">features</a></li>
<li><a href="../modules/file.html">file</a></li>
<li><a href="../modules/file-flash.html">file-flash</a></li>
<li><a href="../modules/file-html5.html">file-html5</a></li>
<li><a href="../modules/frame.html">frame</a></li>
<li><a href="../modules/gesture-simulate.html">gesture-simulate</a></li>
<li><a href="../modules/get.html">get</a></li>
<li><a href="../modules/get-nodejs.html">get-nodejs</a></li>
<li><a href="../modules/graphics.html">graphics</a></li>
<li><a href="../modules/graphics-group.html">graphics-group</a></li>
<li><a href="../modules/handlebars.html">handlebars</a></li>
<li><a href="../modules/handlebars-base.html">handlebars-base</a></li>
<li><a href="../modules/handlebars-compiler.html">handlebars-compiler</a></li>
<li><a href="../modules/highlight.html">highlight</a></li>
<li><a href="../modules/highlight-accentfold.html">highlight-accentfold</a></li>
<li><a href="../modules/highlight-base.html">highlight-base</a></li>
<li><a href="../modules/history.html">history</a></li>
<li><a href="../modules/history-base.html">history-base</a></li>
<li><a href="../modules/history-hash.html">history-hash</a></li>
<li><a href="../modules/history-hash-ie.html">history-hash-ie</a></li>
<li><a href="../modules/history-html5.html">history-html5</a></li>
<li><a href="../modules/imageloader.html">imageloader</a></li>
<li><a href="../modules/intl.html">intl</a></li>
<li><a href="../modules/io.html">io</a></li>
<li><a href="../modules/io-base.html">io-base</a></li>
<li><a href="../modules/io-form.html">io-form</a></li>
<li><a href="../modules/io-nodejs.html">io-nodejs</a></li>
<li><a href="../modules/io-queue.html">io-queue</a></li>
<li><a href="../modules/io-upload-iframe.html">io-upload-iframe</a></li>
<li><a href="../modules/io-xdr.html">io-xdr</a></li>
<li><a href="../modules/json.html">json</a></li>
<li><a href="../modules/json-parse.html">json-parse</a></li>
<li><a href="../modules/json-stringify.html">json-stringify</a></li>
<li><a href="../modules/jsonp.html">jsonp</a></li>
<li><a href="../modules/jsonp-url.html">jsonp-url</a></li>
<li><a href="../modules/lazy-model-list.html">lazy-model-list</a></li>
<li><a href="../modules/loader.html">loader</a></li>
<li><a href="../modules/loader-base.html">loader-base</a></li>
<li><a href="../modules/loader-yui3.html">loader-yui3</a></li>
<li><a href="../modules/matrix.html">matrix</a></li>
<li><a href="../modules/model.html">model</a></li>
<li><a href="../modules/model-list.html">model-list</a></li>
<li><a href="../modules/model-sync-rest.html">model-sync-rest</a></li>
<li><a href="../modules/node.html">node</a></li>
<li><a href="../modules/node-base.html">node-base</a></li>
<li><a href="../modules/node-core.html">node-core</a></li>
<li><a href="../modules/node-data.html">node-data</a></li>
<li><a href="../modules/node-event-delegate.html">node-event-delegate</a></li>
<li><a href="../modules/node-event-html5.html">node-event-html5</a></li>
<li><a href="../modules/node-event-simulate.html">node-event-simulate</a></li>
<li><a href="../modules/node-flick.html">node-flick</a></li>
<li><a href="../modules/node-focusmanager.html">node-focusmanager</a></li>
<li><a href="../modules/node-load.html">node-load</a></li>
<li><a href="../modules/node-menunav.html">node-menunav</a></li>
<li><a href="../modules/node-pluginhost.html">node-pluginhost</a></li>
<li><a href="../modules/node-screen.html">node-screen</a></li>
<li><a href="../modules/node-scroll-info.html">node-scroll-info</a></li>
<li><a href="../modules/node-style.html">node-style</a></li>
<li><a href="../modules/oop.html">oop</a></li>
<li><a href="../modules/overlay.html">overlay</a></li>
<li><a href="../modules/paginator.html">paginator</a></li>
<li><a href="../modules/paginator-core.html">paginator-core</a></li>
<li><a href="../modules/paginator-url.html">paginator-url</a></li>
<li><a href="../modules/panel.html">panel</a></li>
<li><a href="../modules/parallel.html">parallel</a></li>
<li><a href="../modules/pjax.html">pjax</a></li>
<li><a href="../modules/pjax-base.html">pjax-base</a></li>
<li><a href="../modules/pjax-content.html">pjax-content</a></li>
<li><a href="../modules/pjax-plugin.html">pjax-plugin</a></li>
<li><a href="../modules/plugin.html">plugin</a></li>
<li><a href="../modules/pluginhost.html">pluginhost</a></li>
<li><a href="../modules/pluginhost-base.html">pluginhost-base</a></li>
<li><a href="../modules/pluginhost-config.html">pluginhost-config</a></li>
<li><a href="../modules/promise.html">promise</a></li>
<li><a href="../modules/querystring.html">querystring</a></li>
<li><a href="../modules/querystring-parse.html">querystring-parse</a></li>
<li><a href="../modules/querystring-parse-simple.html">querystring-parse-simple</a></li>
<li><a href="../modules/querystring-stringify.html">querystring-stringify</a></li>
<li><a href="../modules/querystring-stringify-simple.html">querystring-stringify-simple</a></li>
<li><a href="../modules/queue-promote.html">queue-promote</a></li>
<li><a href="../modules/range-slider.html">range-slider</a></li>
<li><a href="../modules/recordset.html">recordset</a></li>
<li><a href="../modules/recordset-base.html">recordset-base</a></li>
<li><a href="../modules/recordset-filter.html">recordset-filter</a></li>
<li><a href="../modules/recordset-indexer.html">recordset-indexer</a></li>
<li><a href="../modules/recordset-sort.html">recordset-sort</a></li>
<li><a href="../modules/resize.html">resize</a></li>
<li><a href="../modules/resize-contrain.html">resize-contrain</a></li>
<li><a href="../modules/resize-plugin.html">resize-plugin</a></li>
<li><a href="../modules/resize-proxy.html">resize-proxy</a></li>
<li><a href="../modules/rollup.html">rollup</a></li>
<li><a href="../modules/router.html">router</a></li>
<li><a href="../modules/scrollview.html">scrollview</a></li>
<li><a href="../modules/scrollview-base.html">scrollview-base</a></li>
<li><a href="../modules/scrollview-base-ie.html">scrollview-base-ie</a></li>
<li><a href="../modules/scrollview-list.html">scrollview-list</a></li>
<li><a href="../modules/scrollview-paginator.html">scrollview-paginator</a></li>
<li><a href="../modules/scrollview-scrollbars.html">scrollview-scrollbars</a></li>
<li><a href="../modules/selection.html">selection</a></li>
<li><a href="../modules/selector-css2.html">selector-css2</a></li>
<li><a href="../modules/selector-css3.html">selector-css3</a></li>
<li><a href="../modules/selector-native.html">selector-native</a></li>
<li><a href="../modules/series-area.html">series-area</a></li>
<li><a href="../modules/series-area-stacked.html">series-area-stacked</a></li>
<li><a href="../modules/series-areaspline.html">series-areaspline</a></li>
<li><a href="../modules/series-areaspline-stacked.html">series-areaspline-stacked</a></li>
<li><a href="../modules/series-bar.html">series-bar</a></li>
<li><a href="../modules/series-bar-stacked.html">series-bar-stacked</a></li>
<li><a href="../modules/series-base.html">series-base</a></li>
<li><a href="../modules/series-candlestick.html">series-candlestick</a></li>
<li><a href="../modules/series-cartesian.html">series-cartesian</a></li>
<li><a href="../modules/series-column.html">series-column</a></li>
<li><a href="../modules/series-column-stacked.html">series-column-stacked</a></li>
<li><a href="../modules/series-combo.html">series-combo</a></li>
<li><a href="../modules/series-combo-stacked.html">series-combo-stacked</a></li>
<li><a href="../modules/series-combospline.html">series-combospline</a></li>
<li><a href="../modules/series-combospline-stacked.html">series-combospline-stacked</a></li>
<li><a href="../modules/series-curve-util.html">series-curve-util</a></li>
<li><a href="../modules/series-fill-util.html">series-fill-util</a></li>
<li><a href="../modules/series-histogram.html">series-histogram</a></li>
<li><a href="../modules/series-line.html">series-line</a></li>
<li><a href="../modules/series-line-stacked.html">series-line-stacked</a></li>
<li><a href="../modules/series-line-util.html">series-line-util</a></li>
<li><a href="../modules/series-marker.html">series-marker</a></li>
<li><a href="../modules/series-marker-stacked.html">series-marker-stacked</a></li>
<li><a href="../modules/series-ohlc.html">series-ohlc</a></li>
<li><a href="../modules/series-pie.html">series-pie</a></li>
<li><a href="../modules/series-plot-util.html">series-plot-util</a></li>
<li><a href="../modules/series-range.html">series-range</a></li>
<li><a href="../modules/series-spline.html">series-spline</a></li>
<li><a href="../modules/series-spline-stacked.html">series-spline-stacked</a></li>
<li><a href="../modules/series-stacked.html">series-stacked</a></li>
<li><a href="../modules/shim-plugin.html">shim-plugin</a></li>
<li><a href="../modules/slider.html">slider</a></li>
<li><a href="../modules/slider-base.html">slider-base</a></li>
<li><a href="../modules/slider-value-range.html">slider-value-range</a></li>
<li><a href="../modules/sortable.html">sortable</a></li>
<li><a href="../modules/sortable-scroll.html">sortable-scroll</a></li>
<li><a href="../modules/stylesheet.html">stylesheet</a></li>
<li><a href="../modules/substitute.html">substitute</a></li>
<li><a href="../modules/swf.html">swf</a></li>
<li><a href="../modules/swfdetect.html">swfdetect</a></li>
<li><a href="../modules/tabview.html">tabview</a></li>
<li><a href="../modules/template.html">template</a></li>
<li><a href="../modules/template-base.html">template-base</a></li>
<li><a href="../modules/template-micro.html">template-micro</a></li>
<li><a href="../modules/test.html">test</a></li>
<li><a href="../modules/test-console.html">test-console</a></li>
<li><a href="../modules/text.html">text</a></li>
<li><a href="../modules/text-accentfold.html">text-accentfold</a></li>
<li><a href="../modules/text-wordbreak.html">text-wordbreak</a></li>
<li><a href="../modules/timers.html">timers</a></li>
<li><a href="../modules/transition.html">transition</a></li>
<li><a href="../modules/transition-timer.html">transition-timer</a></li>
<li><a href="../modules/tree.html">tree</a></li>
<li><a href="../modules/tree-labelable.html">tree-labelable</a></li>
<li><a href="../modules/tree-lazy.html">tree-lazy</a></li>
<li><a href="../modules/tree-node.html">tree-node</a></li>
<li><a href="../modules/tree-openable.html">tree-openable</a></li>
<li><a href="../modules/tree-selectable.html">tree-selectable</a></li>
<li><a href="../modules/tree-sortable.html">tree-sortable</a></li>
<li><a href="../modules/uploader.html">uploader</a></li>
<li><a href="../modules/uploader-flash.html">uploader-flash</a></li>
<li><a href="../modules/uploader-html5.html">uploader-html5</a></li>
<li><a href="../modules/uploader-queue.html">uploader-queue</a></li>
<li><a href="../modules/view.html">view</a></li>
<li><a href="../modules/view-node-map.html">view-node-map</a></li>
<li><a href="../modules/widget.html">widget</a></li>
<li><a href="../modules/widget-anim.html">widget-anim</a></li>
<li><a href="../modules/widget-autohide.html">widget-autohide</a></li>
<li><a href="../modules/widget-base.html">widget-base</a></li>
<li><a href="../modules/widget-base-ie.html">widget-base-ie</a></li>
<li><a href="../modules/widget-buttons.html">widget-buttons</a></li>
<li><a href="../modules/widget-child.html">widget-child</a></li>
<li><a href="../modules/widget-htmlparser.html">widget-htmlparser</a></li>
<li><a href="../modules/widget-modality.html">widget-modality</a></li>
<li><a href="../modules/widget-parent.html">widget-parent</a></li>
<li><a href="../modules/widget-position.html">widget-position</a></li>
<li><a href="../modules/widget-position-align.html">widget-position-align</a></li>
<li><a href="../modules/widget-position-constrain.html">widget-position-constrain</a></li>
<li><a href="../modules/widget-skin.html">widget-skin</a></li>
<li><a href="../modules/widget-stack.html">widget-stack</a></li>
<li><a href="../modules/widget-stdmod.html">widget-stdmod</a></li>
<li><a href="../modules/widget-uievents.html">widget-uievents</a></li>
<li><a href="../modules/yql.html">yql</a></li>
<li><a href="../modules/yql-jsonp.html">yql-jsonp</a></li>
<li><a href="../modules/yql-nodejs.html">yql-nodejs</a></li>
<li><a href="../modules/yql-winjs.html">yql-winjs</a></li>
<li><a href="../modules/yui.html">yui</a></li>
<li><a href="../modules/yui-base.html">yui-base</a></li>
<li><a href="../modules/yui-later.html">yui-later</a></li>
<li><a href="../modules/yui-log.html">yui-log</a></li>
<li><a href="../modules/yui-throttle.html">yui-throttle</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="yui3-u-3-4">
<div id="api-options">
Show:
<label for="api-show-inherited">
<input type="checkbox" id="api-show-inherited" checked>
Inherited
</label>
<label for="api-show-protected">
<input type="checkbox" id="api-show-protected">
Protected
</label>
<label for="api-show-private">
<input type="checkbox" id="api-show-private">
Private
</label>
<label for="api-show-deprecated">
<input type="checkbox" id="api-show-deprecated">
Deprecated
</label>
</div>
<div class="apidocs">
<div id="docs-main">
<div class="content">
<h1>scrollview-scrollbars Module</h1>
<div class="box clearfix meta">
<a class="button link-docs" href="/yui/docs/scrollview">User Guide & Examples</a>
<div class="foundat">
Defined in: <a href="../files/scrollview_js_scrollbars-plugin.js.html#l45"><code>scrollview/js/scrollbars-plugin.js:45</code></a>
</div>
</div>
<div class="box intro">
<p>Provides a plugin, which adds support for a scroll indicator to ScrollView instances</p>
</div>
<div class="yui3-g">
<div class="yui3-u-1-2">
<p>This module provides the following classes:</p>
<ul class="module-classes">
<li class="module-class">
<a href="../classes/Plugin.ScrollViewScrollbars.html">
Plugin.ScrollViewScrollbars
</a>
</li>
</ul>
</div>
<div class="yui3-u-1-2">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="../assets/vendor/prettify/prettify-min.js"></script>
<script>prettyPrint();</script>
<script src="../assets/js/yui-prettify.js"></script>
<script src="../assets/../api.js"></script>
<script src="../assets/js/api-filter.js"></script>
<script src="../assets/js/api-list.js"></script>
<script src="../assets/js/api-search.js"></script>
<script src="../assets/js/apidocs.js"></script>
</body>
</html>
|
billwiliams/Yui
|
client/yui-3.17.2/api/modules/scrollview-scrollbars.html
|
HTML
|
mit
| 74,470
|
Pattern: Misaligned multi-line array brace
Issue: -
## Description
This rule checks that the closing brace in an array literal is either
on the same line as the last array element, or a new line.
When using the `symmetrical` (default) style:
If an array's opening brace is on the same line as the first element
of the array, then the closing brace should be on the same line as
the last element of the array.
If an array's opening brace is on the line above the first element
of the array, then the closing brace should be on the line below
the last element of the array.
When using the `new_line` style:
The closing brace of a multi-line array literal must be on the line
after the last element of the array.
When using the `same_line` style:
The closing brace of a multi-line array literal must be on the same
line as the last element of the array.
## Examples
```ruby
# symmetrical: bad
# new_line: good
# same_line: bad
[ :a,
:b
]
# symmetrical: bad
# new_line: bad
# same_line: good
[
:a,
:b ]
# symmetrical: good
# new_line: bad
# same_line: good
[ :a,
:b ]
# symmetrical: good
# new_line: good
# same_line: bad
[
:a,
:b
]
```
## Default configuration
Attribute | Value
--- | ---
EnforcedStyle | symmetrical
SupportedStyles | symmetrical, new_line, same_line
## Further Reading
* [RuboCop - Layout/MultilineArrayBraceLayout](https://rubocop.readthedocs.io/en/latest/cops_layout/#layoutmultilinearraybracelayout)
|
Adroiti/docs-for-code-review-tools
|
RuboCop/Layout-MultilineArrayBraceLayout.md
|
Markdown
|
mit
| 1,449
|
import math
d = int(input())
for _ in range(d):
t, a, b, c = [int(x) for x in input().split()]
l = [a, b, c]
l.sort()
if l[0] + l[1] < l[2]:
l[2] = l[0] + l[1]
print(min(t, math.floor((l[0]+l[1]+l[2])/2)))
|
madeinqc/IEEEXtreme9.0
|
06-tacostand-moderate/main.py
|
Python
|
mit
| 238
|
const React = require('react');
export default ({onQuantityChange, productId}) => (
<div className="product__element">
<img />
<input className="quantity"
onChange={(e) => {
e.preventDefault();
const inputValue = e.target.value;
onQuantityChange({
id: productId,
// in case of manual deleted input number (value === '')
quantity: inputValue !== '' ? parseInt(inputValue, 10) : 0
});
}}
type="number" min="1" defaultValue="1" />
<img />
</div>
);
|
unam3/oshop_i
|
src/components/Quantity/Quantity.js
|
JavaScript
|
mit
| 545
|
package com.devotedmc.ExilePearl.util;
import java.util.ArrayList;
/**
* String List class with an override for seeing if
* it contains a string value, ignoring case
* @author Gordon
*
*/
@SuppressWarnings("serial")
public class StringListIgnoresCase extends ArrayList<String> {
@Override
public boolean contains(Object o) {
String paramStr = (String)o;
for (String s : this) {
if (paramStr.equalsIgnoreCase(s)) return true;
}
return false;
}
}
|
DevotedMC/ExilePearl
|
src/main/java/com/devotedmc/ExilePearl/util/StringListIgnoresCase.java
|
Java
|
mit
| 506
|
// ======================================================================== //
// Copyright 2009-2016 Intel Corporation //
// //
// Licensed under the Apache License, Version 2.0 (the "License"); //
// you may not use this file except in compliance with the License. //
// You may obtain a copy of the License at //
// //
// http://www.apache.org/licenses/LICENSE-2.0 //
// //
// Unless required by applicable law or agreed to in writing, software //
// distributed under the License is distributed on an "AS IS" BASIS, //
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
// See the License for the specific language governing permissions and //
// limitations under the License. //
// ======================================================================== //
#include "scene.h"
#include "../bvh/bvh4_factory.h"
#include "../bvh/bvh8_factory.h"
namespace embree
{
/* error raising rtcIntersect and rtcOccluded functions */
void missing_rtcCommit() { throw_RTCError(RTC_INVALID_OPERATION,"scene got not committed"); }
void invalid_rtcIntersect1() { throw_RTCError(RTC_INVALID_OPERATION,"rtcIntersect and rtcOccluded not enabled"); }
void invalid_rtcIntersect4() { throw_RTCError(RTC_INVALID_OPERATION,"rtcIntersect4 and rtcOccluded4 not enabled"); }
void invalid_rtcIntersect8() { throw_RTCError(RTC_INVALID_OPERATION,"rtcIntersect8 and rtcOccluded8 not enabled"); }
void invalid_rtcIntersect16() { throw_RTCError(RTC_INVALID_OPERATION,"rtcIntersect16 and rtcOccluded16 not enabled"); }
void invalid_rtcIntersectN() { throw_RTCError(RTC_INVALID_OPERATION,"rtcIntersectN and rtcOccludedN not enabled"); }
Scene::Scene (Device* device, RTCSceneFlags sflags, RTCAlgorithmFlags aflags)
: Accel(AccelData::TY_UNKNOWN),
device(device),
commitCounter(0),
commitCounterSubdiv(0),
numMappedBuffers(0),
flags(sflags), aflags(aflags),
needTriangleIndices(false), needTriangleVertices(false),
needQuadIndices(false), needQuadVertices(false),
needBezierIndices(false), needBezierVertices(false),
needLineIndices(false), needLineVertices(false),
needSubdivIndices(false), needSubdivVertices(false),
is_build(false), modified(true),
progressInterface(this), progress_monitor_function(nullptr), progress_monitor_ptr(nullptr), progress_monitor_counter(0),
numIntersectionFilters1(0), numIntersectionFilters4(0), numIntersectionFilters8(0), numIntersectionFilters16(0), numIntersectionFiltersN(0)
{
#if defined(TASKING_INTERNAL)
scheduler = nullptr;
#else
group = new tbb::task_group;
#endif
intersectors = Accel::Intersectors(missing_rtcCommit);
if (device->scene_flags != -1)
flags = (RTCSceneFlags) device->scene_flags;
if (aflags & RTC_INTERPOLATE) {
needTriangleIndices = true;
needQuadIndices = true;
needBezierIndices = true;
needLineIndices = true;
//needSubdivIndices = true; // not required for interpolation
needTriangleVertices = true;
needQuadVertices = true;
needBezierVertices = true;
needLineVertices = true;
needSubdivVertices = true;
}
createTriangleAccel();
createTriangleMBAccel();
createQuadAccel();
createQuadMBAccel();
createSubdivAccel();
createHairAccel();
createHairMBAccel();
createLineAccel();
createLineMBAccel();
#if defined(EMBREE_GEOMETRY_TRIANGLES)
accels.add(device->bvh4_factory->BVH4InstancedBVH4Triangle4ObjectSplit(this));
#endif
#if defined(EMBREE_GEOMETRY_USER)
accels.add(device->bvh4_factory->BVH4UserGeometry(this)); // has to be the last as the instID field of a hit instance is not invalidated by other hit geometry
accels.add(device->bvh4_factory->BVH4UserGeometryMB(this)); // has to be the last as the instID field of a hit instance is not invalidated by other hit geometry
#endif
}
void Scene::createTriangleAccel()
{
#if defined(EMBREE_GEOMETRY_TRIANGLES)
if (device->tri_accel == "default")
{
if (isStatic()) {
int mode = 2*(int)isCompact() + 1*(int)isRobust();
switch (mode) {
case /*0b00*/ 0:
#if defined (__TARGET_AVX__)
if (device->hasISA(AVX))
{
if (isHighQuality())
{
/* new spatial split builder is now active per default */
accels.add(device->bvh8_factory->BVH8Triangle4SpatialSplit(this));
}
else
accels.add(device->bvh8_factory->BVH8Triangle4ObjectSplit(this));
}
else
#endif
{
if (isHighQuality())
{
/* new spatial split builder is now active per default */
accels.add(device->bvh4_factory->BVH4Triangle4SpatialSplit(this));
}
else accels.add(device->bvh4_factory->BVH4Triangle4ObjectSplit(this));
}
break;
case /*0b01*/ 1: accels.add(device->bvh4_factory->BVH4Triangle4vObjectSplit(this)); break;
case /*0b10*/ 2: accels.add(device->bvh4_factory->BVH4Triangle4iObjectSplit(this)); break;
case /*0b11*/ 3: accels.add(device->bvh4_factory->BVH4Triangle4iObjectSplit(this)); break;
}
}
else
{
int mode = 2*(int)isCompact() + 1*(int)isRobust();
switch (mode) {
case /*0b00*/ 0: accels.add(device->bvh4_factory->BVH4Triangle4Twolevel(this)); break;
case /*0b01*/ 1: accels.add(device->bvh4_factory->BVH4Triangle4vTwolevel(this)); break;
case /*0b10*/ 2: accels.add(device->bvh4_factory->BVH4Triangle4iTwolevel(this)); break;
case /*0b11*/ 3: accels.add(device->bvh4_factory->BVH4Triangle4iTwolevel(this)); break;
}
}
}
else if (device->tri_accel == "bvh4.triangle4") accels.add(device->bvh4_factory->BVH4Triangle4(this));
else if (device->tri_accel == "bvh4.triangle4v") accels.add(device->bvh4_factory->BVH4Triangle4v(this));
else if (device->tri_accel == "bvh4.triangle4i") accels.add(device->bvh4_factory->BVH4Triangle4i(this));
#if defined (__TARGET_AVX__)
else if (device->tri_accel == "bvh8.triangle4") accels.add(device->bvh8_factory->BVH8Triangle4(this));
else if (device->tri_accel == "qbvh8.triangle4i") accels.add(device->bvh8_factory->BVH8QuantizedTriangle4i(this));
#endif
else throw_RTCError(RTC_INVALID_ARGUMENT,"unknown triangle acceleration structure "+device->tri_accel);
#endif
}
void Scene::createQuadAccel()
{
#if defined(EMBREE_GEOMETRY_QUADS)
if (device->quad_accel == "default")
{
int mode = 2*(int)isCompact() + 1*(int)isRobust();
switch (mode) {
case /*0b00*/ 0:
#if defined (__TARGET_AVX__)
if (device->hasISA(AVX))
accels.add(device->bvh8_factory->BVH8Quad4v(this));
else
#endif
accels.add(device->bvh4_factory->BVH4Quad4v(this));
break;
case /*0b01*/ 1:
#if defined (__TARGET_AVX__) && 1
if (device->hasISA(AVX))
accels.add(device->bvh8_factory->BVH8Quad4i(this));
else
#endif
accels.add(device->bvh4_factory->BVH4Quad4i(this));
break;
case /*0b10*/ 2:
#if defined (__TARGET_AVX__)
if (device->hasISA(AVX))
{
// FIXME: reduce performance overhead of 10% compared to uncompressed bvh8
// if (isExclusiveIntersect1Mode())
// accels.add(device->bvh8_factory->BVH8QuantizedQuad4i(this));
// else
accels.add(device->bvh8_factory->BVH8Quad4i(this));
}
else
#endif
{
accels.add(device->bvh4_factory->BVH4Quad4i(this));
}
break;
case /*0b11*/ 3: accels.add(device->bvh4_factory->BVH4Quad4i(this)); break;
}
}
else if (device->quad_accel == "bvh4.quad4v") accels.add(device->bvh4_factory->BVH4Quad4v(this));
else if (device->quad_accel == "bvh4.quad4i") accels.add(device->bvh4_factory->BVH4Quad4i(this));
else if (device->quad_accel == "qbvh4.quad4i") accels.add(device->bvh4_factory->BVH4QuantizedQuad4i(this));
#if defined (__TARGET_AVX__)
else if (device->quad_accel == "bvh8.quad4v") accels.add(device->bvh8_factory->BVH8Quad4v(this));
else if (device->quad_accel == "bvh8.quad4i") accels.add(device->bvh8_factory->BVH8Quad4i(this));
else if (device->quad_accel == "qbvh8.quad4i") accels.add(device->bvh8_factory->BVH8QuantizedQuad4i(this));
#endif
else throw_RTCError(RTC_INVALID_ARGUMENT,"unknown quad acceleration structure "+device->quad_accel);
#endif
}
void Scene::createQuadMBAccel()
{
#if defined(EMBREE_GEOMETRY_QUADS)
if (device->quad_accel_mb == "default")
{
int mode = 2*(int)isCompact() + 1*(int)isRobust();
switch (mode) {
case /*0b00*/ 0:
case /*0b01*/ 1:
#if defined (__TARGET_AVX__)
if (device->hasISA(AVX))
accels.add(device->bvh8_factory->BVH8Quad4iMB(this));
else
#endif
accels.add(device->bvh4_factory->BVH4Quad4iMB(this));
break;
case /*0b10*/ 2: accels.add(device->bvh4_factory->BVH4Quad4iMB(this)); break;
case /*0b11*/ 3: accels.add(device->bvh4_factory->BVH4Quad4iMB(this)); break;
}
}
else throw_RTCError(RTC_INVALID_ARGUMENT,"unknown quad acceleration structure "+device->quad_accel);
#endif
}
void Scene::createTriangleMBAccel()
{
#if defined(EMBREE_GEOMETRY_TRIANGLES)
if (device->tri_accel_mb == "default")
{
#if defined (__TARGET_AVX__)
if (device->hasISA(AVX))
{
accels.add(device->bvh8_factory->BVH8Triangle4vMB(this));
}
else
#endif
{
accels.add(device->bvh4_factory->BVH4Triangle4vMB(this));
}
}
else if (device->tri_accel_mb == "bvh4.triangle4vmb") accels.add(device->bvh4_factory->BVH4Triangle4vMB(this));
#if defined (__TARGET_AVX__)
else if (device->tri_accel_mb == "bvh8.triangle4vmb") accels.add(device->bvh8_factory->BVH8Triangle4vMB(this));
#endif
else throw_RTCError(RTC_INVALID_ARGUMENT,"unknown motion blur triangle acceleration structure "+device->tri_accel_mb);
#endif
}
void Scene::createHairAccel()
{
#if defined(EMBREE_GEOMETRY_HAIR)
if (device->hair_accel == "default")
{
int mode = 2*(int)isCompact() + 1*(int)isRobust();
if (isStatic())
{
#if defined (__TARGET_AVX__)
if (device->hasISA(AVX2)) // only enable on HSW machines, for SNB this codepath is slower
{
switch (mode) {
case /*0b00*/ 0: accels.add(device->bvh8_factory->BVH8OBBBezier1v(this,isHighQuality())); break;
case /*0b01*/ 1: accels.add(device->bvh8_factory->BVH8OBBBezier1v(this,isHighQuality())); break;
case /*0b10*/ 2: accels.add(device->bvh8_factory->BVH8OBBBezier1i(this,isHighQuality())); break;
case /*0b11*/ 3: accels.add(device->bvh8_factory->BVH8OBBBezier1i(this,isHighQuality())); break;
}
}
else
#endif
{
switch (mode) {
case /*0b00*/ 0: accels.add(device->bvh4_factory->BVH4OBBBezier1v(this,isHighQuality())); break;
case /*0b01*/ 1: accels.add(device->bvh4_factory->BVH4OBBBezier1v(this,isHighQuality())); break;
case /*0b10*/ 2: accels.add(device->bvh4_factory->BVH4OBBBezier1i(this,isHighQuality())); break;
case /*0b11*/ 3: accels.add(device->bvh4_factory->BVH4OBBBezier1i(this,isHighQuality())); break;
}
}
}
else
{
switch (mode) {
case /*0b00*/ 0: accels.add(device->bvh4_factory->BVH4Bezier1v(this)); break;
case /*0b01*/ 1: accels.add(device->bvh4_factory->BVH4Bezier1v(this)); break;
case /*0b10*/ 2: accels.add(device->bvh4_factory->BVH4Bezier1i(this)); break;
case /*0b11*/ 3: accels.add(device->bvh4_factory->BVH4Bezier1i(this)); break;
}
}
}
else if (device->hair_accel == "bvh4.bezier1v" ) accels.add(device->bvh4_factory->BVH4Bezier1v(this));
else if (device->hair_accel == "bvh4.bezier1i" ) accels.add(device->bvh4_factory->BVH4Bezier1i(this));
else if (device->hair_accel == "bvh4obb.bezier1v" ) accels.add(device->bvh4_factory->BVH4OBBBezier1v(this,false));
else if (device->hair_accel == "bvh4obb.bezier1i" ) accels.add(device->bvh4_factory->BVH4OBBBezier1i(this,false));
#if defined (__TARGET_AVX__)
else if (device->hair_accel == "bvh8obb.bezier1v" ) accels.add(device->bvh8_factory->BVH8OBBBezier1v(this,false));
else if (device->hair_accel == "bvh8obb.bezier1i" ) accels.add(device->bvh8_factory->BVH8OBBBezier1i(this,false));
#endif
else throw_RTCError(RTC_INVALID_ARGUMENT,"unknown hair acceleration structure "+device->hair_accel);
#endif
}
void Scene::createHairMBAccel()
{
#if defined(EMBREE_GEOMETRY_HAIR)
if (device->hair_accel_mb == "default")
{
#if defined (__TARGET_AVX__)
if (device->hasISA(AVX2)) // only enable on HSW machines, on SNB this codepath is slower
{
accels.add(device->bvh8_factory->BVH8OBBBezier1iMB(this,false));
}
else
#endif
{
accels.add(device->bvh4_factory->BVH4OBBBezier1iMB(this,false));
}
}
else if (device->hair_accel_mb == "bvh4obb.bezier1imb") accels.add(device->bvh4_factory->BVH4OBBBezier1iMB(this,false));
#if defined (__TARGET_AVX__)
else if (device->hair_accel_mb == "bvh8obb.bezier1imb") accels.add(device->bvh8_factory->BVH8OBBBezier1iMB(this,false));
#endif
else throw_RTCError(RTC_INVALID_ARGUMENT,"unknown motion blur hair acceleration structure "+device->tri_accel_mb);
#endif
}
void Scene::createLineAccel()
{
#if defined(EMBREE_GEOMETRY_LINES)
if (device->line_accel == "default")
{
if (isStatic())
{
#if defined (__TARGET_AVX__)
if (device->hasISA(AVX) && !isCompact())
accels.add(device->bvh8_factory->BVH8Line4i(this));
else
#endif
accels.add(device->bvh4_factory->BVH4Line4i(this));
}
else
{
accels.add(device->bvh4_factory->BVH4Line4iTwolevel(this));
}
}
else if (device->line_accel == "bvh4.line4i") accels.add(device->bvh4_factory->BVH4Line4i(this));
#if defined (__TARGET_AVX__)
else if (device->line_accel == "bvh8.line4i") accels.add(device->bvh8_factory->BVH8Line4i(this));
#endif
else throw_RTCError(RTC_INVALID_ARGUMENT,"unknown line segment acceleration structure "+device->line_accel);
#endif
}
void Scene::createLineMBAccel()
{
#if defined(EMBREE_GEOMETRY_LINES)
if (device->line_accel_mb == "default")
{
#if defined (__TARGET_AVX__)
if (device->hasISA(AVX) && !isCompact())
accels.add(device->bvh8_factory->BVH8Line4iMB(this));
else
#endif
accels.add(device->bvh4_factory->BVH4Line4iMB(this));
}
else if (device->line_accel_mb == "bvh4.line4imb") accels.add(device->bvh4_factory->BVH4Line4iMB(this));
#if defined (__TARGET_AVX__)
else if (device->line_accel_mb == "bvh8.line4imb") accels.add(device->bvh8_factory->BVH8Line4iMB(this));
#endif
else throw_RTCError(RTC_INVALID_ARGUMENT,"unknown motion blur line segment acceleration structure "+device->line_accel_mb);
#endif
}
void Scene::createSubdivAccel()
{
#if defined(EMBREE_GEOMETRY_SUBDIV)
if (device->subdiv_accel == "default")
{
if (isIncoherent(flags) && isStatic())
{
#if defined (__TARGET_AVX__)
if (device->hasISA(AVX))
accels.add(device->bvh8_factory->BVH8SubdivGridEager(this));
else
#endif
accels.add(device->bvh4_factory->BVH4SubdivGridEager(this));
}
else
accels.add(device->bvh4_factory->BVH4SubdivPatch1Cached(this));
}
else if (device->subdiv_accel == "bvh4.subdivpatch1cached") accels.add(device->bvh4_factory->BVH4SubdivPatch1Cached(this));
else if (device->subdiv_accel == "bvh4.grid.eager" ) accels.add(device->bvh4_factory->BVH4SubdivGridEager(this));
#if defined (__TARGET_AVX__)
else if (device->subdiv_accel == "bvh8.grid.eager" ) accels.add(device->bvh8_factory->BVH8SubdivGridEager(this));
#endif
else throw_RTCError(RTC_INVALID_ARGUMENT,"unknown subdiv accel "+device->subdiv_accel);
#endif
}
Scene::~Scene ()
{
for (size_t i=0; i<geometries.size(); i++)
delete geometries[i];
#if TASKING_TBB
delete group; group = nullptr;
#endif
}
void Scene::clear() {
}
unsigned Scene::newUserGeometry (size_t items, size_t numTimeSteps)
{
Geometry* geom = new UserGeometry(this,items,numTimeSteps);
return geom->id;
}
unsigned Scene::newInstance (Scene* scene, size_t numTimeSteps)
{
Geometry* geom = new Instance(this,scene,numTimeSteps);
return geom->id;
}
unsigned Scene::newGeometryInstance (Geometry* geom) {
Geometry* instance = new GeometryInstance(this,geom);
return instance->id;
}
unsigned Scene::newTriangleMesh (RTCGeometryFlags gflags, size_t numTriangles, size_t numVertices, size_t numTimeSteps)
{
if (isStatic() && (gflags != RTC_GEOMETRY_STATIC)) {
throw_RTCError(RTC_INVALID_OPERATION,"static scenes can only contain static geometries");
return -1;
}
if (numTimeSteps == 0 || numTimeSteps > 2) {
throw_RTCError(RTC_INVALID_OPERATION,"only 1 or 2 time steps supported");
return -1;
}
Geometry* geom = new TriangleMesh(this,gflags,numTriangles,numVertices,numTimeSteps);
return geom->id;
}
unsigned Scene::newQuadMesh (RTCGeometryFlags gflags, size_t numQuads, size_t numVertices, size_t numTimeSteps)
{
if (isStatic() && (gflags != RTC_GEOMETRY_STATIC)) {
throw_RTCError(RTC_INVALID_OPERATION,"static scenes can only contain static geometries");
return -1;
}
if (numTimeSteps == 0 || numTimeSteps > 2) {
throw_RTCError(RTC_INVALID_OPERATION,"only 1 or 2 time steps supported");
return -1;
}
Geometry* geom = new QuadMesh(this,gflags,numQuads,numVertices,numTimeSteps);
return geom->id;
}
unsigned Scene::newSubdivisionMesh (RTCGeometryFlags gflags, size_t numFaces, size_t numEdges, size_t numVertices, size_t numEdgeCreases, size_t numVertexCreases, size_t numHoles, size_t numTimeSteps)
{
if (isStatic() && (gflags != RTC_GEOMETRY_STATIC)) {
throw_RTCError(RTC_INVALID_OPERATION,"static scenes can only contain static geometries");
return -1;
}
if (numTimeSteps == 0 || numTimeSteps > 2) {
throw_RTCError(RTC_INVALID_OPERATION,"only 1 or 2 time steps supported");
return -1;
}
Geometry* geom = nullptr;
#if defined(__TARGET_AVX__)
if (device->hasISA(AVX))
geom = new SubdivMeshAVX(this,gflags,numFaces,numEdges,numVertices,numEdgeCreases,numVertexCreases,numHoles,numTimeSteps);
else
#endif
geom = new SubdivMesh(this,gflags,numFaces,numEdges,numVertices,numEdgeCreases,numVertexCreases,numHoles,numTimeSteps);
return geom->id;
}
unsigned Scene::newBezierCurves (BezierCurves::SubType subtype, RTCGeometryFlags gflags, size_t numCurves, size_t numVertices, size_t numTimeSteps)
{
if (isStatic() && (gflags != RTC_GEOMETRY_STATIC)) {
throw_RTCError(RTC_INVALID_OPERATION,"static scenes can only contain static geometries");
return -1;
}
if (numTimeSteps == 0 || numTimeSteps > 2) {
throw_RTCError(RTC_INVALID_OPERATION,"only 1 or 2 time steps supported");
return -1;
}
Geometry* geom = new BezierCurves(this,subtype,gflags,numCurves,numVertices,numTimeSteps);
return geom->id;
}
unsigned Scene::newLineSegments (RTCGeometryFlags gflags, size_t numSegments, size_t numVertices, size_t numTimeSteps)
{
if (isStatic() && (gflags != RTC_GEOMETRY_STATIC)) {
throw_RTCError(RTC_INVALID_OPERATION,"static scenes can only contain static geometries");
return -1;
}
if (numTimeSteps == 0 || numTimeSteps > 2) {
throw_RTCError(RTC_INVALID_OPERATION,"only 1 or 2 time steps supported");
return -1;
}
Geometry* geom = new LineSegments(this,gflags,numSegments,numVertices,numTimeSteps);
return geom->id;
}
unsigned Scene::add(Geometry* geometry)
{
Lock<SpinLock> lock(geometriesMutex);
if (usedIDs.size()) {
unsigned id = usedIDs.back();
usedIDs.pop_back();
geometries[id] = geometry;
return id;
} else {
geometries.push_back(geometry);
return unsigned(geometries.size()-1);
}
}
void Scene::deleteGeometry(size_t geomID)
{
Lock<SpinLock> lock(geometriesMutex);
if (isStatic())
throw_RTCError(RTC_INVALID_OPERATION,"rtcDeleteGeometry cannot get called in static scenes");
if (geomID >= geometries.size())
throw_RTCError(RTC_INVALID_OPERATION,"invalid geometry ID");
Geometry* geometry = geometries[geomID];
if (geometry == nullptr)
throw_RTCError(RTC_INVALID_OPERATION,"invalid geometry");
geometry->disable();
accels.deleteGeometry(unsigned(geomID));
usedIDs.push_back(unsigned(geomID));
geometries[geomID] = nullptr;
delete geometry;
}
void Scene::updateInterface()
{
/* update bounds */
is_build = true;
bounds = accels.bounds;
intersectors = accels.intersectors;
/* enable only algorithms choosen by application */
if ((aflags & RTC_INTERSECT_STREAM) == 0)
{
intersectors.intersectorN = Accel::IntersectorN(&invalid_rtcIntersectN);
if ((aflags & RTC_INTERSECT1) == 0) intersectors.intersector1 = Accel::Intersector1(&invalid_rtcIntersect1);
if ((aflags & RTC_INTERSECT4) == 0) intersectors.intersector4 = Accel::Intersector4(&invalid_rtcIntersect4);
if ((aflags & RTC_INTERSECT8) == 0) intersectors.intersector8 = Accel::Intersector8(&invalid_rtcIntersect8);
if ((aflags & RTC_INTERSECT16) == 0) intersectors.intersector16 = Accel::Intersector16(&invalid_rtcIntersect16);
}
/* update commit counter */
commitCounter++;
}
void Scene::build_task ()
{
progress_monitor_counter = 0;
/* select fast code path if no intersection filter is present */
accels.select(numIntersectionFiltersN+numIntersectionFilters4,
numIntersectionFiltersN+numIntersectionFilters8,
numIntersectionFiltersN+numIntersectionFilters16,
numIntersectionFiltersN);
/* build all hierarchies of this scene */
accels.build(0,0);
/* make static geometry immutable */
if (isStatic())
{
accels.immutable();
for (size_t i=0; i<geometries.size(); i++)
if (geometries[i]) geometries[i]->immutable();
}
/* clear modified flag */
for (size_t i=0; i<geometries.size(); i++)
{
Geometry* geom = geometries[i];
if (!geom) continue;
if (geom->isEnabled()) geom->clearModified(); // FIXME: should builders do this?
}
updateInterface();
if (device->verbosity(2)) {
std::cout << "created scene intersector" << std::endl;
accels.print(2);
std::cout << "selected scene intersector" << std::endl;
intersectors.print(2);
}
setModified(false);
}
#if defined(TASKING_INTERNAL)
void Scene::build (size_t threadIndex, size_t threadCount)
{
Lock<MutexSys> buildLock(buildMutex,false);
/* allocates own taskscheduler for each build */
Ref<TaskScheduler> scheduler = nullptr;
{
Lock<MutexSys> lock(schedulerMutex);
scheduler = this->scheduler;
if (scheduler == null) {
buildLock.lock();
this->scheduler = scheduler = new TaskScheduler;
}
}
/* worker threads join build */
if (!buildLock.isLocked()) {
scheduler->join();
return;
}
/* wait for all threads in rtcCommitThread mode */
if (threadCount != 0)
scheduler->wait_for_threads(threadCount);
/* fast path for unchanged scenes */
if (!isModified()) {
scheduler->spawn_root([&]() { this->scheduler = nullptr; }, 1, threadCount == 0);
return;
}
/* report error if scene not ready */
if (!ready()) {
scheduler->spawn_root([&]() { this->scheduler = nullptr; }, 1, threadCount == 0);
throw_RTCError(RTC_INVALID_OPERATION,"not all buffers are unmapped");
}
/* initiate build */
try {
scheduler->spawn_root([&]() { build_task(); this->scheduler = nullptr; }, 1, threadCount == 0);
}
catch (...) {
accels.clear();
updateInterface();
throw;
}
}
#endif
#if defined(TASKING_TBB)
void Scene::build (size_t threadIndex, size_t threadCount)
{
/* let threads wait for build to finish in rtcCommitThread mode */
if (threadCount != 0) {
if (threadIndex > 0) {
group_barrier.wait(threadCount); // FIXME: use barrier that waits in condition
group->wait();
return;
}
}
/* try to obtain build lock */
Lock<MutexSys> lock(buildMutex,buildMutex.try_lock());
/* join hierarchy build */
if (!lock.isLocked()) {
#if USE_TASK_ARENA
device->arena->execute([&]{ group->wait(); });
#else
group->wait();
#endif
while (!buildMutex.try_lock()) {
__pause_cpu();
yield();
#if USE_TASK_ARENA
device->arena->execute([&]{ group->wait(); });
#else
group->wait();
#endif
}
buildMutex.unlock();
return;
}
if (!isModified()) {
if (threadCount) group_barrier.wait(threadCount);
return;
}
if (!ready()) {
if (threadCount) group_barrier.wait(threadCount);
throw_RTCError(RTC_INVALID_OPERATION,"not all buffers are unmapped");
return;
}
/* for best performance set FTZ and DAZ flags in the MXCSR control and status register */
unsigned int mxcsr = _mm_getcsr();
_mm_setcsr(mxcsr | /* FTZ */ (1<<15) | /* DAZ */ (1<<6));
try {
#if TBB_INTERFACE_VERSION_MAJOR < 8
tbb::task_group_context ctx( tbb::task_group_context::isolated, tbb::task_group_context::default_traits);
#else
tbb::task_group_context ctx( tbb::task_group_context::isolated, tbb::task_group_context::default_traits | tbb::task_group_context::fp_settings );
#endif
//ctx.set_priority(tbb::priority_high);
#if USE_TASK_ARENA
device->arena->execute([&]{
#endif
group->run([&]{
tbb::parallel_for (size_t(0), size_t(1), size_t(1), [&] (size_t) { build_task(); }, ctx);
});
if (threadCount) group_barrier.wait(threadCount);
group->wait();
#if USE_TASK_ARENA
});
#endif
/* reset MXCSR register again */
_mm_setcsr(mxcsr);
}
catch (...) {
/* reset MXCSR register again */
_mm_setcsr(mxcsr);
accels.clear();
updateInterface();
throw;
}
}
#endif
void Scene::write(std::ofstream& file)
{
int magick = 0x35238765LL;
file.write((char*)&magick,sizeof(magick));
size_t numGroups = size();
file.write((char*)&numGroups,sizeof(numGroups));
for (size_t i=0; i<numGroups; i++) {
if (geometries[i]) geometries[i]->write(file);
else { int type = -1; file.write((char*)&type,sizeof(type)); }
}
}
void Scene::setProgressMonitorFunction(RTCProgressMonitorFunc func, void* ptr)
{
static MutexSys mutex;
mutex.lock();
progress_monitor_function = func;
progress_monitor_ptr = ptr;
mutex.unlock();
}
void Scene::progressMonitor(double dn)
{
if (progress_monitor_function) {
size_t n = size_t(dn) + progress_monitor_counter.fetch_add(size_t(dn));
if (!progress_monitor_function(progress_monitor_ptr, n / (double(numPrimitives())))) {
throw_RTCError(RTC_CANCELLED,"progress monitor forced termination");
}
}
}
}
|
01alchemist/x-ray-kernel
|
src/embree/kernels/common/scene.cpp
|
C++
|
mit
| 28,173
|
<?php
namespace Event\GeneralBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
/**
* This is the class that validates and merges configuration from your app/config files
*
* To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class}
*/
class Configuration implements ConfigurationInterface
{
/**
* {@inheritDoc}
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('event_general');
// Here you should define the parameters that are allowed to
// configure your bundle. See the documentation linked above for
// more information on that topic.
return $treeBuilder;
}
}
|
oachkatzlschwoaf/EVENTS
|
src/Event/GeneralBundle/DependencyInjection/Configuration.php
|
PHP
|
mit
| 881
|
/* dont use imports, use require, because errors are coming when we are dynamically using services in the base model*/
let uiTypes = require('../../utils/ui-types');
// let ObjectID = require('mongodb').ObjectID;
// const model = require('../../models/trips'); -- wont work as this file is required on model creation
const collection = 'Trips';
module.exports = {
type: 'form',
requestType: 'get',
schemaFields: ['pickup.date', 'pickup.address', 'pickup.contact', 'pickup.material', 'drop.date', 'drop.address', 'drop.contact', 'drop.itemsToDrop', 'vehicleRequirements', 'totalWeight', 'totalWeightUnit'], // pick fields configuration from default schema
schemaOverrideFeilds: {
// 'pickup': {
// minItems: 1
// },
}, //override above listed schema fields
defaults: {
status: 'New'
},
prepare: (cacheKey, schema, serviceConfig) => { //on schema prepare - sync call
//add any extra fields which are not in schema etc, default values etc
//can do based on role, app etc by using the "cacheKey"
//cacheKey format 'TRIPS_TRUCKS#ADMIN#TRIPS#FORM#ADDTRIP'
// console.log(cacheKey);
// console.log(schema);
},
get: {
preValidate: (serviceConfig, req, res, options, cb) => {//on init hook, will get executed on service request - init
console.log('get prevalidate');
cb();//if error, return as first argument
},
callback: (schema, serviceConfig, req, res, options, cb) => {//callback hook - after serving the request - forms & grid
console.log('get callback', req.params.id);
if (req.params.id || req.query.id) {
const model = require('mongoose').model(collection);
let params = {
id: req.params.id || req.query.id
};
model.getById(params, {
response: {
schema: schema
}
}, cb);
} else {
cb(null, schema);
}
}
}
};
|
peakhigh/tapi
|
server/services/trips/getTripStats.js
|
JavaScript
|
mit
| 2,036
|
module Popmovies
module Models
class TvShow
attr_accessor :title, :url
def initialize(title, url)
@title = title
@url = url
end
end
end
end
|
gntics/popmovies
|
lib/popmovies/models/tv_show.rb
|
Ruby
|
mit
| 189
|
import { processErrorSymbol } from "./symbols";
import { flatten } from "./utils/general";
import { buildErrorMaps, getValidatorInput } from "./utils/process";
import skurt from "./utils/skurt";
import * as types from "../types";
export default function asyncProcess<S, A extends types.AnyAction>({
state,
action,
validatorMap,
mode,
}: types.AsyncProcessInput<S, A>): Promise<types.ProcessOutput<A>> {
function failure(result: types.ValidationResult): boolean {
return result !== true;
}
function binaryProcess(): Promise<types.ProcessOutput<A>> {
function getResult<S, A extends types.AnyAction, K extends keyof A>(
validator: types.Validator<S, A, K>,
fieldKey: K,
validatorInput: types.ValidatorInput<S, A, K>,
): Promise<types.ValidationResult> {
return new Promise((resolve) => {
resolve(validator.check(validatorInput));
})
.catch((externalError) => {
return false;
});
}
const results = [];
for (const fieldKey of Object.keys(validatorMap)) {
const validatorInput = getValidatorInput({ action, state, fieldKey});
for (const validator of validatorMap[fieldKey]!) {
results.push(getResult(validator, fieldKey, validatorInput));
}
}
return skurt(failure)(1)(results).then((failures) => !failures.length);
}
function normalProcess(): Promise<types.ProcessOutput<A>> {
function getResult<S, A extends types.AnyAction, K extends keyof A>(
{ check, error }: types.Validator<S, A, K>,
fieldKey: K,
validatorInput: types.ValidatorInput<S, A, K>,
): Promise<types.ValidationResult> {
return new Promise((resolve) => {
resolve(check(validatorInput));
})
.then((result) => {
if (result === true) {
return true;
} else {
return {
fieldKey,
error: error(validatorInput),
};
}
})
.catch((externalError) => {
externalError[processErrorSymbol] = true;
return {
fieldKey,
error: externalError,
};
});
}
function getFieldFailures(): Array<Promise<types.Failure[]>> {
const findFailures = skurt(failure)(mode);
const fieldResults: Array<Promise<types.Failure[]>> = [];
for (const fieldKey of Object.keys(validatorMap)) {
const fieldResult: Array<Promise<types.ValidationResult>> = [];
const validatorInput = getValidatorInput({ action, state, fieldKey});
for (const validator of validatorMap[fieldKey]!) {
const result = getResult(validator, fieldKey, validatorInput);
fieldResult.push(result);
}
fieldResults.push(findFailures(fieldResult));
}
return fieldResults;
}
return Promise.all(getFieldFailures())
.then(flatten)
.then((failures) => {
if (failures.length) {
return buildErrorMaps<A>(failures);
} else {
return true;
}
});
}
return mode === 0 ? binaryProcess() : normalProcess();
}
|
contrarian/redux-tsa
|
src/internal/asyncProcess.ts
|
TypeScript
|
mit
| 3,588
|
#Mista Reader
Мобильный клиент для форума сайта [Mista.ru](http://www.forum.mista.ru/index.php)
### Основные возможности
* Просмотр списка тем, просмотр сообщений.
* Добавление тем, добавление сообщений.
* Поддержка голосований.
* Фильтры по разделам и секциям.
* Просмотр "**Моих тем**" и "**Тем с моим участием**".
* **Подписки на новые сообщения в теме**.
* Поддержка нескольких цветовых оформлений.
* Возможность перехода к последнему сообщению темы.
* Ответы с цитированием номера поста.
### Страница в Google Play
[Mista Reader](https://play.google.com/store/apps/details?id=com.mistareader)
### Контакты
mistareader@gmail.com
|
Rexee/MistaReader
|
README.md
|
Markdown
|
mit
| 983
|
#!/usr/bin/env python
#file cogent.parse.mothur.py
"""Parses Mothur otu list"""
from record_finder import is_empty
__author__ = "Kyle Bittinger"
__copyright__ = "Copyright 2007-2012, The Cogent Project"
__credits__ = ["Kyle Bittinger"]
__license__ = "GPL"
__version__ = "1.5.3"
__maintainer__ = "Kyle Bittinger"
__email__ = "kylebittinger@gmail.com"
__status__ = "Prototype"
def parse_otu_list(lines, precision=0.0049):
"""Parser for mothur *.list file
To ensure all distances are of type float, the parser returns a
distance of 0.0 for the unique groups. However, if some sequences
are very similar, mothur may return a grouping at zero distance.
What Mothur really means by this, however, is that the clustering
is at the level of Mothur's precision. In this case, the parser
returns the distance explicitly.
If you are parsing otu's with a non-default precision, you must
specify the precision here to ensure that the parsed distances are
in order.
Returns an iterator over (distance, otu_list)
"""
for line in lines:
if is_empty(line):
continue
tokens = line.strip().split('\t')
distance_str = tokens.pop(0)
if distance_str.lstrip().lower().startswith('u'):
distance = 0.0
elif distance_str == '0.0':
distance = float(precision)
else:
distance = float(distance_str)
num_otus = int(tokens.pop(0))
otu_list = [t.split(',') for t in tokens]
yield (distance, otu_list)
|
sauloal/cnidaria
|
scripts/venv/lib/python2.7/site-packages/cogent/parse/mothur.py
|
Python
|
mit
| 1,558
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="rustdoc">
<meta name="description" content="API documentation for the Rust `LLVMBuildPointerCast` fn in crate `rustc_llvm`.">
<meta name="keywords" content="rust, rustlang, rust-lang, LLVMBuildPointerCast">
<title>rustc_llvm::LLVMBuildPointerCast - Rust</title>
<link rel="stylesheet" type="text/css" href="../main.css">
<link rel="shortcut icon" href="http://www.rust-lang.org/favicon.ico">
</head>
<body class="rustdoc">
<!--[if lte IE 8]>
<div class="warning">
This old browser is unsupported and will most likely display funky
things.
</div>
<![endif]-->
<section class="sidebar">
<a href='../rustc_llvm/index.html'><img src='http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png' alt='' width='100'></a>
<p class='location'><a href='index.html'>rustc_llvm</a></p><script>window.sidebarCurrent = {name: 'LLVMBuildPointerCast', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script>
</section>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press 'S' to search, '?' for more options..."
type="search">
</div>
</form>
</nav>
<section id='main' class="content fn">
<h1 class='fqn'><span class='in-band'><a href='index.html'>rustc_llvm</a>::<wbr><a class='fn' href=''>LLVMBuildPointerCast</a><wbr><a class='stability Unstable' title=''>Unstable</a></span><span class='out-of-band'><span id='render-detail'>
<a id="collapse-all" href="#">[-]</a> <a id="expand-all" href="#">[+]</a>
</span><a id='src-7140' href='../src/rustc_llvm/lib.rs.html#1414-1418'>[src]</a></span></h1>
<pre class='rust fn'>pub unsafe fn LLVMBuildPointerCast(B: <a class='type' href='../rustc_llvm/type.BuilderRef.html' title='rustc_llvm::BuilderRef'>BuilderRef</a>, Val: <a class='type' href='../rustc_llvm/type.ValueRef.html' title='rustc_llvm::ValueRef'>ValueRef</a>, DestTy: <a class='type' href='../rustc_llvm/type.TypeRef.html' title='rustc_llvm::TypeRef'>TypeRef</a>, Name: *const <a class='type' href='../libc/types/os/arch/c95/type.c_char.html' title='libc::types::os::arch::c95::c_char'>c_char</a>) -> <a class='type' href='../rustc_llvm/type.ValueRef.html' title='rustc_llvm::ValueRef'>ValueRef</a></pre></section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<div id="help" class="hidden">
<div class="shortcuts">
<h1>Keyboard shortcuts</h1>
<dl>
<dt>?</dt>
<dd>Show this help dialog</dd>
<dt>S</dt>
<dd>Focus the search field</dd>
<dt>⇤</dt>
<dd>Move up in search results</dd>
<dt>⇥</dt>
<dd>Move down in search results</dd>
<dt>⏎</dt>
<dd>Go to active search result</dd>
</dl>
</div>
<div class="infos">
<h1>Search tricks</h1>
<p>
Prefix searches with a type followed by a colon (e.g.
<code>fn:</code>) to restrict the search to a given type.
</p>
<p>
Accepted types are: <code>fn</code>, <code>mod</code>,
<code>struct</code>, <code>enum</code>,
<code>trait</code>, <code>typedef</code> (or
<code>tdef</code>).
</p>
</div>
</div>
<script>
window.rootPath = "../";
window.currentCrate = "rustc_llvm";
window.playgroundUrl = "";
</script>
<script src="../jquery.js"></script>
<script src="../main.js"></script>
<script async src="../search-index.js"></script>
</body>
</html>
|
ArcherSys/ArcherSys
|
Rust/share/doc/rust/html/rustc_llvm/fn.LLVMBuildPointerCast.html
|
HTML
|
mit
| 4,166
|
import isLocationAction from '../src/pure-utils/isLocationAction'
import isServer from '../src/pure-utils/isServer'
import objectValues from '../src/pure-utils/objectValues'
import nestAction from '../src/pure-utils/nestAction'
import pathToAction from '../src/pure-utils/pathToAction'
import actionToPath from '../src/pure-utils/actionToPath'
import changePageTitle from '../src/pure-utils/changePageTitle'
import { NOT_FOUND } from '../src/actions'
it('isLocationAction(action) if has meta.location object', () => {
let ret = isLocationAction({})
expect(ret).toBeFalsy()
ret = isLocationAction({ meta: { location: { } } })
expect(ret).toBeTruthy()
})
it('isServer()', () => {
expect(isServer()).toEqual(false)
global.window.SSRtest = true
expect(isServer()).toEqual(true)
delete global.window.SSRtest
})
it('objectValues(routesMap) converts map of routes to an array of routes without the action type keys', () => {
const routesMap = {
ACTION_TYPE: '/foo/:bar',
ACTION_TYPE_2: { path: '/path/:baz/', capitalizedWords: true },
}
const ret = objectValues(routesMap)
expect(ret).toEqual([routesMap.ACTION_TYPE, routesMap.ACTION_TYPE_2])
console.log(ret)
})
it('nestAction(pathname, action, location)', () => {
const pathname = 'path'
const receivedAction = { type: 'FOO', payload: { bar: 'baz' }, meta: { info: 'something' } }
const location = { pathname: 'previous', type: 'PREV', payload: { bla: 'prev' } }
let action = nestAction(pathname, receivedAction, location)
expect(action).toMatchSnapshot()
expect(action.type).toEqual('FOO')
expect(action.payload).toEqual({ bar: 'baz' })
expect(action.type).toEqual(action.meta.location.current.type)
expect(action.payload).toEqual(action.meta.location.current.payload)
expect(action.meta.location.prev).toEqual(location)
expect(action.meta).toMatchObject(receivedAction.meta)
expect(action.meta.location.current.pathname).toEqual(pathname)
console.log(action)
console.log(action.meta.location)
expect(action.meta.location.load).not.toBeDefined()
action = nestAction(pathname, receivedAction, location, 'load')
expect(action.meta.location.load).toEqual(true)
})
describe('pathToAction(path, routesMap)', () => {
it('parse path into action using routePath without /:param segment', () => {
const routesMap = {
INFO: '/info',
INFO_PARAM: '/info/:param',
}
const action = pathToAction('/info', routesMap)
expect(action).toEqual({ type: 'INFO', payload: {} })
console.log(action)
})
it('parse path into action using routePath with /:param segment', () => {
const routesMap = {
INFO: '/info',
INFO_PARAM: '/info/:param',
}
const action = pathToAction('/info/foo', routesMap)
expect(action).toEqual({ type: 'INFO_PARAM', payload: { param: 'foo' } })
console.log(action)
})
it('parse path (/info/foo-bar) into action using route object containing capitalizedWords: true: payload: { param: "Foo Bar" }', () => {
const path = '/info/foo-bar'
const routesMap = {
INFO_PARAM: { path: '/info/:param/', capitalizedWords: true },
}
const action = pathToAction(path, routesMap)
expect(action.payload.param).toEqual('Foo Bar')
console.log(action)
})
it('parse path into action using route object containing fromPath() function', () => {
const path = '/info/foo-bar'
const routesMap = {
INFO_PARAM: { path: '/info/:param/', fromPath: (segment, key) => (`${segment} ${key}`).replace('-', ' ').toUpperCase() },
}
const action = pathToAction(path, routesMap)
expect(action.payload.param).toEqual('FOO BAR PARAM')
console.log(action)
})
it('parse path containing number param into action with payload value set as integer instead of string', () => {
const path = '/info/69'
const routesMap = {
INFO_PARAM: { path: '/info/:param/' },
}
const action = pathToAction(path, routesMap)
expect(typeof action.payload.param).toEqual('number')
expect(action.payload.param).toEqual(69)
console.log(action)
})
it('parsed path not found and return NOT_FOUND action.type: "@@pure-redux-router/NOT_FOUND"', () => {
const path = '/info/foo/bar'
const routesMap = {
INFO_PARAM: { path: '/info/:param/' },
}
const action = pathToAction(path, routesMap)
expect(action.type).toEqual(NOT_FOUND)
console.log(action)
})
})
describe('actionToPath(action, routesMap)', () => {
it('parse action into path without payload: /info', () => {
const action = { type: 'INFO' }
const routesMap = {
INFO: '/info',
INFO_PARAM: '/info/:param',
}
const path = actionToPath(action, routesMap)
expect(path).toEqual('/info')
console.log(path)
})
it('parse action payload into path segment: /info/foo', () => {
const action = { type: 'INFO_PARAM', payload: { param: 'foo' } }
const routesMap = {
INFO: '/info',
INFO_PARAM: '/info/:param',
}
const path = actionToPath(action, routesMap)
expect(path).toEqual('/info/foo')
console.log(path)
})
it('parse action into path with numerical payload key value: /info/69', () => {
const action = { type: 'INFO_PARAM', payload: { param: 69 } }
const routesMap = {
INFO: '/info',
INFO_PARAM: { path: '/info/:param', capitalizedWords: true },
}
const path = actionToPath(action, routesMap)
expect(path).toEqual('/info/69')
console.log(path)
})
it('parse action into path with parameters using route object containing capitalizedWords: true: /info/foo-bar', () => {
const action = { type: 'INFO_PARAM', payload: { param: 'Foo Bar' } }
const routesMap = {
INFO_PARAM: { path: '/info/:param', capitalizedWords: true },
}
const path = actionToPath(action, routesMap)
expect(path).toEqual('/info/foo-bar')
console.log(path)
})
it('parse action into path with parameters using route object containing toPath() function: /info/foo-param-bar', () => {
const action = { type: 'INFO_PARAM', payload: { param: 'Foo Bar' } }
const routesMap = {
INFO_PARAM: { path: '/info/:param', toPath: (value, key) => value.replace(' ', `-${key}-`).toLowerCase() },
}
const path = actionToPath(action, routesMap)
expect(path).toEqual('/info/foo-param-bar')
console.log(path)
})
it('perform no formatting when route object contains ONLY path key: /info/FooBar', () => {
const action = { type: 'INFO_PARAM', payload: { param: 'FooBar' } }
const routesMap = {
INFO_PARAM: { path: '/info/:param' },
}
const path = actionToPath(action, routesMap)
expect(path).toEqual('/info/FooBar')
console.log(path)
})
it('throw error when parsing non-matched action', () => {
const routesMap = {
INFO: { path: '/info' },
}
let performMatch = () => actionToPath({ type: 'MISSED' }, routesMap)
expect(performMatch).toThrowError()
performMatch = () => actionToPath({ type: 'INFO' }, routesMap)
expect(performMatch).not.toThrowError()
})
})
describe('changePageTitle()', () => {
it('when title changes set it to document.title', () => {
const document = { }
const title = 'foo'
const ret = changePageTitle(document, title)
console.log(document)
expect(document).toEqual({ title: 'foo' })
expect(ret).toEqual('foo')
})
it('when title changes do not set document.title', () => {
const document = { title: 'foo' }
const title = 'foo'
const ret = changePageTitle(document, title)
console.log(document)
expect(document).toEqual({ title: 'foo' })
expect(ret).toEqual(null) // no return value when title does not change
})
})
|
celebvidy/pure-redux-router
|
__tests__/pure-utils.js
|
JavaScript
|
mit
| 7,737
|
---
layout: post
title: "Corriendo NodeJS App con Systemd"
image: img3.png
video: false
---
Habilita tu app en NodeJS como un servicio mas del SO y controlalo con systemctl
### Creando un archivo de servicio systemd
Los archivos de servicios systemd esta en:
{% highlight Bash %}
/lib/systemd/system
{% endhighlight %}
Para crear un nuevo servicio, debemos crear un archivo con los detalles:
{% highlight Bash %}
sudo nano /lib/systemd/system/mi_servicio.service
{% endhighlight %}
`mi_servicio` es el nombre con el que se reconocer el servicio.
{% highlight Bash linenos%}
[Unit]
Description=hello_env.js - making your environment variables rad
Documentation=https://example.com
After=network.target
[Service]
Environment=NODE_PORT=3001
Type=simple
User=ubuntu
ExecStart=/usr/bin/node /home/ubuntu/hello_env.js
Restart=on-failure
[Install]
WantedBy=multi-user.target
{% endhighlight %}
donde:
`Description` descripción del servicio\\
`Documentation` Referencia donde encontrar la documentación \\
`After=network.target` Para que el servicio espere a que los servicios de res esten disponibles.\\
`Environment=NODE_PORT=3001` : Permite setear variables de entorno\\
`Type=simple` \\
`User=ubuntu` : Usuario bajo el cual se ejecutara el servicio \\
`ExecStart=node /home/ubuntu/app.js` : Comando que se ejecutara para levantar el servicio \\
`Restart=on-failure` : Para que se vuelva a iniciar frente a un fallo \\
`WantedBy=multi-user.target` \\
### Usando systemctl para controlar nuestra aplicación
Recargamos systemctl para que reconozca el archivo que agregamos anteriormete.
sudo systemctl daemon-reload
Iniciamos el servicio
sudo systemctl start mi_servicio
Recuerda que `mi_servicio` corresponde al nombre del archivo `mi_servicio.service` creado anteriormente
Luego verificamos el `status` del servicio
sudo systemctl status cloud9
Deberiamos tener por respuesta algo como esto
● cloud9.service - Cloud9 CORE - Entorno de Desarrollo
Loaded: loaded (/lib/systemd/system/cloud9.service; disabled)
Active: inactive (dead)
Docs: https://c9.io
Le diremos a **systemd** que inicie nuestra aplicacion en *NodeJs* junto con el sistema operativo
sudo systemctl enable cloud9
Si luego quieres que **no inicie**
sudo systemctl disable cloud9
Lectura Recomendada: [How To Use Systemctl to Manage Systemd Services and Units ](https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-systemd-services-and-units)
|
cristofer-dev/cristofer.io
|
_posts/2017-03-02-systemd.md
|
Markdown
|
mit
| 2,488
|
using System.Collections.Concurrent;
using OmniSharp.Extensions.LanguageServer.Protocol;
using OmniSharp.Extensions.LanguageServer.Protocol.Models;
namespace OmniSharp.LanguageServerProtocol.Handlers
{
public class DocumentVersions
{
private readonly ConcurrentDictionary<DocumentUri, int> _documentVersions = new ConcurrentDictionary<DocumentUri, int>();
public int? GetVersion(DocumentUri documentUri)
{
if (_documentVersions.TryGetValue(documentUri, out var version))
{
return version;
}
return null;
}
public void Update(VersionedTextDocumentIdentifier identifier)
{
_documentVersions.AddOrUpdate(identifier.Uri, identifier.Version, (uri, i) => identifier.Version);
}
public void Update(OptionalVersionedTextDocumentIdentifier identifier)
{
_documentVersions.AddOrUpdate(identifier.Uri, identifier.Version ?? 0, (uri, i) => identifier.Version ?? 0);
}
public void Reset(TextDocumentIdentifier identifier)
{
_documentVersions.AddOrUpdate(identifier.Uri, 0, (uri, i) => 0);
}
public void Remove(TextDocumentIdentifier identifier)
{
_documentVersions.TryRemove(identifier.Uri, out _);
}
}
}
|
OmniSharp/omnisharp-roslyn
|
src/OmniSharp.LanguageServerProtocol/Handlers/DocumentVersions.cs
|
C#
|
mit
| 1,354
|
---
---
<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>TransitionService | @uirouter/angular</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
<link rel="stylesheet" href="../assets/css/uirouter.css">
<script src="../assets/js/modernizr.js"></script>
<script src="../assets/js/reset.js"></script>
</head>
<body>
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.js" data-base="..">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">@uirouter/angular</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<!--
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
-->
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Internal UI-Router API</label>
<!--
<input type="checkbox" id="tsd-filter-only-exported" />
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
-->
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="../index.html">@uirouter/angular</a>
</li>
<li>
<a href="../modules/transition.html">transition</a>
</li>
<li>
<a href="transition.transitionservice.html">TransitionService</a>
</li>
</ul>
<h1>Class TransitionService</h1>
</div>
</div>
</header>
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>This class provides services related to Transitions.</p>
</div>
<ul>
<li>Most importantly, it allows global Transition Hooks to be registered.</li>
<li>It allows the default transition error handler to be set.</li>
<li>It also has a factory function for creating new <a href="transition.transition-1.html">Transition</a> objects, (used internally by the <a href="state.stateservice.html">StateService</a>).</li>
</ul>
<p>At bootstrap, <a href="core.uirouter.html">UIRouter</a> creates a single instance (singleton) of this class.</p>
</div>
</section>
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
<li>
<span class="target">TransitionService</span>
</li>
</ul>
</section>
<section class="tsd-panel">
<h3>Implements</h3>
<ul class="tsd-hierarchy">
<li><a href="../interfaces/transition.ihookregistry.html" class="tsd-signature-type">IHookRegistry</a></li>
<li><a href="../interfaces/core.disposable.html" class="tsd-signature-type">Disposable</a></li>
</ul>
</section>
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section tsd-is-external">
<h3>Properties</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-external"><a href="transition.transitionservice.html#_pluginapi" class="tsd-kind-icon">_pluginapi</a></li>
</ul>
</section>
<section class="tsd-index-section ">
<h3>Methods</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-method tsd-parent-kind-class"><a href="transition.transitionservice.html#create" class="tsd-kind-icon">create</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="transition.transitionservice.html#dispose" class="tsd-kind-icon">dispose</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="transition.transitionservice.html#onbefore" class="tsd-kind-icon">on<wbr>Before</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-external"><a href="transition.transitionservice.html#oncreate" class="tsd-kind-icon">on<wbr>Create</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="transition.transitionservice.html#onenter" class="tsd-kind-icon">on<wbr>Enter</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="transition.transitionservice.html#onerror" class="tsd-kind-icon">on<wbr>Error</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="transition.transitionservice.html#onexit" class="tsd-kind-icon">on<wbr>Exit</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="transition.transitionservice.html#onfinish" class="tsd-kind-icon">on<wbr>Finish</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="transition.transitionservice.html#onretain" class="tsd-kind-icon">on<wbr>Retain</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="transition.transitionservice.html#onstart" class="tsd-kind-icon">on<wbr>Start</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="transition.transitionservice.html#onsuccess" class="tsd-kind-icon">on<wbr>Success</a></li>
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group tsd-is-external">
<h2>Properties</h2>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a name="_pluginapi" class="tsd-anchor"></a>
<!--
<h3>_pluginapi</h3>
-->
<div class="tsd-signature tsd-kind-icon">_pluginapi<span class="tsd-signature-symbol">:</span> <a href="../interfaces/transition.transitionservicepluginapi.html" class="tsd-signature-type">TransitionServicePluginAPI</a></div>
<div class="tsd-declaration">
<div class="tsd-comment tsd-typography">
</div>
</div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/ui-router/core/blob/0329205/src/transition/transitionService.ts#L124">core/src/transition/transitionService.ts:124</a></li>
</ul>
</aside>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Methods</h2>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="create" class="tsd-anchor"></a>
<!--
<h3>create</h3>
-->
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">create<span class="tsd-signature-symbol">(</span>fromPath<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">PathNode[]</span>, targetState<span class="tsd-signature-symbol">: </span><a href="state.targetstate.html" class="tsd-signature-type">TargetState</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="transition.transition-1.html" class="tsd-signature-type">Transition</a></li>
<li class="tsd-header">
<p> Creates a new <a href="transition.transition-1.html">Transition</a> object </p>
</li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Creates a new <a href="transition.transition-1.html">Transition</a> object</p>
</div>
<p>This is a factory function for creating new Transition objects.
It is used internally by the <a href="state.stateservice.html">StateService</a> and should generally not be called by application code.</p>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>fromPath <span class="tsd-signature-type">PathNode[]</span></h5>
: <div class="tsd-comment tsd-typography">
<p>the path to the current state (the from state)</p>
</div>
</li>
<li>
<h5>targetState <a href="state.targetstate.html" class="tsd-signature-type">TargetState</a></h5>
: <div class="tsd-comment tsd-typography">
<p>the target state (destination)</p>
</div>
</li>
</ul>
<div class="tsd-returns">
<h4 class="tsd-returns-title">Returns <a href="transition.transition-1.html" class="tsd-signature-type">Transition</a></h4>
: <p>a Transition</p>
</div>
<hr>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/ui-router/core/blob/0329205/src/transition/transitionService.ts#L231">core/src/transition/transitionService.ts:231</a></li>
</ul>
</aside> </li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="dispose" class="tsd-anchor"></a>
<!--
<h3>dispose</h3>
-->
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">dispose<span class="tsd-signature-symbol">(</span>router<span class="tsd-signature-symbol">: </span><a href="core.uirouter.html" class="tsd-signature-type">UIRouter</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
<li class="tsd-header">
<p> dispose </p>
</li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>dispose</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>router <a href="core.uirouter.html" class="tsd-signature-type">UIRouter</a></h5>
</li>
</ul>
<div class="tsd-returns">
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</div>
<hr>
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/core.disposable.html">Disposable</a>.<a href="../interfaces/core.disposable.html#dispose">dispose</a></p>
<ul>
<li>Defined in <a href="https://github.com/ui-router/core/blob/0329205/src/transition/transitionService.ts#L214">core/src/transition/transitionService.ts:214</a></li>
</ul>
</aside> </li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="onbefore" class="tsd-anchor"></a>
<!--
<h3>on<wbr>Before</h3>
-->
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">on<wbr>Before<span class="tsd-signature-symbol">(</span>criteria<span class="tsd-signature-symbol">: </span><a href="../interfaces/transition.hookmatchcriteria.html" class="tsd-signature-type">HookMatchCriteria</a>, callback<span class="tsd-signature-symbol">: </span><a href="../interfaces/transition.transitionhookfn.html" class="tsd-signature-type">TransitionHookFn</a>, options<span class="tsd-signature-symbol">?: </span><a href="../interfaces/transition.hookregoptions.html" class="tsd-signature-type">HookRegOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Function</span></li>
<li class="tsd-header">
<p> Registers a <a href="../interfaces/transition.transitionhookfn.html">TransitionHookFn</a>, called <em>before a transition starts</em>. </p>
</li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Registers a <a href="../interfaces/transition.transitionhookfn.html">TransitionHookFn</a>, called <em>before a transition starts</em>.</p>
</div>
<p>Registers a transition lifecycle hook, which is invoked before a transition even begins.
This hook can be useful to implement logic which prevents a transition from even starting, such
as authentication, redirection</p>
<p>See <a href="../interfaces/transition.transitionhookfn.html">TransitionHookFn</a> for the signature of the function.</p>
<p>The <a href="../interfaces/transition.hookmatchcriteria.html">HookMatchCriteria</a> is used to determine which Transitions the hook should be invoked for.
To match all Transitions, use an empty criteria object <code>{}</code>.</p>
<h3 id="lifecycle">Lifecycle</h3>
<p><code>onBefore</code> hooks are invoked <em>before a Transition starts</em>.
No resolves have been fetched yet.
Each <code>onBefore</code> hook is invoked synchronously, in the same call stack as <a href="state.stateservice.html#transitionto">StateService.transitionTo</a>.
The registered <code>onBefore</code> hooks are invoked in priority order.</p>
<p>Note: during the <code>onBefore</code> phase, additional hooks can be added to the specific <a href="transition.transition-1.html">Transition</a> instance.
These "on-the-fly" hooks only affect the currently running transition..</p>
<h3 id="return-value">Return value</h3>
<p>The hook's return value can be used to pause, cancel, or redirect the current Transition.
See <a href="../modules/transition.html#hookresult">HookResult</a> for more information.</p>
<p>If any hook modifies the transition <em>synchronously</em> (by throwing, returning <code>false</code>, or returning
a <a href="state.targetstate.html">TargetState</a>), the remainder of the hooks are skipped.
If a hook returns a promise, the remainder of the <code>onBefore</code> hooks are still invoked synchronously.
All promises are resolved, and processed asynchronously before the <code>onStart</code> phase of the Transition.</p>
<h3 id="examples">Examples</h3>
<h4 id="default-substate">Default Substate</h4>
<p>This example redirects any transition from 'home' to 'home.dashboard'. This is commonly referred to as a
"default substate".</p>
<dl class="tsd-comment-tags">
<dt>example</dt>
<dd><pre><code class="lang-js"><span class="hljs-comment">// ng2</span>
transitionService.onBefore({ <span class="hljs-attr">to</span>: <span class="hljs-string">'home'</span> }, (trans: Transition) =>
trans.router.stateService.target(<span class="hljs-string">"home.dashboard"</span>));
</code></pre>
<h4 id="data-driven-default-substate">Data Driven Default Substate</h4>
<p>This example provides data-driven default substate functionality. It matches on a transition to any state
which has <code>defaultSubstate: "some.sub.state"</code> defined. See: <a href="transition.transition-1.html#to">Transition.to</a> which returns the "to state"
definition.</p>
</dd>
<dt>example</dt>
<dd><pre><code class="lang-js"><span class="hljs-comment">// ng1</span>
<span class="hljs-comment">// state declaration</span>
{
<span class="hljs-attr">name</span>: <span class="hljs-string">'home'</span>,
<span class="hljs-attr">template</span>: <span class="hljs-string">'<div ui-view/>'</span>,
<span class="hljs-attr">defaultSubstate</span>: <span class="hljs-string">'home.dashboard'</span>
}
<span class="hljs-keyword">var</span> criteria = {
<span class="hljs-attr">to</span>: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">state</span>) </span>{
<span class="hljs-keyword">return</span> state.defaultSubstate != <span class="hljs-literal">null</span>;
}
}
$transitions.onBefore(criteria, <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">trans: Transition</span>) </span>{
<span class="hljs-keyword">var</span> substate = trans.to().defaultSubstate;
<span class="hljs-keyword">return</span> trans.router.stateService.target(substate);
});
</code></pre>
<h4 id="require-authentication">Require authentication</h4>
<p>This example cancels a transition to a state which requires authentication, if the user is not currently authenticated.</p>
<p>This example assumes a state tree where all states which require authentication are children of a parent <code>'requireauth'</code> state.
This example assumes <code>MyAuthService</code> synchronously returns a boolean from <code>isAuthenticated()</code>.</p>
<h4 id="example-">Example:</h4>
<pre><code class="lang-js"><span class="hljs-comment">// ng1</span>
$transitions.onBefore( { <span class="hljs-attr">to</span>: <span class="hljs-string">'requireauth.**'</span> }, <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">trans</span>) </span>{
<span class="hljs-keyword">var</span> myAuthService = trans.injector().get(<span class="hljs-string">'MyAuthService'</span>);
<span class="hljs-comment">// If isAuthenticated returns false, the transition is cancelled.</span>
<span class="hljs-keyword">return</span> myAuthService.isAuthenticated();
});
</code></pre>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>criteria <a href="../interfaces/transition.hookmatchcriteria.html" class="tsd-signature-type">HookMatchCriteria</a></h5>
</li>
<li>
<h5>callback <a href="../interfaces/transition.transitionhookfn.html" class="tsd-signature-type">TransitionHookFn</a></h5>
</li>
<li>
<h5>options: <span class="tsd-flag ts-flagOptional">Optional</span> <a href="../interfaces/transition.hookregoptions.html" class="tsd-signature-type">HookRegOptions</a></h5>
</li>
</ul>
<div class="tsd-returns">
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Function</span></h4>
: <p>a function which deregisters the hook.</p>
</div>
<hr>
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/transition.ihookregistry.html">IHookRegistry</a>.<a href="../interfaces/transition.ihookregistry.html#onbefore">onBefore</a></p>
<ul>
<li>Defined in <a href="https://github.com/ui-router/core/blob/0329205/src/transition/transitionService.ts#L194">core/src/transition/transitionService.ts:194</a></li>
</ul>
</aside> </li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a name="oncreate" class="tsd-anchor"></a>
<!--
<h3>on<wbr>Create</h3>
-->
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-external">
<li class="tsd-signature tsd-kind-icon">on<wbr>Create<span class="tsd-signature-symbol">(</span>criteria<span class="tsd-signature-symbol">: </span><a href="../interfaces/transition.hookmatchcriteria.html" class="tsd-signature-type">HookMatchCriteria</a>, callback<span class="tsd-signature-symbol">: </span><a href="../interfaces/transition.transitioncreatehookfn.html" class="tsd-signature-type">TransitionCreateHookFn</a>, options<span class="tsd-signature-symbol">?: </span><a href="../interfaces/transition.hookregoptions.html" class="tsd-signature-type">HookRegOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Function</span></li>
<li class="tsd-header">
<p> Registers a <a href="../interfaces/transition.transitionhookfn.html">TransitionHookFn</a>, called <em>while a transition is being constructed</em>. </p>
</li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Registers a <a href="../interfaces/transition.transitionhookfn.html">TransitionHookFn</a>, called <em>while a transition is being constructed</em>.</p>
</div>
<p>Registers a transition lifecycle hook, which is invoked during transition construction.</p>
<p>This low level hook should only be used by plugins.
This can be a useful time for plugins to add resolves or mutate the transition as needed.
The Sticky States plugin uses this hook to modify the treechanges.</p>
<h3 id="lifecycle">Lifecycle</h3>
<p><code>onCreate</code> hooks are invoked <em>while a transition is being constructed</em>.</p>
<h3 id="return-value">Return value</h3>
<p>The hook's return value is ignored</p>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>criteria <a href="../interfaces/transition.hookmatchcriteria.html" class="tsd-signature-type">HookMatchCriteria</a></h5>
: <div class="tsd-comment tsd-typography">
<p>defines which Transitions the Hook should be invoked for.</p>
</div>
</li>
<li>
<h5>callback <a href="../interfaces/transition.transitioncreatehookfn.html" class="tsd-signature-type">TransitionCreateHookFn</a></h5>
: <div class="tsd-comment tsd-typography">
<p>the hook function which will be invoked.</p>
</div>
</li>
<li>
<h5>options: <span class="tsd-flag ts-flagOptional">Optional</span> <a href="../interfaces/transition.hookregoptions.html" class="tsd-signature-type">HookRegOptions</a></h5>
: <div class="tsd-comment tsd-typography">
<p>the registration options</p>
</div>
</li>
</ul>
<div class="tsd-returns">
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Function</span></h4>
: <p>a function which deregisters the hook.</p>
</div>
<hr>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/ui-router/core/blob/0329205/src/transition/transitionService.ts#L192">core/src/transition/transitionService.ts:192</a></li>
</ul>
</aside> </li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="onenter" class="tsd-anchor"></a>
<!--
<h3>on<wbr>Enter</h3>
-->
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">on<wbr>Enter<span class="tsd-signature-symbol">(</span>criteria<span class="tsd-signature-symbol">: </span><a href="../interfaces/transition.hookmatchcriteria.html" class="tsd-signature-type">HookMatchCriteria</a>, callback<span class="tsd-signature-symbol">: </span><a href="../interfaces/transition.transitionstatehookfn.html" class="tsd-signature-type">TransitionStateHookFn</a>, options<span class="tsd-signature-symbol">?: </span><a href="../interfaces/transition.hookregoptions.html" class="tsd-signature-type">HookRegOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Function</span></li>
<li class="tsd-header">
<p> Registers a <a href="../interfaces/transition.transitionstatehookfn.html">TransitionStateHookFn</a>, called when a specific state is entered. </p>
</li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Registers a <a href="../interfaces/transition.transitionstatehookfn.html">TransitionStateHookFn</a>, called when a specific state is entered.</p>
</div>
<p>Registers a lifecycle hook, which is invoked (during a transition) when a specific state is being entered.</p>
<p>Since this hook is run only when the specific state is being <em>entered</em>, it can be useful for
performing tasks when entering a submodule/feature area such as initializing a stateful service,
or for guarding access to a submodule/feature area.</p>
<p>See <a href="../interfaces/transition.transitionstatehookfn.html">TransitionStateHookFn</a> for the signature of the function.</p>
<p>The <a href="../interfaces/transition.hookmatchcriteria.html">HookMatchCriteria</a> is used to determine which Transitions the hook should be invoked for.
<code>onEnter</code> hooks generally specify <code>{ entering: 'somestate' }</code>.
To match all Transitions, use an empty criteria object <code>{}</code>.</p>
<h3 id="lifecycle">Lifecycle</h3>
<p><code>onEnter</code> hooks are invoked when the Transition is entering a state.
States are entered after the <code>onRetain</code> phase is complete.
If more than one state is being entered, the parent state is entered first.
The registered <code>onEnter</code> hooks for a state are invoked in priority order.</p>
<p>Note: A built-in <code>onEnter</code> hook with high priority is used to fetch lazy resolve data for states being entered.</p>
<h3 id="return-value">Return value</h3>
<p>The hook's return value can be used to pause, cancel, or redirect the current Transition.
See <a href="../modules/transition.html#hookresult">HookResult</a> for more information.</p>
<h3 id="inside-a-state-declaration">Inside a state declaration</h3>
<p>Instead of registering <code>onEnter</code> hooks using the <a href="transition.transitionservice.html">TransitionService</a>, you may define an <code>onEnter</code> hook
directly on a state declaration (see: <a href="../interfaces/state.statedeclaration.html#onenter">StateDeclaration.onEnter</a>).</p>
<h3 id="examples">Examples</h3>
<h4 id="audit-log">Audit Log</h4>
<p>This example uses a service to log that a user has entered the admin section of an app.
This assumes that there are substates of the "admin" state, such as "admin.users", "admin.pages", etc.</p>
<dl class="tsd-comment-tags">
<dt>example</dt>
<dd><pre><code>
<span class="hljs-variable">$transitions</span>.<span class="hljs-keyword">on</span>Enter({ entering: 'admin' }, function(transition, <span class="hljs-keyword">state</span>) {
var AuditService = trans.injector().get('AuditService');
AuditService.<span class="hljs-keyword">log</span>(<span class="hljs-string">"Entered "</span> + <span class="hljs-keyword">state</span>.name + <span class="hljs-string">" module while transitioning to "</span> + transition.<span class="hljs-keyword">to</span>().name);
}
</code></pre><h4 id="audit-log-inside-a-state-declaration-">Audit Log (inside a state declaration)</h4>
<p>The <code>onEnter</code> inside this state declaration is syntactic sugar for the previous Audit Log example.</p>
<pre><code>{
name: 'admin',
component: 'admin',
<span class="hljs-keyword">on</span>Enter: function(<span class="hljs-variable">$transition</span>$, <span class="hljs-variable">$state</span>$) {
var AuditService = <span class="hljs-variable">$transition</span>$.injector().get('AuditService');
AuditService.<span class="hljs-keyword">log</span>(<span class="hljs-string">"Entered "</span> + <span class="hljs-keyword">state</span>.name + <span class="hljs-string">" module while transitioning to "</span> + transition.<span class="hljs-keyword">to</span>().name);
}
}
</code></pre><p>Note: A state declaration's <code>onEnter</code> function is injected for Angular 1 only.</p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>criteria <a href="../interfaces/transition.hookmatchcriteria.html" class="tsd-signature-type">HookMatchCriteria</a></h5>
</li>
<li>
<h5>callback <a href="../interfaces/transition.transitionstatehookfn.html" class="tsd-signature-type">TransitionStateHookFn</a></h5>
</li>
<li>
<h5>options: <span class="tsd-flag ts-flagOptional">Optional</span> <a href="../interfaces/transition.hookregoptions.html" class="tsd-signature-type">HookRegOptions</a></h5>
</li>
</ul>
<div class="tsd-returns">
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Function</span></h4>
: <p>a function which deregisters the hook.</p>
</div>
<hr>
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/transition.ihookregistry.html">IHookRegistry</a>.<a href="../interfaces/transition.ihookregistry.html#onenter">onEnter</a></p>
<ul>
<li>Defined in <a href="https://github.com/ui-router/core/blob/0329205/src/transition/transitionService.ts#L202">core/src/transition/transitionService.ts:202</a></li>
</ul>
</aside> </li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="onerror" class="tsd-anchor"></a>
<!--
<h3>on<wbr>Error</h3>
-->
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">on<wbr>Error<span class="tsd-signature-symbol">(</span>criteria<span class="tsd-signature-symbol">: </span><a href="../interfaces/transition.hookmatchcriteria.html" class="tsd-signature-type">HookMatchCriteria</a>, callback<span class="tsd-signature-symbol">: </span><a href="../interfaces/transition.transitionhookfn.html" class="tsd-signature-type">TransitionHookFn</a>, options<span class="tsd-signature-symbol">?: </span><a href="../interfaces/transition.hookregoptions.html" class="tsd-signature-type">HookRegOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Function</span></li>
<li class="tsd-header">
<p> Registers a <a href="../interfaces/transition.transitionhookfn.html">TransitionHookFn</a>, called after a transition has errored. </p>
</li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Registers a <a href="../interfaces/transition.transitionhookfn.html">TransitionHookFn</a>, called after a transition has errored.</p>
</div>
<p>Registers a transition lifecycle hook, which is invoked after a transition has been rejected for any reason.</p>
<p>See <a href="../interfaces/transition.transitionhookfn.html">TransitionHookFn</a> for the signature of the function.</p>
<p>The <a href="../interfaces/transition.hookmatchcriteria.html">HookMatchCriteria</a> is used to determine which Transitions the hook should be invoked for.
To match all Transitions, use an empty criteria object <code>{}</code>.</p>
<h3 id="lifecycle">Lifecycle</h3>
<p>The <code>onError</code> hooks are chained off the Transition's promise (see <a href="transition.transition-1.html#promise">Transition.promise</a>).
If a Transition fails, its promise is rejected and the <code>onError</code> hooks are invoked.
The <code>onError</code> hooks are invoked in priority order.</p>
<p>Since these hooks are run after the transition is over, their return value is ignored.</p>
<p>A transition "errors" if it was started, but failed to complete (for any reason).
A <em>non-exhaustive list</em> of reasons a transition can error:</p>
<ul>
<li>A transition was cancelled because a new transition started while it was still running (<code>Transition superseded</code>)</li>
<li>A transition was cancelled by a Transition Hook returning false</li>
<li>A transition was redirected by a Transition Hook returning a <a href="state.targetstate.html">TargetState</a></li>
<li>A Transition Hook or resolve function threw an error</li>
<li>A Transition Hook returned a rejected promise</li>
<li>A resolve function returned a rejected promise</li>
</ul>
<p>To check the failure reason, inspect the return value of <a href="transition.transition-1.html#error">Transition.error</a>.</p>
<p>Note: <code>onError</code> should be used for targeted error handling, or error recovery.
For simple catch-all error reporting, use <a href="state.stateservice.html#defaulterrorhandler">StateService.defaultErrorHandler</a>.</p>
<h3 id="return-value">Return value</h3>
<p>Since the Transition is already completed, the hook's return value is ignored</p>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>criteria <a href="../interfaces/transition.hookmatchcriteria.html" class="tsd-signature-type">HookMatchCriteria</a></h5>
</li>
<li>
<h5>callback <a href="../interfaces/transition.transitionhookfn.html" class="tsd-signature-type">TransitionHookFn</a></h5>
</li>
<li>
<h5>options: <span class="tsd-flag ts-flagOptional">Optional</span> <a href="../interfaces/transition.hookregoptions.html" class="tsd-signature-type">HookRegOptions</a></h5>
</li>
</ul>
<div class="tsd-returns">
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Function</span></h4>
: <p>a function which deregisters the hook.</p>
</div>
<hr>
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/transition.ihookregistry.html">IHookRegistry</a>.<a href="../interfaces/transition.ihookregistry.html#onerror">onError</a></p>
<ul>
<li>Defined in <a href="https://github.com/ui-router/core/blob/0329205/src/transition/transitionService.ts#L208">core/src/transition/transitionService.ts:208</a></li>
</ul>
</aside> </li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="onexit" class="tsd-anchor"></a>
<!--
<h3>on<wbr>Exit</h3>
-->
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">on<wbr>Exit<span class="tsd-signature-symbol">(</span>criteria<span class="tsd-signature-symbol">: </span><a href="../interfaces/transition.hookmatchcriteria.html" class="tsd-signature-type">HookMatchCriteria</a>, callback<span class="tsd-signature-symbol">: </span><a href="../interfaces/transition.transitionstatehookfn.html" class="tsd-signature-type">TransitionStateHookFn</a>, options<span class="tsd-signature-symbol">?: </span><a href="../interfaces/transition.hookregoptions.html" class="tsd-signature-type">HookRegOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Function</span></li>
<li class="tsd-header">
<p> Registers a <a href="../interfaces/transition.transitionstatehookfn.html">TransitionStateHookFn</a>, called when a specific state is exited. </p>
</li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Registers a <a href="../interfaces/transition.transitionstatehookfn.html">TransitionStateHookFn</a>, called when a specific state is exited.</p>
</div>
<p>Registers a lifecycle hook, which is invoked (during a transition) when a specific state is being exited.</p>
<p>Since this hook is run only when the specific state is being <em>exited</em>, it can be useful for
performing tasks when leaving a submodule/feature area such as cleaning up a stateful service,
or for preventing the user from leaving a state or submodule until some criteria is satisfied.</p>
<p>See <a href="../interfaces/transition.transitionstatehookfn.html">TransitionStateHookFn</a> for the signature of the function.</p>
<p>The <a href="../interfaces/transition.hookmatchcriteria.html">HookMatchCriteria</a> is used to determine which Transitions the hook should be invoked for.
<code>onExit</code> hooks generally specify <code>{ exiting: 'somestate' }</code>.
To match all Transitions, use an empty criteria object <code>{}</code>.</p>
<h3 id="lifecycle">Lifecycle</h3>
<p><code>onExit</code> hooks are invoked when the Transition is exiting a state.
States are exited after any <code>onStart</code> phase is complete.
If more than one state is being exited, the child states are exited first.
The registered <code>onExit</code> hooks for a state are invoked in priority order.</p>
<h3 id="return-value">Return value</h3>
<p>The hook's return value can be used to pause, cancel, or redirect the current Transition.
See <a href="../modules/transition.html#hookresult">HookResult</a> for more information.</p>
<h3 id="inside-a-state-declaration">Inside a state declaration</h3>
<p>Instead of registering <code>onExit</code> hooks using the <a href="transition.transitionservice.html">TransitionService</a>, you may define an <code>onExit</code> hook
directly on a state declaration (see: <a href="../interfaces/state.statedeclaration.html#onexit">StateDeclaration.onExit</a>).</p>
<p>Note: A state declaration's <code>onExit</code> function is injected for Angular 1 only.</p>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>criteria <a href="../interfaces/transition.hookmatchcriteria.html" class="tsd-signature-type">HookMatchCriteria</a></h5>
</li>
<li>
<h5>callback <a href="../interfaces/transition.transitionstatehookfn.html" class="tsd-signature-type">TransitionStateHookFn</a></h5>
</li>
<li>
<h5>options: <span class="tsd-flag ts-flagOptional">Optional</span> <a href="../interfaces/transition.hookregoptions.html" class="tsd-signature-type">HookRegOptions</a></h5>
</li>
</ul>
<div class="tsd-returns">
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Function</span></h4>
: <p>a function which deregisters the hook.</p>
</div>
<hr>
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/transition.ihookregistry.html">IHookRegistry</a>.<a href="../interfaces/transition.ihookregistry.html#onexit">onExit</a></p>
<ul>
<li>Defined in <a href="https://github.com/ui-router/core/blob/0329205/src/transition/transitionService.ts#L198">core/src/transition/transitionService.ts:198</a></li>
</ul>
</aside> </li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="onfinish" class="tsd-anchor"></a>
<!--
<h3>on<wbr>Finish</h3>
-->
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">on<wbr>Finish<span class="tsd-signature-symbol">(</span>criteria<span class="tsd-signature-symbol">: </span><a href="../interfaces/transition.hookmatchcriteria.html" class="tsd-signature-type">HookMatchCriteria</a>, callback<span class="tsd-signature-symbol">: </span><a href="../interfaces/transition.transitionhookfn.html" class="tsd-signature-type">TransitionHookFn</a>, options<span class="tsd-signature-symbol">?: </span><a href="../interfaces/transition.hookregoptions.html" class="tsd-signature-type">HookRegOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Function</span></li>
<li class="tsd-header">
<p> Registers a <a href="../interfaces/transition.transitionhookfn.html">TransitionHookFn</a>, called <em>just before a transition finishes</em>. </p>
</li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Registers a <a href="../interfaces/transition.transitionhookfn.html">TransitionHookFn</a>, called <em>just before a transition finishes</em>.</p>
</div>
<p>Registers a transition lifecycle hook, which is invoked just before a transition finishes.
This hook is a last chance to cancel or redirect a transition.</p>
<p>See <a href="../interfaces/transition.transitionhookfn.html">TransitionHookFn</a> for the signature of the function.</p>
<p>The <a href="../interfaces/transition.hookmatchcriteria.html">HookMatchCriteria</a> is used to determine which Transitions the hook should be invoked for.
To match all Transitions, use an empty criteria object <code>{}</code>.</p>
<h3 id="lifecycle">Lifecycle</h3>
<p><code>onFinish</code> hooks are invoked after the <code>onEnter</code> phase is complete.
These hooks are invoked just before the transition is "committed".
Each hook is invoked in priority order.</p>
<h3 id="return-value">Return value</h3>
<p>The hook's return value can be used to pause, cancel, or redirect the current Transition.
See <a href="../modules/transition.html#hookresult">HookResult</a> for more information.</p>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>criteria <a href="../interfaces/transition.hookmatchcriteria.html" class="tsd-signature-type">HookMatchCriteria</a></h5>
</li>
<li>
<h5>callback <a href="../interfaces/transition.transitionhookfn.html" class="tsd-signature-type">TransitionHookFn</a></h5>
</li>
<li>
<h5>options: <span class="tsd-flag ts-flagOptional">Optional</span> <a href="../interfaces/transition.hookregoptions.html" class="tsd-signature-type">HookRegOptions</a></h5>
</li>
</ul>
<div class="tsd-returns">
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Function</span></h4>
: <p>a function which deregisters the hook.</p>
</div>
<hr>
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/transition.ihookregistry.html">IHookRegistry</a>.<a href="../interfaces/transition.ihookregistry.html#onfinish">onFinish</a></p>
<ul>
<li>Defined in <a href="https://github.com/ui-router/core/blob/0329205/src/transition/transitionService.ts#L204">core/src/transition/transitionService.ts:204</a></li>
</ul>
</aside> </li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="onretain" class="tsd-anchor"></a>
<!--
<h3>on<wbr>Retain</h3>
-->
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">on<wbr>Retain<span class="tsd-signature-symbol">(</span>criteria<span class="tsd-signature-symbol">: </span><a href="../interfaces/transition.hookmatchcriteria.html" class="tsd-signature-type">HookMatchCriteria</a>, callback<span class="tsd-signature-symbol">: </span><a href="../interfaces/transition.transitionstatehookfn.html" class="tsd-signature-type">TransitionStateHookFn</a>, options<span class="tsd-signature-symbol">?: </span><a href="../interfaces/transition.hookregoptions.html" class="tsd-signature-type">HookRegOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Function</span></li>
<li class="tsd-header">
<p> Registers a <a href="../interfaces/transition.transitionstatehookfn.html">TransitionStateHookFn</a>, called when a specific state is retained/kept. </p>
</li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Registers a <a href="../interfaces/transition.transitionstatehookfn.html">TransitionStateHookFn</a>, called when a specific state is retained/kept.</p>
</div>
<p>Registers a lifecycle hook, which is invoked (during a transition) for
a specific state that was previously active will remain active (is not being entered nor exited).</p>
<p>This hook is invoked when a state is "retained" or "kept".
It means the transition is coming <em>from</em> a substate of the retained state <em>to</em> a substate of the retained state.
This hook can be used to perform actions when the user moves from one substate to another, such as between steps in a wizard.</p>
<p>The <a href="../interfaces/transition.hookmatchcriteria.html">HookMatchCriteria</a> is used to determine which Transitions the hook should be invoked for.
<code>onRetain</code> hooks generally specify <code>{ retained: 'somestate' }</code>.
To match all Transitions, use an empty criteria object <code>{}</code>.</p>
<h3 id="lifecycle">Lifecycle</h3>
<p><code>onRetain</code> hooks are invoked after any <code>onExit</code> hooks have been fired.
If more than one state is retained, the child states' <code>onRetain</code> hooks are invoked first.
The registered <code>onRetain</code> hooks for a state are invoked in priority order.</p>
<h3 id="return-value">Return value</h3>
<p>The hook's return value can be used to pause, cancel, or redirect the current Transition.
See <a href="../modules/transition.html#hookresult">HookResult</a> for more information.</p>
<h3 id="inside-a-state-declaration">Inside a state declaration</h3>
<p>Instead of registering <code>onRetain</code> hooks using the <a href="transition.transitionservice.html">TransitionService</a>, you may define an <code>onRetain</code> hook
directly on a state declaration (see: <a href="../interfaces/state.statedeclaration.html#onretain">StateDeclaration.onRetain</a>).</p>
<p>Note: A state declaration's <code>onRetain</code> function is injected for Angular 1 only.</p>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>criteria <a href="../interfaces/transition.hookmatchcriteria.html" class="tsd-signature-type">HookMatchCriteria</a></h5>
</li>
<li>
<h5>callback <a href="../interfaces/transition.transitionstatehookfn.html" class="tsd-signature-type">TransitionStateHookFn</a></h5>
</li>
<li>
<h5>options: <span class="tsd-flag ts-flagOptional">Optional</span> <a href="../interfaces/transition.hookregoptions.html" class="tsd-signature-type">HookRegOptions</a></h5>
</li>
</ul>
<div class="tsd-returns">
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Function</span></h4>
: <p>a function which deregisters the hook.</p>
</div>
<hr>
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/transition.ihookregistry.html">IHookRegistry</a>.<a href="../interfaces/transition.ihookregistry.html#onretain">onRetain</a></p>
<ul>
<li>Defined in <a href="https://github.com/ui-router/core/blob/0329205/src/transition/transitionService.ts#L200">core/src/transition/transitionService.ts:200</a></li>
</ul>
</aside> </li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="onstart" class="tsd-anchor"></a>
<!--
<h3>on<wbr>Start</h3>
-->
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">on<wbr>Start<span class="tsd-signature-symbol">(</span>criteria<span class="tsd-signature-symbol">: </span><a href="../interfaces/transition.hookmatchcriteria.html" class="tsd-signature-type">HookMatchCriteria</a>, callback<span class="tsd-signature-symbol">: </span><a href="../interfaces/transition.transitionhookfn.html" class="tsd-signature-type">TransitionHookFn</a>, options<span class="tsd-signature-symbol">?: </span><a href="../interfaces/transition.hookregoptions.html" class="tsd-signature-type">HookRegOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Function</span></li>
<li class="tsd-header">
<p> Registers a <a href="../interfaces/transition.transitionhookfn.html">TransitionHookFn</a>, called when a transition starts. </p>
</li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Registers a <a href="../interfaces/transition.transitionhookfn.html">TransitionHookFn</a>, called when a transition starts.</p>
</div>
<p>Registers a transition lifecycle hook, which is invoked as a transition starts running.
This hook can be useful to perform some asynchronous action before completing a transition.</p>
<p>See <a href="../interfaces/transition.transitionhookfn.html">TransitionHookFn</a> for the signature of the function.</p>
<p>The <a href="../interfaces/transition.hookmatchcriteria.html">HookMatchCriteria</a> is used to determine which Transitions the hook should be invoked for.
To match all Transitions, use an empty criteria object <code>{}</code>.</p>
<h3 id="lifecycle">Lifecycle</h3>
<p><code>onStart</code> hooks are invoked asynchronously when the Transition starts running.
This happens after the <code>onBefore</code> phase is complete.
At this point, the Transition has not yet exited nor entered any states.
The registered <code>onStart</code> hooks are invoked in priority order.</p>
<p>Note: A built-in <code>onStart</code> hook with high priority is used to fetch any eager resolve data.</p>
<h3 id="return-value">Return value</h3>
<p>The hook's return value can be used to pause, cancel, or redirect the current Transition.
See <a href="../modules/transition.html#hookresult">HookResult</a> for more information.</p>
<h3 id="example">Example</h3>
<h4 id="login-during-transition">Login during transition</h4>
<p>This example intercepts any transition to a state which requires authentication, when the user is
not currently authenticated. It allows the user to authenticate asynchronously, then resumes the
transition. If the user did not authenticate successfully, it redirects to the "guest" state, which
does not require authentication.</p>
<p>This example assumes:</p>
<ul>
<li>a state tree where all states which require authentication are children of a parent <code>'auth'</code> state.</li>
<li><code>MyAuthService.isAuthenticated()</code> synchronously returns a boolean.</li>
<li><code>MyAuthService.authenticate()</code> presents a login dialog, and returns a promise which is resolved
or rejected, whether or not the login attempt was successful.</li>
</ul>
<h4 id="example-">Example:</h4>
<pre><code class="lang-js"><span class="hljs-comment">// ng1</span>
$transitions.onStart( { <span class="hljs-attr">to</span>: <span class="hljs-string">'auth.**'</span> }, <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">trans</span>) </span>{
<span class="hljs-keyword">var</span> $state = trans.router.stateService;
<span class="hljs-keyword">var</span> MyAuthService = trans.injector().get(<span class="hljs-string">'MyAuthService'</span>);
<span class="hljs-comment">// If the user is not authenticated</span>
<span class="hljs-keyword">if</span> (!MyAuthService.isAuthenticated()) {
<span class="hljs-comment">// Then return a promise for a successful login.</span>
<span class="hljs-comment">// The transition will wait for this promise to settle</span>
<span class="hljs-keyword">return</span> MyAuthService.authenticate().catch(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) </span>{
<span class="hljs-comment">// If the authenticate() method failed for whatever reason,</span>
<span class="hljs-comment">// redirect to a 'guest' state which doesn't require auth.</span>
<span class="hljs-keyword">return</span> $state.target(<span class="hljs-string">"guest"</span>);
});
}
});
</code></pre>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>criteria <a href="../interfaces/transition.hookmatchcriteria.html" class="tsd-signature-type">HookMatchCriteria</a></h5>
</li>
<li>
<h5>callback <a href="../interfaces/transition.transitionhookfn.html" class="tsd-signature-type">TransitionHookFn</a></h5>
</li>
<li>
<h5>options: <span class="tsd-flag ts-flagOptional">Optional</span> <a href="../interfaces/transition.hookregoptions.html" class="tsd-signature-type">HookRegOptions</a></h5>
</li>
</ul>
<div class="tsd-returns">
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Function</span></h4>
: <p>a function which deregisters the hook.</p>
</div>
<hr>
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/transition.ihookregistry.html">IHookRegistry</a>.<a href="../interfaces/transition.ihookregistry.html#onstart">onStart</a></p>
<ul>
<li>Defined in <a href="https://github.com/ui-router/core/blob/0329205/src/transition/transitionService.ts#L196">core/src/transition/transitionService.ts:196</a></li>
</ul>
</aside> </li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="onsuccess" class="tsd-anchor"></a>
<!--
<h3>on<wbr>Success</h3>
-->
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">on<wbr>Success<span class="tsd-signature-symbol">(</span>criteria<span class="tsd-signature-symbol">: </span><a href="../interfaces/transition.hookmatchcriteria.html" class="tsd-signature-type">HookMatchCriteria</a>, callback<span class="tsd-signature-symbol">: </span><a href="../interfaces/transition.transitionhookfn.html" class="tsd-signature-type">TransitionHookFn</a>, options<span class="tsd-signature-symbol">?: </span><a href="../interfaces/transition.hookregoptions.html" class="tsd-signature-type">HookRegOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Function</span></li>
<li class="tsd-header">
<p> Registers a <a href="../interfaces/transition.transitionhookfn.html">TransitionHookFn</a>, called after a successful transition completed. </p>
</li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Registers a <a href="../interfaces/transition.transitionhookfn.html">TransitionHookFn</a>, called after a successful transition completed.</p>
</div>
<p>Registers a transition lifecycle hook, which is invoked after a transition successfully completes.</p>
<p>See <a href="../interfaces/transition.transitionhookfn.html">TransitionHookFn</a> for the signature of the function.</p>
<p>The <a href="../interfaces/transition.hookmatchcriteria.html">HookMatchCriteria</a> is used to determine which Transitions the hook should be invoked for.
To match all Transitions, use an empty criteria object <code>{}</code>.</p>
<h3 id="lifecycle">Lifecycle</h3>
<p><code>onSuccess</code> hooks are chained off the Transition's promise (see <a href="transition.transition-1.html#promise">Transition.promise</a>).
If the Transition is successful and its promise is resolved, then the <code>onSuccess</code> hooks are invoked.
Since these hooks are run after the transition is over, their return value is ignored.
The <code>onSuccess</code> hooks are invoked in priority order.</p>
<h3 id="return-value">Return value</h3>
<p>Since the Transition is already completed, the hook's return value is ignored</p>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>criteria <a href="../interfaces/transition.hookmatchcriteria.html" class="tsd-signature-type">HookMatchCriteria</a></h5>
</li>
<li>
<h5>callback <a href="../interfaces/transition.transitionhookfn.html" class="tsd-signature-type">TransitionHookFn</a></h5>
</li>
<li>
<h5>options: <span class="tsd-flag ts-flagOptional">Optional</span> <a href="../interfaces/transition.hookregoptions.html" class="tsd-signature-type">HookRegOptions</a></h5>
</li>
</ul>
<div class="tsd-returns">
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Function</span></h4>
: <p>a function which deregisters the hook.</p>
</div>
<hr>
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/transition.ihookregistry.html">IHookRegistry</a>.<a href="../interfaces/transition.ihookregistry.html#onsuccess">onSuccess</a></p>
<ul>
<li>Defined in <a href="https://github.com/ui-router/core/blob/0329205/src/transition/transitionService.ts#L206">core/src/transition/transitionService.ts:206</a></li>
</ul>
</aside> </li>
</ul>
</section>
</section>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation primary">
<ul>
<li class="globals ">
<a href="../index.html"><em>@uirouter/angular</em></a>
</li>
<li class="label tsd-is-external">
<span>Public API</span>
</li>
<li class=" tsd-kind-external-module">
<a href="../modules/core.html">core</a>
</li>
<li class=" tsd-kind-external-module">
<a href="../modules/directives.html">directives</a>
</li>
<li class=" tsd-kind-external-module">
<a href="../modules/params.html">params</a>
</li>
<li class=" tsd-kind-external-module">
<a href="../modules/resolve.html">resolve</a>
</li>
<li class=" tsd-kind-external-module">
<a href="../modules/state.html">state</a>
</li>
<li class="current tsd-kind-external-module">
<a href="../modules/transition.html">transition</a>
</li>
<li class=" tsd-kind-external-module">
<a href="../modules/url.html">url</a>
</li>
<li class=" tsd-kind-external-module">
<a href="../modules/view.html">view</a>
</li>
<li class="label tsd-is-external">
<span>Internal UI-<wbr><wbr>Router API</span>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="../modules/common.html">common</a>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="../modules/common_hof.html">common_<wbr>hof</a>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="../modules/common_predicates.html">common_<wbr>predicates</a>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="../modules/common_strings.html">common_<wbr>strings</a>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="../modules/hooks.html">hooks</a>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="../modules/ng2.html">ng2</a>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="../modules/path.html">path</a>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="../modules/trace.html">trace</a>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="../modules/vanilla.html">vanilla</a>
</li>
</ul>
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
<li class=" tsd-kind-enum tsd-parent-kind-external-module">
<a href="../enums/transition.rejecttype.html" class="tsd-kind-icon">Reject<wbr>Type</a>
</li>
<li class=" tsd-kind-enum tsd-parent-kind-external-module">
<a href="../enums/transition.transitionhookphase.html" class="tsd-kind-icon">Transition<wbr>Hook<wbr>Phase</a>
</li>
<li class=" tsd-kind-enum tsd-parent-kind-external-module">
<a href="../enums/transition.transitionhookscope.html" class="tsd-kind-icon">Transition<wbr>Hook<wbr>Scope</a>
</li>
<li class=" tsd-kind-class tsd-parent-kind-external-module">
<a href="transition.hookbuilder.html" class="tsd-kind-icon">Hook<wbr>Builder</a>
</li>
<li class=" tsd-kind-class tsd-parent-kind-external-module tsd-is-external">
<a href="transition.registeredhook.html" class="tsd-kind-icon">Registered<wbr>Hook</a>
</li>
<li class=" tsd-kind-class tsd-parent-kind-external-module">
<a href="transition.rejection.html" class="tsd-kind-icon">Rejection</a>
</li>
<li class=" tsd-kind-class tsd-parent-kind-external-module">
<a href="transition.transition-1.html" class="tsd-kind-icon">Transition</a>
</li>
<li class=" tsd-kind-class tsd-parent-kind-external-module tsd-is-external">
<a href="transition.transitioneventtype.html" class="tsd-kind-icon">Transition<wbr>Event<wbr>Type</a>
</li>
</ul>
<ul class="current">
<li class="current tsd-kind-class tsd-parent-kind-external-module">
<a href="transition.transitionservice.html" class="tsd-kind-icon">Transition<wbr>Service</a>
<ul>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-external">
<a href="transition.transitionservice.html#_pluginapi" class="tsd-kind-icon">_pluginapi</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="transition.transitionservice.html#create" class="tsd-kind-icon">create</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="transition.transitionservice.html#dispose" class="tsd-kind-icon">dispose</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="transition.transitionservice.html#onbefore" class="tsd-kind-icon">on<wbr>Before</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-external">
<a href="transition.transitionservice.html#oncreate" class="tsd-kind-icon">on<wbr>Create</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="transition.transitionservice.html#onenter" class="tsd-kind-icon">on<wbr>Enter</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="transition.transitionservice.html#onerror" class="tsd-kind-icon">on<wbr>Error</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="transition.transitionservice.html#onexit" class="tsd-kind-icon">on<wbr>Exit</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="transition.transitionservice.html#onfinish" class="tsd-kind-icon">on<wbr>Finish</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="transition.transitionservice.html#onretain" class="tsd-kind-icon">on<wbr>Retain</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="transition.transitionservice.html#onstart" class="tsd-kind-icon">on<wbr>Start</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="transition.transitionservice.html#onsuccess" class="tsd-kind-icon">on<wbr>Success</a>
</li>
</ul>
</li>
</ul>
<ul class="after-current">
<li class=" tsd-kind-interface tsd-parent-kind-external-module">
<a href="../interfaces/transition.hookmatchcriteria.html" class="tsd-kind-icon">Hook<wbr>Match<wbr>Criteria</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-external-module">
<a href="../interfaces/transition.hookregoptions.html" class="tsd-kind-icon">Hook<wbr>Reg<wbr>Options</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-external-module tsd-is-not-exported">
<a href="../interfaces/transition.hooktuple.html" class="tsd-kind-icon">Hook<wbr>Tuple</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-external-module">
<a href="../interfaces/transition.ihookregistry.html" class="tsd-kind-icon">IHook<wbr>Registry</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-external-module">
<a href="../interfaces/transition.imatchingnodes.html" class="tsd-kind-icon">IMatching<wbr>Nodes</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-external-module">
<a href="../interfaces/transition.transitioncreatehookfn.html" class="tsd-kind-icon">Transition<wbr>Create<wbr>Hook<wbr>Fn</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-external-module">
<a href="../interfaces/transition.transitionhookfn.html" class="tsd-kind-icon">Transition<wbr>Hook<wbr>Fn</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-external-module tsd-is-external">
<a href="../interfaces/transition.transitionhookoptions.html" class="tsd-kind-icon">Transition<wbr>Hook<wbr>Options</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-external-module">
<a href="../interfaces/transition.transitionoptions.html" class="tsd-kind-icon">Transition<wbr>Options</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-external-module tsd-is-external">
<a href="../interfaces/transition.transitionservicepluginapi.html" class="tsd-kind-icon">Transition<wbr>Service<wbr>PluginAPI</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-external-module">
<a href="../interfaces/transition.transitionstatehookfn.html" class="tsd-kind-icon">Transition<wbr>State<wbr>Hook<wbr>Fn</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-external-module">
<a href="../interfaces/transition.treechanges.html" class="tsd-kind-icon">Tree<wbr>Changes</a>
</li>
<li class=" tsd-kind-type-alias tsd-parent-kind-external-module">
<a href="../modules/transition.html#errorhandler" class="tsd-kind-icon">Error<wbr>Handler</a>
</li>
<li class=" tsd-kind-type-alias tsd-parent-kind-external-module">
<a href="../modules/transition.html#geterrorhandler" class="tsd-kind-icon">Get<wbr>Error<wbr>Handler</a>
</li>
<li class=" tsd-kind-type-alias tsd-parent-kind-external-module">
<a href="../modules/transition.html#getresulthandler" class="tsd-kind-icon">Get<wbr>Result<wbr>Handler</a>
</li>
<li class=" tsd-kind-type-alias tsd-parent-kind-external-module">
<a href="../modules/transition.html#hookfn" class="tsd-kind-icon">Hook<wbr>Fn</a>
</li>
<li class=" tsd-kind-type-alias tsd-parent-kind-external-module">
<a href="../modules/transition.html#hookmatchcriterion" class="tsd-kind-icon">Hook<wbr>Match<wbr>Criterion</a>
</li>
<li class=" tsd-kind-type-alias tsd-parent-kind-external-module">
<a href="../modules/transition.html#hookresult" class="tsd-kind-icon">Hook<wbr>Result</a>
</li>
<li class=" tsd-kind-type-alias tsd-parent-kind-external-module">
<a href="../modules/transition.html#ihookregistration" class="tsd-kind-icon">IHook<wbr>Registration</a>
</li>
<li class=" tsd-kind-type-alias tsd-parent-kind-external-module">
<a href="../modules/transition.html#istatematch" class="tsd-kind-icon">IState<wbr>Match</a>
</li>
<li class=" tsd-kind-type-alias tsd-parent-kind-external-module">
<a href="../modules/transition.html#resulthandler" class="tsd-kind-icon">Result<wbr>Handler</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported">
<a href="../modules/transition.html#tuplesort" class="tsd-kind-icon">tuple<wbr>Sort</a>
</li>
<li class=" tsd-kind-object-literal tsd-parent-kind-external-module tsd-is-not-exported">
<a href="../modules/transition.html#defaultoptions" class="tsd-kind-icon">default<wbr>Options</a>
</li>
<li class=" tsd-kind-object-literal tsd-parent-kind-external-module">
<a href="../modules/transition.html#defaulttransopts" class="tsd-kind-icon">default<wbr>Trans<wbr>Opts</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<footer class="with-border-bottom">
<div class="container">
<h2>Legend</h2>
<div class="tsd-legend-group">
<ul class="tsd-legend">
<li class="tsd-kind-module"><span class="tsd-kind-icon">Module</span></li>
<li class="tsd-kind-object-literal"><span class="tsd-kind-icon">Object literal</span></li>
<li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li>
<li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li>
<li class="tsd-kind-function tsd-has-type-parameter"><span class="tsd-kind-icon">Function with type parameter</span></li>
<li class="tsd-kind-index-signature"><span class="tsd-kind-icon">Index signature</span></li>
<li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-enum"><span class="tsd-kind-icon">Enumeration</span></li>
<li class="tsd-kind-enum-member"><span class="tsd-kind-icon">Enumeration member</span></li>
<li class="tsd-kind-property tsd-parent-kind-enum"><span class="tsd-kind-icon">Property</span></li>
<li class="tsd-kind-method tsd-parent-kind-enum"><span class="tsd-kind-icon">Method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li>
<li class="tsd-kind-interface tsd-has-type-parameter"><span class="tsd-kind-icon">Interface with type parameter</span></li>
<li class="tsd-kind-constructor tsd-parent-kind-interface"><span class="tsd-kind-icon">Constructor</span></li>
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
<li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li>
<li class="tsd-kind-index-signature tsd-parent-kind-interface"><span class="tsd-kind-icon">Index signature</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li>
<li class="tsd-kind-class tsd-has-type-parameter"><span class="tsd-kind-icon">Class with type parameter</span></li>
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
<li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
<li class="tsd-kind-accessor tsd-parent-kind-class"><span class="tsd-kind-icon">Accessor</span></li>
<li class="tsd-kind-index-signature tsd-parent-kind-class"><span class="tsd-kind-icon">Index signature</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited accessor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li>
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected accessor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private method</span></li>
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private accessor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
<li class="tsd-kind-call-signature tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
</ul>
</div>
</div>
</footer>
<div class="container tsd-generator">
<p>Generated using <a href="http://typedoc.io" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
<script>if (location.protocol == 'file:') document.write('<script src="../assets/js/search.js"><' + '/script>');</script>
</body>
</html>
|
ui-router/ui-router.github.io
|
_ng2_docs/1.0.0/classes/transition.transitionservice.html
|
HTML
|
mit
| 75,901
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My Development</title>
<link href="../bower_components/angular-ui-grid/ui-grid.css" rel="stylesheet" />
<link href="../styles/css/bootstrap.css" rel="stylesheet" />
<link href="../styles/css/toastr.css" rel="stylesheet" />
</head>
<body ng-app="contactsApp">
<ui-view></ui-view>
</body>
<script src="../lib/angular/angular.js"></script>
<script src="../lib/angular/angular-resource.js"></script>
<script src="../bower_components/angular-ui-grid/ui-grid.js"></script>
<script src="http://ui-grid.info/docs/grunt-scripts/csv.js"></script>
<script src="http://ui-grid.info/docs/grunt-scripts/pdfmake.js"></script>
<script src="http://ui-grid.info/docs/grunt-scripts/vfs_fonts.js"></script>
<script src="../lib/angular/angular-ui-router.js"></script>
<script src="app.js"></script>
<script src="Controller/contactlists.js"></script>
<script src="Controller/contactdetails.js"></script>
<script src="Services/ContactsData.js"></script>
</html>
|
Rmathusuthanan/My-C-Progects
|
app/Scripts/indexold.html
|
HTML
|
mit
| 1,030
|
/*!
* Start Bootstrap - Freelancer v4.0.0-beta (https://startbootstrap.com/template-overviews/freelancer)
* Copyright 2013-2017 Start Bootstrap
* Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap-freelancer/blob/master/LICENSE)
*/
body {
font-family: 'Lato';
overflow-x: hidden; }
p {
font-size: 20px; }
p.small {
font-size: 16px; }
a,
a.active,
a:active,
a:focus,
a:hover {
color: #18BC9C;
outline: none; }
h1,
h2,
h3,
h4,
h5,
h6 {
font-weight: 700;
text-transform: uppercase; }
hr.star-light,
hr.star-primary {
max-width: 250px;
margin: 25px auto 30px;
padding: 0;
text-align: center;
border: none;
border-top: solid 5px; }
hr.star-light:after,
hr.star-primary:after {
font-family: FontAwesome;
font-size: 2em;
position: relative;
top: -.8em;
display: inline-block;
padding: 0 0.25em;
content: '\f005'; }
hr.star-light {
border-color: white; }
hr.star-light:after {
color: white;
background-color: #18BC9C; }
hr.star-primary {
border-color: #2C3E50; }
hr.star-primary:after {
color: #2C3E50;
background-color: white; }
.img-centered {
margin: 0 auto; }
section {
padding: 100px 0; }
section h2 {
font-size: 3em;
margin: 0; }
section.success {
color: white;
background: #18BC9C; }
@media (max-width: 767px) {
section {
padding: 75px 0; }
section.first {
padding-top: 75px; } }
.scroll-top {
position: fixed;
z-index: 1049;
right: 2%;
bottom: 2%;
width: 50px;
height: 50px; }
.scroll-top .btn {
font-size: 16px;
line-height: 28px;
width: 50px;
height: 50px;
text-align: center;
border-radius: 100%; }
.scroll-top .btn:focus {
outline: none; }
#mainNav {
font-weight: 700;
text-transform: uppercase;
border: none;
background: #2C3E50; }
#mainNav a:focus {
outline: none; }
#mainNav .navbar-brand {
font-size: 1.1rem;
color: white; }
#mainNav .navbar-brand.active, #mainNav .navbar-brand:active, #mainNav .navbar-brand:focus, #mainNav .navbar-brand:hover {
color: white; }
#mainNav .navbar-nav {
letter-spacing: 1px; }
#mainNav .navbar-nav li.nav-item a.nav-link {
color: white; }
#mainNav .navbar-nav li.nav-item a.nav-link:hover {
color: #18BC9C;
outline: none; }
#mainNav .navbar-nav li.nav-item a.nav-link:active, #mainNav .navbar-nav li.nav-item a.nav-link:focus {
color: white; }
#mainNav .navbar-toggler {
font-size: 14px;
padding: 11px;
text-transform: uppercase;
color: white;
border-color: white; }
#mainNav .navbar-toggler:focus, #mainNav .navbar-toggler:hover {
color: white;
border-color: #18BC9C;
background-color: #18BC9C; }
@media (min-width: 992px) {
#mainNav {
padding-top: 25px;
padding-bottom: 25px;
-webkit-transition: padding-top 0.3s, padding-bottom 0.3s;
-moz-transition: padding-top 0.3s, padding-bottom 0.3s;
transition: padding-top 0.3s, padding-bottom 0.3s; }
#mainNav .navbar-brand {
font-size: 2em;
-webkit-transition: all 0.3s;
-moz-transition: all 0.3s;
transition: all 0.3s; }
#mainNav .navbar-nav > li.nav-item > a.nav-link.active {
color: white;
border-radius: 3px;
background: #18BC9C; }
#mainNav .navbar-nav > li.nav-item > a.nav-link.active:active, #mainNav .navbar-nav > li.nav-item > a.nav-link.active:focus, #mainNav .navbar-nav > li.nav-item > a.nav-link.active:hover {
color: white;
background: #18BC9C; }
#mainNav.navbar-shrink {
padding-top: 10px;
padding-bottom: 10px; }
#mainNav.navbar-shrink .navbar-brand {
font-size: 1.5em; } }
header.masthead {
padding-top: 100px;
padding-bottom: 50px;
text-align: center;
color: white;
background: #18BC9C; }
header.masthead img {
display: block;
margin: 0 auto 20px;
width: 400px;
height: auto;
border-radius: 50%; }
header.masthead .intro-text .name {
font-size: 2em;
font-weight: 700;
display: block;
text-transform: uppercase; }
header.masthead .intro-text .skills {
font-size: 1.25em;
font-weight: 300; }
@media (min-width: 768px) {
header.masthead {
padding-top: 200px;
padding-bottom: 100px; }
header.masthead .intro-text .name {
font-size: 4.75em; }
header.masthead .intro-text .skills {
font-size: 1.75em; } }
#portfolio .portfolio-item {
right: 0;
margin: 0 0 15px; }
#portfolio .portfolio-item .portfolio-link {
position: relative;
display: block;
max-width: 400px;
margin: 0 auto;
cursor: pointer; }
#portfolio .portfolio-item .portfolio-link .caption {
position: absolute;
width: 100%;
height: 100%;
-webkit-transition: all ease 0.5s;
-moz-transition: all ease 0.5s;
transition: all ease 0.5s;
opacity: 0;
background: rgba(24, 188, 156, 0.9); }
#portfolio .portfolio-item .portfolio-link .caption:hover {
opacity: 1; }
#portfolio .portfolio-item .portfolio-link .caption .caption-content {
font-size: 20px;
position: absolute;
top: 50%;
width: 100%;
height: 20px;
margin-top: -12px;
text-align: center;
color: white; }
#portfolio .portfolio-item .portfolio-link .caption .caption-content i {
margin-top: -12px; }
#portfolio .portfolio-item .portfolio-link .caption .caption-content h3,
#portfolio .portfolio-item .portfolio-link .caption .caption-content h4 {
margin: 0; }
#portfolio * {
z-index: 2; }
@media (min-width: 767px) {
#portfolio .portfolio-item {
margin: 0 0 30px; } }
.portfolio-modal .modal-dialog {
max-width: 100%;
min-height: 100%;
margin: 0;
padding: 0;
text-align: center;
border: none;
border-radius: 0;
background-clip: border-box;
-webkit-box-shadow: none;
box-shadow: none; }
.portfolio-modal .modal-dialog .modal-content {
padding: 20px 0;
border: 0;
border-radius: 0; }
.portfolio-modal .modal-dialog .modal-content h2 {
font-size: 3em;
margin: 0; }
.portfolio-modal .modal-dialog .modal-content img {
margin-bottom: 30px; }
.portfolio-modal .modal-dialog .modal-content .item-details {
margin: 30px 0; }
.portfolio-modal .close-modal {
position: absolute;
top: 25px;
right: 25px;
width: 75px;
height: 75px;
cursor: pointer;
z-index: 99;
background-color: transparent; }
.portfolio-modal .close-modal:hover {
opacity: 0.3; }
.portfolio-modal .close-modal .lr {
/* Safari and Chrome */
z-index: 1051;
width: 1px;
height: 75px;
margin-left: 35px;
/* IE 9 */
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
background-color: #2C3E50; }
.portfolio-modal .close-modal .lr .rl {
/* Safari and Chrome */
z-index: 1052;
width: 1px;
height: 75px;
/* IE 9 */
-webkit-transform: rotate(90deg);
-ms-transform: rotate(90deg);
transform: rotate(90deg);
background-color: #2C3E50; }
.portfolio-modal .modal-backdrop {
display: none;
opacity: 0; }
.floating-label-form-group {
position: relative;
margin-bottom: 0;
padding-bottom: 0.5em;
border-bottom: 1px solid #eeeeee; }
.floating-label-form-group input,
.floating-label-form-group textarea {
font-size: 1.5em;
position: relative;
z-index: 1;
padding-right: 0;
padding-left: 0;
resize: none;
border: none;
border-radius: 0;
background: none;
box-shadow: none !important; }
.floating-label-form-group label {
font-size: 0.85em;
line-height: 1.764705882em;
position: relative;
z-index: 0;
top: 2em;
display: block;
margin: 0;
-webkit-transition: top 0.3s ease, opacity 0.3s ease;
-moz-transition: top 0.3s ease, opacity 0.3s ease;
-ms-transition: top 0.3s ease, opacity 0.3s ease;
transition: top 0.3s ease, opacity 0.3s ease;
vertical-align: middle;
vertical-align: baseline;
opacity: 0; }
.floating-label-form-group:not(:first-child) {
padding-left: 14px;
border-left: 1px solid #eeeeee; }
.floating-label-form-group-with-value label {
top: 0;
opacity: 1; }
.floating-label-form-group-with-focus label {
color: #18BC9C; }
form .row:first-child .floating-label-form-group {
border-top: 1px solid #eeeeee; }
footer {
color: white; }
footer h3 {
margin-bottom: 30px; }
footer .footer-above {
padding-top: 50px;
background-color: #2C3E50; }
footer .footer-col {
margin-bottom: 50px; }
footer .footer-below {
padding: 25px 0;
background-color: #2c3e50; }
.btn-outline {
font-size: 20px;
margin-top: 15px;
transition: all 0.3s ease-in-out;
color: white;
border: solid 2px white;
background: transparent; }
.btn-outline.active, .btn-outline:active, .btn-outline:focus, .btn-outline:hover {
color: #18BC9C;
border: solid 2px white;
background: white; }
.btn-primary {
font-weight: 700;
color: white;
border-color: #2C3E50;
background-color: #2C3E50; }
.btn-primary.focus, .btn-primary:focus {
color: white;
border-color: black;
background-color: #1a252f; }
.btn-primary:hover {
color: white;
border-color: #161f29;
background-color: #1a252f; }
.btn-primary.active, .btn-primary:active,
.open > .btn-primary.dropdown-toggle {
color: white;
border-color: #161f29;
background-color: #1a252f; }
.btn-primary.active.focus, .btn-primary.active:focus, .btn-primary.active:hover, .btn-primary:active.focus, .btn-primary:active:focus, .btn-primary:active:hover,
.open > .btn-primary.dropdown-toggle.focus,
.open > .btn-primary.dropdown-toggle:focus,
.open > .btn-primary.dropdown-toggle:hover {
color: white;
border-color: black;
background-color: #0d1318; }
.btn-primary.active, .btn-primary:active,
.open > .btn-primary.dropdown-toggle {
background-image: none; }
.btn-primary.disabled.focus, .btn-primary.disabled:focus, .btn-primary.disabled:hover, .btn-primary[disabled].focus, .btn-primary[disabled]:focus, .btn-primary[disabled]:hover,
fieldset[disabled] .btn-primary.focus,
fieldset[disabled] .btn-primary:focus,
fieldset[disabled] .btn-primary:hover {
border-color: #2C3E50;
background-color: #2C3E50; }
.btn-primary .badge {
color: #2C3E50;
background-color: white; }
.btn-success {
font-weight: 700;
color: white;
border-color: #18BC9C;
background-color: #18BC9C; }
.btn-success.focus, .btn-success:focus {
color: white;
border-color: #0a4b3e;
background-color: #128f76; }
.btn-success:hover {
color: white;
border-color: #11866f;
background-color: #128f76; }
.btn-success.active, .btn-success:active,
.open > .btn-success.dropdown-toggle {
color: white;
border-color: #11866f;
background-color: #128f76; }
.btn-success.active.focus, .btn-success.active:focus, .btn-success.active:hover, .btn-success:active.focus, .btn-success:active:focus, .btn-success:active:hover,
.open > .btn-success.dropdown-toggle.focus,
.open > .btn-success.dropdown-toggle:focus,
.open > .btn-success.dropdown-toggle:hover {
color: white;
border-color: #0a4b3e;
background-color: #0e6f5c; }
.btn-success.active, .btn-success:active,
.open > .btn-success.dropdown-toggle {
background-image: none; }
.btn-success.disabled.focus, .btn-success.disabled:focus, .btn-success.disabled:hover, .btn-success[disabled].focus, .btn-success[disabled]:focus, .btn-success[disabled]:hover,
fieldset[disabled] .btn-success.focus,
fieldset[disabled] .btn-success:focus,
fieldset[disabled] .btn-success:hover {
border-color: #18BC9C;
background-color: #18BC9C; }
.btn-success .badge {
color: #18BC9C;
background-color: white; }
.btn-social {
font-size: 20px;
line-height: 45px;
display: inline-block;
width: 50px;
height: 50px;
text-align: center;
border: 2px solid white;
border-radius: 100%; }
.btn.active,
.btn:active,
.btn:focus {
outline: none; }
|
frostme/melliotfrost
|
public/css/freelancer.css
|
CSS
|
mit
| 12,188
|