public abstract class TrcI2cDevice
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
TrcI2cDevice.CompletionHandler
The client of this class provides this interface if it wants to be notified when a read or write operation
has been completed.
|
| Modifier and Type | Field and Description |
|---|---|
protected TrcDbgTrace |
dbgTrace |
protected static boolean |
debugEnabled |
protected static java.lang.String |
moduleName |
protected static TrcDbgTrace.MsgLevel |
msgLevel |
protected static TrcDbgTrace.TraceLevel |
traceLevel |
protected static boolean |
tracingEnabled |
protected static boolean |
useGlobalTracer |
| Constructor and Description |
|---|
TrcI2cDevice(java.lang.String instanceName)
Constructor: Creates an instance of the object.
|
| Modifier and Type | Method and Description |
|---|---|
abstract byte[] |
getData()
This method retrieves the data read from the device.
|
abstract boolean |
isPortInWriteMode()
This method checks if the I2C port is in write mode.
|
abstract boolean |
isPortReady()
This method checks if the I2C port is ready for bus transaction.
|
void |
read(int regAddress,
int length)
This method queues the read request.
|
void |
read(int regAddress,
int length,
TrcI2cDevice.CompletionHandler handler)
This method queues the read request.
|
void |
read(int regAddress,
int length,
TrcI2cDevice.CompletionHandler handler,
double timeout)
This method queues the read request.
|
void |
sendByteCommand(int regAddress,
byte command)
This method sends a byte command to the device.
|
abstract void |
sendReadCommand(int regAddress,
int length)
This method sends a read command to the device.
|
void |
sendWordCommand(int regAddress,
short command)
This method sends a 16-bit command to the device.
|
abstract void |
sendWriteCommand(int regAddress,
int length,
byte[] data)
This method sends a write command to the device.
|
java.lang.String |
toString()
This method returns the instance name of the device.
|
void |
write(int regAddress,
int length,
byte[] writeBuffer)
This method queues the write request.
|
void |
write(int regAddress,
int length,
byte[] writeBuffer,
TrcI2cDevice.CompletionHandler handler)
This method queues the write request.
|
void |
write(int regAddress,
int length,
byte[] writeBuffer,
TrcI2cDevice.CompletionHandler handler,
double timeout)
This method queues the write request.
|
protected static final java.lang.String moduleName
protected static final boolean debugEnabled
protected static final boolean tracingEnabled
protected static final boolean useGlobalTracer
protected static final TrcDbgTrace.TraceLevel traceLevel
protected static final TrcDbgTrace.MsgLevel msgLevel
protected TrcDbgTrace dbgTrace
public TrcI2cDevice(java.lang.String instanceName)
instanceName
- specifies the instance name.public abstract boolean isPortReady()
public abstract boolean isPortInWriteMode()
public abstract void sendReadCommand(int regAddress, int length)
regAddress
- specifies the register address.length
- specifies the number of bytes to read.public abstract void sendWriteCommand(int regAddress, int length, byte[] data)
regAddress
- specifies the register address.length
- specifies the number of bytes to write.data
- specifies the data buffer containing the data to write to the device.public abstract byte[] getData()
public java.lang.String toString()
toString
in class java.lang.Object
public void read(int regAddress, int length, TrcI2cDevice.CompletionHandler handler, double timeout)
regAddress
- specifies the register address to read from.length
- specifies the number of bytes to read.handler
- specifies the completion handler to call when done. Can be null if none needed.timeout
- specifies the timeout for the operation in seconds.public void read(int regAddress, int length, TrcI2cDevice.CompletionHandler handler)
regAddress
- specifies the register address to read from.length
- specifies the number of bytes to read.handler
- specifies the completion handler to call when done. Can be null if none needed.public void read(int regAddress, int length)
regAddress
- specifies the register address to read from.length
- specifies the number of bytes to read.public void write(int regAddress, int length, byte[] writeBuffer, TrcI2cDevice.CompletionHandler handler, double timeout)
regAddress
- specifies the register address to write to.length
- specifies the number of bytes to read.writeBuffer
- specifies the buffer containing the data to be written to the device.handler
- specifies the completion handler to call when done. Can be null if none needed.timeout
- specifies the timeout for the operation in seconds.public void write(int regAddress, int length, byte[] writeBuffer, TrcI2cDevice.CompletionHandler handler)
regAddress
- specifies the register address to write to.length
- specifies the number of bytes to read.writeBuffer
- specifies the buffer containing the data to be written to the device.handler
- specifies the completion handler to call when done.
Can be null if none needed.public void write(int regAddress, int length, byte[] writeBuffer)
regAddress
- specifies the register address to write to.length
- specifies the number of bytes to read.writeBuffer
- specifies the buffer containing the data to be written to the device.public void sendByteCommand(int regAddress, byte command)
regAddress
- specifies the register address to write to.command
- specifies the command byte.public void sendWordCommand(int regAddress, short command)
regAddress
- specifies the register address to write to.command
- specifies the 16-bit command.


A payday lender charges an annual percentage rate of 350% (simple interest). If you borrow $200 for two weeks, how much will you have to pay back? How much will you have to pay back if you renew the loan three times (for a total of 8 weeks)?
in-context


{% extends "base.html" %} {% block content %} {{post.render() | safe}}
To Continue on to the Blog click on "The Blog" main title from above.


public enum HttpHeader extends java.lang.Enum<HttpHeader>
| Modifier and Type | Method and Description |
|---|---|
static HttpHeader |
get(java.lang.String name)
Returns the HttpHeader representation of the header field
|
java.lang.String |
getText()
Returns the String equivalent of the enum
|
static HttpHeader |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static HttpHeader[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final HttpHeader A_IM
public static final HttpHeader ACCEPT
public static final HttpHeader ACCEPT_CHARSET
public static final HttpHeader ACCEPT_ENCODING
public static final HttpHeader ACCEPT_LANGUAGE
public static final HttpHeader ACCEPT_DATETIME
public static final HttpHeader ACCESS_CONTROL_REQUEST_METHOD
public static final HttpHeader ACCESS_CONTROL_REQUEST_HEADERS
public static final HttpHeader AUTHORIZATION
public static final HttpHeader CACHE_CONTROL
public static final HttpHeader CONNECTION
public static final HttpHeader CONTENT_LENGTH
public static final HttpHeader CONTENT_MD5
public static final HttpHeader CONTENT_TYPE
public static final HttpHeader COOKIE
public static final HttpHeader DATE
public static final HttpHeader EXPECT
public static final HttpHeader FORWARDED
public static final HttpHeader FROM
public static final HttpHeader HOST
public static final HttpHeader HTTP2_SETTINGS
public static final HttpHeader IF_MATCH
public static final HttpHeader IF_MODIFIED_SINCE
public static final HttpHeader IF_NONE_MATCH
public static final HttpHeader IF_RANGE
public static final HttpHeader IF_UNMODIFIED_SINCE
public static final HttpHeader MAX_FORWARDS
public static final HttpHeader ORIGIN
public static final HttpHeader PRAGMA
public static final HttpHeader PROXY_AUTHORIZATION
public static final HttpHeader RANGE
public static final HttpHeader REFERER
public static final HttpHeader TE
public static final HttpHeader USER_AGENT
public static final HttpHeader UPGRADE
public static final HttpHeader VIA
public static final HttpHeader WARNING
public static final HttpHeader UPGRADE_INSECURE_REQUESTS
public static final HttpHeader X_REQUESTED_WITH
public static final HttpHeader DNT
public static final HttpHeader X_FORWARDED_FOR
public static final HttpHeader X_FORWARDED_PROTO
public static final HttpHeader FRONT_END_HTTPS
public static final HttpHeader X_HTTP_METHOD_OVERRIDE
public static final HttpHeader X_ATT_DEVICEID
public static final HttpHeader X_WAP_PROFILE
public static final HttpHeader PROXY_CONNECTION
public static final HttpHeader X_UIDH
public static final HttpHeader X_CSRF_TOKEN
public static final HttpHeader X_REQUEST_ID
public static final HttpHeader X_CORRELATION_ID
public static final HttpHeader SAVE_DATA
public static final HttpHeader ACCESS_CONTROL_ALLOW_ORIGIN
public static final HttpHeader ACCESS_CONTROL_ALLOW_CREDENTIALS
public static final HttpHeader ACCESS_CONTROL_EXPOSE_HEADERS
public static final HttpHeader ACCESS_CONTROL_MAX_AGE
public static final HttpHeader ACCESS_CONTROL_ALLOW_METHODS
public static final HttpHeader ACCESS_CONTROL_ALLOW_HEADERS
public static final HttpHeader ACCEPT_PATCH
public static final HttpHeader ACCEPT_RANGES
public static final HttpHeader AGE
public static final HttpHeader ALLOW
public static final HttpHeader ALT_SVC
public static final HttpHeader CONTENT_DISPOSITION
public static final HttpHeader CONTENT_LANGUAGE
public static final HttpHeader CONTENT_LOCATION
public static final HttpHeader DELTA_BASE
public static final HttpHeader ETAG
public static final HttpHeader EXPIRES
public static final HttpHeader IM
public static final HttpHeader LAST_MODIFIED
public static final HttpHeader LINK
public static final HttpHeader LOCATION
public static final HttpHeader P3P
public static final HttpHeader PROXY_AUTHENTICATE
public static final HttpHeader PUBLIC_KEY_PINS
public static final HttpHeader RETRY_AFTER
public static final HttpHeader SERVER
public static final HttpHeader SET_COOKIE
public static final HttpHeader STRICT_TRANSPORT_SECURITY
public static final HttpHeader TRAILER
public static final HttpHeader TRANSFER_ENCODING
public static final HttpHeader TK
public static final HttpHeader VARY
public static final HttpHeader WWW_AUTHENTICATE
public static final HttpHeader X_FRAME_OPTIONS
public static final HttpHeader CONTENT_SECURITY_POLICY
public static final HttpHeader X_CONTENT_SECURITY_POLICY
public static final HttpHeader X_WEBKIT_CSP
public static final HttpHeader REFRESH
public static final HttpHeader STATUS
public static final HttpHeader TIMING_ALLOW_ORIGIN
public static final HttpHeader X_CONTENT_DURATION
public static final HttpHeader X_CONTENT_TYPE_OPTIONS
public static final HttpHeader X_POWERED_BY
public static final HttpHeader X_UA_COMPATIBLE
public static final HttpHeader X_XSS_PROTECTION
public static HttpHeader[] values()
for (HttpHeader c : HttpHeader.values()) System.out.println(c);
public static HttpHeader valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String getText()
public static HttpHeader get(java.lang.String name)
name
- The name of the header field


Bus Mall
Home
Our Business
Contact
I've a few pictures for you!
Each time choose one from the three images , you have 25 rounds


|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
| Interface Summary | |
|---|---|
| Cookie | Interface representing HTTP cookie operations, supporting pojo-style getters and setters for all attributes which includes HttpOnly support. |
| Class Summary | |
|---|---|
| AbstractFilter | Base abstract Filter simplifying Filter initialization and access to init parameters. |
| AbstractShiroFilter | Abstract base class that provides all standard Shiro request filtering behavior and expects subclasses to implement configuration-specific logic (INI, XML, .properties, etc). |
| AdviceFilter | A Servlet Filter that enables AOP-style "around" advice for a ServletRequest via
preHandle ,
postHandle ,
and afterCompletion
hooks. |
| IniShiroFilter | Deprecated. in 1.2 in favor of using the ShiroFilter |
| NameableFilter | Allows a filter to be named via JavaBeans-compatible
NameableFilter.getName() /NameableFilter.setName(String) methods. |
| OncePerRequestFilter | Filter base class that guarantees to be just executed once per request, on any servlet container. |
| ProxiedFilterChain | A proxied filter chain is a FilterChain instance that proxies an original FilterChain as well
as a List of other Filter s that might need to execute prior to the final wrapped
original chain. |
| ServletContextSupport | Base implementation for any components that need to access the web application's ServletContext . |
| ShiroFilter | Primary Shiro Filter for web applications configuring Shiro via Servlet <listener> in web.xml. |
| ShiroHttpServletRequest | A ShiroHttpServletRequest wraps the Servlet container's original ServletRequest instance, but ensures
that all HttpServletRequest invocations that require Shiro's support (getRemoteUser ,
getSession , etc) can be executed first by Shiro as necessary before allowing the underlying
Servlet container instance's method to be invoked. |
| ShiroHttpServletResponse | HttpServletResponse implementation to support URL Encoding of Shiro Session IDs. |
| ShiroHttpSession | Wrapper class that uses a Shiro Session under the hood for all session operations instead of the
Servlet Container's session mechanism. |
| SimpleCookie | Default Cookie implementation. |
Shiro-specific implementations of the Servlet API (Servlet Filters, et al).
ShiroFilter
|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |


