Docker is growing with amazing features, and it becomes a platform to deploy services even in embedded linux enviroment. There are different ways to install docker, one approach is to install using the pre-built binary distribution.
The following post shows what I did under ubuntu 16.04.
Let’s go through some basic steps:
Prerequistes
A 64-bit installation
Version 3.10 or higher of the Linux kernel. The latest version of the kernel available for you platform is recommended.
iptables version 1.4 or higher.
git version 1.7 or higher.
A ps executable, usually provided by procps or a similar package.
XZ Utils 4.9 or higher.
a properly mounted cgroupfs hierarchy; a single, all-encompassing cgroup mount point is not sufficient. See Github issues #2683, #3485, #4568).
iot@sgbu-ucs-11:/nobackup/docker/docker-1.13.1$ uname -a
Linux sgbu-ucs-11 4.4.0-53-generic #74-Ubuntu SMP Fri Dec 2 15:59:10 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
iot@sgbu-ucs-11:/nobackup/docker/docker-1.13.1$iptables --version
iptables v1.6.0
iot@sgbu-ucs-11:/nobackup/docker/docker-1.13.1$ git --version
git version 2.7.4
iot@sgbu-ucs-11:/nobackup/docker/docker-1.13.1$ which ps
/bin/ps
iot@sgbu-ucs-11:/nobackup/docker/docker-1.13.1$ which xz
/usr/bin/xz
iot@sgbu-ucs-11:/nobackup/docker/docker-1.13.1$ xz --version
xz ( XZ Utils) 5.1.0alpha
liblzma 5.1.0alpha
iot@sgbu-ucs-11:/nobackup/docker/docker-1.13.1$ cat /proc/filesystems | grep cgroup
nodev cgroup
# Download docker binary distribution
Check [GITHUB docker release site](https://github.com/docker/docker/releases) to pick a version you want, I pick version 1.13.1.
iot@sgbu-ucs-11:/nobackup/docker$ wget https://get.docker.com/builds/Linux/x86_64/docker-1.13.1.tgz
--2017-03-04 15:56:54-- https://get.docker.com/builds/Linux/x86_64/docker-1.13.1.tgz
Resolving proxy.esl.cisco.com ( proxy.esl.cisco.com) ... <IP_ADDRESS>, 2001:420:620::4
Connecting to proxy.esl.cisco.com ( proxy.esl.cisco.com) |<IP_ADDRESS>|:8080... connected.
Proxy request sent, awaiting response... 200 OK
Length: 27851024 ( 27M) [ application/x-tar]
Saving to: docker-1.13.1.tgz
docker-1.13.1.tgz 100%[=========================================================>] 26.56M 26.5MB/s in 1.0s
2017-03-04 15:56:55 ( 26.5 MB/s) - docker-1.13.1.tgz saved [ 27851024/27851024]
iot@sgbu-ucs-11:/nobackup/docker$ ls -l docker-1.13.1.tgz
-rw-rw-r-- 1 iot iot 27851024 Feb 8 00:52 docker-1.13.1.tgz
iot@sgbu-ucs-11:/nobackup/docker$
# Installation
Installation is straightforward by extracting tarball, and copy the binary into a directory like "usr/bin", any directory which is part of your existing $PATH is fine.
iot@sgbu-ucs-11:/nobackup/docker$ tar xvf docker-1.13.1.tgz && mv docker docker-1.13.1
iot@sgbu-ucs-11:/nobackup/docker$ ls -l
total 866320
drwxr-xr-x 3 iot iot 4096 Feb 8 00:51 docker-1.13.1
-rw-rw-r-- 1 iot iot 27851024 Feb 8 00:52 docker-1.13.1.tgz
iot@sgbu-ucs-11:/nobackup/docker$ ls -l docker-1.13.1
total 82856
drwxr-xr-x 5 iot iot 4096 Feb 8 00:51 completion
-rwxr-xr-x 1 iot iot 14125488 Feb 8 00:51 docker
-rwxr-xr-x 1 iot iot 8932648 Feb 8 00:51 docker-containerd
-rwxr-xr-x 1 iot iot 8381448 Feb 8 00:51 docker-containerd-ctr
-rwxr-xr-x 1 iot iot 3047368 Feb 8 00:51 docker-containerd-shim
-rwxr-xr-x 1 iot iot 39941680 Feb 8 00:51 dockerd
-rwxr-xr-x 1 iot iot 772400 Feb 8 00:51 docker-init
-rwxr-xr-x 1 iot iot 2534781 Feb 8 00:51 docker-proxy
-rwxr-xr-x 1 iot iot 7092736 Feb 8 00:51 docker-runc
iot@sgbu-ucs-11:/nobackup/docker$ sudo cp docker-1.13.1/* /usr/bin
# Run
It is important to know that docker is running in a client server mode, it means that "dockerd" runs as a daemon, which is server and does all the heavy lifting work; "docker" is client tool, which used to send command to dockerd to do actual work.
Here I show to run docker manually. Since my box is running inside Cisco lab, which sits behind proxy, I pass the proxy setting to dockerd directly, this works well. I ecountered erros in a apt-get docker set up case, even after I configured docker proxy under /etc/default/docker. Another thing to be aware, you need to know that docker needs storage space to store all containers, which could grow significantly depending on what you do.
In my case, I create a directory "/nobackup/docker/workspace1.13.1/" as storage area.
iot@sgbu-ucs-11:/nobackup/docker$ mkdir workspace1.13.1
iot@sgbu-ucs-11:/nobackup/docker$ sudo https_proxy = "https://proxy.esl.cisco.com:8080" http_proxy = "http://proxy.esl.cisco.com:8080" dockerd -g /nobackup/docker/workspace1.13.1/ &
[ 1] 10038
iot@sgbu-ucs-11:/nobackup/docker$ INFO[0000] libcontainerd: new containerd process, pid: 10050
WARN[0000] containerd: low RLIMIT_NOFILE changing to max current = 1024 max = 65536
INFO[0001] [ graphdriver] using prior storage driver: aufs
INFO[0001] Graph migration to content-addressability took 0.00 seconds
WARN[0001] Your kernel does not support swap memory limit
WARN[0001] Your kernel does not support cgroup rt period
WARN[0001] Your kernel does not support cgroup rt runtime
INFO[0001] Loading containers: start.
INFO[0001] Firewalld running: false
INFO[0001] Default bridge ( docker0) is assigned with an IP address <IP_ADDRESS>/16. Daemon option --bip can be used to set a preferred IP address
INFO[0001] Loading containers: done .
WARN[0001] Couldn't run auplink before unmount /nobackup/docker/workspace1.13.1/tmp/docker-aufs-union687449707: exec: "auplink": executable file not found in $PATH
INFO[0001] Daemon has completed initialization
INFO[0001] Docker daemon commit=092cba3 graphdriver=aufs version=1.13.1
INFO[0001] API listen on /var/run/docker.sock
iot@sgbu-ucs-11:/nobackup/docker$
iot@sgbu-ucs-11:/nobackup/docker$ ps -ef | grep docker
root 10038 8482 0 16:18 pts/16 00:00:00 sudo https_proxy=https://proxy.esl.cisco.com:8080 http_proxy=http://proxy.esl.cisco.com:8080 dockerd -g /nobackup/docker/workspace1.13.1/
root 10039 10038 0 16:18 pts/16 00:00:01 dockerd -g /nobackup/docker/workspace1.13.1/
root 10050 10039 0 16:18 ? 00:00:00 docker-containerd -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --metrics-interval=0 --start-timeout 2m --state-dir /var/run/docker/libcontainerd/containerd --shim docker-containerd-shim --runtime docker-runc
iot 10248 8482 0 16:22 pts/16 00:00:00 grep --color=auto docker
iot@sgbu-ucs-11:/nobackup/docker$
As it is shwoing, docker is running nicely.
# Deploy containers
First we make sure there is no docker images there:
iot@sgbu-ucs-11:/nobackup/docker$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
iot@sgbu-ucs-11:/nobackup/docker$
As a sanity testing, we install "hello-world" from docker hub to make sure it is working well:
iot@sgbu-ucs-11:/nobackup/docker$ sudo docker pull hello-world
Using default tag: latest
latest: Pulling from library/hello-world
78445dd45222: Already exists
Digest: sha256:c5515758d4c5e1e838e9cd307f6c6a0d620b5e07e6f927b07d05f6d12a1ac8d7
Status: Downloaded newer image for hello-world:latest
iot@sgbu-ucs-11:/nobackup/docker$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
hello-world latest 48b5124b2768 7 weeks ago 1.84 kB
iot@sgbu-ucs-11:/nobackup/docker$
Second we can install a "fedora" image and "nginx" image.
iot@sgbu-ucs-11:/nobackup/docker$ sudo docker pull fedora
Using default tag: latest
latest: Pulling from library/fedora
1b39978eabd9: Pull complete
Digest: sha256:8d3f642aa4d3fa8f9dc52ab0e3bbbe8bc2494843dc6ebb26c4a6958db888e5a2
Status: Downloaded newer image for fedora:latest
iot@sgbu-ucs-11:/nobackup/docker$ sudo docker pull nginx
Using default tag: latest
latest: Pulling from library/nginx
693502eb7dfb: Pull complete
6decb850d2bc: Pull complete
c3e19f087ed6: Pull complete
Digest: sha256:52a189e49c0c797cfc5cbfe578c68c225d160fb13a42954144b29af3fe4fe335
Status: Downloaded newer image for nginx:latest
iot@sgbu-ucs-11:/nobackup/docker$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
nginx latest 6b914bbcb89e 4 days ago 182 MB
fedora latest 1f8ec1108a3f 2 weeks ago 230 MB
hello-world latest 48b5124b2768 7 weeks ago 1.84 kB
iot@sgbu-ucs-11:/nobackup/docker$
Third, let run fedora interactive through bash: it shows it is fedora 25, however you can see it is actually has ubuntu kernel since container is a user space virtualization technology.
iot@sgbu-ucs-11:/nobackup/docker$ sudo docker run -it fedora /bin/bash
WARN[0699] Couldn't run auplink before unmount /nobackup/docker/workspace1.13.1/aufs/mnt/f7babbdcde18ee51bc5efffbe67aff8edc734753624c91f0bfb8702ef4922d93-init: exec: "auplink": executable file not found in $PATH
WARN[0699] Couldn' t run auplink before unmount /nobackup/docker/workspace1.13.1/aufs/mnt/f7babbdcde18ee51bc5efffbe67aff8edc734753624c91f0bfb8702ef4922d93: exec : "auplink" : executable file not found in $PATH
INFO[0700] No non-localhost DNS nameservers are left in resolv.conf. Using default external servers: [ nameserver <IP_ADDRESS> nameserver <IP_ADDRESS>]
INFO[0700] IPv6 enabled; Adding default IPv6 external servers: [ nameserver 2001:4860:4860::8888 nameserver 2001:4860:4860::8844]
[ root@18ca8d8ced5b /]# cat /etc/fedora-release
Fedora release 25 ( Twenty Five)
[ root@18ca8d8ced5b /]# uname -a
Linux 18ca8d8ced5b 4.4.0-53-generic #74-Ubuntu SMP Fri Dec 2 15:59:10 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
[ root@18ca8d8ced5b /]#
[ root@18ca8d8ced5b /]# df -h
Filesystem Size Used Avail Use% Mounted on
none 823G 49G 733G 7% /
tmpfs 48G 0 48G 0% /dev
tmpfs 48G 0 48G 0% /sys/fs/cgroup
/dev/sda1 823G 49G 733G 7% /etc/hosts
shm 64M 0 64M 0% /dev/shm
tmpfs 48G 0 48G 0% /sys/firmware
[ root@18ca8d8ced5b /]# exit
exit
iot@sgbu-ucs-11:/nobackup/docker$ WARN[0988] Couldn't run auplink before unmount /nobackup/docker/workspace1.13.1/aufs/mnt/f7babbdcde18ee51bc5efffbe67aff8edc734753624c91f0bfb8702ef4922d93: exec: "auplink": executable file not found in $PATH
iot@sgbu-ucs-11:/nobackup/docker$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
18ca8d8ced5b fedora "/bin/bash" 5 minutes ago Exited (0) 12 seconds ago romantic_einstein
81b59ab256b3 hello-world "/hello" About an hour ago Exited (0) About an hour ago keen_mestorf
iot@sgbu-ucs-11:/nobackup/docker$
There is another way to load docker image by reading a prepared and downloaded binary of docker image:
iot@sgbu-ucs-11:/nobackup/docker$ sudo docker load --input widevine-api.tar
e7ebc6e16708: Loading layer [==================================================>] 133.8 MB/133.8 MB
f934e33a54a6: Loading layer [==================================================>] 15.87 kB/15.87 kB
bf6751561805: Loading layer [==================================================>] 11.78 kB/11.78 kB
943edb549a83: Loading layer [==================================================>] 4.608 kB/4.608 kB
c1bd37d01c89: Loading layer [==================================================>] 3.072 kB/3.072 kB
a95df000892a: Loading layer [==================================================>] 31.23 kB/31.23 kB
87a8db33c00a: Loading layer [==================================================>] 680.7 MB/680.7 MB
3eb94c8c4801: Loading layer [==================================================>] 1.536 kB/1.536 kB
ae09daac5f09: Loading layer [==================================================>] 10.37 MB/10.37 MB
7515649c4f96: Loading layer [==================================================>] 34.23 MB/34.23 MB
3df54ddc927e: Loading layer [==================================================>] 3.584 kB/3.584 kB
afaa58df73a7: Loading layer [==================================================>] 3.584 kB/3.584 kB
54f82330fe32: Loading layer [==================================================>] 4.608 kB/4.608 kB
cce3f38770a6: Loading layer [==================================================>] 3.072 kB/3.072 kB
f157603ca1b0: Loading layer [==================================================>] 2.048 kB/2.048 kB
14f338761f7e: Loading layer [==================================================>] 2.048 kB/2.048 kB
Loaded image: registry.axinom.com/widevine-api/app:latest
iot@sgbu-ucs-11:/nobackup/docker$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
nginx latest 6b914bbcb89e 4 days ago 182 MB
fedora latest 1f8ec1108a3f 2 weeks ago 230 MB
hello-world latest 48b5124b2768 7 weeks ago 1.84 kB
registry.axinom.com/widevine-api/app latest a8c197b7a44b 3 months ago 840 MB
iot@sgbu-ucs-11:/nobackup/docker$ iot@sgbu-ucs-11:/nobackup/docker$ sudo docker run registry.axinom.com/widevine-api/app -it
WARN[1873] Couldn't run auplink before unmount /nobackup/docker/workspace1.13.1/aufs/mnt/f17847c68b04f64b687f745fb49abf82cde3fcb4ba38cbdb94748862e69c4d2b-init: exec: "auplink": executable file not found in $PATH
WARN[1873] Couldn' t run auplink before unmount /nobackup/docker/workspace1.13.1/aufs/mnt/f17847c68b04f64b687f745fb49abf82cde3fcb4ba38cbdb94748862e69c4d2b: exec : "auplink" : executable file not found in $PATH
INFO[1874] No non-localhost DNS nameservers are left in resolv.conf. Using default external servers: [ nameserver <IP_ADDRESS> nameserver <IP_ADDRESS>]
INFO[1874] IPv6 enabled; Adding default IPv6 external servers: [ nameserver 2001:4860:4860::8888 nameserver 2001:4860:4860::8844]
The setup has been successfully completed.
..........
# Reference
For more details, check [docker docs](https://docs.docker.com/engine/installation/binaries/#install-daemon-and-client-binaries-on-linux).


--- layout: post title: Fearless ... categories: [] tags: - food - funny status: publish type: post published: true meta: _original_post_id: '' _original_import_author: John Duprey author: ---
I'm fearless in the kitchen. Ingredients: tofu, 2 left over meatballs, kale, mushroom, onion, garlic powder, red curry, garlic sauce.


Choose an example
Maths
Hello, world!
Logic
Variables
Unknown Variables
Custom Function
Fibonacci
WASM is
required
. ES6 is
required


The general structure of each page in this website is as show below:
Some important CSS selectors/id's were used in the development of this website.
The chart below briefly explains on the important selectors/id's used.
Code
Function
.classname
The .classname selector was used to provide same styles and feature
to multiple pages in this website for eg .header was used to provide
the same header style in all web pages (home,past,future and comments).
#idname
The #id selector was used to style elements with specific ids.
For example #comments-text was used to provide specific color to my h1 text
and the same to contents text.
span.name
The span.name selector is used to group inline-elements in the webpage.
For eg In this website, span.imp-words was used in the homepage to highlight
or differentiate the simportant words by giving them a bluish color.
a:link
The a:link selector was used to provide specific style to the normal
and unvisited links in this website.
a:visited
The a:visited selector was used to provide specific style to the visited links.
a:hover
The a:hover was used to provide specific styles to the links(buttons) when the
user hovers the mouse over it.
Aesthetics
This is a simple designed website that is made for my web systems assignment.
It has all features and styles that would attract both aged and young people, especially
today's young generation.
The colourscheme chosen is a combination of light neon colors on the
darkbackground. The chosen colors are among the famous colours liked by most
people which will attract more users. This website contains a user friendly design
that has been achieved by the usage of attractive colours on different pages eg pink,
purple, yellow and green.
The navigation bar at the top of the page and the center of the header class makes use
of the active and hover selectors. The link buttons are initially given different colors such as
pink, purple, yellow and green. When the mouse hovers on the link-buttons the text within
the button, get underlined and when the user presses a button, then the current page's link-button changes
it's colour to blue.
To avoid the scrolling back up again for long pages like (Past and Comments page), a link
to the top of the page is made in the footer section named "Top". This will make it easy for the users
to scroll back to the top with a click after reaching the end of the page.
Accessibility
All images in this website have been given alt attribute, therefore the users who cannot
see or are colorblind , can get alternative information in the place of the image.
On each page of this website, a viewport metatag has been configured with width=device-width.
This allows adjustment in viewing the website in any screen size of the device it is being viewed on.
This means the website can be viewed on a small screen like a mobile phone screen or normal laptop screen,
as well as the large computer monitor screens.
This site has been tested in different browsers like Internet explorer, Mozilla Firefox and Google Chrome.
It is great that it displayed right for all the browsers it was tested on.
Technicalities
The general structure of each page in this website is as show below:
Some important CSS selectors/id's were used in the development of this website.
The chart below briefly explains on the important selectors/id's used.
multiple pages in this website for eg .header was used to provide
the same header style in all web pages (home,past,future and comments).
#comments-text was used to provide specific color to my h1 text
and the same to contents text.
In this website, span.imp-words was used in the homepage to highlight
or differentiate the simportant words by giving them a bluish color.
links in this website.
hovers the mouse over it.
Aesthetics
This is a simple designed website that is made for my web systems assignment. It has all features and styles that would attract both aged and young people, especially today's young generation. The colourscheme chosen is a combination of light neon colors on the darkbackground. The chosen colors are among the famous colours liked by most people which will attract more users. This website contains a user friendly design that has been achieved by the usage of attractive colours on different pages eg pink, purple, yellow and green.
The navigation bar at the top of the page and the center of the header class makes use of the active and hover selectors. The link buttons are initially given different colors such as pink, purple, yellow and green. When the mouse hovers on the link-buttons the text within the button, get underlined and when the user presses a button, then the current page's link-button changes it's colour to blue.
To avoid the scrolling back up again for long pages like (Past and Comments page), a link to the top of the page is made in the footer section named "Top". This will make it easy for the users to scroll back to the top with a click after reaching the end of the page.
Accessibility
All images in this website have been given alt attribute, therefore the users who cannot see or are colorblind , can get alternative information in the place of the image.
On each page of this website, a viewport metatag has been configured with width=device-width. This allows adjustment in viewing the website in any screen size of the device it is being viewed on. This means the website can be viewed on a small screen like a mobile phone screen or normal laptop screen, as well as the large computer monitor screens.
This site has been tested in different browsers like Internet explorer, Mozilla Firefox and Google Chrome. It is great that it displayed right for all the browsers it was tested on.


I am an Adult Nurse. To secure employment with in the health care industry, i am in possession of all the current qualifications needed to practice professional nursing and able to provide a high standard of individualised care to those who needs my assistance and care.
I can be relied upon to always apply evidence based knowldge to get results and achieve best practice. I am a dynamic, forward thinking individual who sets new standards in every thing i have done. As a true professional i am able to show the correct balance of empathy and assertiveness.
Right now i am looking for a new position that will offer me plenty of opportunities for my career development in the future.
Full Time Agency nurse.
Full Time Agency nurse.
Worked as a full time agency nurse in different hospitals and community setting.
Worked a health care assistance with in the community and hospital setting.
Planning and completing duties with minimum direction from nurse in charge or managers.
Maintaining accurate paper and computer medical records and ensuring patient confidentiallity at all times.
Maintaining the sucurity of medical supplies including drugs and medical equipment.
Ability to develop positive working relationships with colleagues, patients and other health care professionals.
Provide excellent patient care in nursing and supportive environment to a wide range of patients.
Administering,Checking and witnessing contron drugs to a wide variety of patients.
Acting as the first point of contact for patients, answering their questions as well as listening to their concerns.
In addition to compassioately helping my patients, I enjoy most of my time traveling enjoying new foods and cultures.


Gauteng police nab over 600 suspects in operations | Saturday Star
Johannesburg - Gauteng police arrested 600 suspects wanted for various crimes including murder, hijacking, rape, assault and robberies, during an Operation O Kae Molao sting.
The operation took place on Wednesday night and during the early hours of Thursday morning at different locations around the province.
Police officers were accompanied by Gauteng’s provincial commissioner, Lieutenant General Elias Mawela, and head of department for Gauteng Community Safety, Yoliswa Makhasi.
Gauteng police said six minibus taxis had been impounded for having suspected stolen engines.
Gauteng police spokesperson, Captain Mavela Masondo, said some vehicles were caught with drugs and large volumes of dagga during the roadblocks.
He said in another arrest, police officers were offered a R10 000 bribe.
“A R10 000 bribe could not stop the police from arresting six suspects who were found in possession of an estimate of 80 kilograms of copper. Police stopped a suspicious Mitsubishi double cab bakkie and upon searching the vehicle, they found straps of copper hidden underneath the ‘recycled cans’,” he said.
Police said they fined three car dealerships R7500 for non-compliance with the Second Hand Goods Act after several cars’ computer boxes were found to be allegedly tampered with.
“Police continued with the raiding of second-hand goods dealerships with an intention of recovering illicit goods as well as stolen and hijacked vehicles.
“This raid once more yielded positive results as several vehicle computer boxes and cars that are tempered with were seized for further investigation. Three dealers were fined a total of R7500 for non-compliance with the Second Hand Goods Act,” said Masondo.
Masondo said in an operation to the south of Joburg, R10m worth of illegal gambling equipment and counterfeit goods were recovered.
Mawela has since urged the public to be careful when buying second hand goods, especially vehicles.
“If possible the buyers can avail the vehicle for inspection to the police before any transaction is made,” he said.
Saturday Star


--- layout: paper headline: Publications title: 'Programming Constraint Services' authors: 'Christian Schulte' howpublished: > Volume 2302 of Lecture Notes in Artificial Intelligence, Springer-Verlag, 2002 link: more bibtex: > @Book{Schulte:LNAI:2002, Author = "Christian Schulte", Title = "Programming Constraint Services", Publisher = "Springer-Verlag", Series = "Lecture Notes in Artificial Intelligence", Volume = "2302", Year = 2002, URL = "http://link.springer.de/link/service/series/0558/tocs/t2302.htm" } relation: > Search architecture also used in Gecode shorthowpub: > Lecture Notes in Artificial Intelligence, Springer-Verlag, 2002. ---
Constraint programming is an approach to modeling and solving combinatorial problems that has proven succesful in many applications. Building on techniques developed in AI, logic programming and operations research, constraint programming is based on an abstraction that decomposes the problem solver into a reusable constraint engine and a declarative program modeling the problem.
This book is concerned with the architecture and implementation of constraint engines. The author's main contribution is that constraint services, such as search and combinators, are made programmable; this is achieved by devising computation spaces as simple abstraction for programming constraint services at a high level. State-of-the-art and novel search strategies, such as visual interactive search and parallel search are covered.
The book is indispensible reading for anyone seriously interested in constraint technology.


Budget Tracker
Home
(current)
Your total is: $
0
Add Funds
Subtract Funds
Delete Pending Records
Transaction
Amount


Online Medicine Shopping
Contact
Contact Info
Online Medical Shopping...
Phone: 1800-258-589
Order
Placed Order
Customer
Registration
Login
View Order Details
Other User
Seller Login
Admin Login
Search Medicine Shop


A template engine allows rendering of documents using static templates. At runtime, template variables are substituted with actual values to generate an HTML file. This means that you have clear separation between your template and data. You can also generate multiple web pages dynamically with a single template!
Kitura template engines are classes that implement the TemplateEngine protocol from the Kitura-TemplateEngine package. Kitura currently supports three template engines, with Stencil being the most commonly used:
You can provide your own Kitura template engine by implementing the TemplateEngine protocol from Kitura-TemplateEngine package.
See Getting Started for instructions on how to install Kitura’s command-line interface.
To use the template engines we first need to setup a Kitura server. Open a terminal and run the following:
1. Create a directory
mkdir ~/KituraTemplateExample
2. Change to the new directory
cd ~/KituraTemplateExample
3. Create a Kitura server
kitura init
kitura init downloads, creates and builds a starter Kitura application and will take a couple of minutes to complete. This includes best-practice implementations of health checking and monitoring as well as configuration files to allow easily deployment to a Docker container, a Kubernetes cluster, or the IBM Cloud.
Kitura is a lightweight, modular framework — by default you get basic HTTP functionality, like routing, parameter handling, parsing request body, etc. You can augment Kitura’s out-of-the-box functionality by adding additional packages using the Swift Package Manager, or SPM for short. The kitura init command we ran earlier created us a Package.swift file and added some of these packages for us already, we need to add two more. The two packages we’d like to add are the template engines we’d like to use:
Kitura-StencilTemplateEngine:
.package(url: "https://github.com/IBM-Swift/Kitura-StencilTemplateEngine.git", .upToNextMajor(from: "1.0.0"))
Kitura-MustacheTemplateEngine:
.package(url: "https://github.com/IBM-Swift/Kitura-MustacheTemplateEngine.git", .upToNextMajor(from: "1.0.0"))
We’re going to add both template engines to our Kitura app, to do this we need to add the packages to our Package.swift file (this was also generated by kitura init). In your terminal run the following:
1. Open the Package.swift file
.package(url: "https://github.com/IBM-Swift/Health.git", from: "0.0.0"),
2. Add the following:
.package(url: "https://github.com/IBM-Swift/Kitura-MustacheTemplateEngine.git", .upToNextMajor(from: "1.0.0")),
.package(url: "https://github.com/IBM-Swift/Kitura-StencilTemplateEngine.git", .upToNextMajor(from: "1.0.0")),
3. Add the template engines to the correct target. At the end of the line:
.target(name: "Application", dependencies: [ "Kitura", "Configuration", "CloudEnvironment","SwiftMetrics","Health"])
Add "KituraStencil", "KituraMustache"
The result should look like this:
.target(name: "Application", dependencies: [ "Kitura", "Configuration", "CloudEnvironment","SwiftMetrics","Health", "KituraStencil", "KituraMustache"]),
After those changes our Package.swift should look like this:
// swift-tools-version:4.0
import PackageDescription
let package = Package(
name: "KituraTemplateExample",
dependencies: [
.package(url: "https://github.com/IBM-Swift/Kitura.git", .upToNextMinor(from: "2.2.0")),
.package(url: "https://github.com/IBM-Swift/HeliumLogger.git", .upToNextMinor(from: "1.7.1")),
.package(url: "https://github.com/IBM-Swift/CloudEnvironment.git", .upToNextMinor(from: "6.0.0")),
.package(url: "https://github.com/RuntimeTools/SwiftMetrics.git", from: "2.0.0"),
.package(url: "https://github.com/IBM-Swift/Health.git", from: "0.0.0"),
.package(url: "https://github.com/IBM-Swift/Kitura-MustacheTemplateEngine.git", from: "1.0.0"),
.package(url: "https://github.com/IBM-Swift/Kitura-StencilTemplateEngine.git", from: "1.0.0"),
],
targets: [
.target(name: "KituraTemplateExample", dependencies: [ .target(name: "Application"), "Kitura" , "HeliumLogger"]),
.target(name: "Application", dependencies: [ "Kitura", "CloudEnvironment","SwiftMetrics","Health", "KituraStencil", "KituraMustache"]),
.testTarget(name: "ApplicationTests" , dependencies: [.target(name: "Application"), "Kitura","HeliumLogger" ])
]
)
Template files are text files that follow the syntax of a template engine. Here is an example of a Mustache template, taken from GRMustache.swift and a Stencil template, taken from Stencil.
Mustache Example:
Hello {{name}}
Your beard trimmer will arrive on {{format(date)}}.
{{#late}}
Well, on {{format(realDate)}} because of a Martian attack.
{{/late}}
Stencil Example:
There are {{ articles.count }} articles.
{% for article in articles %}
- {{ article.title }} by {{ article.author }}.
{% endfor %}
By default template engines look in a ./Views directory for the template files to use so we need to add this directory to our project. In a terminal window run the following:
mkdir ~/KituraTemplateExample/Views
We’ve added two new packages and a new directory to our project but if you open the KituraTemplateExample.xcodeproj that was generated by kitura init none of our additions will be visible within Xcode. To solve this we need to generate a new Xcode project so it will be aware of all we’ve added. Open a terminal and run the following:
1. Ensure you’re in the correct directory
cd ~/KituraTemplateExample
2. Generate new Xcode project
swift package generate-xcodeproj
3. Once the command has finished executing open the new project
open KituraTemplateExample.xcodeproj
Now we need to add our template files:
1. In Xcode right-click on the Views folder and select New File
2. Click on the new file (called File by default) and change the name to StencilExample.stencil
3. Add the following into the StencilExample.stencil file:
There are {{ articles.count }} articles.
{% for article in articles %}
- {{ article.title }} by {{ article.author }}.
{% endfor %}
4. Create another new file in Views and change the name to: MustacheExample.mustache
5. Add the following into the MustacheExample.mustache file:
Hello {{name}}
Your beard trimmer will arrive on {{format(date)}}.
{{#late}}
Well, on {{format(realDate)}} because of a Martian attack.
{{/late}}
We now have everything in place to start writing the code for our implementation of the template engines!
In Xcode open the Application.swift file found in Sources/Application/
The first step we do to do is import our packages so we can make use of the API they provide. Below the line:
import Health
Add the following:
import KituraMustache
import KituraStencil
This will now allow us to use both of the template engines within our code.
To use the template engine, you must register it with a Router instance. This is done by calling the Router.add(templateEngine:) function, e.g.:
In the postInit() function below the line:
initializeHealthRoutes(app: self)
Add the following:
router.add(templateEngine: MustacheTemplateEngine())
router.add(templateEngine: StencilTemplateEngine())
We have now registered both of our template engines with a router.
We can render a template by calling the response.render(_:context) function, where context is the information the template engine will use to fill out the corresponding template files.
We will start with rendering the Stencil template. Below the line:
router.add(templateEngine: StencilTemplateEngine())
add the following:
// Handle HTTP GET requests to Stencil
router.get("/articles") { request, response, next in
// The example from https://github.com/kylef/Stencil/blob/master/README.md
let context = [
"articles": [
["title": "Migrating from OCUnit to XCTest", "author": "Kyle Fuller"],
["title": "Memory Management with ARC", "author": "Kyle Fuller" ]
]
]
try response.render("StencilExample.stencil", context: context)
next()
}
So lets break down what we’re doing here; First we’ve registered a GET end point which will call a block of code (a closure) when a GET request is made to the server:
router.get("/articles") { request, response, next in ... }
Then we create a context value, which is an array of dictionaries. The point to notice here is that the key for the context dictionary, i.e. the "articles" value matches the same value in our StencilExample.template:
There are {{ articles.count }} articles.
{% for article in articles %}
- {{ article.title }} by {{ article.author }}.
{% endfor %}
This is a requirement, the key for this dictionary HAS to match the corresponding value in your Stencil template file. This is how the template engine knows where to render the information we provide.
We then call the render function, providing the name of the template file we want to use, "StencilExample.stencil"in this case, and the context. The render function will then use the context to fill out the template file and serve it to a specified URL, in our case this is: https://localhost:8080
Our postInit() function should look like this now:
func postInit() throws {
// Endpoints
initializeHealthRoutes(app: self)
router.add(templateEngine: MustacheTemplateEngine())
router.add(templateEngine: StencilTemplateEngine())
router.get("/articles") { request, response, next in
let context = [
"articles": [
["title": "Migrating from OCUnit to XCTest", "author": "Kyle Fuller"],
["title": "Memory Management with ARC", "author": "Kyle Fuller" ]
]
]
try response.render("StencilExample.stencil", context: context)
next()
}
}
So now we’re ready to see if our implementation of the Stencil template engine works, first we need to start our server. In Xcode we can just use the shortcut cmd + R.
Allow the project to accept incoming network connections if prompted.
Then open:
http://localhost:8080/articles
and we should see this:
There are 2 articles.
- Migrating from OCUnit to XCTest by Kyle Fuller.
- Memory Management with ARC by Kyle Fuller.
Next we will render the Mustache template, and we can do so along side our current Stencil implementation. Kitura allows multiple different template engines to be used along side each other.
First stop the current build running, in Xcode you can do this using the cmd + . shortcut. Next, below the previous router.get("delivery") {...} block add the following:
// Handle HTTP GET requests to GRMustache/
router.get("/delivery") { request, response, next in
// The example from https://github.com/groue/GRMustache.swift/blob/master/README.md
var context: [String: Any] = [
"name": "Arthur",
"date": Date(),
"realDate": Date().addingTimeInterval(60*60*24*3),
"late": true
]
// Let template format dates with ``
let dateFormatter = DateFormatter()
dateFormatter.dateStyle = .medium
context["format"] = dateFormatter
try response.render("MustacheExample.mustache", context: context)
next()
}
So again lets break down what we’re doing here; we’ve set up another GET end point this time on the "/delivery" route. Just like in the Stencil example we create a context value, however this time we need to specify a type of [String: Any] because we’re using multiple different types here. We can do this because the template engine is expecting a type of [String: Any] to be passed through. In our Stencil example the type of context was [String: [String: String]], so the [String: String] would be the Any part here. The context contains values for Mustache’s tags name, date, realDate, late and for GRMustache.swift’s filter format
Our postInit() function should now look like this:
func postInit() throws {
// Endpoints
initializeHealthRoutes(app: self)
router.add(templateEngine: MustacheTemplateEngine())
router.add(templateEngine: StencilTemplateEngine())
router.get("/articles") { request, response, next in
let context = [
"articles": [
["title": "Migrating from OCUnit to XCTest", "author": "Kyle Fuller"],
["title": "Memory Management with ARC", "author": "Kyle Fuller" ]
]
]
try response.render("StencilExample.stencil", context: context)
next()
}
router.get("/delivery") { request, response, next in
var context: [String: Any] = [
"name": "Arthur",
"date": Date(),
"realDate": Date().addingTimeInterval(60*60*24*3),
"late": true
]
let dateFormatter = DateFormatter()
dateFormatter.dateStyle = .medium
context["format"] = dateFormatter
try response.render("MustacheExample.mustache", context: context)
next()
}
}
Now if you run the project again using cmd + R and open
http://localhost:8080/delivery
You should now see the following:
> Hello Arthur
>
Your beard trimmer will arrive on Sep 8, 2016.
>
Well, on Sep 19, 2016 because of a Martian attack.
Now we’ve implemented two different template engines which can work side by side!
If you’d like to see a Stencil template engine in use in an iOS app checkout our FoodTrackerBackend tutorial!


All Files (86.96% covered at 1.2 hits/line)
5 files in total.
23 relevant lines.
20 lines covered and
3 lines missed
| File | % covered | Lines | Relevant Lines | Lines covered | Lines missed | Avg. Hits / Line |
|---|---|---|---|---|---|---|
| app/controllers/application_controller.rb | 100.0 % | 10 | 5 | 5 | 0 | 2.0 |
| app/controllers/importantdates_controller.rb | 78.57 % | 23 | 14 | 11 | 3 | 1.0 |
| app/helpers/application_helper.rb | 100.0 % | 2 | 1 | 1 | 0 | 1.0 |
| app/helpers/importantdates_helper.rb | 100.0 % | 2 | 1 | 1 | 0 | 1.0 |
| app/models/importantdate.rb | 100.0 % | 3 | 2 | 2 | 0 | 1.0 |
Controllers (84.21% covered at 1.5 hits/line)
2 files in total.
19 relevant lines.
16 lines covered and
3 lines missed
| File | % covered | Lines | Relevant Lines | Lines covered | Lines missed | Avg. Hits / Line |
|---|---|---|---|---|---|---|
| app/controllers/application_controller.rb | 100.0 % | 10 | 5 | 5 | 0 | 2.0 |
| app/controllers/importantdates_controller.rb | 78.57 % | 23 | 14 | 11 | 3 | 1.0 |
Models (100.0% covered at 1.0 hits/line)
1 files in total.
2 relevant lines.
2 lines covered and
0 lines missed
| File | % covered | Lines | Relevant Lines | Lines covered | Lines missed | Avg. Hits / Line |
|---|---|---|---|---|---|---|
| app/models/importantdate.rb | 100.0 % | 3 | 2 | 2 | 0 | 1.0 |
Mailers (100.0% covered at 0.0 hits/line)
0 files in total.
0.0 relevant lines.
0.0 lines covered and
0.0 lines missed
| File | % covered | Lines | Relevant Lines | Lines covered | Lines missed | Avg. Hits / Line |
|---|
Helpers (100.0% covered at 1.0 hits/line)
2 files in total.
2 relevant lines.
2 lines covered and
0 lines missed
| File | % covered | Lines | Relevant Lines | Lines covered | Lines missed | Avg. Hits / Line |
|---|---|---|---|---|---|---|
| app/helpers/application_helper.rb | 100.0 % | 2 | 1 | 1 | 0 | 1.0 |
| app/helpers/importantdates_helper.rb | 100.0 % | 2 | 1 | 1 | 0 | 1.0 |


Contact Us
Email:
<EMAIL_ADDRESS>Address:
11730, Plaza America Dr #205, Reston, VA USA, 20190
Web:
www.revature.com
Phone:
+1-730-111-2340
For more enquires send us the this form
Name:
Email:
Phone:
Gender:
Male
Female
Others
Query Message:
Remember me
Enjoy this free video


JSUnconf is an Unconference.
That means the schedule is voted by the participants.
Our plan is to offer an initial session on Saturday, March 25th 2017.
In this session we want to give you the most important information to get through our tutorial.
Afterwards we will offer you the help of our volunteer mentors during office hours, where you can get help with the tutorial.
You are free to go through the tutorial at our office hours place or during the sessions and breaks of the conference.
- 12:00 - Welcome and intro to Angular
- 12:30 - Workshop begins!
- 13:15 - Lunch break
- 14:30 - Office Hours
- 15:45 - Coffee Break
- 16:30 - Office Hours
- 17:30 - Goodbye


Introduction on Microcontrolers
What’s a Microcontrollers?
Microcontrollers are essentially a low powered embedded computer that is used to controller motors, sensors, and other devices for any electronics, mechantronics, robotics and industrial projects. You may already have encountered microcontrollers from your gadgets, appliances, printer at your office, and other IoT or automation devices. This consist of a processor, flash memory, and host of I/O.
Arduino?
Arduino is a low powered 8-bit microcontroller, which is used for any beginner or advance projects. The typical Arduino flavor that you might have heard is the Arduino Uno.
Modules
These are devices/components that allows you to have a ready use I/O i.e. motors and sensors devices, it can be use to controll, gather data, store data, or produce data. Modules are oftenly interchanged with the term sensors.
Sensors
These are components used to collect data either environmental, digital or analog.
Arduino IDE Syntax
Programming with arduino is easy, if you have a background or experience using C language or C++ you can practically use the Arduino IDE to control modules and collect data from it, the Arduino IDE. You can use library written in C++ to make it easier and save time instead of you manually controlling and LCD screen or sensor you can just use the readily available opensourced libraries, with opensourced libraries on thoudsand of sensors and modules this greatly impacts the availability to learn microcontrollers for beginners.
Syntax Basics
Typically upon opening the IDE you’ll see;
void setup(){
}
void loop(){
}
these are functions are set upon creating a new file, setup()
function allows you to setup the serial baud rate, the pinouts for your sensors or modules, while the loop()
allows you to set a code that contstantly being repeated e.g. refreshing an LCD screen every 1 second.
Resources
You can Learn more about the syntax and its functions from Arduino IDE’s documentation. Familiarizing basic electronics like resistance, capacitance is helpful when doing mechatronics projects.
Happy Coding.


Smart Calculator is a powerful tool to do mathmatic analysis. It supports: 1. math expression recognition (need back camera); 2. solve mathematic equation(s); 3. complex number; 4. array (matrix); 5. (higher level) integration; 6. 2D, polar and 3D chart plotting and 7. string besides the basic calculations provided by most calculator apps. The calculator is actually derived from another powerful calculator app named Scientific Calculator Plus but it disables its programming capability and adds math expression recognition. As such it is more easy-to-use. User can input using built-in input pad, system soft keyboard or camera, and Smart Calculator employs a powerful programmable math engine called MFP to analyse mathematical expressions. As such it can satisfy most of user's requirements.
Built-in and predefined functions (from Scientific Calculator Plus mannual)
Language manual (from Scientific Calculator Plus mannual, for advanced users only)


Functional interface for the batch normalization layer. (deprecated)
tf.compat.v1.layers.batch_normalization( inputs, axis=-1, momentum=0.99, epsilon=0.001, center=True, scale=True, beta_initializer=tf.zeros_initializer(), gamma_initializer=tf.ones_initializer(), moving_mean_initializer=tf.zeros_initializer(), moving_variance_initializer=tf.ones_initializer(), beta_regularizer=None, gamma_regularizer=None, beta_constraint=None, gamma_constraint=None, training=False, trainable=True, name=None, reuse=None, renorm=False, renorm_clipping=None, renorm_momentum=0.99, fused=None, virtual_batch_size=None, adjustment=None )
Warning: THIS FUNCTION IS DEPRECATED. It will be removed in a future version.
Instructions for updating:
Use keras.layers.BatchNormalization instead. In particular, tf.control_dependencies(tf.GraphKeys.UPDATE_OPS)
should not be used (consult the tf.keras.layers.batch_normalization
documentation).
Reference: http://arxiv.org/abs/1502.03167
"Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift"
Sergey Ioffe, Christian Szegedy
Note: when training, the moving_mean and moving_variance need to be updated.
By default the update ops are placed in tf.GraphKeys.UPDATE_OPS
, so they
need to be executed alongside the train_op
. Also, be sure to add any
batch_normalization ops before getting the update_ops collection. Otherwise,
update_ops will be empty, and training/inference will not work properly. For
example:
x_norm = tf.compat.v1.layers.batch_normalization(x, training=training) # ... update_ops = tf.compat.v1.get_collection(tf.GraphKeys.UPDATE_OPS) train_op = optimizer.minimize(loss) train_op = tf.group([train_op, update_ops])
inputs
: Tensor input.axis
: An int
, the axis that should be normalized (typically the features
axis). For instance, after a Convolution2D
layer with
data_format="channels_first"
, set axis=1
in BatchNormalization
.momentum
: Momentum for the moving average.epsilon
: Small float added to variance to avoid dividing by zero.center
: If True, add offset of beta
to normalized tensor. If False, beta
is ignored.scale
: If True, multiply by gamma
. If False, gamma
is
not used. When the next layer is linear (also e.g. nn.relu
), this can be
disabled since the scaling can be done by the next layer.beta_initializer
: Initializer for the beta weight.gamma_initializer
: Initializer for the gamma weight.moving_mean_initializer
: Initializer for the moving mean.moving_variance_initializer
: Initializer for the moving variance.beta_regularizer
: Optional regularizer for the beta weight.gamma_regularizer
: Optional regularizer for the gamma weight.beta_constraint
: An optional projection function to be applied to the beta
weight after being updated by an Optimizer
(e.g. used to implement
norm constraints or value constraints for layer weights). The function
must take as input the unprojected variable and must return the
projected variable (which must have the same shape). Constraints are
not safe to use when doing asynchronous distributed training.gamma_constraint
: An optional projection function to be applied to the
gamma
weight after being updated by an Optimizer
.training
: Either a Python boolean, or a TensorFlow boolean scalar tensor
(e.g. a placeholder). Whether to return the output in training mode
(normalized with statistics of the current batch) or in inference mode
(normalized with moving statistics). NOTE: make sure to set this
parameter correctly, or else your training/inference will not work
properly.trainable
: Boolean, if True
also add variables to the graph collection
GraphKeys.TRAINABLE_VARIABLES
(see tf.Variable).name
: String, the name of the layer.reuse
: Boolean, whether to reuse the weights of a previous layer
by the same name.renorm
: Whether to use Batch Renormalization
(https://arxiv.org/abs/1702.03275). This adds extra variables during
training. The inference is the same for either value of this parameter.renorm_clipping
: A dictionary that may map keys 'rmax', 'rmin', 'dmax' to
scalar Tensors
used to clip the renorm correction. The correction
(r, d)
is used as corrected_value = normalized_value * r + d
, with
r
clipped to [rmin, rmax], and d
to [-dmax, dmax]. Missing rmax, rmin,
dmax are set to inf, 0, inf, respectively.renorm_momentum
: Momentum used to update the moving means and standard
deviations with renorm. Unlike momentum
, this affects training
and should be neither too small (which would add noise) nor too large
(which would give stale estimates). Note that momentum
is still applied
to get the means and variances for inference.fused
: if None
or True
, use a faster, fused implementation if possible.
If False
, use the system recommended implementation.virtual_batch_size
: An int
. By default, virtual_batch_size
is None
,
which means batch normalization is performed across the whole batch. When
virtual_batch_size
is not None
, instead perform "Ghost Batch
Normalization", which creates virtual sub-batches which are each
normalized separately (with shared gamma, beta, and moving statistics).
Must divide the actual batch size during execution.adjustment
: A function taking the Tensor
containing the (dynamic) shape of
the input tensor and returning a pair (scale, bias) to apply to the
normalized values (before gamma and beta), only during training. For
example, if axis==-1,
adjustment = lambda shape: (
tf.random.uniform(shape[-1:], 0.93, 1.07),
tf.random.uniform(shape[-1:], -0.1, 0.1))
will scale the normalized value by up to 7% up or down, then shift the
result by up to 0.1 (with independent scaling and bias for each feature
but shared across all examples), and finally apply gamma and/or beta. If
None
, no adjustment is applied. Cannot be specified if
virtual_batch_size is specified.Output tensor.
ValueError
: if eager execution is enabled.


well done @Strob ! did you plan to give us the solution ?
Strob07-Feb-19 12:41 PM
I will just say it was easy and not at the same time. Cause anyone could have get the first level without any skillset but at the same time there were many possibilities.
I got it in like 2 tries so that's why I can't believe I got it so fast.(edited)
But I feel like level 2 will be far more difficult...
Cause then I guess I would need some skillset that I don't have!
cryptocat07-Feb-19 12:43 PM
Can I ask if it's numeric or alphabetical? Or alpha-numeric?(edited)
Strob07-Feb-19 12:46 PM
I could enter it in agama by hitting only 3 keystroke on my keyboard.
Gam_B1t07-Feb-19 12:48 PM
oh ! private key with only 3 caracters ?
So level one is required to find level 2 ?
Strob07-Feb-19 12:48 PM
I didn't say 3 characters, 3 keystroke
I guess I have to convert level 1 with some mathematical process to get level 2...
cryptocat07-Feb-19 12:49 PM
keystroke - "a single depression of a key on a keyboard."
Gam_B1t07-Feb-19 12:49 PM
ok
cryptocat07-Feb-19 12:52 PM
Do you mean it's 3 different keys, but they are repeated in the same string?
A keystroke means pressing a button
Strob07-Feb-19 12:53 PM
Think more like shortcuts on the keyboard.
linuxcaptain07-Feb-19 12:53 PM
ctrl shift...
Strob07-Feb-19 12:55 PM
Yes precisely I pressed only 3 keys, one of them 2 times and the other 2, 1 time each(edited)
cryptocat07-Feb-19 12:56 PM
@linuxcaptain Did you get it?
linuxcaptain07-Feb-19 12:56 PM
no... if I get it ill open source it.
cryptocat07-Feb-19 12:57 PM
haha
linuxcaptain07-Feb-19 12:59 PM
ctrl +c ctrl +v
1
cryptocat07-Feb-19 01:00 PM
@Strob has been playing us?
linuxcaptain07-Feb-19 01:00 PM
get him hahahhah
how many characters @Strob ?
Strob07-Feb-19 01:09 PM
You got it!!!!
linuxcaptain07-Feb-19 01:10 PM
So.. dont let me copying and pasting...
Strob07-Feb-19 01:10 PM
So it was that easy, take the most important info in the text, copy and paste it in agama as a seed and you could get level 1.
Now I hope the next hint will be about how to get from level 1 to level 2! Or ca333 will just give out level 1 answer as a hint.
1
linuxcaptain07-Feb-19 01:19 PM
@cryptocat ?
Strob07-Feb-19 01:23 PM
I tried converting level 1 to morse code, binary, hexadecimal, Octa (3-digit), Binary 7-bit, Binary 8-bit, decimal (3-digit), decimal, reverse words, reverse letters, ASCII numbers.... still nothing(edited)
linuxcaptain07-Feb-19 01:24 PM
Give us the morse code @Strob
cryptocat07-Feb-19 01:25 PM
Sorry was getting lunch. Working on it now!
1
Strob07-Feb-19 01:26 PM
First word of level 1 in morse code: -.- --- -- --- -.. ---
linuxcaptain07-Feb-19 01:27 PM
KOMODO
Strob07-Feb-19 01:27 PM
Right!
ch6ris07-Feb-19 01:27 PM
KOMODO
damn to late
linuxcaptain07-Feb-19 01:28 PM
1
cryptocat07-Feb-19 01:29 PM
hahaha found it!
1
Strob07-Feb-19 01:29 PM
That was an easy one right?
cryptocat07-Feb-19 01:29 PM
Yes...but no
Strob07-Feb-19 01:30 PM
Exactly
Gam_B1t07-Feb-19 01:32 PM
KOMODO is really the key ? it is too short when I use it in the Komodo password generator wallet
Strob07-Feb-19 01:32 PM
No just first word
So far: it's in the text, start by komodo and is the most important info!
ch6ris07-Feb-19 01:33 PM
Komodo is ahead of Decred
cryptocat07-Feb-19 01:33 PM
yaaaay
ch6ris07-Feb-19 01:33 PM
"Komodo is ahead of Decred"
1
Strob07-Feb-19 01:34 PM
That's it!(edited)
ch6ris07-Feb-19 01:34 PM
linuxcaptain07-Feb-19 01:35 PM
Thanks @Strob
Gam_B1t07-Feb-19 01:35 PM
oh !
no way. How do you found this ? it seems so random to me.
cryptocat07-Feb-19 01:37 PM
That was my first thought
Strob07-Feb-19 01:37 PM
I thought this guy is promoting Komodo so what if the most important info for him in the article?
ch6ris07-Feb-19 01:37 PM
I knew it was it when i went through all the sentences that started with komodo.
It's ahead that's the point.
Strob07-Feb-19 01:38 PM
But it could have been so many other thing and so many other way to input it.
So I was very lucky to find it so fast
ch6ris07-Feb-19 01:38 PM
no copy paste was the only way
Strob07-Feb-19 01:39 PM
And yes I just did ctrl-c, ctrl-v!(edited)
cryptocat07-Feb-19 01:39 PM
lol
linuxcaptain07-Feb-19 01:39 PM
some of my trials were komodo cto , all names, dex , komodo barterdex
Strob07-Feb-19 01:39 PM
But now how to hell do we get to level 2 I converted those words in any ^possible way.
ch6ris07-Feb-19 01:40 PM
yeah I tried komodo barterdex first.
Strob07-Feb-19 01:40 PM
I didn't try sha 256 (salt+ passphrase) yet though
linuxcaptain07-Feb-19 01:40 PM
I used the middle click paste @Strob
1
cryptocat07-Feb-19 01:43 PM
Let's think like the creator...What info would I use to further encrypt level 1?
Or maybe it's another string of text we need to append to "Komodo is ahead of Decred"(edited)
linuxcaptain07-Feb-19 01:44 PM
a random password
cryptocat07-Feb-19 01:44 PM
I'm thinking things like 1/777
linuxcaptain07-Feb-19 01:45 PM
= 0.001287001
cryptocat07-Feb-19 01:46 PM
hmm
linuxcaptain07-Feb-19 01:46 PM
This is in levels. So we have to use something from level one. Maybe the pub address or a part of the txo
cryptocat07-Feb-19 01:46 PM
Guess where level 1 answer was?
Within the paragraph that contained the word "level".
1
Maybe we look at the other paragraph containing "level"?
linuxcaptain07-Feb-19 01:47 PM
I get you..
cryptocat07-Feb-19 01:47 PM
"Komodo is ahead of Decred in terms of DEX development, but it also takes a more integrated approach to working with larger centralized exchanges. This means while BarterDEX may offer more liquidity and choice as its partnerships come through, it isn’t a DEX that addresses issues around coin listing prices and potentially unfair advantages for high-level traders."
ch6ris07-Feb-19 01:48 PM
pseudorandom
cryptocat07-Feb-19 01:48 PM
Level 1
“By doing pseudorandom order matching in epochs — say every 10-60 seconds — it puts everyone on a much more level playing field with respect to latency. The person using satellite internet in Siberia can't be taken advantage of by traders with a fiber link at the nearest interchange point, allowing buyers and sellers to transact without the opportunity for day traders to front-run their orders.”
Level 2
1
Strob07-Feb-19 01:49 PM
Nice one
We will have to wait the next hint...
linuxcaptain07-Feb-19 01:57 PM
Sure... For now the situation is pseudorandom
1
ch6ris07-Feb-19 02:08 PM
Indeed that is why I said it.
anyone?
I've tried too much now. and it's 1am
ch6ris07-Feb-19 02:16 PM
I think Epoch might have something to do with it "a particular period of time in history or a person's life."


Preparation time
less than 30 mins
Cooking time
10 to 30 mins
Serves
Makes 30
For the salmon, using a pestle and mortar pound the garlic and ginger with the salt to form a smooth paste. Spoon into a shallow dish and mix in the lime juice.
Chop the salmon into 2.5cm/1in cubes and add to the dish. Mix gently to coat evenly in the mixture. Leave to marinate for about 10 minutes.
For the coriander marinade, place the spinach, coriander and mint into a food processor. Add the chillies, a squeeze of lime juice and a trickle of vegetable oil. Blend until smooth, adding a little more oil if the mixture is too thick. Spoon into a bowl and mix in the flour and yoghurt. Season with a little salt, then add the marinated salmon, coating evenly in the mixture.
Preheat the oven to 200C/390F/gas 6. Grease 1-2 large baking sheets with olive oil.
Place the marinate salmon pieces onto the prepared trays, spacing them apart. Roast for 8-10 minutes, or until just cooked through. Remove from the oven and set aside. Preheat the grill to high.
For the garnish, mix the sugar, reserved pickling liquid from the beetroot, lime juice and coriander leaves together in a bowl. Add the shallot rings and mix well to coat.
Place the trays of salmon under the grill and cook for 3-4 minutes, or until golden-brown.
To serve, spoon the grilled salmon into small serving dishes and garnish with the shallot mixture and chopped beetroot.


@import helper._
Home
@nav.render("home")
PhotoBase
Current Features
Photo Uploading
Metadata Extraction
Photo Storage
Search Features
Future Features
File Streaming
User Accounts
Flickr Integration


//does not display anything
Jeanie Jung
☰
//utf-8 is always a better choice //if image, then may go blurry with people zooming in
About Me
My Passions
Other Things
Let's Talk


History.txt
- History.txt
- Last modified: Thu Oct 27 22:35:37 +0200 2011
2.3.1 / 2011-09-21
- 2 bug fixes:
- Fixed line numbers at end of special var+whitespace (larsch)
- Holy crap I was smokin’ something good... Fixed 1.9.3 warning
2.3.0 / 2011-09-06
- 2 minor enhancements:
- Add -g flag to parser compile if DEBUG
- Lexer now embeds line number in yacc_value for keywords, helping fix up
line numbers
- 3 bug fixes:
- Fix method line numbers when no args and no parens (quix)
- Fixed line numbers on return/break/next w/ result expr. (pjnz)
- Fixed some lexing state in order to parse: ‘f (1), 2’ as
‘f(1, 2)’. (invernizzi)
2.2.0 / 2011-08-23
- 2 minor enhancements:
- Moved Keyword, Environment, and StackState inside of RubyParser
- Added proper dsym and dsym->sym support.
- 3 bug fixes:
- Added extra (failing) tests for call/iter line number checking (quix)
- Fixed line numbers for certain call/iter edge cases
- Fixed parsing of: alias :”<<” :”>>”.
2.1.0 / 2011-08-15
- 2 minor enhancements:
- Added new accessor canonicalize_conditions to toggle conditional
canonicalization (on by default). (confused)
- Awesome cleanup: Replaced call to append_block by block_append. (Confusion)
- 2 bug fixes:
- Fixed handling last line of =begin/=end. (raybaxter)
- Fixed source line numbers after heredocs. (jbarreneche)
2.0.6 / 2011-02-18
- 1 minor enhancement:
- Switched to hoe’s racc plugin to clean up rakefile and builds
- 1 bug fix:
2.0.5 / 2010-09-01
- 1 minor enhancement:
- Started merging like lexical cases to try to squeeze some optimization out
2.0.4 / 2009-08-18
- 1 minor enhancement:
- Changed requires around to be more accurate.
- 4 bug fixes:
- Fixed .autotest for minitest
- Fixed emacs escape lexing bug: “C-\“ (maglev/gemstone)
- Fixed octal lexing edgecases. (maglev/gemstone)
- Fixed regexp lexing edgecases. (maglev/gemstone)
2.0.3 / 2009-06-23
- 4 minor enhancements:
- Removed dead code handling d/regex match node cruft.
- Switched to minitest
- Updated .autotest and rakefile wrt rcov for new hoe capabilities
- Updated hoe for new capabilities
- 4 bug fixes:
- Environment#all now deals with strange edge cases in RAD.
- Fixed packaging/compilation issue.
- Minor 1.9 fixes
- hoe -> flay -> rubyparser rakefile circularity fixed
2.0.2 / 2009-01-20
- 2 minor enhancements:
- Added gauntlet_rubyparser plugin. YAY for easy massive bug-hunting.
- Promoted Sexp’s file/line/comments to sexp_processor.
- 4 bug fixes:
- Fixed and improved the readme
- Fixed lexing heredoc newlines.
- Fixed line numbers on defns.
- Fixed rdoc generation bug pointed out by hugh sasse (who rocks)
2.0.1 / 2008-11-04
- 2 minor enhancements:
- Updated for changes to splat node in many contexts.
- Made PT a developer dep
2.0.0 / 2008-10-22
- 1 major enhancement
- Brought on the AWESOME! 4x faster! no known lexing/parsing bugs!
- 71 minor enhancements
- 1.9: Added Fixnum#ord.
- 1.9: Added missing Regexp constants
and did it so it’d work on 1.9.
- Added store_comment and comments
- Added StringScanner begin_of_line?
- Added a bunch of tests for regexp escape chars, parse_string, read_escape,
? numbers, ? whitespace.
- Added a hack for rubinius’ r2l eval bug.
- Added a new token type tSTRING that bypasses tSTRING_BEG/END entirely. Only
does non-interpolated strings and then falls back to the old way. MUCH
cleaner tho.
- Added bin/ruby_parse
- Added compare rule to Rakefile.
- Added coverage files/dirs to clean rule.
- Added file and line numbers to all sexp nodes. Column/ranges to come.
- Added lex_state change for lvars at the end of yylex.
- Added lexed comments to defn/defs/class/module nodes.
- Added stats gathering for yylex. Reordered yylex for avg data
- Added tSYMBOL token type and parser rule to speed up symbol lexing.
- Added tally output for getch, unread, and unread_many.
- Added tests for ambigous uminus/uplus, backtick in cmdarg, square and curly
brackets, numeric gvars, eos edge cases, string quoting %<> and %%%.
- All cases throughout yylex now return directly if they match, no
passthroughs.
- All lexer cases now slurp entire token in one swoop.
- All zarrays are now just empty arrays.
- Changed s(:block_arg, :blah) to :”&blah” in args sexp.
- Cleaned up lexer error handling. Now just raises all over.
- Cleaned up read_escape and regx_options
- Cleaned up tokadd_string (for some definition of cleaned).
- Converted single quoted strings to new tSTRING token type.
- Coverage is currently 94.4% on lexer.

- Flattened resbodies in rescue node. Fixed .autotest file.
- Folded lex_keywords back in now that it screams.
- Found very last instanceof ILiteralNode in the code. haha!
- Got the tests subclassing PTTC and cleaned up a lot. YAY
- Handle yield(*ary) properly
- MASSIVELY cleaned out =begin/=end comment processor.
- Massive overhaul on Keyword class. All hail the mighty Hash!

- Merged @/@@ scanner together, going to try to do the same everywhere.
- Refactored fix_arg_lex_state, common across the lexer.
- Refactored new_fcall into new_call.
- Refactored some code to get better profile numbers.
- Refactored some more fix_arg_lex_state.
- Refactored tail of yylex into its own method.
- Removed Module#kill
- Removed Token, replaced with Sexp.
- Removed all parse_number and parse_quote tests.
- Removed argspush, argscat. YAY!
- Removed as many token_buffer.split(//)’s as possible. 1 to go.
- Removed begins from compstmts
- Removed buffer arg for tokadd_string.
- Removed crufty (?) solo ’@’ token... wtf was that anyhow?
- Removed most jruby/stringio cruft from StringScanner.
- Removed one unread_many... 2 to go. They’re harder.
- Removed store_comment, now done directly.
- Removed token_buffer. Now I just use token ivar.
- Removed use of s() from lexer. Changed the way line numbers are gathered.
- Renamed *qwords to *awords.
- Renamed StringScanner to RPStringScanner (a subclass) to
fix namespace trashing.
- Renamed parse to process and aliased to parse.

- Resolved the rest of the lexing issues I brought up w/ ruby-core.
- Revamped tokadd_escape.
- Rewrote Keyword and KWtable.
- Rewrote RubyLexer using
StringScanner.
- Rewrote tokadd_escape. 79 lines down to 21.
- Split out lib/ruby_parser_extras.rb so
lexer is standalone.
- Started to clean up the parser and make it as skinny as possible
- Stripped out as much code as possible.
- Stripped yylex of some dead code.
- Switched from StringIO to StringScanner.
- Updated rakefile for new hoe.
- Uses pure ruby racc if ENV[‘PURE_RUBY’], otherwise use c.
- Wrote a ton of lexer tests. Coverage is as close to 100% as possible.
- Wrote args to clean up the big nasty args processing grammar section.
- lex_strterm is now a plain array, removed RubyLexer#s(...).
- yield and super now flatten args.
- 21+ bug fixes:
- I’m sure this list is missing a lot:
- Fixed 2 bugs both involving attrasgn (and ilk) esp when lhs is an array.
- Fixed a bug in the lexer for strings with single digit hex escapes.
- Fixed a bug parsing: a (args) { expr }… the space caused a different
route to be followed and all hell broke loose.
- Fixed a bug with xn=beginvar not putting begin back.
- Fixed attrasgn to have arglists, not arrays.
- Fixed bug in defn/defs with block fixing.
- Fixed class/module’s name slot if colon2/3.
- Fixed dstr with empty interpolation body.
- Fixed for 1.9 string/char changes.
- Fixed lexer BS wrt determining token type of words.
- Fixed lexer BS wrt pass through values and lexing words. SO STUPID.
- Fixed lexing of floats.
- Fixed lexing of identifiers followed by equals. I hope.
- Fixed masgn with splat on lhs
- Fixed new_super to deal with block_pass correctly.
- Fixed parser’s treatment of :colon2 and :colon3.
- Fixed regexp scanning of escaped numbers, ANY number is valid, not just
octs.
- Fixed string scanning of escaped octs, allowing 1-3 chars.
- Fixed unescape for n
- Fixed: omg this is stupid. ’()’ was returning bare nil
- Fixed: remove_begin now goes to the end, not sure why it didn’t
before.
1.0.0 / 2007-12-20


2pm T:00 -- I'm 190'lbs. Had eaten lunch about 1 hour ago. Took 200mg Tramadol in four 50mg tablets.
T:00:40 -- Perhaps feel the very edge of it, little bit of a light ''uplifting'' feeling, going to go outside shovel some snow - see if exercise kicks it in.
T:01:00 -- Definately feeling a slight euphoria, just one hour in on a full stomach, this is a good sign! I don't feel dazed or cognatively challenged at all, just a little bit of pleasant euphoria.
T:01:05 -- Only five minutes after last entry - noticing euphoric feelings building very quickly now. Very thirsty too, am going to drink some OJ.
T:01:30 -- One and a half hours in, I feel good. But I'm in the mood to feel a bit better. Am going to have a few puff's of Cannabis.
T:01:45 -- Cannabis in, feel that as its own distinct and nice self. Feel undercurrent of Tramadol under it, am going to play some music and go with this relaxation a bit.
T:01:52 -- Almost two hours in -- I can tell looking at this time stamp, that my sense of time is definately altered. I would have guessed its been 20 minutes or so since the last entry - not 7! Piano playing was fun, finger dexterity seems undeminished, creativity fine, perhaps tending a bit towards overdramatic.  But over all dexterity and cognition seems good. Not sure about reaction time, I'll play some Unreal Tournament real quick and see.
T:03:00 -- 3 hours in now. Unreal Tournament went pretty well - definately not top not reaction time - but decent. Then phone rang: had nearly hour long conversation with my wife on the phone, very good conversation. She normally can tell immediately if I've had any substances. This was a relaxed and positive talk, very loving for both of us and good for our relationship! I'm a bit dehydrated - and definately my thoughts can wander quickly, though the thought straying I believe is mostly from the cannabis - not the Tramadol, the Tramadol seems to be doing the dehydration, but also a general muscle/body relaxed feel - and slight underlying euphoria. I'm noticing that since the pot and pharms set it -- my reports here are getting much wordier, as you can tell!
T:3:15 -- Still feeling good, home alone tonight and would love to feel even better - so I'm having a Vodka Sweet & Sour right now. Drinking it slowly, will see what happens.
T:3:50 -- The alcohol has perhaps mellowed it all a bit, no huge change though. I feel very relaxed and happy. Made myself a very nice dinner, and enjoyed it very much - definately sensory appreciation is excellent with this combination. Am curious about sexual effects, perhaps will try in a bit.
T:4:05 -- Just wrote a love letter to my wife, this is a good combination for expressing love/passion.
T:4:37 -- Was feeling a bit tired, and its just 6:37 at night, and I want to enjoy this mellowness some more. So I'm adding one more drug to the mix - caffeine. One big strong cup of coffee.
T:4:55 -- Coffee kicked in fast, feeling much more awake - a bit edgy, but not upleasantly so. I'm not sure I have the ability to get sexually aroused right now, and I'm not interested enough to even try! Perhaps I'll try later.
T:5:20 -- I'm in a nice mellow place, energetic, alert, mentally on the ball - and a bit euphoric. Of course at this point its tough to sort out what is being caused by what - since I'm under the influence of 4 drugs: Tramadol, Cannabis, Alcohol and Caffeine! Am feeling a bit of itching on my body, I imagine from the Tramadol -- but, it is very pleasurable to itch each one!
T:6:00 -- In spite of caffeine, feeling tired. Still good and relaxed, but very droopy eyelids.
T:6:10 -- Seems like it was a blood sugar low, I had some sweets - and I'm feeling much more alert now.
T:6:30 -- Going to have another drink, and then maybe another bowl. So I think any objective evidence about the Tramadol is pretty much a wash at this point. Its been 6.5 hours now since injestion anyways, and I don't really feeling the underlying euphoric effects that it was giving me. All in all though, it was a pleasent experience. Doesn't feel healthy enough to be something one would want to do regularly - but was worth it for a quick experience!
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Why using Slider.js?
Basic features
- Each slide displays the image, but can also have a text caption and a link.
- Slides navigation (pages, next, previous)
- Load images before starting the slider.
- Load the slider photos with a JSON object (distant or local).
Highly extensible and customizable
Transitions
Choose your transition among 13 available CSS Transitions and 10 built-in Canvas transition functions.
Implement your own transition in the technology you mastery:
- Style your own CSS transitions which fit the best your needs.
- Implement your own render function manipulating images pixels and Canvas API.
Themes
Choose or style your own theme.
Features
Extend the API with new features. (see our Flickr example)
Lightweight
- slider.min.js
- 11K
- slider.min.css
- 8.2K
Efficient
Unlike many Javascript and jQuery image sliders, Slider.js animation implementation is simple, clean and do not parse/manipulate DOM style attributes with Javascript each render frame rate.
Slider.js is an hybrid solution taking the efficiency of CSS3 transitions and the power of Canvas animation based on requestAnimationFrame
.
More details in the technical part.
Browser compatibility
This library intends to work perfectly with latest browsers (Chrome, Firefox 4+, Safari, IE10).
On older browsers (like IE6, FF3.0, ...) CSS Transitions aren't supported, it means that there are no animations
but the slider works, it's not broken, because CSS by its nature provides a graceful degradation.
Open question: Do old browser users care about animations?
A Canvas usage falls back on CSS version if Canvas is not supported.
Usage and API
Best way is to hack...
...the source code:
Try it live with your web console:
Open your web console and play with the slider
variable.
Slider.js
The Slider constructor takes an empty container DOM node in argument.
var slider = new Slider($('#sliderContainer'));
You can start the slider by setting photos through a JSON object:
slider.setPhotos([
{ "src" : "images/evil-frank.png", "name": "Big Buck Bunny" },
{ "src" : "images/s1_proog.jpg", "name": "Elephant Dreams" }
]);
The format of this JSON is an Array of { src, name (optional), link (optional) }
Or fetch this JSON with AJAX:
slider.fetchJson('photos.json');
Don't forget to set your slider images size:
slider.setSize(400, 300);
Themes and CSS transitions can be switched live with these methods:
slider.setTheme('theme-dark');
slider.setTransition('transition-zoomin');
For the Canvas usage, see the canvas part section.
Advanced usages
Stop the slider if needed:
slider.stop();
And (re)start it:
slider.start();
To manually change slides, use:
slider.next(); // next slide
slider.prev(); // previous slide
slider.slide(4); // go to slide number 4
You can chain different methods in any order
slider.setSize(400, 300)
.fetchJson('photos.json')
.slide(5)
.setTheme('theme-light')
.setTransition('transition-zoomout');
The CSS
To implement your own slider CSS transitions, choose a transition name and describe what change between (at least) 2 selectors.
For instance using tn
transition name you could define rules for .slider.tn .slider-image
and .slider.tn .slider-image.current
.
Example: Zoom in transition
/* zoom in */
.slider.transition-zoomin .slide-image {
transform: scale(2);
}
.slider.transition-zoomin .slide-image.current {
transform: scale(1);
}
Example: Left transition
/* left transition */
.slider.transition-left .slide-image {
opacity: 1;
left: -100%;
}
.slider.transition-left .slide-image.current {
left: 0;
}
.slider.transition-left .slide-image.current ~ .slide-image {
left: 100%;
}
Note that using a Canvas transition, the CSS transition is still used for the caption text.
On the same principle, you can define your own slider themes with CSS:
Example: dark theme
Less source code:
.slider.theme-dark {
background: black;
color: white;
a {
color: white;
}
.caption {
background: rgba(0,0,0,0.5);
}
.options a {
color: #91BECC;
&:hover {
color: #D3E5EB;
}
}
.slide-image {
background: black;
}
.slide-pager a.current {
background-color: #91BECC;
color: black;
}
.loader .spinner {
background: url(load_dark.gif) no-repeat;
}
}
Canvas API
Using the Canvas API is optional. Most of times, CSS transitions can fit your needs. But if you want more effects manipulating images, you need to handle your own render function.
setTransitionFunction
You can use setTransitionFunction
to set the transition function.
- Pick one of the built-in transition functions:
slider.setTransitionFunction(SliderTransitionFunctions.clock);
- Or implement your own transition function.
Basically, you implement the render method, the loop function called during the transition:slider.setTransitionFunction({ render: function(slider, from, to, progress){ // draw the current transition from image from to to with progress percent. } });
This render function must be efficient because it directly impacts the render frame rate.
If you use datas which never change between two render frames, you could preload these datas implementing the init method.
For instance, you could extract once the Canvas ImageData from the two transition images:
slider.setTransitionFunction({
init: function(self, from, to) {
return SliderUtils.extractImageData(self, from, to);
},
render: function(slider, from, to, progress, externalDatas){
// externalDatas.fromData
// externalDatas.toData
// externalDatas.output
...
}
});
There are some util functions (we just see a extractImageData
usage before).
You should also use the clippedTransition
util function for most of your Canvas transitions.
Example with the circle transition:
slider.setTransitionFunction({
render: SliderUtils.clippedTransition(function(ctx, w, h, p) {
return ctx.arc(w / 2, h / 2, 0.6 * p * Math.max(w, h), 0, Math.PI * 2, false);
})
})
setTransitionDuration
You can also define the transition duration.
Using CSS transitions, this transition duration can be overriden with the transition-duration property.
But with Canvas, you must use the setTransitionDuration
method. It takes the duration in milliseconds.
slider.setTransitionDuration(1500) // the default
How does it work?
Let's go deeper and see how things are working under the hood.
Canvas Animations VS CSS Transitions
Slider.js provides a transparent Canvas or CSS transitions support: Whatever the technology you choose for the transition, the slider should work properly and in a same way.
But each technology has its own good and bad points:
| Canvas | CSS Transitions | |
|---|---|---|
| Usability | Medium (Javascript and Canvas API knowledge required) | Easy |
| Performance | Good (thanks to requestAnimationFrame ) |
Very good |
| Possibilities | Infinite (you manipulate pixels how you want) | Limited (to CSS) |
How CSS transitions work
CSS Transitions allows property changes in CSS values to occur smoothly over a specified duration.
(spec)
CSS Transitions are a way to easily add animations to a web page. Basically, it allows us to perform an animation between two given states by adding one CSS property: transition
(derived in 4 sub-properties). CSS properties will change CSS values, which will be animated smoothly over a specified duration.
To use CSS Transitions, like in a state machine, we firstly need to identify states and actions. States are CSS selectors and actions are changes made between these CSS selectors.
It's that simple!
It let the browser rendering animation instead of using javascript complex code. You don’t have to worry about animation and performance. So you can stay focused on what changes and describe it in CSS.
In our slider, CSS and Javascript are split and independent:
- The javascript part just does ajax stuff, templating and change a few classes.
To perform slide change, only a
current
class is moved. - The CSS part styles the slider and use classes set by Javascript to perform Slider effects with CSS Transitions.
For instance, slider.setTransition('transition-left')
will set a transition-left
class which will be used in CSS to describe the transition
with CSS3 Transitions.
Hence, you can add your own transitions very easily. Mixing with CSS3 Transforms, effects are incredible and very efficient (animations are rendered by your browser : accelerated and optimized).
How Canvas animation works
Mmh, Canvas?
A Canvas element is used for some more advanced transitions which are impossible to implement using CSS Transitions.
A Canvas is basically a pixels area in which you have a full access of each pixel. Hopefully, Canvas also provides some APIs like the Canvas 2D Context API.
requestAnimationFrame is exactly designed for animation looping
To perform the transition animation, we need to loop during the animation (and only at that time) to render the progressing state change. Looping means iterate as fast as possible to render a frame on the Canvas.
In our slider, each slide change is performed by calling the slide
method which takes in argument the number of the slide to switch to.
The slide method will init the render animation for a specific transition function (transitionFunction
) and
during a specific duration (duration
) by calling startRender
.
This method will init "constant" variables for the current transition by calling the transitionFunction.init
function if defined.
For a same transition, the "from" image and the "to" image are constant,
so we have sometimes some constant variables which could be init once (like the CanvasDataImage objects of both images).
Once done, we init the render animation loop by calling the render
method.
In this method, we determine the progress of the transition (from 0% to 100%). If the transition is finished, we draw the final image until the next transition comes. But if the transition is in progress, we call the transitionFunction.render
method by passing all variables this method can deal with (including the canvas context, the constant variables, ...) and we recall the render method to immediately redraw the next animation frame.
But to handle this recall, we really need to use the requestAnimationFrame
which is exactly designed for animation looping.
Older Javascript codes was using setTimeout
or setInterval
which is bad. (Some libraries like jQuery are today still using it for animating).
Using this method, the browser knows explicitly what you are doing and can optimize the animation for you. It takes two arguments: the function to call for the next frame (here it's render) and the node element in which the animation occurs.
This second argument is essential for the optimization.
For instance, if the Canvas is not visible in the viewport (means that you scroll down and not see it anymore), the browser can stop (or slow down) the requestAnimationFrame frame rate. It wasn't the case with setTimeout
/ setInterval
usages.
I think there are much more optimizations made by the browser using this method (optimizations I don't know because I haven't hack some low level render engine codes yet).
Implementation notes
We tried to keep independence between the slider engine, the CSS Transitions support and the Canvas support.
To perform that, a first class implements the slider engine and target CSS Transitions. A second class extends it and provides the Canvas transition feature. It's the Slider class.
CoffeeScript makes the inherence easier for Javascript.
Hack-ability - Flickr example
With this Slider API. Let's see how to easily retrieve flickr photos.
Implementation
Let's create a new slider
var slider = new Slider($('#sliderContainer'));
Now, let's create a new method in this slider :
slider.fetchFlickr = function(options) {
this.fetchJson('http://www.flickr.com/services/rest/?jsoncallback=?', $.extend({
method: 'flickr.photos.getRecent',
per_page: 10,
format: 'json',
api_key: 'be902d7f912ea43230412619cb9abd52' // Your API key
}, options), function(json){
return $.map(json.photos.photo, function(photo){
return {
link: 'http://www.flickr.com/photos/'+photo.owner+'/'+photo.id,
src: 'http://farm'+photo.farm+'.static.flickr.com/'+
photo.server+'/'+photo.id+'_'+photo.secret+'_z.jpg',
name: photo.title.substring(0,20)
}
});
});
return this;
}
In only 18 lines of code, we have created an awesome flickr slider!
Let's see deeply this code source here: fetchFlickr.js annoted source.
You could also implement it in a more OO way with inherence (easy with CoffeeScript).
Usage
Default behavior: get recent Flickr photos.
slider.fetchFlickr();
You can override default flickr options by passing params (see flickr API).
Retrieve 30 recent photos searching "China":
slider.fetchFlickr({
per_page: 30,
method: 'flickr.photos.search',
text: 'China'
});


Oyinbola botique lets shop!
Below are upcoming events and programmes with Oyinbola Botique for 2017, we will be updating events yearly. For more information go to our contact page.
| Date | Event Description |
|---|---|
| 10 July to 28 July | 30% discount on every chilren suit and bow tie. |
| 28 august to 8 september | Two week holiday for sallah break |
| 8 september to 20 september | 25% discount on Childrens underwear |
| 20 December to 10 January | 20% discount on childrens underwear. |


Registration & Breakfast
Location: Lobby
Kickoff Speech
Speaker: Chuck Russel - Organizer
Location: Grand Ballroom
Augmented Reality in a Fracture Reality
Speaker: Dave Alpert
Location: Ballroom A
Digital Experiences On-Demand
Speaker: Leemay Nassery
Location: Ballroom B
Ruby On Rails Migration
Speaker: Renaud Visage
Location: Ballroom C
SmartThings - An Origin Story
Speaker: Jeff Beck
Location: Ballroom A
Beginning Angular 2.0
Speaker: Romain Guy
Location: Ballroom B
Continuous Development Pipeline Considerations
Speaker: Tricia Katz
Location: Ballroom C
Social Data Algorithims
Speaker: Phil Nash
Location: Ballroom A
Blockchain - From out of the Dark Web to Civic Engagement
Speaker: Marie Leaf
Location: Ballroom B
Adobe Experience Manager Primer
Speaker: Elisha Dvorak
Location: Ballroom C
Lunch
Location: Grand Ballroom
Linux and IIS
Speaker: E.G Nadhan
Location: Ballroom A
Digital Media Experiences
Speaker: Dana White
Location: Ballroom B
Meaningful Digital Communication
Speaker: Cal Henderson
Location: Ballroom C
Ember.js vs Electron - A Breakdown
Speaker: Melanie Sumner
Location: Ballroom A
Google Analytics in the age of Privacy
Speaker: Harry Roberts
Location: Ballroom B
Brining Military Discipline into the Agile Environment
Speaker: Rebecca Fitzhuh
Location: Ballroom C
Python Foundations
Speaker: Matt Layman
Location: Ballroom A
Online Payments that Don't Suck
Speaker: Rohit Basu
Location: Ballroom B
OpenID Foundation Pursuits
Speaker: Sarah Squire
Location: Ballroom C
Technology Lounge - Bar and Lounge
Location: First Two Floors of the Hotel
Registration & Breakfast
Location: Lobby
Day Highlights
Speaker: Chuck Russel - Organizer
Location: Grand Ballroom
Advanced SCSS
Speaker: Sarah Drasner
Location: Ballroom A
Authentication Systems and Tokens
Speaker: Michael Albers
Location: Ballroom B
Customer Experience at the Gallery
Speaker: Ryan King
Location: Ballroom C
Panel Discussion: Venture Capital in Transformative Technology
Panel Moderator: Allison Lowery
Panelist: Phil Nash
Panelist: Harry Roberts
Panelist: Melanie Sumner
Panelist: Rohit Basu
Location: Grand Ballroom
Sponsor Presentations
Speaker: Sponsor Hall
Location: Lobby
Lunch
Location: Grand Ballroom
Modern Fullstack Workflow
Speaker: Leemay Nassery
Location: Ballroom A
Educating the Future of Technology
Speaker: Marie Leaf
Location: Ballroom B
Geo-Services Powering Everything
Speaker: Dave Alpert
Location: Ballroom C
Modern User Interfaces
Panel Moderator: David Hickthier
Panelist: Brad Frost
Panelist Sarah Drasner
Panelist: Romain Guy
Location: Grand Ballroom
Sponsor Presentations
Speaker: Sponsor Hall
Location: Lobby
Harrisburg Senators Ballpark After Parth
Location: City Island
Registration & Breakfast
Location: Lobby
Kickoff Speech
Speaker: Chuck Russel - Organizer
Location: Grand Ballroom
eLearning and Content Design
Speaker: Elisha Dvorak
Location: Ballroom A
Scaling a Business Exponentially
Speaker: Cal Henderson
Location: Ballroom B
Authenticaing Security Tokens
Speaker: Marie Leaf
Location: Ballroom C
VUI integrations in your CX
Speaker: Tricia Katz
Location: Ballroom A
Digital Childhood Frontier
Speaker: Matt Layman
Location: Ballroom B
Headless CMS
Speaker: Dana White
Location: Ballroom C
Open Source in Enterprise
Speaker: E.G. Nadhan
Location: Ballroom A
Open API's
Speaker: Renuad Visage
Location: Ballroom B
Data Processing and Synergy
Speaker: Ryan King
Location: Ballroom C
Lunch
Location: Grand Ballroom
Final Comments
Speaker: Chuck Russel - Organizer
Location: Grand Ballroom


Function S2Polygon.initializeToIntersection
Initialize this polygon to the intersection, union, difference (A - B), or symmetric difference (XOR) of the given two polygons.
"snap_function" allows you to specify a minimum spacing between output vertices, and/or that the vertices should be snapped to a discrete set of points (e.g. S2CellId centers or E7 lat/lng coordinates). Any snap function can be used, including the IdentitySnapFunction with a snap_radius of zero (which preserves the input vertices exactly).
The boundary of the output polygon before snapping is guaranteed to be accurate to within S2::kIntersectionError of the exact result. Snapping can move the boundary by an additional distance that depends on the snap function. Finally, any degenerate portions of the output polygon are automatically removed (i.e., regions that do not contain any points) since S2Polygon does not allow such regions.
See S2Builder and s2builderutil for more details on snap functions. For example, you can snap to E7 coordinates by setting "snap_function" to
s2builderutil
:IntLatLngSnapFunction(7).
The default snap function is the IdentitySnapFunction with a snap radius of S2::kIntersectionMergeRadius (equal to about 1.8e-15 radians or 11 nanometers on the Earth's surface). This means that vertices may be positioned arbitrarily, but vertices that are extremely close together can be merged together. The reason for a non-zero default snap radius is that it helps to eliminate narrow cracks and slivers when T-vertices are present. For example, adjacent S2Cells at different levels do not share exactly the same boundary, so there can be a narrow crack between them. If a polygon is intersected with those cells and the pieces are unioned together, the result would have a narrow crack unless the snap radius is set to a non-zero value.
Note that if you want to encode the vertices in a lower-precision representation (such as S2CellIds or E7), it is much better to use a suitable SnapFunction rather than rounding the vertices yourself, because this will create self-intersections unless you ensure that the vertices and edges are sufficiently well-separated first. In particular you need to use a snap function whose min_edge_vertex_separation() is at least twice the maximum distance that a vertex can move when rounded.


${self.head()} <% def inpath(req,menu): _path = req.fullpath if _path.endswith("/"): _path = _path[:-1] return _path in [ it['path'] for it in menu['items'] ] def aclass(req,path): _path = req.fullpath if _path.endswith("/"): _path = _path[:-1] return _path==path and 'sl-active' or '' %>


| Home | Trees | Indices | Help |
|
|---|
|
|
Statistics root package.
This package contains a number of common statistical utilities. Sub-packages provide more specialized APIs, for example csb.statistics.pdf defines the probability density object model.
| Submodules | |
|
| Classes | |
| Cumulative |
| Functions | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
| Variables | |
__package__ = None hash(x) |
| Function Details |
auto-correlation of a times series
|
Estimate mean of a circular variable
|
Calculate circular variance of a circular variable.
|
Histogram of univariate input data: basically calls numpy's histogram method and does a proper normalization.
|
Calculate the entropy of p.
|
|
|
Non-greedy two-dimensional histogram.
|
Non-greedy n-dimemsional histogram.
|
|
Reconstruction of a multidimensional configuration that optimally reproduces the input distance matrix. See: Gower, J (1966) |
Probabilistic version of XOR. Works only for axis=0. |
Calculates a running average for given window size
|
|
Calculates the weighted median, that is the minimizer of argmin {\sum w_i |x_i - \mu|}
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Tue Jul 4 20:19:04 2017 | http://epydoc.sourceforge.net |


Hello World!
\n"} lang="jsx" />
Hello World!
"}}
{...{"desc":"","CSSInDependencies":["katex/dist/katex.css"],"dependencies":{"katex":"0.11.1"},"files":{}}}
>
<>>;","jsx":"export default () => <>>;\n"}}
{...{"hideActions":["CSB"],"path":"/_demos/demo-missing-react","dependencies":{},"files":{}}}
>