| VerifySignature.java |
1 package com.nexmo.security; 2 /* 3 * Copyright (c) 2011-2013 Nexmo Inc 4 * 5 * Permission is hereby granted, free of charge, to any person obtaining a copy 6 * of this software and associated documentation files (the "Software"), to deal 7 * in the Software without restriction, including without limitation the rights 8 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 * copies of the Software, and to permit persons to whom the Software is 10 * furnished to do so, subject to the following conditions: 11 * 12 * The above copyright notice and this permission notice shall be included in 13 * all copies or substantial portions of the Software. 14 * 15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 * THE SOFTWARE. 22 */ 23 24import java.util.Map; 25import java.util.TreeMap; 26import java.util.Iterator; 27import javax.servlet.http.HttpServletRequest; 28 29import org.apache.commons.logging.Log; 30import org.apache.commons.logging.LogFactory; 31 32import com.nexmo.common.util.MD5Util; 33 34/** 35 * VerifySignature.java

 36 * 37 * Helper class to assist with verifying sigmatures on inbound message requests 38 * Upon receiving a request, the HttpServletRequest object should be passed to the verifyRequestSignature method 39 * along with the secret key assigned to your account. 40 * This will verify that the message request was signed by and originated from the Nexmo platform. 41 * Additionally, the timestamp will be checked to ensure it is within an acceptable time window to help ensure 42 * that a properly signed request has not been intercepted and later re-played 43 * 44 * Created on 5 January 2011, 17:34 45 * 46 * @author Paul Cook 47 * @version 1.0 48 */ 49public class VerifySignature implements SecurityConstants { 50 51 private static Log log = LogFactory.getLog(VerifySignature.class); 52 53 /** 54 * looks at the current http request and verifies that the request signature, if supplied is valid. 55 * 56 * @param request The servlet request object to be verified 57 * @param secretKey the pre-shared secret key used by the sender of the request to create the signature 58 * 59 * @return boolean returns true only if the signature is correct for this request and secret key. 60 */ 61 public static boolean verifyRequestSignature(HttpServletRequest request, String secretKey) { 62 // identify the signature supplied in the request ... 63 String suppliedSignature = request.getParameter(PARAM_SIGNATURE); 64 65 // Firstly, extract the timestamp parameter and verify that it is within 5 minutes of 'current time' 66 String timeString = request.getParameter(PARAM_TIMESTAMP); 67 long time = -1; 68 try { 69 time = Long.parseLong(timeString) * 1000; 70 } catch (NumberFormatException e) { 71 time = 0; 72 } 73 long diff = System.currentTimeMillis() - time; 74 if (diff > MAX_ALLOWABLE_TIME_DELTA || diff < -MAX_ALLOWABLE_TIME_DELTA) { 75 log.debug("SECURITY-KEY-VERIFICATION -- BAD-TIMESTAMP ... Timestamp [ " + time + " ] delta [ " + diff + " ] max allowed delta [ " + -MAX_ALLOWABLE_TIME_DELTA + " ] "); 76 return false; 77 } 78 79 // Next, construct a sorted list of the name-value pair parameters supplied in the request, excluding the signature parameter 80 Map<String, String> sortedParams = new TreeMap<String, String>(); 81 for (Iterator<?> I = request.getParameterMap().entrySet().iterator();I.hasNext();) { 82 Map.Entry<?, ?> param = (Map.Entry<?, ?>)I.next(); 83 String name = (String)param.getKey(); 84 String value = ((String[])(param.getValue()))[0]; 85 if (name.equals(PARAM_SIGNATURE)) 86 continue; 87 if (value == null || value.trim().equals("")) 88 continue; 89 sortedParams.put(name, value); 90 } 91 92 // walk this sorted list of parameters and construct a string 93 StringBuilder sb = new StringBuilder(); 94 for (Map.Entry<String, String> param: sortedParams.entrySet()) { 95 String name = param.getKey(); 96 String value = param.getValue(); 97 sb.append("&").append(clean(name)).append("=").append(clean(value)); 98 } 99 00 // append the secret key and calculate an md5 signature of the resultant string 01 sb.append(secretKey); 02 03 String str = sb.toString(); 04 05 String md5 = "no signature"; 06 try { 07 md5 = MD5Util.calculateMd5(str); 08 } catch (Exception e) { 09 log.error("error...", e); 10 } 11 12 log.debug("SECURITY-KEY-VERIFICATION -- String [ " + str + " ] Signature [ " + md5 + " ] SUPPLIED SIGNATURE [ " + suppliedSignature + " ] "); 13 14 // verify that the secre 15 if (!md5.equals(suppliedSignature)) 16 return false; 17 18 return true; 19 } 20 21 public static String clean(String str) { 22 return str == null ? null : str.replaceAll("[=&]", "_"); 23 } 24 25} 26


TC/2012/00001 Brian Griffin vs HM Revenue & Customs
There are currently no outstanding fees on your case.
This could be for a number of different reasons:
- There are no fees due.
- You’ve already paid.
- You have missed the deadline to pay.
Contact the tribunal if you believe there should be an outstanding fee.


In POSIX sh, echo flags are undefined.
#!/bin/sh
echo -ne 'Foo:\tBar'
Rewrite in terms of the more robust and standardized printf
:
#!/bin/sh
printf 'Foo:\tBar'
echo
has historically behaved differently on different systems. Use printf
instead to ensure compatibility between shells.
If you only intend to target systems that supports this feature, you can change the shebang to a shell that guarantees support, or [[ignore]] this warning.
You can use # shellcheck disable=SC3000-SC4000
to ignore all such compatibility
warnings.


ForgeRock is a multinational identity and access management software company headquartered in San Francisco, U.S.A. The company develops commercial open source identity and access management products for internet of things, customer, cloud, mobile, and enterprise environments. Fran Rosch is the CEO
ForgeRock is a multinational identity and access management software company headquartered in San Francisco, U.S.A. The company develops commercial open source identity and access management products for internet of things, customer, cloud, mobile, and enterprise environments. Fran Rosch is the CEO
| No. | {{ element.position }} | Name | {{ element.name }} | Weight | {{ element.weight }} | Symbol | {{ element.symbol }} |
|---|
I'm visible because I am open


Introduction to my Data Science Blog
9 March ’18
Introduction to my Blog
This data science blog is built on the Jekyll Travelog theme (both elegant and downright simple). The theme source code can be found on Github here.
Introduction
I am a systems engineer and an adjunct professor of data science. As I cover concepts in data science (or learn new ones), I have been writing code, mostly in R but sometimes in Python, to demonstrate to my classes or better learn certain techniques. I am establishing this blog so I can post code and material.
Bio
Dr. Clifton Baldwin is an adjunct professor for the Data Science and Strategic Analytics Masters degree, Stockton University, Galloway, NJ, a program he helped establish. In addition, Dr. Baldwin is the Southern New Jersey Regional Director for the Delaware Valley Chapter of INCOSE INCOSE. He has over 26 years of experience working in software and systems engineering with the first ten years of his career as a “systems analyst” (what we would now call “data scientist”) at the U.S. Bureau of Economic Analysis [BEA] (https://www.bea.gov). His research interests include system of systems and complex systems modeling. He holds a BA degree in Mathematics from Rutgers University, a MS degree in Information Systems from Johns Hopkins University, and a PhD in Systems Engineering from Stevens Institute of Technology.


Hello there! I am currently a research engineer at Reservoir Labs, located in Manhattan. Previously, I was a student at Yale University, where I did a B.S. in Computer Science and Mathematics. And before that, it all started with qualifying for the USA Junior Mathematical Olympiad (USAJMO) in high school and placing 65th in the nation. This page contains info about my past projects. I also post on my blog (linked above) about what I'm working on, and any thoughts I have about technical topics. Feel free to contact me (email linked above) to discuss any interesting technical topics or opportunities!
Published three papers, 6 years of experience at Yale, Vanderbilt, and Reservoir Labs performing research in computational biology, computer science, and machine learning
Technical lead for several projects as a full-time engineer and as a consultant
Consultant for Yale School of Public Health at the Townsend Lab, and part-owner and consultant at Knowsun Consulting


Redis is an in-memory key-value pair NoSQL data store often used for web application sessions, transient data and as a broker for task queues. redis-py is a common Python code library for interacting with Redis. Let's learn how to get Redis up and running on Ubuntu and then start using it in a simple Python application.
This tutorial is tested with Python 3.5 but either
Python 2 or 3 should work for everything written
here. Just make sure one version is installed on your system by going to
the terminal and typing python --version
. Other than Python itself,
here is the software we are going to use throughout the rest of this post:
If you aren't sure how how to install pip and virtualenv, review the first few steps of the how to set up Python 3, Flask and Green Unicorn on Ubuntu 16.04 LTS guide.
There are a few ways to install Redis, such as
downloading and compiling from source.
However, on Ubuntu we can install a system package through apt
. The
advantage of this method is that the apt
process will take care of
installing redis-server
as a system service. Open the terminal and run
the following command:
sudo apt-get install redis-server
Enter your sudo
password and when you are prompted whether you want
to install the new package enter 'yes'.
After a few moments the downloading and processing should be complete and you will be back at the prompt.
Redis is now installed and the Redis server is running in the background
as a system service. Even though we installed the redis-server
package,
the installation also comes with the Redis command line client. The client
is useful for connecting directly to the Redis server without any Python
code. Give redis-cli
a try by typing this into the command prompt:
redis-cli
The Redis client connects to the localhost server and gives a new prompt to show it's ready for commands:
Give the prompt a try by using Redis commands such as keys *
or set a 1
.
The full list of Redis commands is provided in the
project documentation.
We need to figure out our python3
location, then create a virtualenv,
activate the virtualenv and then install redis-py with pip
.
Determine your python3
executable location with the which
command.
which python3
You'll see some output like the following screenshot.
Create a new virtualenv either in your home directory or wherever you
store your project virtualenvs. Specify the full path to your python3
installation.
# specify the system python3 installation
virtualenv --python=/usr/bin/python3 venvs/redistest
Activate the virtualenv.
source ~/venvs/redistest/bin/activate
Next we can install the redis-py Python package from
PyPI using the pip
command.
pip install redis
Alright, now it is installed in our virtualenv. Let's write some simple Python code to try out give redis-py!
Fire up the Python REPL with the python
or python3
command. You can also
write the following code in a Python file such as "testredis.py" then
execute it with python testredis.py
.
import redis
# create a connection to the localhost Redis server instance, by
# default it runs on port 6379
redis_db = redis.StrictRedis(host="localhost", port=6379, db=0)
# see what keys are in Redis
redis_db.keys()
# output for keys() should be an empty list "[]"
redis_db.set('full stack', 'python')
# output should be "True"
redis_db.keys()
# now we have one key so the output will be "[b'full stack']"
redis_db.get('full stack')
# output is "b'python'", the key and value still exist in Redis
redis_db.incr('twilio')
# output is "1", we just incremented even though the key did not
# previously exist
redis_db.get('twilio')
# output is "b'1'" again, since we just obtained the value from
# the existing key
redis_db.delete('twilio')
# output is "1" because the command was successful
redis_db.get('twilio')
# nothing is returned because the key and value no longer exist
That is a quick introduction to some commonly-used Redis commands invoked by their Python bindings through the redis-py library. Take a look at the redis-py official documentation to learn more about the extensive command list you can use to create, read, modify and delete keys and values in Redis.
Questions? Tweet @fullstackpython or post a message on the Full Stack Python Facebook page. Something wrong with this post? Fork this page's source on GitHub.


SpeedOf.Me API Consumer - Advanced Sample Page
--------------- Settings ---------------
Faster Test
More Accurate Test
Find Test Server
Find User Info
Do Latency Test
Do Upload Test
Show Progress
Verbose Progress
Start Test
For more information and getting an API key please visit
speedof.me/api


{% extends "admin/change_form.html" %} {% load projects i18n %} {% block top_header %} {% project_header object_id %} {% endblock %} {% block content %} {% if not add %} {% project_tabs object_id request %} {% endif %} {{ block.super }} {# On-change-tab modal #} {% translate 'Close' %} {% translate 'Are you sure you want to close this form?' %} {% translate 'There are unsaved changes in the form. Changing tab will lose all changes. If you are not sure, cancel this action, check the form and save it.' %} {% endblock %}
{% translate 'There are unsaved changes in the form. Changing tab will lose all changes. If you are not sure, cancel this action, check the form and save it.' %}


http://www.exploit-monday.com/2017/08/exploiting-powershell-code-injection.html?m=1
https://blogs.msdn.microsoft.com/powershell/2017/11/02/powershell-constrained-language-mode/
Check if your session is running in ConstrainedLanguage:
PS> $ExecutionContext.SessionState.LanguageMode
ConstrainedLanguage
So what does Constrained Language constrain?
Constrained Language consists of a number of restrictions that limit unconstrained code execution on a locked-down system. These restrictions are:
- PowerShell module script files must explicitly export functions by name without the use of wildcard characters.
- This is to prevent inadvertently exposing powerful helper function not meant to be used publicly.
- PowerShell module manifest files must explicitly export functions by name without the use of wildcards.
- Again, to prevent inadvertent exposure of functions.
- COM objects are blocked.
- They can expose Win32 APIs that have likely never been rigorously hardened as part of an attack surface.
- Only approved .NET types are allowed.
- Many .NET types can be used to invoke arbitrary Win32 APIs. As a result only specific whitelisted types are allowed.
- Add-Type is blocked.
- It allows the creation of arbitrary types defined in different languages.
- The use of PowerShell classes are disallowed.
- PowerShell classes are just arbitrary C# type definitions.
- PowerShell type conversion is not allowed.
- Type conversion implicitly creates types and runs type constructors.
- Dot sourcing across language modes is disallowed.
- Dot sourcing a script file brings all functions, variables, aliases from that script into the current scope.
- So this blocks a trusted script from being dot sourced into an untrusted script and exposing all of its internal functions.
- Similarly, an untrusted script is prevented from being dot sourced into a trusted script so that it cannot pollute the trusted scope.
- Command resolution automatically hides commands you cannot run.
- For example, a function created in Constrained Language mode is not visible to script running in Full Language mode.
- XAML based workflows are blocked since they cannot be constrained by PowerShell.
- But script based workflows and trusted XAML based workflows shipped in-box are allowed.
- The SupportedCommand parameter for Import-LocalizedData is disabled.
- It allows additional commands prevented by Constrained Language.
- Invoke-Expression cmdlet always runs in Constrained Language.
- Invoke-Expression cannot validate input as trusted.
- Set-PSBreakpoint command is blocked unless there is a system-wide lockdown through UMCI.
- Command completers are always run in Constrained Language.
- Command completers are not validated as trustworthy.
- Commands and script run within the script debugger will always be run in Constrained Language if there is a system-wide lockdown.
- The DSC Configuration keyword is disabled.
- Supported commands and Statements are not allowed in script DATA sections.
- Start-Job is unavailable if the system is not locked-down.
- Start-Job starts PowerShell in a new process and if the system is not locked-down the new process runs in Full Language mode.
As we can see, Constrained Language mode imposes some significant restrictions on PowerShell. Nevertheless, it remains a formidable and capable shell and scripting language. You can run native commands and PowerShell cmdlets and you have access to the full scripting features: variables, statements, loops, functions, arrays, hashtables, error handling, etc.


This package provides various indices, like Crude Migration Rate, different Gini indices or the Coefficient of Variation among others, to show the (un)equality of migration.
| Version: | 0.3.0 |
| Imports: | calibrate |
| Published: | 2013-10-07 |
| Author: | Lajos Bálint and Gergely Daróczi |
| Maintainer: | Gergely Daróczi <daroczig at rapporter.net> |
| BugReports: | https://github.com/daroczig/migration.indices/issues |
| License: | AGPL-3 |
| URL: | http://github.com/daroczig/migration.indices |
| NeedsCompilation: | no |
| Citation: | migration.indices citation info |
| Materials: | NEWS |
| CRAN checks: | migration.indices results |
| Reference manual: | migration.indices.pdf |
| Package source: | migration.indices_0.3.0.tar.gz |
| Windows binaries: | r-devel: migration.indices_0.3.0.zip, r-release: migration.indices_0.3.0.zip, r-oldrel: migration.indices_0.3.0.zip |
| OS X binaries: | r-release: migration.indices_0.3.0.tgz, r-oldrel: migration.indices_0.3.0.tgz |
| Old sources: | migration.indices archive |
Please use the canonical form https://CRAN.R-project.org/package=migration.indices to link to this page.


${{total}}
|
Dollars Donated
|
Givology Challenge
|
|
Volunteer Hours
|
Givology Challenge
|
YOU'VE DONATED TO
{% for result in results %}
{% endfor %}
{% for result in results %}
{% endfor %}
{% for result in results %}
{% endfor %}
YOU'VE VOLUNTEERED:
| Date | Activity |
| {{ vw.when|date:"n.j.y" }} |
{{ vw.minutes }} minutes volunteering by {{ vw.action }}
|


Hurry: Discounted AirPods Pro are back in stock and shipping immediately on Amazon
by Maren EstradaSeriously, we’re not even going to waste our breath or your time here. All you have to know is that Apple AirPods Pro are somehow back in stock on Amazon, they’re shipping immediately, and they got a rare discount as part of Amazon’s early Black Friday 2019 sale that kicked off today. This is quite literally the hottest product of the season so there is no question whatsoever that shipping estimates will begin to slip soon. If you want a pair for yourself or to give as a gift, now’s your chance!
Available from Amazon
BGR may receive a commission
Buy Now
Here’s more info from the product page:
- Active noise cancellation for immersive sound
- Transparency mode for hearing and connecting with the world around you
- Three sizes of soft, tapered silicone tips for a customizable fit
- Sweat and water resistant
- Adaptive EQ automatically tunes music to the shape of your ear
- Easy setup for all your Apple devices
- Quick access to Siri by saying “Hey Siri”
- The Wireless Charging Case delivers more than 24 hours of battery life
Available from Amazon
BGR may receive a commission
Buy Now
Follow @BGRDeals on Twitter to keep up with the latest and greatest deals we find around the web. Prices subject to change without notice. BGR may receive a commission on orders placed through this article.


Bitcoin (BTC) Recovering But Is This Real Correction?
- Bitcoin price is currently correcting higher above the $8,600 resistance area against the US Dollar.
- The price is still facing a strong resistance near the $8,700 and $8,780 levels.
- Morning’s major declining channel is preventing gains near $8,705 on the hourly chart of the BTC/USD pair (data feed from Kraken).
- The price could correct further, but a clear break above $8,880 is needed for a convincing rise.
Bitcoin price is showing signs of an upside correction above $8,600 against the US Dollar. However, BTC is still facing a lot of hurdles near $8,780, $8,800 and $8,880.
Bitcoin Price Analysis
After trading to a new monthly low at $8,457, bitcoin started an upside correction against the US Dollar. BTC climbed above the $8,550 and $8,600 resistance levels to start the current correction.
Moreover, there was a break above the 50% Fib retracement level of the recent decline from the $8,785 high to $8,457 low. Finally, there was a spike above the $8,650 resistance area.
However, the upward move was capped by the $8,700 resistance the 100 hourly simple moving average. More importantly, morning’s major declining channel is preventing gains near $8,705 on the hourly chart of the BTC/USD pair.
Besides, it seems like the 76.4% Fib retracement level of the recent decline from the $8,785 high to $8,457 low is also acting as a strong resistance.
If there is a clear break above the channel resistance, $8,720, and the 100 hourly SMA, the price is likely to continue to higher. The next key resistance is near the $8,780 level. The main resistance is still near the $8,880 level and a connecting bearish trend line on the same chart.
Above $8,880, bitcoin is likely to continue to higher towards $9,000 and $9,250. Conversely, the price might fail to continue above $8,780 or $8,880. In the mentioned case, the $8,550 level is likely to provide support in the near term.
If the price struggles to hold the $8,550 support area, there are high chances of another break below $8,500 or even $8,450. The next major support is near the $8,300 and $8,200 levels.
Looking at the chart, bitcoin is showing a few positive signs above the $8,600 level. Having said that, the bulls need to gains strength above $8,700 and $8,720. If not, the price will most likely start a fresh decline back towards the $8,550 and $8,450 support levels.
Technical indicators:
Hourly MACD – The MACD is currently gaining momentum in the bullish zone.
Hourly RSI (Relative Strength Index) – The RSI for BTC/USD is currently rising and it is well above the 50 level.
Major Support Levels – $8,550 followed by $8,450.
Major Resistance Levels – $8,720, $8,780 and $8,880.


I am currently in Btech in second year in JUIT. I am a student of Computer Science Engineering. I am very curious of hoe computer works and very much interested in competitive programming. I am learning website designing and this is my first webpage to design.
Changed almost 6 schools.
Did my 10th and 12th in City Montessori School.
Percentage scored in 10th - 93%
Percentage scored in 12th - 86%
Jaypee University of Information Technology.
SGPA of first semester = 9.1
SGPA of second semester = 9.6
CGPA = 9.4
Address =
Email =
Contact number =
FB =


Hostel_Finder is a platform created in Kenya.It aims to help students find affordable places of residence during their tenure as they study.
We know how hectic hostel/house hunting is hence came up with this web application to save you the time, energy and hassle that comes with the cumbersome search. We gather information on hostels within your residence of option and link you up with them to secure a room giving you comfort away from home at an affordable range.
Our mission is to assist students who come to study in the city to secure affordable hostels at the comfort of their couch hence give them a conducive environment of residence as they study. Additionally collaborate with hostel owners and link them up with students.
Below are amenities which the hostel offers;
Spacious study area! No excuse for bad grades!
The hostels have fully furnished rooms that offer students a conducive environment to live as they study.
The hostels offer the students, delicious meals, hot shower, gym,lounge and WIFI


We meet on the last Tuesday of the month at 6:30pm. RSVP via Meetup.
Follow on twitter for meeting updates & interesting retweets: @lambdaloungecha
Lambda Lounge Chattanooga is dedicated to a harassment-free community for everyone. Our code of conduct is on Github
Meeting calendar


Journalist gets robot room service in Shanghai hotel, here’s how people reacted
Anna Fifield took to Twitter to share her unique experience with the 'chatty' bot who arrived at her door bearing the coffee pods that she had ordered.
by Trends DeskA journalist staying at a hotel in Shanghai was surprised when she ordered extra coffee pods and it was delivered by a robot.
Anna Fifield of the Washington Post, recently took to Twitter to share her unique experience with the ‘chatty’ bot who arrived at her door bearing the pods. The Beijing bureau chief of the newspaper, wrote, “I called for more coffee pods in my Shanghai hotel room and this is how they came to me”.
On opening the door, the journalist is heard saying “Good Morning, robot!” while pressing the ‘open’ button to retrieve the pods — one normal, another decaf.
When asked how the robot rang the doorbell, the journalist said that the machine called on the room’s phone to let her known that it was waiting outside in English and Chinese.
Some thought the robot was cute, but others felt it could have been more generous with the coffee pods. Some also pointed out that the customer didn’t tip the robot and it might be a good way to save some cash. Others shared similar experiences.
Incidentally, a restaurant in Ahmadabad started using robots to serve food, while another in Bengaluru has one that sings and entertains guests.
In Japan, the Henn-na Hotel made headlines in 2015 for letting robots maintain the premises. However, by 2019, most of the bots were fired after they reportedly created more work for the humans working there.
However, some have complained that these ‘cool’ services lack the warmth that defines the industry, and costs people jobs.


Conic gradients are awesome, but browsers haven’t realized yet. This polyfill lets you experiment with them now. If you like them, ask browser vendors to implement them!
The emulate 3D with conic-gradient demo again, now with an image (+working in WebKit browsers) http://t.co/ZzAqwKLdaT pic.twitter.com/jdAEgGDnuI
— Ana Tudor (@anatudor) August 15, 2015
Another demo using `conic-gradient` for bouncing cube's faces (I hate animation) http://t.co/YXwJGaGQaM cc @LeaVerou pic.twitter.com/BEnimSXeMN
— Ana Tudor (@anatudor) August 15, 2015
And an actually practical one: a metallic looking button! http://t.co/0SLAHN8gKL @LeaVerou pic.twitter.com/lmv98tp2nK
— Ana Tudor (@anatudor) June 19, 2015
Cog animation using #conicGradient (css polyfill made by @LeaVerou) http://t.co/wH95eZTO2s (now with screenshot) pic.twitter.com/d7Bif13Hwo
— Ryan (@ryanantonydunn) June 23, 2015
New idea: combined with `clip-path` (WebKit-only) http://t.co/Roz0fOrMEF @LeaVerou pic.twitter.com/vGe3phS6nR
— Ana Tudor (@anatudor) June 19, 2015
A few more examples using the conic-gradient() polyfill http://t.co/x0sfVmzqPX (each one is one element ☺) @LeaVerou pic.twitter.com/60MDWDDE6Z
— Ana Tudor (@anatudor) June 19, 2015
@LeaVerou Radar! http://t.co/FIfXFBTp4k 1 element, created now using the 3 types of gradients: linear, radial, conic☺ pic.twitter.com/Y4KWGpG2fr
— Ana Tudor (@anatudor) June 18, 2015
And one more with `clip-path` (WebKit only) http://t.co/D0cdRncK7C - one element per shape @LeaVerou pic.twitter.com/OpXiIyUDXX
— Ana Tudor (@anatudor) June 19, 2015
I just made a rotating snake [#illusion] with #conicGradient (css polyfill made by @LeaVerou ) http://t.co/9ouDRkLq3s pic.twitter.com/IdV4h2MO4i
— R+ (@RplusTW) 2015 6月 21日
@LeaVerou Took it a bit further with some blend modes http://t.co/XEolonnTVt Wish we could animate... pic.twitter.com/EEAZ7cw2qV
— Ryan (@ryanantonydunn) June 23, 2015
Playing around with @LeaVerou 's conic-gradient polyfill http://t.co/HXEAo1PZeP pic.twitter.com/NzNOq8lu3T
— Lucas Bebber (@lucasbebber) June 23, 2015
Thanks @LeaVerou for the #conicGradient css polyfill! Makes creating a Color Wheel a snap http://t.co/uLxteQmQgh pic.twitter.com/V2YTCRe7rO
— Michael (@mge_de) June 25, 2015
Quick @CodePen demo: rays http://t.co/bEoBY5v3hk (using `conic-gradient()`) @LeaVerou pic.twitter.com/JZYVwubNcN
— Ana Tudor (@anatudor) August 29, 2015
Inspired from Basic Indian Sarees. Made using conic-gradient polyfill by @LeaVerou. https://t.co/HCYcprWA2W pic.twitter.com/Eb1w8pJbPF
— Praveen Puglia (@praveenpuglia) October 22, 2015
conic-gradient()
and repeating-conic-gradient()
supportTo use directly in your CSS code like you would if it was supported, it requires -prefix-free. Just include both scripts in order:
<script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
<script src="conic-gradient.js"></script>
Alternatively, you can use the API to directly get the SVG element generated and do whatever you want with it:
var gradient = new ConicGradient({
stops: "gold 40%, #f06 0", // required
repeating: true, // Default: false
size: 400 // Default: Math.max(innerWidth, innerHeight)
});
console.log(gradient.svg); // SVG markup
console.log(gradient.png); // PNG image (fixed dimensions) as a data URL
console.log(gradient.dataURL); // data URL
console.log(gradient.blobURL); // blog URL
Note that the generated image will always resize accordingly, you don’t have to provide a size. The size argument just controls the resolution of the bitmap image generated inside the SVG that will be scaled. Making it smaller will result in faster performance but less crisp gradients.
Also, you can use PostCSS Conic Gradient to have conic gradient fallbacks added automatically to your CSS file.
The best way to get a feature implemented is asking browser vendors to do it. It’s really that simple. Browser vendors prioritize what to implement based on developer requests, so the more developers asking for a feature, the higher the chances browsers will notice.
Tweet TweetAlso, communicate directly with the developers. Vote or comment in the following:
But mainly, and regardless of the venue, speak up. Make noise. It matters more than you think.


WATRHUB DATA CHALLENGE LEADERBOARD
Prizes Awarded Daily! Do You Have What It Takes?
THE WATRHUB DATA CHAMPIONS
LEADER
QUESTIONS
STROKES
TOTAL


Air of criticism surrounds proposed offshore wind farm
FENWICK ISLAND, Del. (AP) - A proposed offshore wind farm off the coast of Delaware has received a wave of criticism from residents who live around Fenwick Island State Park.
News outlets report hundreds of people attended a meeting about the proposal Tuesday in Dagsboro. The Department of Natural Resources and Environmental Control announced last month it was negotiating an agreement with state park officials and Denmark-based company Ørsted for the Skipjack Wind Farm Project.
The project would bring offshore windmills to Delaware’s southern coast in exchange for $18 million in improvements to the state park. It would also supply power to about 35,000 homes.
Some attendees worried the wind farm would sour the coastal view. Others accused leaders of a lack of transparency about the plan. Supporters praised the environmental benefits of wind energy.
Sign up for Daily Newsletters
Copyright © 2019 The Washington Times, LLC.
Please read our comment policy before commenting.


We're not far from the Bangalore Culture Center!
No 16, 1st Main Santhrupthi Nagar
JP Nagar 7th Phase, Bangalore 56007878
Phone:<PHONE_NUMBER> - Pradeep,<PHONE_NUMBER> - Namitaa
Email: contactus@endezinephi.com


This is a work in progress. I'm developing this with p5.js, which is a port of Processing to JavaScript. Currently this program doesn't work with mobile devices, but I'm planning to add that in later.
Arrow Keys: move target reticule
A, S, D Keys: Fire from left, middle, or right missile battery


Senate Deputy Chief Whip justifies death penalty for hate speech
by The Eagle OnlineThe Deputy Senate Whip, Senator Aliyu Abdullahi Sabi, on Monday justified death penalty for hate speech, adding that there is no going back on the proposed bill.
The Deputy Senate Whip is the sponsor of the Hate Speech Bill, which was passed into first reading last week.
Addressing newsmen, Senator Sabi lamented that there have been series of mischievous report on the bill but that will not stop him from going ahead.
He recalled that the bill was sponsored in the 8th Senate before it lapsed with that session, adding that he decided not to go ahead with the bill because of the political atmosphere in the country at that time.
He said: “Unfortunately, there are mischievous reports about hate speech bill, which I sponsored on the floor of the Senate on the 12th of November, 2018.
“Unknown to some people, I actually sponsored that bill in the 8th Senate which the atmosphere was not right at that time because it clashed with campaign time.
“Between that time and now, I have listened attentively and has read copiously all reactions and comments by highly respected Nigerians and they have been very erroneous in their submission.
“In sponsoring that bill, I did that sincerely and without any mischief to ensure that there is order and good governance in Nigeria.”


Organized by community for community
6th PyCon CZ is organized by volunteers from Czech Python community for anyone interested in Python: professionals, novices, students and hobbyist Python programmers from Czechia and abroad. Everyone gets a chance to learn, receive support, and connect with others in a friendly atmosphere.
Watch a short video from the PyCon CZ 2019 or check talks from previous years on PyCon CZ YouTube channel.
Attendees said about PyCon CZ
Sponsors and Partners
PyCon CZ relies on sponsors to keep ticket prices affordable. If you would like to sponsor the conference learn more about PyCon CZ sponsorship.


Tech recruiter
I spend my time traveling the world, helping startups and tech businesses hire the best people.


Alright team, I’ve tried! GOD KNOWS I’VE TRIED! I’ve embraced staying at home. I continue to remind myself that I chose to do this. I CHOOSE THIS LIFE! So WHY!! WHHHHHYYYYY friends am I stuck in a hot kitchen with the smell of burnt chocolate all around me miserably trying to smoosh M&Ms into hard angry won’t-melt-AT-ALL! treats for Harley’s preschool snack! WHY???
These are the adorable pics - The Pinterest “it’s so easy” pics.
Now these are my creations -
OHHHH ladies WHY!?!?!?!?
On the bright side, these were my testers. So I have 3 more days until I throw in the towel and head to the store to get green frosted sugar cookies but I’m trying (there’s points for that right?)
Happy Monday y’all!
xoxo, Jen


General Settings
Smart Timesheet: Time and Attendance Management System
Smart Timesheet delivers the best Time and Attendance Management Software user experience, and functionality. Smart Timesheet is a user-friendly, intuitive system that provides smoothly integrated essential HR Time and Attendance functionality, Employee Management, Leaves Management, Scheduling, Time tracking, and Attendance solution and more.
A smarter approach to Time and Attendance:
- Engage your people everywhere on their preferred devices.
- Take action and respond to changes on the fly.
- Use one version of a single system across your entire organization.
- Make better business decisions based on contextual insights.
- Get a full view of talent, attendance, and schedule with Smart Timesheet software.
Smart Timesheet Features
Manage the full worker attendance lifecycle from time tracking to scheduling using a single intuitive attendance management system.
- Employee Management (HRIS)
- Time and Attendance Management
- Scheduling
- Leaves Management
- Reporting and Analytics
- Real-time Attendance Monitoring
- Multi-company
- Manager and Employee self-service
Help & Feedback
You can help us making this software better by suggesting new features or reporting a problem.
Report a Problem
Let us know if something isn't working
Send Feedback
Write your feedback and send at our developer email<EMAIL_ADDRESS>Open Source Licenses
License details for open source software
Laravel
The MIT License (MIT)
Copyright (c) Taylor Otwell
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Bootstrap
The MIT License (MIT)
Copyright 2011-2018 Twitter, Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Semantic UI
The MIT License (MIT)
Copyright (c) 2015 Semantic Org
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
jQuery JavaScript Library
The MIT License (MIT)
Copyright jQuery Foundation and other contributors
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
DataTables
The MIT License (MIT)
Copyright 2008-2018 SpryMedia Ltd
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Chart.js
The MIT License (MIT)
Copyright 2018 Chart.js Contributors
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Air Datepicker
The MIT License (MIT)
Copyright (c) 2016 Timofey Marochkin
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
MDTimePicker
The MIT License (MIT)
Copyright (c) 2017 Dionlee Uy
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


WE BE STAYING AT YOUR HOUSE !!
who's house ?
Primitives: When you access a primitive type you work directly on its value
BOOM
SHAKALAKA


{% include 'header.html' %}
Work in progress...
Will plug in the
Flaskbb Forum Module
{% include 'footer.html' %}


Combo was the first Cadejo instrument and serves as a test bed for further development.
There were two design goals:
The tone consist of 4 elements (1,2,3, & 4). Elements 1 and 2 produce square/pulse waves,
elements 3 and 4 produce sine, FM "sawtooth" and FM noise. With the coarse and fine detune
sliders at 0 the frequency relationship between the elements is 1:2:3:4. With the coarse slider
set to maximum the frequency relationship becomes 1:3:4:5.
Both relative mix and wave shape may be adjusted for each element. The tone may further be
modified by application of the filter. The filter has two parameters; curve and harmonic.
The available curves are: lowpass, bandpass, highpass, notch and bypass (filter off).
The filer cutoff/center frequency tracks the keyboard at a fixed harmonic from the fundamental.
The vibrato is a sine wave with rate and sensitivity controls.
Reverb has a fixed delay-time, the only control is wet signal mix
The flanger rate and feedback values are set moving the 'x' around the 2D field.


SPLITINDEX(1) User Commands SPLITINDEX(1) NAME splitindex - manual page for splitindex 0.2a SYNOPSIS splitindex.pl [OPTION]... RAWINDEXFILE [MAKEINDEXOPTION]... splitindex [OPTION]... RAWINDEXFILE [MAKEINDEXOPTION]... java splitindex [OPTION]... RAWINDEXFILE [MAKEINDEXOPTION]... tex splitindex DESCRIPTION splitindex 0.2a Copyright (c) 2002 Markus Kohm<EMAIL_ADDRESS>Split a single raw index file into multiple raw index files. Example: splitindex.pl foo.idx. OPTIONS -h, --help show this help and terminate -m, --makeindex PROGNAME call PROGNAME instead of default `makeindex'. -i, --identify EXPRESSION use regular EXPRESSION to match entries (see also option --resul‐ tis and --suffixis). Default is `^(\\indexen‐ try)\[([^]]*)\](.*)$'. -r, --resultis PATTERN create line to be written from PATTERN after matching lines (see also option --identify). Default is `$1$3'. -s, --suffixis PATTERN create suffix to be used from PATTERN after matching lines (see also option --identify). Default is `-$2'. -v, --verbose be more verbose (can be used multiple to increase verbosity) --version show version and terminate COPYRIGHT Copyright © 2002 Markus Kohm<EMAIL_ADDRESS>SEE ALSO The full documentation for splitindex is maintained as a LaTeX manual. If the texdoc and splitindex programs are properly installed at your site, the command texdoc splitidx should give you access to the complete manual. splitindex 0.2a November 2002 SPLITINDEX(1)


# Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right class Solution: def pseudoPalindromicPaths (self, root: TreeNode) -> int: def s(p): if p is None: return nonlocal c c[p.val] += 1 if p.left is None and p.right is None: nonlocal ret if sum(i % 2 for i in c) <= 1: ret += 1 s(p.left) s(p.right) c[p.val] -= 1 c = [0] * 10 ret = 0 s(root) return ret


{% with uns = current_user.unread_notifications %}
{% if uns|length == 0 %} {{ current_user.username }}, you have no new notifications {% elif uns|length == 1 %} {{ current_user.username }}, you have 1 notification {% else %} {{ current_user.username }}, you have {{ uns|length }} notifications {% endif %}


Rajesh Kannan KC2KBY/VU2OW
International Lighthouse and Lightship Weekend
August 18,19 2018 at Mahabalipuram Lighthouse, India
VU6P Station Equipments


Create new App instance
- Returns
- NULL if memory allocation was impossible, otherwise a valid pointer to App
| void App__destroy |
( |
App * |
app | ) |
|
Destroy application
- Parameters
-
| [in] | app | App to be destroyed |
| bool App__init |
( |
App * |
app | ) |
|
Initialize application
- Parameters
-
- Returns
- true if initialization was successful
| void App__render |
( |
App * |
app | ) |
|
Render application
- Parameters
-
| void App__run |
( |
App * |
app | ) |
|
Start application
- Parameters
-
| bool App__terminate |
( |
App * |
app | ) |
|
Terminate application
- Parameters
-
- Returns
- true if termination was successful
The documentation for this struct was generated from the following file:


Search for Ligand-Protein Complexes¶
From the Compounds/
directory, enter:
bsff search <Compound_ID>
Where <Compound_ID> is the name of the project directory for you target molecule. This function will search for proteins bound to small molecules specificed in the PubChem search results for each fragment. A JSON file called PDB_search_results.json keeps track of ligands and associated complexes in the PDB that possess each defined fragment as a substructure. In addition, a directory called Fragment_PDB_Matches will be created that stores the PubChem Compound IDs for fragment-containing compounds in CSV format.
Your project should now look like this:
+-- Compounds
+-- <Compound_ID>
+-- Inputs
+-- Fragment_Inputs
| +-- Fragment_Inputs.csv
| +-- * All fragment .pdb files *
| +-- * All fragment .csv search results from PubChem *
+-- Rosetta_Inputs
| +-- * All conformer .pdb files *
| +-- * All conformer .param files *
+-- User_Inputs
+-- Fragment_PDB_Matches
+-- PDB_search_results.json


Open me! Large modal Small modal Static Navigation Modal
Toggle Animation ({{ animationsEnabled }}) Open from component
Selection from modal: {{ selected }}
I will navigate to another route when you close the modal.


"What you get by achieving your goals is not as important as what you become by achieving your goals."
-Henry David Thoreau
-Henry David Thoreau
I am a software developer with strong background in .Net SDLC and Systems Integration. I have more than 10 years of Experience in high available enterprise applications, web and mobile development, process implementation, and database applications.
I have helped companies to discover, build and support their core systems and business processes, by giving my technical expertise. During the last 8 years, I have participated in projects globally, for sectors such as Workcover and Benefit Payments, insurance, financial, claims, invoice processing, supply chain, mining and government.
From 1 to 10
From 1 to 10


You are here: Home Dive Into HTML5
HTML 5 defines the <canvas> element as “a resolution-dependent bitmap canvas which can be used for rendering graphs, game graphics, or other visual images on the fly.” A canvas is a rectangle in your page where you can use JavaScript to draw anything you want.
| IE | Firefox | Safari | Chrome | Opera | iPhone | Android |
|---|---|---|---|---|---|---|
| 7.0+* | 3.0+ | 3.0+ | 3.0+ | 10.0+ | 1.0+ | 1.0+ |
* Internet Explorer 7 and 8 require the third-party explorercanvas library. Internet Explorer 9 supports <canvas> natively.
|
So what does a canvas look like? Nothing, really. A <canvas>
element has no content and no border of its own.
Invisible canvas
The markup looks like this:
<canvas width="300" height="225"></canvas>
Let’s add a dotted border so we can see what we’re dealing with.
Canvas with border
You can have more than one <canvas>
element on the same page. Each canvas will show up in the DOM, and each canvas maintains its own state. If you give each canvas an id
attribute, you can access them just like any other element.
Let’s expand that markup to include an id
attribute:
<canvas id="a" width="300" height="225"></canvas>
Now you can easily find that <canvas>
element in the DOM.
var a_canvas = document.getElementById("a");
| IE | Firefox | Safari | Chrome | Opera | iPhone | Android |
|---|---|---|---|---|---|---|
| 7.0+* | 3.0+ | 3.0+ | 3.0+ | 10.0+ | 1.0+ | 1.0+ |
* Internet Explorer 7 and 8 require the third-party explorercanvas library. Internet Explorer 9 supports <canvas> shapes natively.
|
Every canvas starts out blank. That’s boring! Let’s draw something.
The onclick
handler called this function:
function draw_b() {
var b_canvas = document.getElementById("b");
var b_context = b_canvas.getContext("2d");
b_context.fillRect(50, 25, 150, 100);
}
The 1st line of the function is nothing special; it just finds the <canvas>
element in the DOM.
And then there’s this
function draw_b() {
var b_canvas = document.getElementById("b");
var b_context = b_canvas.getContext("2d");
b_context.fillRect(50, 25, 150, 100);
}
Every canvas has a drawing context, which is where all the fun stuff happens. Once you’ve found a <canvas>
element in the DOM (by using document.getElementById()
or any other method you like), you call its getContext()
method. You must pass the string "2d"
to the getContext()
method.
Q: Is there a 3-D canvas?
A: Not yet. Individual vendors have experimented with their own three-dimensional canvas APIs, but none of them have been standardized. The HTML5 specification notes, “A future version of this specification will probably define a 3d context.”
So, you have a <canvas>
element, and you have its drawing context. The drawing context is where all the drawing methods and properties are defined. There’s a whole group of properties and methods devoted to drawing rectangles:
fillStyle
property can be a CSS color, a pattern, or a gradient. (More on gradients shortly.) The default fillStyle
is solid black, but you can set it to whatever you like. Each drawing context remembers its own properties as long as the page is open, unless you do something to reset it.
fillRect(x, y, width, height)
draws a rectangle filled with the current fill style.
strokeStyle
property is like fillStyle
— it can be a CSS color, a pattern, or a gradient.
strokeRect(x, y, width, height)
draws an rectangle with the current stroke style. strokeRect
doesn’t fill in the middle; it just draws the edges.
clearRect(x, y, width, height)
clears the pixels in the specified rectangle.
Q: Can I “reset” a canvas?
A: Yes. Setting the width or height of a<canvas>
element will erase its contents and reset all the properties of its drawing context to their default values. You don’t even need to change the width; you can simply set it to its current value, like this:var b_canvas = document.getElementById("b"); b_canvas.width = b_canvas.width;
Getting back to that code sample in the previous example…
Draw a rectangle
var b_canvas = document.getElementById("b");
var b_context = b_canvas.getContext("2d");
b_context.fillRect(50, 25, 150, 100);
Calling the fillRect()
method draws the rectangle and fills it with the current fill style, which is black until you change it. The rectangle is bounded by its upper-left corner (50, 25), its width (150), and its height (100). To get a better picture of how that works, let’s look at the canvas coordinate system.
The canvas is a two-dimensional grid. The coordinate (0, 0) is at the upper-left corner of the canvas. Along the X-axis, values increase towards the right edge of the canvas. Along the Y-axis, values increase towards the bottom edge of the canvas.
Canvas coordinates diagram
That coordinate diagram was drawn with a <canvas>
element. It comprises
First, we need to define the <canvas>
element itself. The <canvas>
element defines the width
and height
, and the id
so we can find it later.
<canvas id="c" width="500" height="375"></canvas>
Then we need a script to find the <canvas>
element in the DOM and get its drawing context.
var c_canvas = document.getElementById("c");
var context = c_canvas.getContext("2d");
Now we can start drawing lines.
| IE | Firefox | Safari | Chrome | Opera | iPhone | Android |
|---|---|---|---|---|---|---|
| 7.0+* | 3.0+ | 3.0+ | 3.0+ | 10.0+ | 1.0+ | 1.0+ |
* Internet Explorer 7 and 8 require the third-party explorercanvas library. Internet Explorer 9 supports <canvas> paths natively.
|
Imagine you’re drawing a picture in ink. You don’t want to just dive in and start drawing with ink, because you might make a mistake. Instead, you sketch the lines and curves with a pencil, and once you’re happy with it, you trace over your sketch in ink.
Each canvas has a path. Defining the path is like drawing with a pencil. You can draw whatever you like, but it won’t be part of the finished product until you pick up the quill and trace over your path in ink.
To draw straight lines in pencil, you use the following two methods:
moveTo(x, y)
moves the pencil to the specified starting point.
lineTo(x, y)
draws a line to the specified ending point.
The more you call moveTo()
and lineTo()
, the bigger the path gets. These are “pencil” methods — you can call them as often as you like, but you won’t see anything on the canvas until you call one of the “ink” methods.
Let’s begin by drawing the off-white grid.
for (var x = 0.5; x < 500; x += 10) {
context.moveTo(x, 0);
context.lineTo(x, 375);
}
Draw vertical lines
for (var y = 0.5; y < 375; y += 10) {
context.moveTo(0, y);
context.lineTo(500, y);
}
Draw horizontal lines
Those were all “pencil” methods. Nothing has actually been drawn on the canvas yet. We need an “ink” method to make it permanent.
context.strokeStyle = "#eee";
context.stroke();
stroke()
is one of the “ink” methods. It takes the complex path you defined with all those moveTo()
and lineTo()
calls, and actually draws it on the canvas. The strokeStyle
controls the color of the lines. This is the result:
Q: Why did you start x and y at
0.5
? Why not0
?
A: Imagine each pixel as a large square. The whole-number coordinates (0, 1, 2…) are the edges of the squares. If you draw a one-unit-wide line between whole-number coordinates, it will overlap opposite sides of the pixel square, and the resulting line will be drawn two pixels wide. To draw a line that is only one pixel wide, you need to shift the coordinates by 0.5 perpendicular to the line's direction.For example, if you try to draw a line from
(1, 0)
to(1, 3)
, the browser will draw a line covering 0.5 screen pixels on either side ofx=1
. The screen can’t display half a pixel, so it expands the line to cover a total of two pixels:
But, if you try to draw a line from
(1.5, 0)
to(1.5, 3)
, the browser will draw a line covering 0.5 screen pixels on either side ofx=1.5
, which results in a true 1-pixel-wide line:
Thanks to Jason Johnson for providing these diagrams.
Now let’s draw the horizontal arrow. All the lines and curves on a path are drawn in the same color (or gradient — yes, we’ll get to those soon). We want to draw the arrow in a different color ink — black instead of off-white — so we need to start a new path.
A new path
context.beginPath();
context.moveTo(0, 40);
context.lineTo(240, 40);
context.moveTo(260, 40);
context.lineTo(500, 40);
context.moveTo(495, 35);
context.lineTo(500, 40);
context.lineTo(495, 45);
The vertical arrow looks much the same. Since the vertical arrow is the same color as the horizontal arrow, we do not need to start another new path. The two arrows will be part of the same path.
context.moveTo(60, 0);
context.lineTo(60, 153);
context.moveTo(60, 173);
context.lineTo(60, 375);
context.moveTo(65, 370);
context.lineTo(60, 375);
context.lineTo(55, 370);
Not a new path
I said these arrows were going to be black, but the strokeStyle
is still off-white. (The fillStyle
and strokeStyle
don’t get reset when you start a new path.) That’s OK, because we’ve just run a series of “pencil” methods. But before we draw it for real, in “ink,” we need to set the strokeStyle
to black. Otherwise, these two arrows will be off-white, and we’ll hardly be able to see them! The following lines change the color to black and draw the lines on the canvas:
context.strokeStyle = "#000";
context.stroke();
This is the result:
| IE | Firefox | Safari | Chrome | Opera | iPhone | Android |
|---|---|---|---|---|---|---|
| 7.0+* | 3.0+† | 3.0+ | 3.0+ | 10.0+ | 1.0+ | 1.0+ |
| * Internet Explorer 7 and 8 require the third-party explorercanvas library. Internet Explorer 9 supports canvas text natively. | ||||||
| † Mozilla Firefox 3.0 requires a compatibility shim. |
In addition to drawing lines on a canvas, you can also draw text on a canvas. Unlike text on the surrounding web page, there is no box model. That means none of the familiar CSS layout techniques are available: no floats, no margins, no padding, no word wrapping. (Maybe you think that’s a good thing!) You can set a few font attributes, then you pick a point on the canvas and draw your text there.
The following font attributes are available on the drawing context:
font
can be anything you would put in a CSS font
rule.  It is similar (but not identical) to a CSS text-align
rule. Possible values are start
, end
, left
, right
, and center
.
textBaseline
controls where the text is drawn relative to the starting point. Possible values are top
, hanging
, middle
, alphabetic
, ideographic
, or bottom
.
textBaseline
is tricky, because text is tricky (English text isn’t, but you can draw any Unicode character you like on a canvas, and Unicode is tricky). The HTML5 specification explains the different text baselines:
The top of the em square is roughly at the top of the glyphs in a font, the hanging baseline is where some glyphs like आ are anchored, the middle is half-way between the top of the em square and the bottom of the em square, the alphabetic baseline is where characters like Á, ÿ, f, and Ω are anchored, the ideographic baseline is where glyphs like 私 and 達 are anchored, and the bottom of the em square is roughly at the bottom of the glyphs in a font. The top and bottom of the bounding box can be far from these baselines, due to glyphs extending far outside the em square.
For simple alphabets like English, you can safely stick with top
, middle
, or bottom
for the textBaseline
property.
Let’s draw some text! Text drawn inside the canvas inherits the font size and style of the <canvas>
element itself, but you can override this by setting the font
property on the drawing context.
context.font = "bold 12px sans-serif";
context.fillText("x", 248, 43);
context.fillText("y", 58, 165);
Change the font style
The fillText()
method draws the actual text.
context.font = "bold 12px sans-serif";
context.fillText("x", 248, 43);
context.fillText("y", 58, 165);
Draw the text
Q: Can I use relative font sizes to draw text on a canvas?
A: Yes. Like every other HTML element on your page, the<canvas>
element itself has a computed font size based on your page’s CSS rules. If you set thecontext.font
property to a relative font size like1.5em
or150%
, your browser multiplies this by the computed font size of the<canvas>
element itself.
For the text in the upper-left corner, let’s say I want the top of the text to be at y=5
. But I’m lazy — I don’t want to measure the height of the text and calculate the baseline. Instead, I can set textBaseline
to top
and pass in the upper-left coordinate of the text’s bounding box.
context.textBaseline = "top";
context.fillText("( 0 , 0 )", 8, 5);
Now for the text in the lower-right corner. Let’s say I want the bottom-right corner of the text to be at coordinates (492,370)
— just a few pixels away from the bottom-right corner of the canvas — but I don’t want to measure the width or height of the text. I can set textAlign
to right
and textBaseline
to bottom
, then call fillText()
with the bottom-right coordinates of the text’s bounding box.
context.textAlign = "right";
context.textBaseline = "bottom";
context.fillText("( 500 , 375 )", 492, 370);
And this is the result:
Oops! We forgot the dots in the corners. We’ll see how to draw circles a little later. For now, I’ll cheat a little and draw them as rectangles.
context.fillRect(0, 0, 3, 3);
context.fillRect(497, 372, 3, 3);
Draw two “dots”
And that’s all she wrote! Here is the final product:
| IE | Firefox | Safari | Chrome | Opera | iPhone | Android | |
|---|---|---|---|---|---|---|---|
| linear gradients | 7.0+* | 3.0+ | 3.0+ | 3.0+ | 10.0+ | 1.0+ | 1.0+ |
| radial gradients | 9.0+ | 3.0+ | 3.0+ | 3.0+ | 10.0+ | 1.0+ | 1.0+ |
* Internet Explorer 7 and 8 require the third-party explorercanvas library. Internet Explorer 9 supports <canvas> gradients natively.
|
Earlier in this chapter, you learned how to draw a rectangle filled with a solid color, then a line stroked with a solid color. But shapes and lines aren’t limited to solid colors. You can do all kinds of magic with gradients. Let’s look at an example.
The markup looks the same as any other canvas.
<canvas id="d" width="300" height="225"></canvas>
First, we need to find the <canvas>
element and its drawing context.
var d_canvas = document.getElementById("d");
var context = d_canvas.getContext("2d");
Once we have the drawing context, we can start to define a gradient. A gradient is a smooth transition between two or more colors. The canvas drawing context supports two types of gradients:
createLinearGradient(x0, y0, x1, y1)
paints along a line from (x0, y0) to (x1, y1).
createRadialGradient(x0, y0, r0, x1, y1, r1)
paints along a cone between two circles. The first three parameters represent the start circle, with origin (x0, y0) and radius r0. The last three parameters represent the end circle, with origin (x1, y1) and radius r1.
Let’s make a linear gradient. Gradients can be any size, but I’ll make this gradient be 300 pixels wide, like the canvas.
Create a gradient object
var my_gradient = context.createLinearGradient(0, 0, 300, 0);
Because the y
values (the 2nd and 4th parameters) are both 0, this gradient will shade evenly from left to right.
Once we have a gradient object, we can define the gradient’s colors. A gradient has two or more color stops. Color stops can be anywhere along the gradient. To add a color stop, you need to specify its position along the gradient. Gradient positions can be anywhere between 0 to 1.
Let’s define a gradient that shades from black to white.
my_gradient.addColorStop(0, "black");
my_gradient.addColorStop(1, "white");
Defining a gradient doesn’t draw anything on the canvas. It’s just an object tucked away in memory somewhere. To draw a gradient, you set your fillStyle
to the gradient and draw a shape, like a rectangle or a line.
 When you create the gradient object, keep the x
values (1st and 3rd parameters) constant, and make the y
values (2nd and 4th parameters) range from 0 to the height of the canvas.
x values are 0, y values vary
var my_gradient = context.createLinearGradient(0, 0, 0, 225);
my_gradient.addColorStop(0, "black");
my_gradient.addColorStop(1, "white");
context.fillStyle = my_gradient;
context.fillRect(0, 0, 300, 225);
And this is the result:
You can also create gradients along a diagonal.
both x and y values vary
var my_gradient = context.createLinearGradient(0, 0, 300, 225);
my_gradient.addColorStop(0, "black");
my_gradient.addColorStop(1, "white");
context.fillStyle = my_gradient;
context.fillRect(0, 0, 300, 225);
And this is the result:
| IE | Firefox | Safari | Chrome | Opera | iPhone | Android |
|---|---|---|---|---|---|---|
| 7.0+* | 3.0+ | 3.0+ | 3.0+ | 10.0+ | 1.0+ | 1.0+ |
* Internet Explorer 7 and 8 require the third-party explorercanvas library. Internet Explorer 9 supports <canvas> images natively.
|
Here is a cat:
An  element
Here is the same cat, drawn on a canvas:
A <canvas> element
The canvas drawing context defines a drawImage()
method for drawing an image on a canvas. The method can take three, five, or nine arguments.
drawImage(image, dx, dy)
takes an image and draws it on the canvas. The given coordinates (dx, dy)
will be the upper-left corner of the image. Coordinates (0, 0)
would draw the image at the upper-left corner of the canvas.
drawImage(image, dx, dy, dw, dh)
takes an image, scales it to a width of dw
and a height of dh
, and draws it on the canvas at coordinates (dx, dy)
.
drawImage(image, sx, sy, sw, sh, dx, dy, dw, dh)
takes an image, clips it to the rectangle (sx, sy, sw, sh)
, scales it to dimensions (dw, dh)
, and draws it on the canvas at coordinates (dx, dy)
.
The HTML5 specification explains the drawImage()
parameters:
The source rectangle is the rectangle [within the source image] whose corners are the four points
(sx, sy)
,(sx+sw, sy)
,(sx+sw, sy+sh)
,(sx, sy+sh)
.The destination rectangle is the rectangle [within the canvas] whose corners are the four points
(dx, dy)
,(dx+dw, dy)
,(dx+dw, dy+dh)
,(dx, dy+dh)
.
To draw an image on a canvas, you need an image. The image can be an existing
element, or you can create an Image()
object with JavaScript. Either way, you need to ensure that the image is fully loaded before you can draw it on the canvas.
If you’re using an existing
element, you can safely draw it on the canvas during the window.onload
event.
using an  element

<canvas id="e" width="177" height="113"></canvas>

If you’re creating the image object entirely in JavaScript, you can safely draw the image on the canvas during the Image.onload
event.
using an Image() object
<canvas id="e" width="177" height="113"></canvas>

The optional 3rd and 4th parameters to the drawImage()
method control image scaling. This is the same image, scaled to half its width and height and drawn repeatedly at different coordinates within a single canvas.
Here is the script that produces the “multicat” effect:
cat.onload = function() {
for (var x = 0, y = 0;
x < 500 && y < 375;
x += 50, y += 37) {
context.drawImage(cat, x, y, 88, 56);
}
};
Scale the image
All this effort raises a legitimate question: why would you want to draw an image on a canvas in the first place? What does the extra complexity of image-on-a-canvas buy you over an
element and some CSS rules? Even the “multicat” effect could be replicated with 10 overlapping
elements.
The simple answer is, for the same reason you might want to draw text on a canvas. The canvas coordinates diagram included text, lines, and shapes; the text-on-a-canvas was just one part of a larger work. A more complex diagram could easily use drawImage()
to include icons, sprites, or other graphics.
Versions of Internet Explorer before 9.0 do not support the canvas API. (IE9 does fully support the canvas API.) However, those older versions of Internet Explorer do support a Microsoft-proprietary technology called VML, which can do many of the same things as the <canvas>
element. And thus, excanvas.js
was born.
Explorercanvas (excanvas.js
) is an open source, Apache-licensed JavaScript library that implements the canvas API in Internet Explorer. To use it, include the following
<![endif]-->

...

The
bits are conditional comments. Internet Explorer interprets them like an if
statement: “if the current browser is a version of Internet Explorer prior to (but not including) version 9, then execute this block.” Every other browser will treat the entire block as an HTML comment. The net result is that Internet Explorer 7 and 8 will download the excanvas.js
script and execute it, but other browsers will ignore the script altogether (not download it, not execute it, not anything). This makes your page load faster in browsers that implement the canvas API natively.
 Just include <canvas>
elements in your markup, or create them dynamically with JavaScript. Follow the instructions in this chapter to get the drawing context of a <canvas>
element, and you can draw shapes, text, and patterns.
Well… not quite. There are a few limitations:
There is one more caveat about using excanvas.js
, and it’s a problem that I ran into while creating the examples in this chapter. ExplorerCanvas initializes its own faux-canvas interface automatically whenever you include the excanvas.js
script in your HTML page. But that doesn’t mean that Internet Explorer is ready to use it immediately. In certain situations, you can run into a race condition where the faux-canvas interface is almost, but not quite, ready to use. The primary symptom of this state is that Internet Explorer will complain that “object doesn’t support this property or method” whenever you try to do anything with a <canvas>
element, such as get its drawing context.
The easiest solution to this is to defer all of your canvas-related manipulation until after the onload
event fires. This may be a while — if your page has a lot of images or videos, they will delay the onload
event — but it will give ExplorerCanvas time to work its magic.
Halma is a centuries-old board game. Many variations exist. In this example, I’ve created a solitaire version of Halma with 9 pieces on a 9 × 9 board. In the beginning of the game, the pieces form a 3 × 3 square in the bottom-left corner of the board. The object of the game is to move all the pieces so they form a 3 × 3 square in the upper-right corner of the board, in the least number of moves.
There are two types of legal moves in Halma:
Here is the game itself. You can also play it on a separate page if you want to poke at it with your browser’s developer tools.
Moves: 2
How does it work? I’m so glad you asked. I won’t show all the code here. (You can see it at diveintohtml5.info/examples/halma.js.) I’ll skip over most of the gameplay code itself, but I want to highlight a few parts of the code that deal with actually drawing on the canvas and responding to mouse clicks on the canvas element.
During page load, we initialize the game by setting the dimensions of the <canvas>
itself and storing a reference to its drawing context.
gCanvasElement.width = kPixelWidth;
gCanvasElement.height = kPixelHeight;
gDrawingContext = gCanvasElement.getContext("2d");
Then we do something you haven’t seen yet: we add an event listener to the <canvas>
element to listen for click events.
gCanvasElement.addEventListener("click", halmaOnClick, false);
The halmaOnClick()
function gets called when the user clicks anywhere within the canvas. Its argument is a MouseEvent
object that contains information about where the user clicked.
function halmaOnClick(e) {
var cell = getCursorPosition(e);
// the rest of this is just gameplay logic
for (var i = 0; i < gNumPieces; i++) {
if ((gPieces[i].row == cell.row) &&
(gPieces[i].column == cell.column)) {
clickOnPiece(i);
return;
}
}
clickOnEmptyCell(cell);
}
The next step is to take the MouseEvent
object and calculate which square on the Halma board just got clicked. The Halma board takes up the entire canvas, so every click is somewhere on the board. We just need to figure out where. This is tricky, because mouse events are implemented differently in just about every browser.
function getCursorPosition(e) {
var x;
var y;
if (e.pageX != undefined && e.pageY != undefined) {
x = e.pageX;
y = e.pageY;
}
else {
x = e.clientX + document.body.scrollLeft +
document.documentElement.scrollLeft;
y = e.clientY + document.body.scrollTop +
document.documentElement.scrollTop;
}
At this point, we have x
and y
coordinates that are relative to the document (that is, the entire HTML page). That’s not quite useful yet. We want coordinates relative to the canvas.
x -= gCanvasElement.offsetLeft;
y -= gCanvasElement.offsetTop;
Now we have x
and y
coordinates that are relative to the canvas. That is, if x
is 0 and y
is 0 at this point, we know that the user just clicked the top-left pixel of the canvas.
From here, we can calculate which Halma square the user clicked, and then act accordingly.
var cell = new Cell(Math.floor(y/kPieceHeight),
Math.floor(x/kPieceWidth));
return cell;
}
Whew! Mouse events are tough. But you can use the same logic (in fact, this exact code) in all of your own canvas-based applications. Remember: mouse click → document-relative coordinates → canvas-relative coordinates → application-specific code.
OK, let’s look at the main drawing routine. Because the graphics are so simple, I’ve chosen to clear and redraw the board in its entirety every time anything changes within the game. This is not strictly necessary. The canvas drawing context will retain whatever you have previously drawn on it, even if the user scrolls the canvas out of view or changes to another tab and then comes back later. If you’re developing a canvas-based application with more complicated graphics (such as an arcade game), you can optimize performance by tracking which regions of the canvas are “dirty” and redrawing just the dirty regions. But that is outside the scope of this book.
gDrawingContext.clearRect(0, 0, kPixelWidth, kPixelHeight);
The board-drawing routine should look familiar. It’s similar to how we drew the canvas coordinates diagram earlier in this chapter.
gDrawingContext.beginPath();
/* vertical lines */
for (var x = 0; x <= kPixelWidth; x += kPieceWidth) {
gDrawingContext.moveTo(0.5 + x, 0);
gDrawingContext.lineTo(0.5 + x, kPixelHeight);
}
/* horizontal lines */
for (var y = 0; y <= kPixelHeight; y += kPieceHeight) {
gDrawingContext.moveTo(0, 0.5 + y);
gDrawingContext.lineTo(kPixelWidth, 0.5 + y);
}
/* draw it! */
gDrawingContext.strokeStyle = "#ccc";
gDrawingContext.stroke();
The real fun begins when we go to draw each of the individual pieces. A piece is a circle, something we haven’t drawn before. Furthermore, if the user selects a piece in anticipation of moving it, we want to draw that piece as a filled-in circle. Here, the argument p
represents a piece, which has row
and column
properties that denote the piece’s current location on the board. We use some in-game constants to translate (column, row)
into canvas-relative (x, y)
coordinates, then draw a circle, then (if the piece is selected) fill in the circle with a solid color.
function drawPiece(p, selected) {
var column = p.column;
var row = p.row;
var x = (column * kPieceWidth) + (kPieceWidth/2);
var y = (row * kPieceHeight) + (kPieceHeight/2);
var radius = (kPieceWidth/2) - (kPieceWidth/10);
That’s the end of the game-specific logic. Now we have (x, y)
coordinates, relative to the canvas, for the center of the circle we want to draw. There is no circle()
method in the canvas API, but there is an arc()
method. And really, what is a circle but an arc that goes all the way around? Do you remember your basic geometry? The arc()
method takes a center point (x, y)
, a radius, a start and end angle (in radians), and a direction flag (false
for clockwise, true
for counter-clockwise). You can use the Math
module that’s built into JavaScript to calculate radians.
gDrawingContext.beginPath();
gDrawingContext.arc(x, y, radius, 0, Math.PI * 2, false);
gDrawingContext.closePath();
But wait! Nothing has been drawn yet. Like moveTo()
and lineTo
, the arc()
method is a “pencil” method. To actually draw the circle, we need to set the strokeStyle
and call stroke()
to trace it in “ink.”
gDrawingContext.strokeStyle = "#000";
gDrawingContext.stroke();
What if the piece is selected? We can re-use the same path we created to draw the outline of the piece, to fill in the circle with a solid color.
if (selected) {
gDrawingContext.fillStyle = "#000";
gDrawingContext.fill();
}
And that’s… well, that’s pretty much it. The rest of the program is game-specific logic — distinguishing between valid and invalid moves, keeping track of the number of moves, detecting whether the game is over. With 9 circles, a few straight lines, and 1 onclick
handler, we’ve created an entire game in <canvas>
. Huzzah!
canvas
— the basics, by Mihai Sucan
canvas
element
canvas
element in the HTML5 draft standard
canvas
element
This has been “Let’s Call It A Draw(ing Surface).” The full table of contents has more if you’d like to keep reading.
In association with Google Press, O’Reilly is distributing this book in a variety of formats, including paper, ePub, Mobi, and DRM-free PDF. The paid edition is called “HTML5: Up & Running,” and it is available now. This chapter is included in the paid edition.
If you liked this chapter and want to show your appreciation, you can buy “HTML5: Up & Running” with this affiliate link or buy an electronic edition directly from O’Reilly.  I do not currently accept direct donations.
Copyright MMIX–MMXI Mark Pilgrim


Original Haml tests from svn.hamptoncatlin.com. Remember phpHaml is not same as original Haml. I must change this tests.
Located in /tests/haml/OriginalHamlTests.class.php (line 21)
PHPUnit_Framework_TestCase | --OriginalHamlTests
Haml parser
Return modified content of original Haml template
Return modified content of original Haml test result
Documentation generated on Mon, 09 Jul 2007 10:05:08 +0200 by phpDocumentor 1.3.0RC3


FOOMATIC-PPDFILE(1) FOOMATIC-PPDFILE(1) NAME foomatic-ppdfile - Generate a PPD file for a given printer/driver combo SYNOPSIS foomatic-ppdfile [-w] [-d <driver>] -p <printerid> foomatic-ppdfile [-A] [-P pattern] foomatic-ppdfile -h DESCRIPTION The first form of the foomatic-ppdfile to compute the spooler-independent Foomatic PPD file for any valid printer/driver combo available in the Foomatic database, both for printing with foomatic-rip(1) and for appli‐ cations/clients being able to access the printer's options. The PPD file is returned on standard ouput. If the driver is not specified, the default driver is used. The second form of the foomatic-ppdfile program will search the printer database and return either all printer entries or those whose name and/or model information match a regular expression. The last form prints a help message and exits. Options -d drivername The (optional) driver name to use. If the driver name is not sup‐ plied, the default or first driver in the printers compatible driver list is used. -p printer id The printer id. -w Return a PPD file that conforms to the Microsoft Windows format lim‐ itations. -A Return all printer entries in the database. -Ppattern Return all printer entries in the database which match the regular expression. SEE ALSO foomatic-rip(1) EXIT STATUS foomatic-ppdfile returns 0 on success, 1 otherwise. AUTHOR Manfred Wassmann<EMAIL_ADDRESS>for the foomatic project using output from the associated binary. Modified and updated by Patrick Powell <papowell at astart.com>. BUGS None so far. Please post bug reports on http://lists.freestandards.org/mailman/listinfo/printing-foomatic Foomatic Project 2001-05-07 FOOMATIC-PPDFILE(1)


Virtual New Liberty Standard
Inspired by the New Liberty Standard, it is the first VBTC trading site created by Virtual Satoshi.
If you know exchanges that allows trading Virtual Bitcoin, please let us know in the issue of the repository.
Inspired by the New Liberty Standard, it is the first VBTC trading site created by Virtual Satoshi.
VBTC can be traded on Uniswap, the world's largest DEX.


_rls
string
_rls
(
what
)
Implentation for building the remote loader service url.
- Parameters:
-
what <Array>
the requested modules.
- Returns:
string
- the url for the remote loader service call.
abort
static
void
abort
(
o
)
Abort a transaction
- Parameters:
-
o <string|object>
Either the tId or the object returned from script() or css().
css
static
tId: string
css
(
url
,
opts
)
Fetches and inserts one or more css link nodes into the
head of the current document or the document in a specified
window.
- Parameters:
-
url <string>
the url or urls to the css file(s). -
opts <object>
Options:- onSuccess
-
callback to execute when the css file(s) are finished loading
The callback receives an object back with the following
data:
- win
- the window the link nodes(s) were inserted into
- data
- the data object passed in when the request was made
- nodes
- An array containing references to the nodes that were inserted
- purge
- A function that, when executed, will remove the nodes that were inserted
- context
- the execution context for the callbacks
- win
- a window other than the one the utility occupies
- data
- data that is supplied to the callbacks when the nodes(s) are loaded.
- insertBefore
- node or node id that will become the new node's nextSibling
- charset
- Node charset, default utf-8 (deprecated, use the attributes config)
- attributes
- An object literal containing additional attributes to add to the link tags
Y.Get.css("http://localhost/css/menu.css");
Y.Get.css( ["http://localhost/css/menu.css", "http://localhost/css/logger.css"], { insertBefore: 'custom-styles' // nodes will be inserted // before the specified node });.
- Returns:
tId: string
- an object containing info about the transaction.
script
static
tId: string
script
(
url
,
opts
)
Fetches and inserts one or more script nodes into the head
of the current document or the document in a specified window.
- Parameters:
-
url <string|string[]>
the url or urls to the script(s). -
opts <object>
Options:- onSuccess
-
callback to execute when the script(s) are finished loading
The callback receives an object back with the following
data:
- win
- the window the script(s) were inserted into
- data
- the data object passed in when the request was made
- nodes
- An array containing references to the nodes that were inserted
- purge
- A function that, when executed, will remove the nodes that were inserted
- onTimeout
-
callback to execute when a timeout occurs.
The callback receives an object back with the following
data:
- win
- the window the script(s) were inserted into
- data
- the data object passed in when the request was made
- nodes
- An array containing references to the nodes that were inserted
- purge
- A function that, when executed, will remove the nodes that were inserted
- onEnd
- a function that executes when the transaction finishes, regardless of the exit path
- onFailure
-
callback to execute when the script load operation fails
The callback receives an object back with the following
data:
- win
- the window the script(s) were inserted into
- data
- the data object passed in when the request was made
- nodes
- An array containing references to the nodes that were inserted successfully
- purge
- A function that, when executed, will remove any nodes that were inserted
- context
- the execution context for the callbacks
- win
- a window other than the one the utility occupies
- autopurge
- setting to true will let the utilities cleanup routine purge the script once loaded
- purgethreshold
- The number of transaction before autopurge should be initiated
- data
- data that is supplied to the callback when the script(s) are loaded.
- insertBefore
- node or node id that will become the new node's nextSibling. If this is not specified, nodes will be inserted before a base tag should it exist. Otherwise, the nodes will be appended to the end of the document head.
- charset
- Node charset, default utf-8 (deprecated, use the attributes config)
- attributes
- An object literal containing additional attributes to add to the link tags
- timeout
- Number of milliseconds to wait before aborting and firing the timeout event
Y.Get.script( ["http://yui.yahooapis.com/2.5.2/build/yahoo/yahoo-min.js", "http://yui.yahooapis.com/2.5.2/build/event/event-min.js"], { onSuccess: function(o) { this.log("won't cause error because Y is the context"); Y.log(o.data); // foo Y.log(o.nodes.length === 2) // true // o.purge(); // optionally remove the script nodes // immediately }, onFailure: function(o) { Y.log("transaction failed"); }, onTimeout: function(o) { Y.log("transaction timed out"); }, data: "foo", timeout: 10000, // 10 second timeout context: Y, // make the YUI instance // win: otherframe // target another window/frame autopurge: true // allow the utility to choose when to // remove the nodes purgetheshold: 1 // purge previous transaction before // next transaction });.
- Returns:
tId: string
- an object containing info about the transaction.


FIELD OF DREAMS A film review by Jeff Meyer Copyright 1989 Jeff Meyer
Summary: The Best Film of the Year (so far)
No, I'm not a baseball fan, and yes, maybe this film is a bit too Utopian for some of you. That's your problem. There is no film I've seen this year that I've enjoyed more than FIELD OF DREAMS; it combines an absolute sterling story and script with excellent performances, and I enjoyed the living daylights out of it.
First the story -- and don't worry, I'd feel criminal if I gave anything away. All I'll say is that it's about a novice farmer in Iowa who hears voices in his cornfield, and it weaves heaven, nature and baseball in and out of one of the most graceful plot designs I've seen placed on the screen. I can tell you what it has in it, though. It's got a basic plot that twirls around on about 6 different axes, each independent but linked to the others, each beautiful in its own right, each culminating in a resolution (actually, the same resolution) and each catching me completely off-guard when it touched down. It has characters who get their personalities across in about three minutes (aided by some very skillful actors); I found them uncommonly easy to laugh with and impossible to forget. It contains some of the most beautiful images I can remember, looked for in a place few others would give a second glance to. And it has more imagination and creativity than any fifteen films out there today.
The actors uniformly absorb the spirit of their characters and literally radiate them out. I kept wondering if Costner's role in BULL DURHAM would slide over to FIELD OF DREAMS, on my part or on his. It doesn't; he is a character the others react to, and when he finally has the spotlight... well, it's a fine thing to see, a fine thing. Amy Madigan has *never* been better; she juices her role into three-dimensionality in about thirty seconds. A delight! James Earl Jones is absolutely a pleasure to watch; his unrolling of his character from the tight, cynical ball it arrives in was a pleasure in itself. The players are all good, especially Ray Liota as Shoeless Joe (certainly a change in roles for him), and Burt Lancaster is himself, which should be enough. Only the guy from "thirty-something" seemed stuck in a rather deadpan manner as the heavy, but that's really having to scratch at the dirt for criticisms.
This is a picture of dreams, of images, of men fading into the shadowed green of a cornfield, and of white spheres fading into the dusk beyond the lights. It's romantic, and hopeful and it believes in magic and family and baseball. And probably Mom. I don't know about apple pie, but I'll give it the benefit of the doubt.
What do I give it? An A. $6 movie. Go for it.
Moriarty, aka Jeff Meyer INTERNET<EMAIL_ADDRESS>Manual UUCP: {uw-beaver, sun, hplsla, thebes, microsoft}!fluke!moriarty
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


Two things are are happening here. the style was changed for the default map options so you see the orange and blue map right away. There is also a new mapType, called "Night" here, which is added to the available map types and changes the style when chosen. Satellite and terrain are unaffected by any of this.


{% extends "base.html" %} {% block content %}
Hi, {{values['USERNAME']}}
We are so glad to have you as a part of our growing community.
We're here to teach you how to use Tasking Manager in 4 quick and simple steps:
|


Next Milestone - Phoenix Integration
A few days ago I demonstrated Searchex at the Silicon Valley Elixir Meetup. We discussed options for future development, and the consensus was that Phoenix integration should be highest priority.
Here are some of the big features we’ll need for the integration:
- Searchex usable as an application in a server process
- streaming
create/update/delete
actions - a ‘docsource plugin’ module, so we can feed from both the database and the filesystem
- configuration documentation and example apps
So it’s official: the next milestone for Searchex will be a working integration with Phoenix!
I will present Searchex and the upcoming Phoenix integration at the Erlang Meetup in San Francisco on Jan 11. Come on down!


Before proceeding, please read the manual first to know what parts need more work. The preview version has many rough edges and the experience may be frustrating.
All updates are included for free. Thank you for enabling further ArmorPaint development!


This is a heading level one(h1)
This is a heading level one(h2)
This is a heading level one(h3)
This is a heading level one(h4)
This is a heading level one(h5)
This is a heading level one(h6)


| Please select customer's item choice: | |
| Please input amount of selected item: |
| Item | Price | Quantity | Total | Remove |
| {{item.name}} | ${{item.price}} | {{item.quantity}} piece(s) | ${{item.total}} | |
Order total |
${{orderTotal}} |
| Sold by | Sold at | Item | Price | Quantity | Total |
| {{orderDetails.order_made_by}} | {{orderDetails.timestamp | date:'yyyy-MM-dd HH:mm'}} | {{orderDetails.item_name}} | ${{orderDetails.item_price}} | {{orderDetails.total_quantity}} piece(s) | ${{orderDetails.total_amount}} |
All orders total |
${{allOrdersTotal}} |


package exception
- Alphabetic
- Public
- All
Type Members
-
abstract
class
BenjiException extends IOException
An error while using an object storage.
-
case class
BenjiUnknownError(message: String, throwable: Option[Throwable] = None) extends BenjiException with Product with Serializable
An unknown error
-
case class
BucketAlreadyExistsException(bucketName: String) extends BenjiException with Product with Serializable
An error when an operation is refused for an already existing bucket.
An error when an operation is refused for an already existing bucket.
storage.bucket(bucketName).create(failsIfExists = true).map { _ => println(s"$bucketName created") }.recover { case BucketAlreadyExistsException(_) => println(s"$bucketName already exists") }
-
case class
BucketNotEmptyException(bucketName: String) extends BenjiException with Product with Serializable
An error when an operation cannot be applied on a not empty bucket (e.g.
An error when an operation cannot be applied on a not empty bucket (e.g. delete).
-
case class
BucketNotFoundException(bucketName: String) extends EntityNotFoundException with Product with Serializable
An error when a bucket is not found.
-
abstract
class
EntityNotFoundException extends BenjiException
An error when either a bucket or an object is not found.
-
case class
ObjectNotFoundException(bucketName: String, objectName: String) extends EntityNotFoundException with Product with Serializable
An error when an object is not found.
-
case class
VersionNotFoundException(bucketName: String, objectName: String, versionId: String) extends EntityNotFoundException with Product with Serializable
An error when an object version is not found.
Value Members
- object BucketAlreadyExistsException extends Serializable
- object BucketNotEmptyException extends Serializable
- object BucketNotFoundException extends Serializable
- object ObjectNotFoundException extends Serializable
- object VersionNotFoundException extends Serializable