Event Horizon (1997) Rated R for violence, terror, language, and brief nudity Starring Sam Neill, Laurence Fishburne, Kathleen Quinlan ***1/2 of ****
Laurence Fishburne was in last year's "Othello." Kathleen Quinlan was in this year's "Breakdown," and Sam Neill was in "Jurassic Park." Now, all these respected actors come together in a film that got dumped on by many critics, and won't make much money at the box office. The only way the film could make more money is by word of mouth, which is exactly what it might do. Last year, a film came out which was very scary the first half, and then turned into a comic suspense thriller. That film was "Scream." By word of mouth, that film became the highest grossing horror film ever. Hopefully, that word of mouth will spread onto Event Horizon, the new sci-fi/horror film from director Paul Anderson.
Whatever occurs at the box office or with critics, Event Horizon will be the scariest film that I have seen since "Nightmare on Elm Street" (Actually, "Arachnophobia" scared me more than any film ever made). The film is so scary that it will have you on the edge of your seat, waiting for another surprise. And don't worry, there are many "jump" moments in this film. Event Horizon begins with the overused computer narration which types the summary onto the screen. We learn that a ship disappeared in 2040, and seven years later, she has returned. The Event Horizon was rumored to have been destroyed in space, becoming the worst space disaster ever. Now that she has reappeared, a crew is brought in to salvage what is left of the crew and ship.
This crew consists of Captain Miller (Fishburne), Dr. Weir (Neill), who designed and built the ship, Starck (Joely Richardson), Peters (Kathleen Quinlan), and four other crew members. In fact, this film only has about nine actors who show up on screen. This crew sets off into deep space; their destination: Neptune. When they arrive, about 57 days later, they find the ship void of human life. What happened to the crew, and where did the ship go? All these questions are shoved into Dr. Weir's face because he designed it. Blood is found on the wall, and a recording is heard in Latin. The ship's log isn't much help either, because the part they need to see is jumbled and blurry. However, soon, the crew begins experiencing strange occurances, and Justin (Jack Noseworthy, also from "Breakdown") is sucked into the "heart" of the ship.
This "heart", as explained by Weir, is what made the ship vanish for seven years. It folds space and allows the ship to pass through a black hole, instantaneously travelling to somewhere far, far away. Justin, however, tries to commit suicide (in a very graphic and bloody way), and Captain Miller wants to know what happened to him. Dr. Weir isn't able to answer any of the questions, and the film quickly turns into a horror film. Explaining any more of this film would ruin all the suspense, and believe me, there is a lot of it present in Event Horizon. And one of the best things about the film is that while most of the "jumps" come from the skilled filmmakers who know how to time the music and silence, most of the scariness comes from the plot and story. Unfortunately, the only downside to the film is the number of cliches that are used, and how many other films it steals from (Alien and Hellraiser are the most notable).
On the plus side, while the film is riddled with cliches, the filmmakers have put new twists to them, making them seem original again. The hero-outruns-the-fireball cliche is one of the best because while it uses the cliche, it also uses the story to make it seem possible. Basically, Event Horizon is a sci-fi haunted house film. Nothing is as it seems, and this is the frightening aspect of the story. What is real? And what is just part of the imagination? Is the ship alive? Or is the mind playing tricks as a result of the isolation of the crew? The outcome is more terrifying than what is expected, and this provides an utterly frightening experience. This is one of those films that you will see once, and then tell all your friends about, and then take them to see it just so you can laugh at how scared they are.
The filmmaking is probably the best part of the film itself. Director Paul Anderson knows exactly how to scare you. He uses great sets with shadows and dark corners. Sounds seem to come from nowhere, and things appear and disappear constantly. Composer Michael Kamen uses music to great effect here, making the music fade into silence, and then playing a very loud chord just when something on screen happens (many of film's "jump" moments are caused by this). Cinematographer Adrian Biddle uses all the common camera angles for horror films, but somehow they all seem to make the film more scary. The special effects are very well done, especially some of the computer generated ones. All of the effects are well done, and some are quite amazing. The effects are done by Cinesite, an ILM rival, and with this film, they prove that they can hold their own against bigger companies.
The acting is well done (with the exception of Noseworthy). Fishburne gives a terrific performance, if not a bit recycled itself. Still, he has a great presence on screen, and his scenes are some of the best. Sam Neill steals the film with a great performance as the designer of Event Horizon. His performance is the key to the film, and he handles it extremely well. Kathleen Quinlan gives a nice and almost low-key performance, but her character isn't given much to do. Joely Richardson is very good, although she doesn't get much to do either. Noseworthy is usually good throughout the film, but sometimes he just got on my nerves. The rest of the cast supports very well, but again, they aren't given much to do. It's mainly Fishburne and Neill's film.
Event Horizon is rated R for graphic violence and gore, some nudity, and language, with quite a bit of terror. This film is definitely not for the faint of heart, and the atmosphere itself could scare some people. Even the most proud people will show signs of fear during this film. All of the technical elements are put together extremely well, providing one of the scariest films to come along in a long time. Not many films give me nightmares at night, but Event Horizon did just that. I will say it again, just in case you didn't get what I am trying to tell you: Event Horizon is an EXTREMELY scary film.
Respect of Respect's Movie Reviews http://www.aros.net/~respect/movies.html<EMAIL_ADDRESS>The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Class: RedisPort
| Defined in: | src/RedisPort.coffee |
| Inherits: | EventEmitter |
Overview
Service registry and port assignment using Redis
Creates two redis clients to support
- Key space notification subscriptions
- Ephemeral network storage
Property Summary
- (Object) client
- Redis client to set/get with
- (Object) ephemerals
- Interval collection the resets the expire flags
- (Number) ephemeralExpire
- Milliseconds to expire
- (Number) ephemeralRefresh
- Milliseconds to reset expire
- (String) prefix
- Main prefix
- (String) rootPath
- The extended prefix of each key
- (String) servicesPath
- Default path to subscribe network services with
- (Object) subscriber
- Redis client to subscribe with
- (Object) subscriptions
- Subscription registry
Instance Method Summary
- # (void) start(cb) Start function with callback
- # (void) stop() Stop the client
- # (void) pset(p, data, cb) Persistantly set a key-value
- # (void) mpset(arr, cb) Set array of persistant key-values
- # (void) get(p, cb) Get a value by key
- # (void) del(p, cb) Delete by key
- # (void) mdel(keys, cb) Delete multiple paths
- # (void) set(p, data, cb) Ephemeral set a key-value
- # (void) mset(arr, cb) Set multiple key-values
- # (void) list(p, cb) List all value by a path
- # (void) register(role, cb) Register a service
- # (void) query(role, fn) Set a watch function on a role
- # (void) getServices(cb) Get current known services
- # (void) getPorts(cb) Get the current active ports
- # (String) _cleanPath(p) Returns the absolute path
Constructor Details
#
(void)
constructor(options)
Constructor
Instance Method Details
#
(void)
start(cb)
Start function with callback
#
(void)
stop()
Stop the client
#
(void)
pset(p, data, cb)
Persistantly set a key-value
#
(void)
mpset(arr, cb)
Set array of persistant key-values
#
(void)
get(p, cb)
Get a value by key
#
(void)
del(p, cb)
Delete by key
#
(void)
mdel(keys, cb)
Delete multiple paths
#
(void)
set(p, data, cb)
Ephemeral set a key-value
#
(void)
mset(arr, cb)
Set multiple key-values
#
(void)
list(p, cb)
List all value by a path
#
(void)
register(role, cb)
Register a service
#
(void)
query(role, fn)
Set a watch function on a role
#
(void)
getServices(cb)
Get current known services
#
(void)
getPorts(cb)
Get the current active ports
#
(String)
_cleanPath(p)
Returns the absolute path


The New PHP
DrupalCamp Sao Paulo 2015
About me
Jesus Manuel Olivas
Drupal 8 Solutions Engineer
I work for FFW
(and you should too)
PHP 7
PHP 7 will be released before the end of 2015.
Probably before Drupal 8.
Symfony 3
Another major release happening by the end of this year and also probably before Drupal 8 too is Symfony 3.
Drupal 8
And according to drupalreleasedate.com Drupal 8 will be release on.
Stop talking about promises and focus on taling about what is already out and we can take advantage of.
What is Symfony
Symfony is a group of decoupled components and other standalone PHP libraries.
Then, based on these components, Symfony is also a full-stack web framework.
We can define Symfony as a group of decoupled components and other stand alone libraries.
And then based on these components Symfony is a full-stack web framework.
Does anyone knows which aproach is Drupal 8 using ?
Drupal is not using Symfony as a full stack framework.
Drupal is only taking advantage of some specific components.
What is the benefit of reusing more code.
The way to be more productive is to write less code and to reuse more code.
Sharing is how Open Source works
The Best Code is No Code At All
-- Jeff Atwood
Code is bad. It rots. It requires periodic maintenance. It has bugs that need to be found. New features mean old code has to be adapted.
-- Rich Skrenta
The more code you have, the more places there are for bugs to hide.
The more code you have, the more code you need to maintain.
Standards Recommendations
Framework Interoperability Group
http://www.php-fig.org
Some people say is like the United Nations of the PHP, but I am not sure if that is a good or bad reference.
The idea behind this group is to group the project representatives of different frameworks to talk about the similitudes between the projects and find ways to work together.
Accepted recommendations
PSR-0 Autoloading Standard
PSR-1 Coding Standards
PSR-2 Coding Style Guide
PSR-3 Logger Interface
PSR-4 Improved Autoloading
PSR-7 HTTP Message Interfaces
Composer
http://getcomposer.org/
Composer is a Dependency Manager for PHP.
It allows you to declare the dependent libraries your project needs and take care of downloading.
Probably this library you are requiring is also dependent on another library or libraries, well worry not composer will resolve that too.
Download Composer
$ curl -sS https://getcomposer.org/installer | php
$ chmod +x composer.phar
$ mv composer.phar /usr/local/bin/composer
How to use Composer
$ composer init
$ composer search faker
$ composer show fzaninotto/faker
$ composer require fzaninotto/faker:v1.3.0
How to use Composer
/* composer.json */
{
"require": {
"fzaninotto/faker": "v1.3.0"
}
}
$ composer install
$ composer update
$ composer show --installed
Awesome now you know how to handle, third party dependencies in every moder PHP framework but not Drupal.
Because ...
Composer Manager
$ drush dl composer_manager
$ drush en -y composer_manager
$ drush composer-manager-init
http://drupal.org/project/composer_manager
As a friend of mine Luis Cordova a developer from Perú, but this is drupal/drupal and it won't be that easy.
And I need to say he is maybe right, seems like we use to make thing harder or maybe not hareder, just different "Drupalisims anyone"
We already have drush why not use for this purpose ...
No more Copy/Paste of libraries
Resolves dependencies
Each project defines its own requirements
Performs build tasks
Packagist
https://packagist.org/
Where are those libraries definitions stored.
All those libraries are stored at Packagist, the PHP archivist.
Why composer and packagist are important?
Which problem they solved ?
You may be wonder why having an standard mechanisim for sharing libraries is so important.
We already have drush and drush help us to download modules.
The CopyPasta era
Remeber the copy-pasta era, where you just copy/paste code from a geocities page you found atfer searching using yahoo or altavista.
Oh boy ... the good old days.
Then you learn the cool kids those days used to visit phpclasses.org to download libraries.
Fortunely those days are over.
Why release my code as a package or library?
You sould try to move the generic and reusable logic to and external repository and share at github/bitbucket or other.
Same Library can be shared accross differents projects, CMS and frameworks. (Drupal 7/8, Symfony, Silex, Laravel, Wordpress, Backdrop, etc.)
And create repo availabe at github/bitbucket or other.
Your module, bundle, plugin, service provider etc... must be only a wrapper for the external library.
In every web application, in any language, you always have one goal, read and understand the incoming HTTP request in order to create and return the appropriate HTTP response.
In every web application regardless of the used language or framework.
You are probably working with PHP using Symfony, Silex, Drupal or Laravel or may you are working with Pyhton using Django or Flask, how about Ruby using Rails or Java developing with Scala.
Your only goal as a web developer is to properly understand the incoming HTTP Request in order to build and return and appropiate HTTP response.
The client sends an HTTP request. When I said client this could be a web-site, mobile app or even an application runing from the terminal.
Now as I mentioned before it is your responsability to build a proper response, this will be based on what the client is asking for, this could be anything form a HTML page to JSON, XML even and attachment or a multimedia file as well.
The Request/Response Flow
Well the flow looks like this.
Symfony/Silex/Drupal use the front controller design-pattern. This mean every single request is routed from a PHP file app.php or app_ENV.php in the case of Symfony and index.php if using Silex or Drupal. The main goal of the front controller is to bootstrap your Application and performing the global initialization of required objects.
Also takes care of extracting information form the requested URL about the path and match this on the routing system and then execute the proper Controller.
Routing
A route is a map from a URL path to a controller.
We can define a Route as a map from a URL to a controller.
Is in the route definition where where we especify the path for a resource and the controller that will be executed.
Now that I have been mentioning the Controller
Controller
A controller is a PHP method or call-back that takes information from the HTTP request and constructs and returns an HTTP response.
A Controller is a method or call-back that takes information from the HTTP request object and based on the implemented code contructs and returns a proper HTTP response.
Lets see how these two looks in code.
Route/Controller - Symfony
src/AppBundle/resources/config/routing.yml
hello_name:
path: /hello/{name}
defaults: { _controller: AppBundle:Hello:index }
src/AppBundle/Controller/HelloController.php
namespace AppBundle\Controller;
use Symfony\Component\HttpFoundation\Response;
class HelloController {
public function indexAction($name) {
return new Response('Hello '.$name);
}
}
In order to add a new route and the matching controller in Symfony we need to declare this on the Bundle routing.yml file.
Within this file, the Route name, the matching Path and the executed controller must be given.
A Controller class must be added this class must containing a method that returns the proper HTTP response.
Remeber what I told you about Symfony-isms. If you pay attention to the _controller: key value it does not include the words Controller for the Class and Action for the method, what it means for this case we are using a shortcut not the fully qualified path name.
Route/Controller - Silex
web/index.php
require_once __DIR__.'/../vendor/autoload.php';
$app = new Silex\Application();
$app->get('/hello/{name}', function($name) {
return 'Hello '.$name;
});
$app->run();
Silex it is a Microframework and by default is more simple, what you see here is a complete Silex aplication.
The way I am registering a new route in this code is:
Creating a new instance of the Silex/Application class and using the get method on the app object. You may also use post/match methods depending on your needs.
The get() method it's exepecting two arguments the first is the path of the resource and the second is a closure or anonymous function, from there we can return a String
What if my application need to scale and grow.
Route/Controller - Silex
web/index.php
$app->get(
'/hello-controller/{name}',
'DrupalCampSP\Controller\HelloController::indexAction'
);
src/DrupalCampSP/Controller/HelloController.php
namespace DrupalCampSP\Controller;
use Symfony\Component\HttpFoundation\Response;
class HelloController {
public function indexAction($name) {
return new Response('Hello '.$name);
}
}
One common misconception about Silex and microframeworks in general is that they are only for small, simple app and APIs. Which is not true
When you need to scale your Silex app, you need to organize and structure your code into different file classes.
For this example a new Controller class must be created with a method returning a HTTP Response object. Yeah the exact same code we use on the Symfony example. Do you see where I am going.
In order to register this ControllerClass we replaced the second argument passed to the get() method and use the fully qualified path name and the methodName separated by double ::
As you can see here, we are using Controller and Action.
Route/Controller - Drupal
drupalcampsp.routing.yml
drupalcampsp.hello_controller:
path: 'hello/{name}'
defaults:
_content: '\Drupal\drupalcampsp\Controller\HelloController::index'
src/Controller/HelloController.php
namespace Drupal\drupalcampsp\Controller;
class HelloController {
public function index($name)
{
return [
'#type' => 'markup',
'#markup' => $this->t('Hello @name!', ['@name' => $name])
];
}
}
In order to achieve this in Drupal we declares a new route at the MODULE_NAME.routing.yml file, adding the Route name and Path.
But instead of using _controller we will replace it with _content 'That was a Drupal-isms' and point to the Controller the same way we did it on Silex, we will be using the fully qualified path name plus :: methodName.
A new Controller Class must be added with a method that could return a String.
As you can see it's kinda a mix of Symfony & Silex but the final result is pretty similar and we shared a lot of concepts and code.
3rd party libraries and projects
Testing
PHPUnit is a programmer-oriented testing framework for PHP.
https://phpunit.de/
Behat is an open source behavior-driven development framework for PHP 5.3 and 5.4.
http://behat.org
WebProfiler
Collects information about each request made to your application and allows you to visualize it in the browser.
WebProfiler
Symfony
Silex
Drupal
Console
The Console component allows you to create command-line commands.


Babbitt
by Sinclair Lewis
Babbitt is a novel by Sinclair Lewis. Largely a satire of American culture, society, and behavior, it critiques the vacuity of middle-class American life and its pressure on individuals toward conformity.
Satire is generally written with humor in mind, but carries undertones of political or social critique.
Babbitt is a novel by Sinclair Lewis. Largely a satire of American culture, society, and behavior, it critiques the vacuity of middle-class American life and its pressure on individuals toward conformity.
A Connecticut Yankee In King Arthur’s Court is a satirical novel that depicts a contemporary American, Hank Morgan, who is transported to medieval England. In the court of the legendary King Arthur, Morgan uses his modern knowledge to face the trials and tribulations of the middle ages.
Gulliver’s Travels (1726, amended 1735), officially Travels into Several Remote Nations of the World, is a novel by Jonathan Swift that is both a satire on human nature and a parody of the “travellers’ tales” literary sub-genre. It is widely considered Swift’s magnum opus (masterpiece) and is his most celebrated work, as well as one of the indisputable classics of English literature.
The book became tremendously popular as soon as it was published (Alexander Pope stated that “it is universally read, from the cabinet council to the nursery”), and it is likely that it has never been out of print since then. George Orwell declared it to be among the six most indispensable books in world literature. It is claimed the inspiration for Gulliver came from the sleeping giant profile of the Cavehill in Belfast.
Main Street is a satirical novel about small-town life, and is notable for the presence of a strong female protagonist.
Northanger Abbey follows Catherine Morland and family friends Mr. and Mrs. Allen as they visit Bath, England. Seventeen year-old Catherine spends her time visiting newly made friends, like Isabella Thorpe, and going to balls. Catherine finds herself pursued by Isabella’s brother John Thorpe and by Henry Tilney. She also becomes friends with Eleanor Tilney, Henry’s younger sister. Mr. Henry Tilney captivates her with his view on novels and knowledge of history and the world. The Tilneys invite Catherine to visit their father’s estate, Northanger Abbey, which, because she has been reading Ann Radcliffe’s gothic novel The Mysteries of Udolpho, Catherine expects to be dark, ancient and full of fantastical mystery.
Northanger Abbey is considered a parody of a gothic novel.
Vanity Fair is a 19th century social satire by William Makepeace Thackeray. The novel follows the adventures and dealings of Becky Sharp and Amelia Sedley.


Print PDF Print PDF with Loading Modal
Print HTML Print HTML with custom style Print HTML with custom css
Print JSON Print Styled JSON Print Nested JSON


The following example gets the latest ledger version and a list of transactions that were newly-validated in that ledger version, using the getLedger() method. Try running it as-is, or change the code and see what happens.
const mainnet = new ripple.RippleAPI({ server: 'wss://your.node.url' }); (async function(api) { await api.connect(); let response = await api.getLedger({ includeTransactions: true }); console.log(response); })(mainnet);


#include <tvobjs.h>
Inheritance diagram for TObject::
Public Methods | |
| virtual | ~TObject () |
| virtual void | shutDown () |
Static Public Methods | |
| void | destroy (TObject *o) |
Any object that uses TVision's stream facilities must trace its ancestry back to TObject.
Definition at line 31 of file tvobjs.h.
|
|
Destructor. Performs the necessary cleanup and disposal for dynamic objects. Does nothing. |
|
|
Destroys the object pointed by `o'. destroy() deletes an object `o' of a type derived from TObject; that is, any object created with operator new(). destroy() terminates the object, correctly freeing the memory that it occupies. It calls `o->shutDown()' and after does `delete o'.
|
|
|
Releases TObject resources. Used internally by TObject::destroy() to ensure correct destruction of derived and related objects. shutDown() is overridden in many classes to ensure the proper setting of related data members when destroy is called. Does nothing.
Reimplemented in TDeskTop, TProgram, TLabel, THistory, TEditor, TFileEditor, TFileDialog, TChDirDialog, TNSCollection, TView, TScroller, TListViewer, TGroup, and TWindow. Referenced by destroy().
|


@* * Copyright 2023 HM Revenue & Customs * * 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. *@ @this() @(params: Fieldset) @import params._
@describedBySnippet = { @describedBy.mapNonEmpty {describedBy => aria-describedby="@describedBy"} }


Faking domain logic
Using C# extensions to create the illusion of domain logic
23 September 2014 | 27 April 2018
domain driven design CSharp code smellsSometimes, life is just a little bit more difficult than you imagined the day before. Sometimes, you have to work on a legacy codebase with custom frameworks rooted so deeply you’re having lot’s of trouble trying to build around them. To make it a bit more concrete, here’s an example: imagine a separate DLL for interfaces and a separate DLL for the implementation. This decision was made because we use NHibernate as a data mapper and not to write beautiful domain driven design code. As a result, writing domain logic methods on our “domain” objects is impossible because we have three implementations.
There are a few solutions. The first would be the classic solution, called a “service layer” where you simply dump random “domain” logic. Done.
Then there’s a slightly better solution involving abstract classes. But it makes things more complicated, and it’s not always allowed to inherit from those classes. Besides, in which DLL should you put them? Dependency Entanglement. Welcome to hotel Cali— erm, DLL Hell.
So, option number three: use extensions on those interfaces.
public interface IVacancy
{
public string Description { get; set; }
}
would have these implementations:
public class FulltimeVacancy : IVacancy
{
public string Description { get { // ... }; set { field = value; }}
}
public class HalftimeVacancy : IVacancy
{
public string Description { get { // ... }; set { field = value; }}
}
If I’d want to implement something like RetrieveLocation()
based on for example google maps and other properties, I can place the entry point in an extension class:
public static class IVacancyExtensions
{
public static string RetrieveLocation(this IVacancy vacancy)
{
// do your thing
}
}
Using the right namespace imports, I’m able to call the above method on any concrete implementation of IVacancy
, regardless of it’s (DLL) location. Now, why would I want to keep code like this as close to the original object as possible? this has multiple reasons:
- It makes code easier to read & refactor.
- It reduces the chance of duplication in another service layer, as people often hit “CTRL+SPACE” to find a method from an object or a piece of logic, and don’t go looking in service classes.
- It makes code easier to discuss (since it’s also easier to read).
- It’s isolated and thus easier to test.
- It avoids a lot of other code smells (deserves it’s own article).


Screens
Tap Here
Home
Woofers
Others
Upload
Make a request
Negotiations Allowed.
scroll image
ID:50081 | Muk
Samsung 24 inch
Shs:350,000
contact
scroll image
ID:50085 | Muk
Proline monitor 16 inch
Shs:170,000
contact


We have enhanced security while making it easier to put your information to work. Use it to help you manage your health using tools and applications that work for you.
Do you want better security for your information? Choose to connect your mobile phone to your account. Then receive a pin code to use whenever you login to your BlueButton account.
Under the hood the technology is designed to make it easier for application developers to work with the information you authorize them to receive. Letting them create applications that are useful to you.
Check out the Introduction for Developers and learn how you can enable Medicare Beneficiaries to connect their claims information to your application, service or research program. Use the CMS BlueButton on FHIR API to create applications that empower them to live better through their data and your creative work.


DatabaseError
Current Task
You nearly achieved your visitor goal
We use a custom coded progress system to generate progress bars with great ease. No need for complicated JS. Just data- your parameters and our code will generate the progress bar for you.
Task Completion
You nearly achieved your visitor goal
Backup
Backing up server now.
Please wait.
Setup
Profile is almost setup.
One thing left.


Celtic boss Neil Lennon welcomes back 'happy' Leigh Griffiths
by David GunnNeil Lennon welcomes back a "happy" Leigh Griffiths to the Celtic squad for the visit of Livingston on Saturday.
READ MORE - Celtic hit with £13,000 UEFA fine for banners at Lazio game and could face further punishment
The Hoops striker has been out since a 3-1 victory over Hearts in late August due to personal problems which were followed by niggling injuries and a virus.
However, Griffiths scored a brace for Celtic reserves against Stenhousemuir in a friendly at Lennoxtown earlier in the week which was enough proof of rehabilitation for the Parkhead boss who has had French forward Odsonne Edouard leading the line for most of the season.
"He will be involved with the squad," said Lennon.
"Slowly but surely. He had an hour on Tuesday, he looked good so he will be in and around it.
"He is good, he is happy. He needs to stay there now and improve his conditioning. It is bit by bit but we have seen enough now to think he may make a contribution.
"We have 11 games between now and the end of December and we will be using the squad and Leigh obviously is a part of that."
Lennon also believes Scotland forward Griffiths could make a material difference to the national side, who discovered on Friday that they will face Israel in the Nations League semi-final play-off at Hampden Park in March.
The Northern Irishman said: "If fit, no question.
"When he is ready and if he is in the groove he will be a real asset for Scotland, there is no doubt about that."


Layertree - Table of Content (Layerbaum)¶
Functions¶
What are the functionalities of the Layertree?
- Display layers
- Display layergroups
- Display thematic layergroups (since version 3.0.5)
- Enabling and disabling layers
- Enabling and disabling queries for the layers
- Changing the order of layers
- Zoom to map extend of layers
- Query the metadata of layers
To configure the Layer tree there are a few linking points to other elements that must be considered:
Configuration¶
General Configuration¶
What do we have to do?
To use the different Layersets in our Layertree, various adjustments are necessary. These relate to:
- Configuration of various Layersets,
- Configuration of the map ( Map element) to display the Layersets
- Configuration of the Layertree itself
Through the use of the Layersets, the desired layers are included in the application. The instances are the references to the individual WMS services. With the plus-button [1] new Layersets can be created. Then, new layers can be integrated in the application by adding the existing instances [2]. The Layerset “overview ” [3] is -as usual- used for displaying the overview map. For a detailed documentation on how the services can be integrated correctly, please head for to the documentation of the Layersets and sources.
In order to let the new integrated Layersets appear in the application, they must be specified in the Mapelement. Here, you define which Layersets you want to use in the map by checking [1] the Layersets in the list. The Layerset “overview ” for example is not displayed on the main map. In this step, you define the order in which the Layersets appear in your Layertree and the map. You can move the created Layersets from the list [2] by drag & drop. Please notice that the first defined themes can cover underlying themes.
Workflow Layertree with basic functions¶
In the following section, we walk through an exemplary configuration of a Layertree with basic functions in three steps:
- Configuration of a Layerset
- Configuration of the map ( Mapelement) to display the Layerset
- Configuration of the Layertree itself
In the example we defined one Layerset with one instance:
- Layerset World:
- Instance OSM Demosource
The instance of the OSM demosource is automatically included in the installation. Now this needs to be integrated into an existing Layerset. Change into the tab “Layersets”. In the following example, the Layerset ” YAML main” was renamed to ” World ”. In case of difficulties with the integration, the documentation of the Layersets provides useful information.
In the next step we configure the Map element to display the Layersets in the map. To do this you need to change into the tab “Layouts” and edit the map element in the content. It is important, that you put a tick in the field of the Layerset “World” [1], so it appears in the application afterwards. If you have questions for further configuration of the Map element the documentation can help.
The last step is the configuration of the Layertree. The instances specified in the map element can be defined in more detail with the Layertree. If a predefined application has been copied, the Layertree should work now. If the element is newly created, it can already be used with the default settings without necessary further adjustments. For a better understanding of the functions and their usage we now edit the Layertree-element in the content.
When configuring the Layersets the function Basesource is activated as default. This is important for the BaseSourceSwitcher, which allows you to switch between predefined themes. By enabling Display BaseSources [1], instances that have been loaded as a base source in the application, are displayed in the Layertree.
The function Display Header [2] allows the inclusion of a headline in the Layertree.
If you activate Open automatically, the Layertree is open on default when you start the application and must not be activated by clicking on a button or the unfolding of a sidebar. The Title [4] of the element is displayed in the “Layouts”-list and allows you to distinguish between different elements. The Target [5] is the ID of the map element.
By specifying a Type [6] the display of the Layertrees can be defined. There are two display options:
- Dialog
- Element
| Dialog: | You should choose the type Dialog when the Layertree is integrated via a button and the configuration element is in the content. |
|---|---|
| Element: | You should choose the type Element when the Layertree is integrated via the sidepane. |
The Displaytype [7] defines the accordion-like display (Tree) of the Layertree. By adjusting the maximum number of characters in the field Titlemaxlength [8] the title of the individual layers can be limited to a number of characters. This is important for long layer names. After the maximung title length the title is shortened with ”...”.
Via the Menu [9] a number of buttons can be activated, which are then available in the layertree.
- Remove layer (remove layer from the application)
- Opacity (change the opacity of a layer)
- Zoom to layer (zoom to the BBOX of the layer)
- Metadata (show the metadata of the layer)
The individual functions can be activated by clicking on the button. All active functions are highlighted in green. In addition next to each layer in the Layertree a symbol of the context menu appears. By clicking on the menu a window pops up and the individual features can be used. The menu can be closed by clicking on the x-button.
The slider in the Layertree context menu [1] regulates the function Opacity. By moving the green box you can adjust the opacity of each layer. The percent of the opacity is displayed as an integer in the box.
You can display the metadata of the layer by clicking on the Fact Sheet in the Layertree context menu [2]. If the service includes metadata, these will be displayed in a new dialog.
A click on the “x” in the Layertree context menu [3] allows you to remove a layer from the application for the duration of the session.
The function Hide visibility by folders [11] allows to save the configuration of the opacity. When active, the opacity of the layers is not displayed and can not be changed.
By clicking on the “folder”-icon of the Layertree [1] to the left of the instance the embedded layers can be displayed. All layers that have been previously activated in the Layerset now appear in the list. The function Hide not toggleable [10] allows you to hide layers that don’t contain multiple layers.
The checkbox next to the respective layer name [2] allows to turn a layer on and off. If the checkbox is set, the Layer will appear in the map. However, it will continue to respect the defined rules of the Layerset, such as scale-dependent display.
The “i”-icon next to a layer name [3] indicates if the FeatureInfo-function is enabled. The FeatureInfo-function is inactive if the “i”-icon is grayed out. If you activate the function with a click, the icon is dark gray and the requested information of the layer appears in a dialog box.
The function Hide info [12] allows you to disable the FeatureInfo-function. Independent of the settings in the Layerset or source the FeatureInfo-function is no longer possible.
Workflow thematic Layertree¶
In the following we walk through an exemplary configuration of a Layertree with advanced features such as the thematic layersets in three steps:
- Configuration of multiple Layersets
- Configuration of the map ( Map element) to display the Layerset
- Configuration of the thematic Layertree itself
In the example, we defined two Layerset with two instances each:
- Layerset Project NRW: * Instance DTK50 NRW * Instance Wald NRW
- Layerset World: * Instance OSM Demodienst * Instance GEBCO
For the configuraion of the Layersets the four services mentioned above were added as instances (Detailed information see above or in the documentation of the Layersets and Sources).
For this example, the above mentioned steps were performed to add the Layerset “World” [2] with the instance “osm”. Now we add the instance “GEBCO” in this Layerset. To use the thematic grouping we create a new Layerset named “Project NRW” [3] and load the two instances “DTK50 NRW” and “Forest NRW” into our new Layerset “Project NRW”.
The Layerset should now contain three Layersets. The Overview [1] for the overview map, the World-Layerset [2] with the world-/ Germany-wide data and the Project NRW Layerset [3] with the two regional data sets from NRW.
Now we configurate the map element to display the Layersets in the map. To do this we switch to the tab “layout” and edit the feature in the content area. It is now important that you set an active checkbox in the Layerset “World” AND Layerset “Project NRW” [1], so that they appear later in the application. If you have questions for further configuration of the map, you can view the documentation of the map element.
The last step is the creation of the Layertree itself. The instances in the map element can be defined in more detail via the Layertree. For a general understanding of the functions and introduction tutorial to create a Layertree please note the already declared settings in the workflow for the simple Layertree.
For the thematic Layertree we bind the element to the sidebar. For the integration into the Sidepane sector the element needs the type Element [6].
If the option Thematic layer is disabled the Layertree ignores the configured Layersets and shows the individual instances without thematic structuring in the main level. However, we want to show the layers of our thematic Layersets, so we activate the function Thematic layer [1]. Since we inserted both Layersets into the map element of the application, they are now displayed under the Themes-area.
Thus, to let the themes in the application appear as you want, there are several configuration options:
| [1] View theme: | If this option is set, the Layerset appears as an additional level . If this option is not set, the defined instances are displayed in the main level. |
|---|---|
| [2] Theme open or closed: | |
| If this option is set (symbol of the open folder), the theme in the Layertree is automatically opened or closed. | |
| [3] Theme source visibility: | |
| If this option is set, the “Show/ Hide source”-button is added in the Layertree. | |
| [4] Theme layer visibility: | |
| If this option is set, the “Activate all Layers”-button is added in the Layertree. |
If we keep the default settings in the Theme Set “World” and activate the other options in the Theme Set “Project NRW”, the configuration of the element will look like this:
Now we have the Layersets integrated as thematic groups. By configuring the thematic layer, the Layertree appears now like this:
The Layerset “World” is displayed as a theme, but it is not open and the two buttons are not available. In the Layerset “Project NRW” the theme is shown unfolded upon opening the application. The button for displaying/ hiding the source is available and all layers can be activated via a button.
YAML-Definition:¶
title: layertree # title of layertree
target: ~ # Id of the Map element to query
type: ~ # type of layertree, element or dialog
displaytype: tree # only tree in 3.0, future will offer list
useAccordion: false # accordion element, default is false
autoOpen: false # true/false open when application is started, default is false
titleMaxLength: 20 # max length of layer title, default is 20
showBaseSource: true # show base layer, default is true
showHeader: true # shows a headline which counts the number of services
menu: [opacity,zoomtolayer,metadata,removelayer] # show contextmenu for the layer (like opacity, zoom to layer, metadata, remove layer), default is menu: []
You can optionally use a button to show this element. See Button for inherited configuration options. You also can define the layertree with a type element. Then you can display the layertree in a frame like the sidebar.
Class, Widget & Style¶
- Class: Mapbender\CoreBundle\Element\Layertree
- Widget: mapbender.element.layertree.js
- Style: mapbender.elements.css
HTTP Callbacks¶
None.
JavaScript Signals¶
None.


Raspberry Pi Internet 'Thing' Part 3
Hello world! Welcome to my internet thing!
Web view:
Fixed view with pad control
Fixed view with glove control
Mobile view:
Plain view NO controls
Plain view with glove controls
VR 360
VR 360 with glove controls
LED
view/driver/full
view/cardboard
view controller raw
view/web-bluetooth-get
view/web-bluetooth-get2
view/web-bluetooth-get3
view/web-bluetooth-rename
view/web-bluetooth-demo2


{% extends "sentry/emails/base.html" %} {% load i18n %} {% block main %}
{{ provider.name }} Single Sign-On has been disabled for the {{ organization.name }} organization.
{% if has_password %}You can now login using your email {{ email }}, and password. If you forgot your password you can always reset it.
{% else %}You can now login using your email {{ email }}, however you'll first have to set a password for your account.
{% endif %}SSO was disabled by {{ actor.email }}
{% endblock %}


By Rowan Weir, Daniel Barnas, Allan Schougaard
The 2htdp/image and picturing-programs libraries provide built-in functions and primitives that allow you to produce simple graphics and even build complex illustrations.
The functions available in these libraries can be placed into a few broad categories for easier understanding and use, as you can see in the table of contents on the left.
To download and install DrRacket on your computer, please visit this link.
To use the code in this chapter include this line in your program before any other source code:
(require 2htdp/image)
(require picturing-programs)
Let's start with a basic circle, one of the easiest shapes to create.
A circle only requires three parameters: size
, mode
, and color
.
We will see these parameters and this format repeated in the construction of other shapes, but what differentiates a circle is that the size is defined by the radius.
The radius is given as a number, denoting how many pixels used, which is typical for how size is defined in Racket.
The mode and color parameters don't change much between shapes, with mode
describing whether the circle should be solid or an outline, and color
, which we will discuss more in depth a little later.
(circle size mode color) → Image
What circle will be created with the following?
(circle 80 "solid" "red")
Try for yourself by clicking this button:
Was this your result?
As expected, the resulting image is that of a solid red circle.
If we switch the mode
to "outline," we get the following:
(circle 80 "outline" "red")
Two functions that will come in handy when dealing with graphics are image-height
and image-width
.
Their signatures are as follows:
(image-height img) → number (height in pixels)
(image-width img) → number (width in pixels)
Circles are easy to create because their radius is the same in all directions.
What if instead we wanted to draw an elongated circle, or an ellipse?
The ellipse
function is very similar to that of a circle, except that we need to specify a width and a height.
(ellipse width height mode color) → Image
Let's try creating an ellipse:
(ellipse 200 100 "solid" "pink")
What do we get?
Polygons are shapes consisting of any number (>= 3) of straight sides. Creating them in Dr. Racket involves a process that is similar to how we made our previous rounded shapes. Let's look at some of them in more detail.
Like a circle, the square
function requires a size.
In this case, the given numerical value specifies the length of a side.
This is followed by the mode
and color
, as before.
(square side-length mode color) → Image
Here's an example:
(square 150 "solid" "blue")
Try It
And here's what is created:
What about a square with a different mode?
(square 150 "outline" "blue")
Try It
By now the general outline for the functions used to define shapes should be becoming familiar.
Can you guess what parameters might be needed to create a rectangle?
(rectangle width height mode color) → Image
(rectangle 225 125 "solid" "green")
Try It
There are several varieties of triangles you can create with Dr. Racket.
We are going to cover two: equilateral triangles and right triangles.
Equilateral triangles have three sides of equal length, and whose three angles, by extension, are also equal.
To produce an equilateral triangle, you simply specify the desired side length, followed by the usual mode and color parameters.
(triangle side-length mode color) → Image
For example:
(triangle 150 "solid" "yellow")
Try It
A right triangle contains a 90 degree angle.
To construct a right triangle, you provide the two side-lengths of the sides adjacent to the right angle.
(right-triangle side-length-1 side-length-2 mode color) → Image
(right-triangle 200 100 "solid" "orange")
Try It
There are several functions that produce star designs.
A traditional five-pointed star can be created with the star
function.
(star side-length mode color) → Image
Here is an example:
(star 100 "solid" "purple")
The radial-star
function is a bit more complicated, but produces a design of greater intricacy.
(radial-star point-count inner-radius outer-radius mode color) → image
The point-count
is a numerical value that determines how many points you'd like your star to have.
The inner-radius
creates the radius of the body of the star, where the wide end of the points connect.
The outer-radius
produces the distance that each outer point of the star reaches.
The mode
and color
arguments are the same as for all the shapes above.
(radial-star 15 50 25 "solid" "violet")
There is one more type of star we can construct, and that is the star made out of polygons.
The star-polygon
is almost exactly the same as a regular polygon, except that it takes one more argument, the step-count
.
Instead of each vertex connecting to the one next to it, it instead connects to the vertex that is step-count
vertices away, creating a star-like design.
(star-polygon side-length side-count step-count mode color) → Image
Here's an example:
(star-polygon 50 10 3 "outline" "indigo")
If you want to construct shapes with more than three or four sides, you can use the regular-polygon
function.
With this function, you can construct regular polygons with any number of sides, and of any side length.
This is how we construct pentagons, hexagons, octagons or any other many-sided shape.
(regular-polygon side-length side-count mode color) → Image
(regular-polygon 20 8 "solid" "palegreen")
If you want to add words to your images, text can be created with the text
function, which requires a string of characters, a font size, and a color.
(text string font-size color) → Image
Note that text
returns an Image, not a String.
(text "Earth" 50 "lightskyblue")
More detailed and stylized text formatting can be accomplished by using the text/font
function.
It takes a variety of parameters that allow you to control individual aspects of how your text looks.
(text/font string font-size color face family style weight underline?) → Image
(text/font "Mars" 50 "hotpink" false "system" "normal" "bold" true)
(text/font "Venus" 50 "gold" false "roman" "italic" "normal" false)
So far, the colors we have been using are in the form of strings such as "blue", "red", or "turquoise." These are predefined colors in the Racket color database. For a full list of predefined colors you can use when creating graphics, see this document.
But what if you want to use a color that hasn't been predefined? The 2htdp/image library has a function that allows us to create almost any color imaginable.
On your screen, all colors are comprised of varying levels of red, green, and blue.
Racket, like most computer graphics systems, uses colors created from these three channels.
The value of each level of color is a whole number that ranges from 0 to 255.
To produce black, you would set each channel (red, green, and blue) to 0.
To produce white, you would set all channels to 255.
Every other possible color is a mix of the three primary colors.
Using the function make-color
, we can create a color by specifying these RGB channels.
(make-color red green blue) → Color
Let's see an example:
(circle 75 "solid" (make-color 64 224 208))
Does your result look like this?
There is a fourth possible input parameter for the function make-color
: alpha
.
The alpha
determines the opacity (or transparency) of the color.

The closer you get to 0, the more transparent your color becomes.
(make-color red green blue alpha) → Color
If we take our previous circle and add an alpha of 50, what do we get?
(circle 75 "solid" (make-color 64 224 208 50))
Experiment with different values for red, green, blue, and alpha in the example above to get an idea for how you make different colors.
If you want to make changes to one of Dr. Racket's predetermined colors, the picturing-programs library provides a function that can help.
The name->color
function accepts the name of a color, like those found in the color database, and returns the numerical values of the RGB and alpha channels.
Let's Try It out with a color from the database.
What values of red, green, and blue make up the color "plum?"
(name->color "plum")
What are the values of red, green, and blue that make up the color "aqua?" Let's find out:
(name->color "aqua")
As you can see, the output of this function looks familiar.
(make-color 221 160 221 255)
name->color
is unusual among functions we've learned up to this point because it returns a function.
In fact, it returns the same function that we would call in order to create the color "aqua".
So far we have learned how to create various shapes and images, but we haven't attempted to alter them in any way.
The htdp/image and picturing-programs libraries provide a large selection of editing tools that we can use on existing images.
Let's start this section by bringing in an image from an external source.
In Dr. Racket, you can insert actual images directly into your code by copying and pasting, or you can use the Insert menu.
To bring an outside image into your program, open the Insert menu at the top of the screen.
From there, select 'Insert Image ...'.
Pick the image file you would like to add from the directory prompt appears.
Upon opening the file, the image should appear where the cursor is located.
Once the image is inside your program, you can move your image to where you need it in your code by copying and pasting as normal.
You can also manipulate the image with one of the functions that allow you to alter or change an image.
Functions in this category include:
rotate
: spins an image a specified number of degreesflip
: flips an image across an axisscale
: enlarges or shrinks an imagecrop
: removes part of an imageframe
: places a box/frame around an image
In order to try these out, we'll create an image constant called moon
.
This will make it easier to do different things wth the image without having to copy and paste it each time.
(define moon
)
It's a good practice to define your images as constants, especially if you are using multiple images in a program.
They can then be combined to create elaborate scenes and pictures.
Let's do the same thing with a few other images we might want to use:
(define venus
)
(define earth
)
(define mars
)
(define saturn
)
(define jupiter
)
(define neptune
)
Try It
From now on in our code, we can refer to any of these images by the constants assigned.
Before we learn more about these editing functions, let's talk about how images can serve as arguments to functions.
In this case, we will use the constant we created up above with the image-height
and image-width
functions.
If a function takes an argument of the image datatype, then any code that returns an image should work equally well as an argument.
Take a look at this code, for example.
(image-height (circle 15 "red" "solid"))
Racket first creates image of a circle, and then feeds it directly into the image-height
function.

This will come in handy shortly when we want to edit and combine images.
The first editing tool we will explore is the rotate
function.
Rotate has two parameters:
(rotate angle image) → Image
This function rotates an image in the counterclockwise direction by the number of degrees specified.
Let's Try It on the moon
:
(rotate 90 saturn)
You can also rotate images in the clockwise direction using a variation of rotate
, the rotate-cw
function.
(rotate-cw 60 saturn)
We also have the option to scale an image to make it larger or smaller.
The scale
function has two parametes:
(scale factor image) → Image
The scale factor
is the amount by which an image is either increased or decreased.
A number between 0 and 1 will result in an image smaller than the original, and a number larger than 1 will result in an image larger than the original.
Let's see this in action:
(scale 0.5 neptune)
(scale 2 neptune)
There are two versions of the flip
function.
flip-horizontal
flips an image across the horizontal axis for a mirror image of your original image.
flip-vertical
flips the image across the vertical axis.
Each of these functions take only the image you want to manipulate.
(flip-horizontal jupiter)
(flip-vertical jupiter)
The last of the major editing functions is the crop
function.
There are a few variations of this function, which more precisely define how the image should be altered.
They include:
crop-top
, crop-bottom
, crop-left
, crop-right
.crop/align
crop
(crop-top image number-of-pixels) → Image
(crop-bottom image number-of-pixels) → Image
(crop-left image number-of-pixels) → Image
(crop-right image number-of-pixels) → Image
These functions work by cropping the specified section of a given image by the given number of pixels.
For example:
(crop-right moon 125)
The placement functions control where, and in what order, images appear.
You can think of these functions as having few major types, then some variations on each type.
Major types include:
above
beside
overlay
underlay
place-image
Like the editing functions, the placement functions have variations that allow greater specificity and level of control over where the image appears.
/align
uses x and y coordinates to determine at what point the images are aligned./offset
moves the image a certain amount on the x and y axes./xy
is similar but the images begin aligned at the top right (not the center).
In this section, we are going to utilize our knowledge from what we've done previously in combination with new placement functions to build an image.
We have a couple options to place multiple images in a scene.
The function above
takes a series of images, and places the first above the other in sequence.
(above image1 image2 ...) → Image
(above earth moon)
See how this function stacks everything vertically?
To order our images horizontally, we can use the beside
function.
(beside image1 image2 ...) → Image
This function returns your images ordered left to right.
(beside mars neptune)
above
and beside
functions have a variation we can call /align
.
(above/align x-place image1 image2 ...) → Image
(beside/align y-place image1 image2 ...) → Image
Take a look at the first parameter for each of these functions.
above/align
requires a string that specifies a place on the x-axis, such as "right" or "left", while beside/align
requires a place on the y-axis like "top" or "bottom".
You might notice these are the same options available for the crop
function.
It might become more apparent when you see these functions in action.
(above/align "right" venus saturn)
Experiment with the beside/align
function and see how it differs.
So far in this section, we have used images we brought in from an external source.
Let's try using the placement functions to build an image from shapes in the htdp/image library.
Specifically, a star.
First, we need to create some shapes.
You can create any shapes you want, in any size and color, but here's what we are going to be working with in our example.
You may want to stick close to the example this first time through and get more creative later.
(radial-star 8 40 10 "solid" "mediumslateblue")
(rotate 18 (radial-star 15 50 30 60 "mediumslateblue"))
(circle 30 80 "mediumslateblue")
(circle 25 100 "mediumslateblue")
What we want to do is place these images on top of each other.
The overlay
function allows us to do exactly that.
(overlay image1 image2 ...) → Image
With overlay
, objects appear directly on top of one another, with the first listed being the top-most visible one, through to the last on the bottom.
Let's Try It out. Don't forget to name your image so that its easier to use later.
(define purple-star
(overlay
(radial-star 8 40 10 "solid" "mediumslateblue")
(rotate 18 (radial-star 15 50 30 60 "mediumslateblue"))
(circle 30 80 "mediumslateblue")
(circle 25 100 "mediumslateblue")
)
)
What does the result look like?
Now, overlay
is not the only way to stack shapes and images.
underlay
is another option.
(underlay image1 image2 ...) → Image
In addition to having a similar template, this function operates very similarly, but in reverse order, with the first image listed appearing underneath all others.
Let's Try It out by making another flower.
(define blue-star
(underlay
(rotate 18 (radial-star 30 45 25 100 "powderblue"))
(rotate 22.5 (regular-polygon 17 8 100 "violet"))
(circle 15 100 "lavender")
(circle 8 "solid" "skyblue")
(radial-star 10 10 5 "solid" "linen")
)
)
Here is what it looks like:
Do you see how the order of layers is reversed, as opposed to overlay
?
overlay
and underlay
to see how a square with a side length of 150 compare to a circle with a radius of 80 (from the first section)
Now we have two stars.
We want to create a scene with them and some of our previous images.
There are many options for placing our images in a scene.
But to do so, we are going to need to create a background on which to place them.
The empty-scene
function creates an outlined rectangle, a 'scene' on which to place things.
(empty-scene width height color)
If you don't include a color, the scene will default to white.
But we probably want to use something a bit more detailed.
(define sky
)
To do this, we can use overlay, underlay, or one of their many variations:
(overlay/align x-place y-place image1 image2 ...) → Image
(overlay/offset image1 x y image2) → Image
(overlay/align/offset x-place y-place image1 x y image2) → Image
(overlay/xy image1 x y image2) → Image
As you can see, much like
(underlay/align x-place y-place image1 image2 ...) → Image
(underlay/offset image1 x y image2) → Image
(underlay/align/offset x-place y-place image1 x y image2) → Image
(underlay/xy image1 x y image2) → Image
above
and beside
, overlay/align
and underlay/align
use an x-place and y-place to specify where to place an image in relation to another one.
However, these functions require both an x and y place.
overlay
and underlay
also have some variations we haven't encountered before.
The /offset
variation actually works similarly to that of /align
, but instead of using a place on a particular axis, the function takes a numerical value.
Given this fact, what do you think /align/offset
might do?
The /xy
variation may look similar to the previous functions, but it does something quite different.
Instead of determining the amount by which the image is offset or aligned on a particular axis, the x and y positions exactly place the image at those coordinates.
Now, there is one more major placement function we haven't covered: place-image
.
(place-image image x y scene) → Image
(place-image/align image x y x-place y-place scene) → Image
place-image
, like overlay/xy
, uses an x and a y coordinate to place an image.
The image is placed with the center at the specified coordinates.
Unlike overlay/xy
, however, place-image
crops the image so that fits within the background or scene.
We will use place image to create our final image:
(place-image saturn 450 125
(overlay/xy (scale 0.5 venus) -50 -200
(underlay/align "middle" "bottom"
(overlay/offset purple-star -200 -125 sky)
blue-star
Once everything is put together we have a full picture.
You can save your "masterpieces" to a file using the save-image function:
(save-image (circle 50 "outline" "red") "red-circle.png")
This will create a file called red-circle.png
in your home folder
(in Windows that may be C:\Users\<user name>
or C:\Users\<user name>\Documents)
.
If you want to read in an image from file, you can do that with:
(bitmap "red-circle.png")
Depending on your system, you may have to add a full path to the file name (in Windows: C:\Users\<user name>\red-circle.png
.
Using what we've learned in this chapter, design a smiley face. Try various facial expressions. For an added challenge, try to make the smiley's color match your skin color by playing with the RGB values.
Use the tools from this chapter to create an image of the United States flag. Try to be as accurate as possible. After that, try to replicate some other world flags. (For really intricate shapes, do your best to approximate them using basic shapes.)
We are grateful being able to stand of the shoulder of giants: Stephen Bloch, Mattihias Felleisen, Robert Bruce Findler, Matthew Flatt and Shriram Krishnamurthi. Theirs works: Picturing Programs (http://picturingprograms.com) and How to Design Programs (https://htdp.org) will make generations better programmers.
We are also grateful for being able to use images available at freepngs.com.


House hunting can be a daunting experience given there is so much information to consider. rhousehunter
aims to simplify the information collection process for end-users with four simple function syntax in R.
This document will show you how to use the functions of rhousehunter
package to gather rental information on Craiglist with ease.
The first function in our package is the scraper()
. Here you will input a Craigslist housing url for the main housing and apartment rentals page of Craigslist BC and designate the argument online = TRUE
to scrape directly from the internet. When online = FALSE
the scraper function will scrape from a local HTML file, this may be handy if the Craigslist website is down or for internal development and test. Please note that you cannot input the url for an individual listing.
url <- "https://vancouver.craigslist.org/d/apartments-housing-for-rent/search/apa"
scraped_data <- scraper(url, online = FALSE)
head(scraped_data)
#> # A tibble: 6 x 3
#> listing_url price house_type
#> <chr> <chr> <chr>
#> 1 https://vancouver.craigslist.org/bnc/apa/d/burnaby-must-see~ $1,250 1br-600ft~
#> 2 https://vancouver.craigslist.org/rds/apa/d/surrey-bedroom-b~ $1,300 2br-
#> 3 https://vancouver.craigslist.org/van/apa/d/vancouver-furnis~ $1,850 1br-500ft~
#> 4 https://vancouver.craigslist.org/van/apa/d/vancouver-yaleto~ $3,695 2br-900ft~
#> 5 https://vancouver.craigslist.org/van/apa/d/vancouver-bed-ba~ $2,390 2br-748ft~
#> 6 https://vancouver.craigslist.org/van/apa/d/cozy-bedroom-apa~ $1,675 1br-500ft~
Our data_cleaner()
function is straightforward and powerful tool. It turns the tibble with data generated by the scraper()
function into a clean and tidy tibble object. It has a single input, which is the output of the scraper()
function.
cleaned_data <- data_cleaner(scraped_data)
head(cleaned_data)
#> # A tibble: 6 x 5
#> listing_url price num_bedroom area_sqft city
#> <chr> <int> <int> <int> <chr>
#> 1 https://vancouver.craigslist.org/bnc/apa/d~ 1250 1 600 burna~
#> 2 https://vancouver.craigslist.org/rds/apa/d~ 1300 2 NA surrey
#> 3 https://vancouver.craigslist.org/van/apa/d~ 1850 1 500 vanco~
#> 4 https://vancouver.craigslist.org/van/apa/d~ 3695 2 900 vanco~
#> 5 https://vancouver.craigslist.org/van/apa/d~ 2390 2 748 vanco~
#> 6 https://vancouver.craigslist.org/van/apa/d~ 1675 1 500 <NA>
The filter()
function allows you to filter the cleaned data to find the rentals meeting your specifications. The inputs of this function include: the tibble object generated by data_cleaner()
, along with the numeric values for the minimum price, maximum price, minimum square feet, minimum number of bedrooms, and a string of the city name of the desired rentals. It outputs a tibble object with the matching results.
filtered_data <- data_filter(cleaned_data,
min_price = 1000,
max_price = 2000,
sqrt_ft = 500,
num_bedroom_input = 1,
city_input = 'Vancouver')
filtered_data
#> # A tibble: 44 x 5
#> listing_url price num_bedroom area_sqft city
#> <chr> <int> <int> <int> <chr>
#> 1 https://vancouver.craigslist.org/van/apa/~ 1850 1 500 vanco~
#> 2 https://vancouver.craigslist.org/van/apa/~ 1675 1 500 <NA>
#> 3 https://vancouver.craigslist.org/van/apa/~ 1700 3 NA vanco~
#> 4 https://vancouver.craigslist.org/van/apa/~ 1575 1 500 <NA>
#> 5 https://vancouver.craigslist.org/van/apa/~ 1550 1 500 <NA>
#> 6 https://vancouver.craigslist.org/van/apa/~ 2000 2 850 vanco~
#> 7 https://vancouver.craigslist.org/bnc/apa/~ 1450 1 900 <NA>
#> 8 https://vancouver.craigslist.org/rds/apa/~ 1500 2 NA <NA>
#> 9 https://vancouver.craigslist.org/van/apa/~ 1650 1 NA vanco~
#> 10 https://vancouver.craigslist.org/nvn/apa/~ 1750 1 505 vanco~
#> # ... with 34 more rows
At this stage, you can choose to email your filtered results in a .csv
. You will need to input the email address you wish to send the results to and the filtered tibble object. You also have the choice to change the optional email_subject
argument to set your email subject. After the function runs through smoothly without error, you should also receive an email from<EMAIL_ADDRESS>in your chosen email’s inbox.
send_email(email_recipient =<EMAIL_ADDRESS>filtered_data = filtered_data,
email_subject = 'Results from RHouseHunter')
We do hope rhousehunter
makes your house hunting process easier.


Instrument Package¶
|
Instruments¶
|
Object representation of a commodities swap |
|
Object representation of an Equity Cliquet |
|
Object representation of an equity forward |
|
Instrument definition for equity option |
|
Instrument definition for equity synthetics |
|
Instrument definition for equity variance swap |
|
Forward cash payment |
|
Object representation of a FX binary option |
|
Object representation of an FX forward |
|
Object representation of an FX multi-cross binary |
|
Object representation of a single leg of a multi-cross binary option |
|
Object representation of an FX option |
|
Object representation of an FX Vol Swap |
|
A vanilla inflation swap of fixed vs floating cashflows adjusted to an inflation rate |
|
A single currency exchange of cashflows from different interest rate indices |
|
Object representation of an interest rate cap |
|
Object representation of a constant maturity option (cap, floor, straddle) |
|
Object representation of a constant maturity option strip (cap, floor, straddle) |
|
Object representation of a constant maturity spread option (cap, floor, straddle) |
|
Object representation of a constant maturity spread option strip (cap, floor, straddle) |
|
Object representation of an interest rate floor |
|
A vanilla interest rate swap of fixed vs floating cashflows |
|
Object representation of a swaption |
|
An exchange of cashflows from different interest rate indices |
|
An exchange of fixed cashflows in different currencies |
|
An exchange of fixed vs floating cashflows in different currencies |
|
A security, specified by a well-known identifier |


How to use and write plugins for Babel
Highly experimental
Internal APIs are still in a high state of flux. If you find something that is not documented on this page then you're at risk of it changing without notice.
Incomplete
Pull requests expanding on existing or adding additional documentation are extremely appreciated.
Plugins are resolved relative to the current working directory.
require("babel").transform("code", {
plugins: ["foo-bar"]
});
CLI:
$ babel --plugins foo-bar script.js
{
"plugins": ["foo-bar"]
}
By default, plugins are ran before the internal ones. You can alternatively specify the position via a colon after the plugin name. ie:
require("babel").transform("code", {
plugins: ["foo-bar:after", "bar-foo:before"]
});
$ babel --plugins foo-bar:after bar-foo:before script.js
The Babel parser is heavily based on Acorn which makes use of the extremely common and versatile ESTree AST format:
package.json
{
"name": "babel-plugin-foo",
"version": "1.0.0",
"dependencies": {
"babel-core": "^5.0.0"
}
}
index.js
module.exports = function (babel) {
return new babel.Transformer("foo-bar", {
// visitors
});
};
You can find a simple plugin example as well as usage in the sebmck/babel-plugin-example repo.
How to visit nodes
How to remove and replace nodes
How to use scoping and track variables


It’s Love Your Body Day! [ http://feministcampus.org/blog/index.php/2013/10/15/roundtable-happy-love-your-body-day/ ]
[ http://feministcampus.org/blog/index.php/tag/meet-the-team/ ]vote [ http://feministcampus.org/blog/index.php/2013/10/15/roundtable-happy-love-your-body-day/ ]
Today is the 15th annual Love Your Body Day [ http://loveyourbody.nowfoundation.org/ ]! The Campus Team commemorated the occasion on our blog [ http://feministcampus.org/blog/index.php/2013/10/15/roundtable-happy-love-your-body-day/ ] by exploring what “body love” really means to them, as well as reflecting on their own struggles with body images and journeys to body empowerment.
Loving our bodies is a political revolution; every day, women face messages that their bodies are “inadequate,” “imperfect,” or need alteration or fixing.
Our deepest hope is that you spend this day reflecting on just how awesome you (and your body!) are, and in that spirit we’re inviting you to share your stories on our LYBD blog post and roundtable [ http://feministcampus.org/blog/index.php/2013/10/15/roundtable-happy-love-your-body-day/ ] and download our LYBD postcard [ http://feministcampus.org/blog/wp-content/uploads/2013/10/love-yr-body-card.pdf ] to share the love. (You can also join today’s conversation on Twitter using the tag [ http://twitter.com/search?q=%23LYBD&src=typd ]!)
[ https://www.facebook.com/feministcampus ] [ https://twitter.com/feministcampus ] [ http://feministcampus.tumblr.com/ ] [ http://instagram.com/feministcampus ] [ https://www.youtube.com/feministcampus ] [ http://feministcampus.org/blog ] [ http://feministcampus.org ]
1600 Wilson Boulevard, Suite 801, Arlington, VA, 22209 |<PHONE_NUMBER> |<EMAIL_ADDRESS>You have received this e-mail because of your interest in women’s issues.
To unsubscribe, please click here. [ http://org.salsalabs.com/o/1400/p/salsa/supporter/unsubscribe/public/index.sjs?unsubscribe_page_KEY=494 ]


{%extends 'base.html'%} {% block content %} {% if user.is_authenticated %}
Food
Quench your thirst with some cold Lemon Water
Accra, Ghana
Explore the endless possibilities!


Instructions for Sole Proprietors
BC resident + is in B.C. + eligible for a BC Services Card
- A Photo BC Services Card
- Witness of Signature Attestation Form
- Witness of Signature Attestation Form
- Consent for Cannabis Security Screening Form
- If you don’t have a card, see [URL] for instructions on getting one
-
Print the Witness of Signature Attestation Form and the Identity Verification Attestation Form. Do not
complete either form. They must be completed by a Service BC representative.
-
Complete all fields on the Consent for Cannabis Security Screening Form except the signature and the date,
then print the form. A Service BC representative must witness you completing the signature and date fields.
- Bring your forms and Photo BC Services Card
-
A Service BC representative will process your documents and send them to the Liquor and Cannabis Regulation
Branch.
BC resident + is in B.C. + isn’t eligible for a BC Services Card
- Witness of Signature Attestation Form
- Identity Verification Attestation Form
- Consent for Cannabis Security Screening
- A piece of government-issued ID that contains your name, photo, date of birth and signature
-
A piece of secondary ID that contains your name and signature. The name must be imprinted and exactly match
the name on your government-issued ID
-
Print the Witness of Signature Attestation Form and the Identity Verification Attestation Form. Do not
complete either form. They must be completed by a Service BC representative.
-
Complete all fields on the Consent for Cannabis Security Screening Form except the signature and the date,
then print the form. A Service BC representative must witness you completing the signature and date fields.
- Bring your forms and Photo BC Services Card
-
A Service BC representative will process your documents and send them to the Liquor and Cannabis Regulation
Branch.
Canadian resident (non-B.C.) + is in B.C.
- Witness of Signature Attestation Form
- Identity Verification Attestation Form
- Consent for Cannabis Security Screening
- A piece of government-issued ID that contains your name, photo, date of birth and signature
-
A piece of secondary ID that contains your name and signature. The name must be imprinted and exactly match
the name on your government-issued ID
-
Print the Witness of Signature Attestation Form and the Identity Verification Attestation Form. Do not
complete either form. They must be completed by a Service BC representative.
-
Complete all fields on the Consent for Cannabis Security Screening Form except the signature and the date,
then print the form. A Service BC representative must witness you completing the signature and date fields.
- Bring your forms, government-issued ID and secondary piece of ID
-
A Service BC representative will process your documents and send them to the Liquor and Cannabis Regulation
Branch.
Canadian resident (non-BC) + isn’t in B.C.
- Witness of Signature Attestation Form
- Identity Verification Attestation Form
- Consent for Cannabis Security Screening
- A piece of government-issued ID that contains your name, photo, date of birth and signature
-
A piece of secondary ID that contains your name and signature. The name must be imprinted and exactly match
the name on your government-issued ID
-
Print the Witness of Signature Attestation Form and the Identity Verification Attestation Form. Do not
complete either form. They must be completed by a police station clerk.
-
Complete all fields on the Consent for Cannabis Security Screening Form except the signature and the date,
then print the form. A police station clerk must witness you completing the signature and date fields.
- Scan the front and back of your government-issued and secondary pieces of ID. Print the scans.
- Bring your forms and your original two pieces of ID.
-
Ask a police station clerk to:
- Conduct a verification of both pieces of ID
- Make sure your information on the Consent for Cannabis Security Screening Form matches your ID
- Witness you sign and date the Consent for Cannabis Security Screening Form
- Complete the Identity Verification Attestation Form
- Complete the Witness of Signature Attestation Form
- Request a Police Information Check (PIC). Don’t open your PIC when you receive it.
- Email your forms and scans of your ID to<EMAIL_ADDRESS>Include your name in the subject line.
-
Mail your unopened Police Information Check to the Liquor and Cannabis Regulation Branch
- Mail your unopened Police Information Check to the Liquor and Cannabis Regulation Branch
-
Mailing address:
Attn: Licensing Department
Liquor and Cannabis Regulation Branch
PO Box 9292 Stn Provincial Govt.
Victoria, BC V8W 9J8
International Resident + is in B.C.
- Witness of Signature Attestation Form
- Identity Verification Attestation Form
- Consent for Cannabis Security Screening form
- Your passport
-
Another piece of government-issued ID that contains your name and signature. The name must be imprinted and
exactly match the name on your passport.
-
The Reference Number of your cannabis retail store licence application (6-digit number found on your
application payment receipt and in an email sent to you
-
Print the Witness of Signature Attestation Form and the Identity Verification Attestation Form. Do not
complete either form. They must be completed by a Service BC representative.
-
Complete all fields on the Consent for Cannabis Security Screening Form except the signature and the date,
then print the form. A Service BC representative must witness you completing the signature and date fields.
- Bring your forms, passport and government-issued ID
-
A Service BC representative will process your documents and send them to the Liquor and Cannabis Regulation
Branch
-
Request a Criminal Record Check from your country of residency. If the Criminal Record Check isn’t going to
be in English, request two copies.
-
When you receive your Criminal Record Check, don’t open it. If you’ve asked for two copies, leave one of them
unopened. You’ll need to open the other one so it can be translated.
-
If your Criminal Record Check isn’t in English, have the opened copy translated into English. The translator
must be admitted to a professional association. Do not open the translated copy when you receive it.
- Include a note indicating the Reference Number of your cannabis retail store licence application
-
Mail your unopened Police Information Check to the Liquor and Cannabis Regulation Branch
- Mail your unopened Police Information Check to the Liquor and Cannabis Regulation Branch
-
Mailing address:
Attn: Licensing Department
Liquor and Cannabis Regulation Branch
PO Box 9292 Stn Provincial Govt.
Victoria, BC V8W 9J8
International Resident + isn’t in B.C.
- Witness of Signature Attestation Form
- Identity Verification Attestation Form
- Consent for Cannabis Security Screening Form
- Your passport
-
Another piece of government-issued ID that contains your name and signature. The name must be imprinted and
exactly match the name on your passport.
-
The Reference Number of your cannabis retail store licence application (6-digit number found on your
application payment receipt and in an email sent to you)
- Scan the front and back of the ID page in your passport. Print the scan.
- Scan the front and back of your government-issued ID. Print the scan.
-
Print the Identity Verification Form. Do not complete the form. It must be completed by a police station
clerk.
-
Print the Witness of Signature Attestation Form. Do not complete the form. It must be completed by a police
station clerk, a lawyer or notary.
-
Complete all fields on the Consent for Cannabis Security Screening Form except the signature and the date,
then print the form. A police station clerk, lawyer or notary must witness you completing the signature and
date fields.
-
Visit a local police station with the Identity Verification Attestation Form, your passport and your
government-issued ID
-
Ask a police station clerk to:
- Conduct an in-person verification of your passport and government-issued ID
- Complete the Identity Verification Attestation Form
-
Visit a local police station, lawyer or notary with:
- Your passport
- Your government-issued ID
- Witness of Signature Attestation Form
- Consent for Cannabis Security Screening Form
-
Ask the police station clerk, lawyer or notary to:
-
Verify that the information on your Cannabis Security Screening Form matches the information on your
passport and government-issued ID
- Witness you sign and date the Consent for Cannabis Security Screening Form
- Complete the Witness of Signature Attestation Form
-
Request a Criminal Record Check from your country of residency. If the Criminal Record Check isn’t going to
be in English, request two copies.
-
When you receive your Criminal Record Check, don’t open it. If you’ve asked for two copies, leave one of them
unopened. You’ll need to open the other one so it can be translated.
-
If your Criminal Record Check isn’t in English, have the opened copy translated into English. The translator
must be admitted to a professional association. Do not open the translated copy when you receive it.
-
Email your forms and scans of your ID to<EMAIL_ADDRESS>Include your name in the subject line.
- Identity Verification Attestation Form
- Witness of Signature Attestation Form
- Consent for Cannabis Security Screening Form
- The scan of your passport’s ID page
- The scan of the front and back of your government-issued ID
-
Mail your original, unopened Criminal Record Check and unopened translated copy to the Liquor and Cannabis
Regulation Branch
- Include a note indicating the Reference Number of your cannabis retail store licence application
-
Mailing address:
Attn: Licensing Department
Liquor and Cannabis Regulation Branch
PO Box 9292 Stn Provincial Govt.
Victoria, BC V8W 9J8


--- layout: mocks title: Subject History -- Complex Waves --- Subject History 📖🎢 Complex Waves Describe the composition of complex sounds. 👂🏿 Follow 💬 Talk 🌳 Edit 2018 May 12 eileen updated the description to: Describe the composition of complex sounds. 2018 May 12 doris created this subject.
Subject History 📖🎢
Describe the composition of complex sounds.
2018 May 12
eileen updated the description to:
doris created this subject.