{% extends "base.html" %} {% load humanize %} {% load access_tags %} {% block title %}
Restore objects of the questionnaire to their previous states. Each version represents a snapshot of the questionnaire objects at the time of the action.
For example, if you want to restore primary assets that you or someone in your team changed/removed intentionally or unintentionally,
navigate to the action where primary assets are mentioned, and find the previous state you want to revert them to. The other questionnaire objects will remain in their current state.
Note that delete actions will not be shown.
| Action | By | When | |
|---|---|---|---|
| {{ version.revision.comment }} | {{ version.revision.user }} | {{ version.revision.date_created|naturaltime }} | Restore |
| No history yet. |


Advent of Code, Day 5: Binary Boarding
Go to Day 5 Challenge |
Go to index
I ran this code in the devtoolbar in Chrome, and the answers were simply outputted to the console.
Learn more about my solution.
Part I
"You write a quick program to use your phone's camera to scan all of the nearby boarding passes
(your puzzle input); perhaps you can find your seat through process of elimination. Instead of zones or
groups, this airline uses binary space partitioning to seat people. A seat might be specified like FBFBBFFRLR,
where F means "front", B means "back", L means "left", and R means "right"."
ref
var calcSeatId = (seat) => {
var minRow = 0
var maxRow = 127
var minCol = 0
var maxCol = 7;
[...seat].forEach(s => {
if(s === "F" || s === "B"){
var diffRow = maxRow - minRow
var halfRow = Math.ceil(diffRow/2)-1
if(s === "F") {
maxRow = minRow + halfRow
}
if(s === "B") {
minRow = maxRow - halfRow
}
}
if(s === "R" || s === "L"){
var diffCol = maxCol - minCol
var halfCol = Math.ceil(diffCol/2)-1
if(s === "L") {
maxCol = minCol+ halfCol
}
if(s === "R") {
minCol = maxCol - halfCol
}
}
})
return minRow * 8 + minCol
}
var allSeatIds = []
seats.forEach(s => allSeatIds.push({ code: s, seatId: calcSeatId(s) }))
console.log('highest seat id', allSeatIds.sort((a,b) => a.seatId < b.seatId ? 1 : -1)[0])
Part II
"It's a completely full flight, so your seat should be the only missing boarding pass in your list.
However, there's a catch: some of the seats at the very front and back of the plane don't exist on this
aircraft, so they'll be missing from your list as well. Your seat wasn't at the very front or back, though;
the seats with IDs +1 and -1 from yours will be in your list."
ref
allSeatIds.sort((a,b) => a.seatId > b.seatId ? 1 : -1).forEach((seat, index) => {
if(seat.seatId > 0) {
if(seat.seatId + 1 !== allSeatIds[index+1].seatId){
console.warn('missing seat',seat.seatId + 1)
}
}
})


$("DBC").ready(function(start){})
I had my first day at DevBootCamp today, and it was eye-opening. Let's start at the beginning. When we first came to the DBC campus, we were welcomed by students in cohorts that had started earlier this year. (At any time there are three different cohorts at DBC with varying degrees of advancement) We did some icebreakers and went over the culture at DBC (Integrity, Kindness, and Effort) and established our first support groups. Then we were introduced to our Phase 1 Week 1 Ruby challenges.
I thought that I would be ready for any challenge thrown at me but after my first pairing session I realized my naivety. Though I've done the challenges before, I haven't been very D.R.Y with my code. Through pairing today I've realized I need to review modulus(%) and refactoring using loops.
But so far, the DBC experience seems to definitely be worth it. I will try to keep blogging once per day, but most of the blogs will probably be technical in nature.


---
layout: default
---
welcome
I am a first-year graduate student in the Department of Cognitive Science at Johns Hopkins University. My advisors are Paul Smolensky and Géraldine Legendre.
I finished my undergraduate degree in computer science and linguistics at Truman State University in the spring of 2014 and began the PhD program at Hopkins the following fall.
Research InterestsMy research interests are broad, but mostly center around computational cogntive science and linguistics, theoretical linguistics, and language acquisition.
I am currently working closely with Paul Smolensky and others on the gradient symbolic computation project, looking for ways to integrate discrete (symbolic) and continuous (connectionist) models of cognition. More specifically, we are investigating new connectionist models of language processing.
For more information about cognitive science, why I'm studying it, or what I plan to do with it, see this thought post.


The image shows the set. Click the button to download it. Each page refresh will provide a slightly different set.
Note: click on the image to redraw another set
Show 2d Case Show 3d Case


Chineese HotPot
Reservation
Takeaway
Delivery
1 plate
2 plates
3 plates
4 plates
5 plates
6 plates
7 plates
8 plates
9 plates
10plates
Dumplings
Ma Po Tofu
Chow Mein
Kung Pao Chicken
Sweet and Sour Snail
Fried MAshi
Spinach Nodlees
Stinky Tofu
Spring Rolls
Special Fried Rice
Add Order
Make Reservation
Dumplings
Ma Po Tofu
Chow Mein
Kung Pao Chicken
Sweet and Sour Snail
Fried MAshi
Spinach Nodlees
Stinky Tofu
Spring Rolls
Special Fried Rice
1 package
2 packages
3 packages
4 packages
5 packages
6 packages
7 packages
8 packages
9 packages
10packages
Add Order
Checkout
Dumplings
Ma Po Tofu
Chow Mein
Kung Pao Chicken
Sweet and Sour Snail
Fried MAshi
Spinach Nodlees
Stinky Tofu
Spring Rolls
Special Fried Rice
1 package
2 packages
3 packages
4 packages
5 packages
6 packages
7 packages
8 packages
9 packages
10packages
Add Order
Checkout
Food
Price
Grand Total
Get QR Bill
Present this to get served
×


| 1 | /* =========================================================== | |
| 2 | * JFreeChart : a free chart library for the Java(tm) platform | |
| 3 | * =========================================================== | |
| 4 | * | |
| 5 | * (C) Copyright 2000-2008, by Object Refinery Limited and Contributors. | |
| 6 | * | |
| 7 | * Project Info: http://www.jfree.org/jfreechart/index.html | |
| 8 | * | |
| 9 | * This library is free software; you can redistribute it and/or modify it | |
| 10 | * under the terms of the GNU Lesser General Public License as published by | |
| 11 | * the Free Software Foundation; either version 2.1 of the License, or | |
| 12 | * (at your option) any later version. | |
| 13 | * | |
| 14 | * This library is distributed in the hope that it will be useful, but | |
| 15 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | |
| 16 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | |
| 17 | * License for more details. | |
| 18 | * | |
| 19 | * You should have received a copy of the GNU Lesser General Public | |
| 20 | * License along with this library; if not, write to the Free Software | |
| 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, | |
| 22 | * USA. | |
| 23 | * | |
| 24 | * [Java is a trademark or registered trademark of Sun Microsystems, Inc. | |
| 25 | * in the United States and other countries.] | |
| 26 | * | |
| 27 | * ---------------- | |
| 28 | * DomainOrder.java | |
| 29 | * ---------------- | |
| 30 | * (C) Copyright 2004-2008, by Object Refinery Limited. | |
| 31 | * | |
| 32 | * Original Author: David Gilbert (for Object Refinery Limited); | |
| 33 | * Contributor(s): -; | |
| 34 | * | |
| 35 | * Changes: | |
| 36 | * -------- | |
| 37 | * 29-Jul-2004 : Version 1 (DG); | |
| 38 | * | |
| 39 | */ | |
| 40 | ||
| 41 | package org.jfree.data; | |
| 42 | ||
| 43 | import java.io.ObjectStreamException; | |
| 44 | import java.io.Serializable; | |
| 45 | ||
| 46 | /** | |
| 47 | * Used to indicate sorting order if any (ascending, descending or none). | |
| 48 | */ | |
| 49 | public final class DomainOrder implements Serializable { | |
| 50 | ||
| 51 | /** For serialization. */ | |
| 52 | private static final long serialVersionUID =<PHONE_NUMBER>512072627L; | |
| 53 | ||
| 54 | /** No order. */ | |
| 55 | public static final DomainOrder NONE = new DomainOrder("DomainOrder.NONE"); | |
| 56 | ||
| 57 | /** Ascending order. */ | |
| 58 | public static final DomainOrder ASCENDING | |
| 59 | = new DomainOrder("DomainOrder.ASCENDING"); | |
| 60 | ||
| 61 | /** Descending order. */ | |
| 62 | public static final DomainOrder DESCENDING | |
| 63 | = new DomainOrder("DomainOrder.DESCENDING"); | |
| 64 | ||
| 65 | /** The name. */ | |
| 66 | private String name; | |
| 67 | ||
| 68 | /** | |
| 69 | * Private constructor. | |
| 70 | * | |
| 71 | * @param name the name. | |
| 72 | */ | |
| 73 | private DomainOrder(String name) { | |
| 74 | this.name = name; | |
| 75 | } | |
| 76 | ||
| 77 | /** | |
| 78 | * Returns a string representing the object. | |
| 79 | * | |
| 80 | * @return The string. | |
| 81 | */ | |
| 82 | public String toString() { | |
| 83 |
1
1. toString : mutated return of Object value for org/jfree/data/DomainOrder::toString to ( if (x != null) null else throw new RuntimeException ) → KILLED |
return this.name; |
| 84 | } | |
| 85 | ||
| 86 | /** | |
| 87 | * Returns true if this object is equal to the specified | |
| 88 | * object, and false otherwise. | |
| 89 | * | |
| 90 | * @param obj the other object. | |
| 91 | * | |
| 92 | * @return A boolean. | |
| 93 | */ | |
| 94 | public boolean equals(Object obj) { | |
| 95 | ||
| 96 |
1
1. equals : negated conditional → KILLED |
if (this == obj) { |
| 97 |
1
1. equals : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED |
return true; |
| 98 | } | |
| 99 |
1
1. equals : negated conditional → KILLED |
if (!(obj instanceof DomainOrder)) { |
| 100 |
1
1. equals : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED |
return false; |
| 101 | } | |
| 102 | DomainOrder that = (DomainOrder) obj; | |
| 103 |
1
1. equals : negated conditional → KILLED |
if (!this.name.equals(that.toString())) { |
| 104 |
1
1. equals : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED |
return false; |
| 105 | } | |
| 106 |
1
1. equals : replaced return of integer sized value with (x == 0 ? 1 : 0) → KILLED |
return true; |
| 107 | } | |
| 108 | ||
| 109 | /** | |
| 110 | * Returns a hash code value for the object. | |
| 111 | * | |
| 112 | * @return The hashcode | |
| 113 | */ | |
| 114 | public int hashCode() { | |
| 115 |
1
1. hashCode : replaced return of integer sized value with (x == 0 ? 1 : 0) → SURVIVED |
return this.name.hashCode(); |
| 116 | } | |
| 117 | ||
| 118 | /** | |
| 119 | * Ensures that serialization returns the unique instances. | |
| 120 | * | |
| 121 | * @return The object. | |
| 122 | * | |
| 123 | * @throws ObjectStreamException if there is a problem. | |
| 124 | */ | |
| 125 | private Object readResolve() throws ObjectStreamException { | |
| 126 |
1
1. readResolve : negated conditional → KILLED |
if (this.equals(DomainOrder.ASCENDING)) { |
| 127 |
1
1. readResolve : mutated return of Object value for org/jfree/data/DomainOrder::readResolve to ( if (x != null) null else throw new RuntimeException ) → KILLED |
return DomainOrder.ASCENDING; |
| 128 | } | |
| 129 |
1
1. readResolve : negated conditional → NO_COVERAGE |
else if (this.equals(DomainOrder.DESCENDING)) { |
| 130 |
1
1. readResolve : mutated return of Object value for org/jfree/data/DomainOrder::readResolve to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return DomainOrder.DESCENDING; |
| 131 | } | |
| 132 |
1
1. readResolve : negated conditional → NO_COVERAGE |
else if (this.equals(DomainOrder.NONE)) { |
| 133 |
1
1. readResolve : mutated return of Object value for org/jfree/data/DomainOrder::readResolve to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return DomainOrder.NONE; |
| 134 | } | |
| 135 |
1
1. readResolve : mutated return of Object value for org/jfree/data/DomainOrder::readResolve to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return null; |
| 136 | } | |
| 137 | ||
| 138 | } | |
Mutations | ||
| 83 |
1.1 |
|
| 96 |
1.1 |
|
| 97 |
1.1 |
|
| 99 |
1.1 |
|
| 100 |
1.1 |
|
| 103 |
1.1 |
|
| 104 |
1.1 |
|
| 106 |
1.1 |
|
| 115 |
1.1 |
|
| 126 |
1.1 |
|
| 127 |
1.1 |
|
| 129 |
1.1 |
|
| 130 |
1.1 |
|
| 132 |
1.1 |
|
| 133 |
1.1 |
|
| 135 |
1.1 |


|
psl1ght
A free SDK for Sony's PS3 console
|
Mutex attributes data structure. More...
#include <mutex.h>
Data Fields | |
| u32 | attr_protocol |
| Scheduling policy. More... | |
| u32 | attr_recursive |
| Recursive setting. More... | |
| u32 | attr_pshared |
| Sharing policy (only known value for it is SYS_MUTEX_ATTR_PSHARED) | |
| u32 | attr_adaptive |
| Adaptive setting. More... | |
| u64 | key |
| Mutex key. | |
| s32 | flags |
| Mutex flags. | |
| u32 | _pad |
| Unused padding element. | |
| char | name [8] |
| Mutex name. | |
Mutex attributes data structure.
| u32 sys_mutex_attr::attr_adaptive |
| u32 sys_mutex_attr::attr_protocol |
Scheduling policy.
Possible values are:
| u32 sys_mutex_attr::attr_recursive |


turbo.web – Core web framework¶
The Turbo.lua Web framework is modeled after the framework offered by Tornado (http://www.tornadoweb.org/), which again is based on web.py (http://webpy.org/) and Google’s webapp (http://code.google.com/appengine/docs/python/tools/webapp/) Some modifications has been made to make it fit better into the Lua eco system. The web framework utilizes asynchronous features that allow it to scale to large numbers of open connections (thousands). The framework support comet polling.
Create a web server that listens to port 8888 and prints the canoncial Hello world on a GET request is very easy:
1 2 3 4 5 6 7 8 9 10 11 12 | local turbo = require('turbo')
local ExampleHandler = class("ExampleHandler", turbo.web.RequestHandler)
function ExampleHandler:get()
self:write("Hello world!")
end
local application = turbo.web.Application({
{"^/$", ExampleHandler}
})
application:listen(8888)
turbo.ioloop.instance():start()
|
RequestHandler class¶
Base RequestHandler class. The heart of Turbo.lua. The usual flow of using Turbo.lua is sub-classing the RequestHandler class and implementing the HTTP request methods described in self.SUPPORTED_METHODS. The main goal of this class is to wrap a HTTP request and offer utilities to respond to the request. Requests are deligated to RequestHandler’s by the Application class. The RequestHandler class are implemented so that it should be subclassed to process HTTP requests.
It is possible to modify self.SUPPORT_METHODS to add support for more methods if that is wanted.
Entry points¶
- RequestHandler:on_create(kwargs)
Redefine this method if you want to do something straight after the class has been initialized. This is called after a request has been recieved, and before the HTTP method has been verified against supported methods. So if a not supported method is requested, this method is still called.
Parameters: kwargs (Table) – The keyword arguments that you initialize the class with.
- RequestHandler:prepare()
Redefine this method if you want to do something after the class has been initialized. This method unlike on_create, is only called if the method has been found to be supported.
- RequestHandler:on_finish()
Called after the end of a request. Useful for e.g a cleanup routine.
- RequestHandler:set_default_headers()
Redefine this method to set HTTP headers at the beginning of all the request recieved by the RequestHandler. For example setting some kind of cookie or adjusting the Server key in the headers would be sensible to do in this method.
Subclass RequestHandler and implement any of the following methods to handle the corresponding HTTP request. If not implemented they will provide a 405 (Method Not Allowed). These methods recieve variable arguments, depending on what the Application instance calling them has captured from the pattern matching of the request URL. The methods are run protected, so they are error safe. When a error occurs in the execution of these methods the request is given a 500 Internal Server Error response. In debug mode, the stack trace leading to the crash is also a part of the response. If not debug mode is set, then only the status code is set.
- RequestHandler:get(...)
HTTP GET reqests handler.
Parameters: ... – Parameters from matched URL pattern with braces. E.g /users/(.*)$ would provide anything after /users/ as first parameter.
- RequestHandler:post(...)
HTTP POST reqests handler.
Parameters: ... – Parameters from matched URL pattern with braces.
- RequestHandler:head(...)
HTTP HEAD reqests handler.
Parameters: ... – Parameters from matched URL pattern with braces.
- RequestHandler:delete(...)
HTTP DELETE reqests handler.
Parameters: ... – Parameters from matched URL pattern with braces.
- RequestHandler:put(...)
HTTP PUT reqests handler.
Parameters: ... – Parameters from matched URL pattern with braces.
- RequestHandler:options(...)
HTTP OPTIONS reqests handler.
Parameters: ... – Parameters from matched URL pattern with braces.
Input¶
- RequestHandler:get_argument(name, default, strip)
Returns the value of the argument with the given name. If default value is not given the argument is considered to be required and will result in a raise of a HTTPError 400 Bad Request if the argument does not exist.
Parameters: - name (String) – Name of the argument to get.
- default (String) – Optional fallback value in case argument is not set.
- strip (Boolean) – Remove whitespace from head and tail of string.
Return type: String
- RequestHandler:get_arguments(name, strip)
Returns the values of the argument with the given name. Should be used when you expect multiple arguments values with same name. Strip will take away whitespaces at head and tail where applicable. Returns a empty table if argument does not exist.
Parameters: - name (String) – Name of the argument to get.
- strip (Boolean) – Remove whitespace from head and tail of string.
Return type: Table
- RequestHandler:get_json(force)
Returns JSON request data as a table. By default, it only parses request with “application/json” as content-type header.
Parameters: force (Boolean) – If force is set to true, all request will be parsed regardless of content-type header. Return type: Table or nil
- RequestHandler:get_cookie(name, default)
Get cookie value from incoming request.
Parameters: - name (String) – The name of the cookie to get.
- default (String) – A default value if no cookie is found.
Return type: String or nil if not found
- RequestHandler:get_secure_cookie(name, default, max_age)
Get a signed cookie value from incoming request.
If the cookie can not be validated, then an error with a string error is raised.
Hash-based message authentication code (HMAC) is used to be able to verify that the cookie has been created with the “cookie_secret” set in the Application class kwargs. This is simply verifing that the cookie has been signed by your key, IT IS NOT ENCRYPTING DATA.
Parameters: - name (String) – The name of the cookie to get.
- default (String) – A default value if no cookie is found.
- max_age (Number) – Timestamp used to sign cookie must be not be older than this value in seconds.
Return type: String or nil if not found
- RequestHandler:set_cookie(name, value, domain, expire_hours)
Set a cookie with value to response.
Note: Expiring relies on the requesting browser and may or may not be respected. Also keep in mind that the servers time is used to calculate expiry date, so the server should ideally be set up with NTP server.
Parameters: - name (String) – The name of the cookie to set.
- value (String) – The value of the cookie:
- domain (String) – The domain to apply cookie for.
- expire_hours (Number) – Set cookie to expire in given amount of hours.
- RequestHandler:set_secure_cookie(name, value, domain, expire_hours)
Set a signed cookie value to response.
Hash-based message authentication code (HMAC) is used to be able to verify that the cookie has been created with the “cookie_secret” set in the Application class kwargs. This is simply verifing that the cookie has been signed by your key, IT IS NOT ENCRYPTING DATA.
Note: Expiring relies on the requesting browser and may or may not be respected. Also keep in mind that the servers time is used to calculate expiry date, so the server should ideally be set up with NTP server.
Parameters: - name (String) – The name of the cookie to set.
- value (String) – The value of the cookie:
- domain (String) – The domain to apply cookie for.
- expire_hours (Number) – Set cookie to expire in given amount of hours.
| RequestHandler.request: | |
|---|---|
| turbo.httpserver.HTTPRequest class instance for this request. This object contains e.g turbo.httputil.HTTPHeader and the body payload etc. See the documentation for the classes for more details. |
Output¶
- RequestHandler:write(chunk)
Writes the given chunk to the output buffer. To write the output to the network, call the turbo.web.RequestHandler:flush() method. If the given chunk is a Lua table, it will be automatically stringifed to JSON.
Parameters: chunk (String) – Data chunk to write to underlying connection.
- RequestHandler:finish(chunk)
Finishes the HTTP request. This method can only be called once for each request. This method flushes all data in the write buffer.
Parameters: chunk (String) – Final data to write to stream before finishing.
- RequestHandler:flush(callback)
Flushes the current output buffer to the IO stream.
If callback is given it will be run when the buffer has been written to the socket. Note that only one callback flush callback can be present per request. Giving a new callback before the pending has been run leads to discarding of the current pending callback. For HEAD method request the chunk is ignored and only headers are written to the socket.
Parameters: callback (Function) – Function to call after the buffer has been flushed.
- RequestHandler:clear()
Reset all headers, empty write buffer in a request.
- RequestHandler:add_header(name, value)
Add the given name and value pair to the HTTP response headers.
Parameters: - name (String) – Key string for header field.
- value (String) – Value for header field.
- RequestHandler:set_header(name, value)
Set the given name and value pair of the HTTP response headers. If name exists then the value is overwritten.
Parameters: - name (String) – Key string for header field.
- value (String) – Value for header field.
- RequestHandler:get_header(name)
Returns the current value of the given name in the HTTP response headers. Returns nil if not set.
Parameters: name (String) – Name of value to get. Return type: String or nil
- RequestHandler:set_status(code)
Set the status code of the HTTP response headers. Must be number or error is raised.
Parameters: code (Number) – HTTP status code to set.
- RequestHandler:get_status()
Get the curent status code of the HTTP response headers.
Return type: Number
- RequestHandler:redirect(url, permanent)
Redirect client to another URL. Sets headers and finish request. User can not send data after this.
Parameters: - url (String) – The URL to redirect to.
- permanent (Boolean) – Flag this as a permanent redirect or temporary.
Misc¶
- RequestHandler:set_async(bool)
Set handler to not call finish() when request method has been called and returned. Default is false. When set to true, the user must explicitly call finish.
Parameters: bool (Boolean) –
HTTPError class¶
This error is raisable from RequestHandler instances. It provides a convinent and safe way to handle errors in handlers. E.g it is allowed to do this:
1 2 3 4 5 6 7 | function MyHandler:get()
local item = self:get_argument("item")
if not find_in_store(item) then
error(turbo.web.HTTPError(400, "Could not find item in store"))
end
...
end
|
The result is that the status code is set to 400 and the message is sent as the body of the request. The request is always finished on error.
- HTTPError(code, message)¶
Create a new HTTPError class instance.
Parameters: - code (Number) – The HTTP status code to send to send to client.
- message (String) – Optional message to pass as body in the response.
StaticFileHandler class¶
A static file handler for files on the local file system. All files below user defined _G.TURBO_STATIC_MAX or default 1MB in size are stored in memory after initial request. Files larger than this are read from disk on demand.
Usage:
local app = turbo.web.Application:new({
{"^/$", turbo.web.StaticFileHandler, "/var/www/index.html"},
{"^/(.*)$", turbo.web.StaticFileHandler, "/var/www/"}
})
Paths are not checked until intial hit on handler. The file is then cached in memory if it is a valid path. Notice that paths postfixed with / indicates that it should be treated as a directory. Paths with no / is treated as a single file.
RedirectHandler class¶
A simple redirect handler that simply redirects the client to the given URL in 3rd argument of a entry in the Application class’s routing table.
local application = turbo.web.Application({
{"^/redirector$", turbo.web.RedirectHandler, "http://turbolua.org"}
})
Application class¶
The Application class is a collection of request handler classes that make together up a web application. Example:
1 2 3 4 5 | local application = turbo.web.Application({
{"^/static/(.*)$", turbo.web.StaticFileHandler, "/var/www/"},
{"^/$", ExampleHandler},
{"^/item/(%d*)", ItemHandler}
})
|
The constructor of this class takes a “map” of URL patterns and their respective handlers. The third element in the table are optional parameters the handler class might have. E.g the turbo.web.StaticFileHandler class takes the root path for your static handler. This element could also be another table for multiple arguments.
The first element in the table is the URL that the application class matches incoming request with to determine how to serve it. These URLs simply be a URL or a any kind of Lua pattern.
The ItemHandler URL pattern is an example on how to map numbers from URL to your handlers. Pattern encased in parantheses are used as parameters when calling the request methods in your handlers.
Note: Patterns are matched in a sequential manner. If a request matches multiple handler pattern’s only the first handler matched is delegated the request. Therefore, it is important to write good patterns.
A good read on Lua patterns matching can be found here: http://www.wowwiki.com/Pattern_matching.
- Application(handlers, kwargs)¶
Initialize a new Application class instance.
Parameters: - handlers (Table) – As described above. Table of tables with pattern to handler binding.
- kwargs (Table) – Keyword arguments
Keyword arguments supported:
- “default_host” (String) - Redirect to this URL if no matching handler is found.
- “cookie_secret” (String) - Sequence of bytes used to sign secure cookies.
- Application:add_handler(pattern, handler, arg)
Add handler to Application.
Parameters: - pattern (String) – Lua pattern string.
- handler (RequestHandler based class) –
- arg – Argument for handler.
- Application:listen(port, address, kwargs)
Starts an HTTP server for this application on the given port. This is really just a convinence method. The same effect can be achieved by creating a turbo.httpserver.HTTPServer class instance and assigning the Application instance to its request_callback parameter and calling its listen() method.
Parameters: - port (Number) – Port to bind server to.
- address (String or number.) – Address to bind server to. E.g “<IP_ADDRESS>”.
- kwargs (Table) – Keyword arguments passed on to turbo.httpserver.HTTPServer. See documentation for available options. This is used to set SSL certificates amongst other things.
- Application:set_server_name(name)
Sets the name of the server. Used in the response headers.
Parameters: name (String) – The name used in HTTP responses. Default is “Turbo vx.x”
- Application:get_server_name()
Gets the current name of the server. :rtype: String
Mustache Templating¶
Turbo.lua has a small and very fast Mustache parser built-in. Mustache templates are logic-less templates, which are supposed to help you keep your business logic outside of templates and inside “controllers”. It is widely known by Javascript developers and very simple to understand.
For more information on the Mustache markup, please see this: http://mustache.github.io/mustache.5.html
- Mustache.compile(template)¶
Compile a Mustache highlighted string into its intermediate state before rendering. This function does some validation on the template. If it finds syntax errors a error with a message is raised. It is always a good idea to cache pre-compiled frequently used templates before rendering them. Although compiling each time is usally not a big overhead. This function can throw errors if the template contains invalid logic.
Parameters: template – (String) Template in string form. Return type: Parse table that can be used for Mustache.render function
- Mustache.render(template, obj, partials, allow_blank)¶
Render a template. Accepts a parse table compiled by Mustache.compile or a uncompiled string. Obj is the table with keys. This function can throw errors in case of un-compiled string being compiled with Mustache.compile internally.
Parameters: - template – Accepts a pre-compiled template or a un-compiled string.
- obj (Table) – Parameters for template rendering.
- partials (Table) – Partial snippets. Will be treated as static and not compiled...
- allow_blank – Halt with error if key does not exist in object table.
Example templating:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |

{{heading }}

{{!
Some comment section that
even spans across multiple lines,
that I just have to have to explain my flawless code.
}}

{{{desc}}} {{! No escape with triple mustaches allow HTML tags! }}
{{&desc}} {{! No escape can also be accomplished by & char }}

I am {{age}} years old. What would you like to buy in my shop?

{{ #items }} {{! I like spaces alot! }}
Item: {{item}}
{{#types}}
{{! Only print items if available.}}
Type available: {{type}}
{{/types}}
{{^types}} Only one type available.
{{! Apparently only one type is available because types is not set,
determined by the hat char ^}}
{{/types}}
{{/items}}
{{^items}}
No items available!
{{/items}}

|
With a render table likes this:
{
heading="My website!",
desc="Big important website",
age=27,
items={
{item="Bread",
types={
{type="light"},
{type="fatty"}
}
},
{item="Milk"},
{item="Sugar"}
}
}
Will produce this output after rendering:

My%20website%21

Big important website
Big important website

I am 27 years old. What would you like to buy in my shop?

Item: Bread
Type available: light
Type available: fatty
Item: Milk
Only one type available.
Item: Sugar
Only one type available.

Mustache.TemplateHelper class¶
A simple class that simplifies the loading of Mustache templates, pre-compile and cache them for future use.
- Mustache.TemplateHelper(base_path)¶
Create a new TemplateHelper class instance.
Parameters: base_path (String) – Template base directory. This will be used as base path when loading templates using the load method. Return type: Mustache.TemplateHelper class
- Mustache.TemplateHelper:load(template)
Pre-load a template.
Parameters: template (String) – Template name, e.g file name in base directory.
- Mustache.TemplateHelper:render(template, table, partials, allow_blank)
Render a template by name. If called twice the template will be cached from first time.
Parameters: - template (String) – Template name, e.g file name in base directory.
- obj (Table) – Parameters for template rendering.
- partials (Table) – Partial snippets. Will be treated as static and not compiled...
- allow_blank – Halt with error if key does not exist in object table.


Line length
Step of Ivan
Step of Penka
Length of a segment
Submit
The visualization of this fast task requires newer browser versions. Please consider updating.


| File | Statements | Branches | Functions | Lines | |||||
|---|---|---|---|---|---|---|---|---|---|
| src/ | 58.41% | 132/226 | 42.71% | 41/96 | 50% | 38/76 | 59.69% | 117/196 | |
| src/button/ | 100% | 1/1 | 100% | 2/2 | 100% | 1/1 | 100% | 1/1 | |
| src/grid/ | 3.7% | 1/27 | 0% | 0/11 | 0% | 0/11 | 4.17% | 1/24 | |
| src/nav/ | 53.85% | 21/39 | 87.5% | 7/8 | 62.5% | 15/24 | 53.85% | 21/39 | |
| src/slides/ | 54.55% | 36/66 | 57.14% | 16/28 | 68% | 17/25 | 56.67% | 34/60 | |
| src/tabs/ | 0% | 0/30 | 0% | 0/17 | 0% | 0/21 | 0% | 0/29 | |
| tests/unit/ | 96.86% | 278/287 | 50% | 3/6 | 95.45% | 84/88 | 96.86% | 278/287 |


1. Introduction
The web’s traditional position calculation mechanisms rely on explicit queries of DOM state that are known to cause (expensive) style recalcuation and layout and, frequently, are a source of significant performance overhead due to continuous polling for this information.A body of common practice has evolved that relies on these behaviors, however, including (but not limited to):
- Building custom pre- and deferred-loading of DOM and data.
- Implementing data-bound high-performance scrolling lists which load and render subsets of data sets. These lists are a central mobile interaction idiom.
- Calculating element visibility. In particular, ad networks now require reporting of ad "visibility" for monetizing impressions. This has led to many sites abusing scroll handlers (causing jank on scroll), synchronous layout invoking readbacks (causing unneccessary critical work in rAF loops), and resorting to exotic plugin-based solutions for computing "true" element visibility (with all the associated overhead of the plugin architecture).
These use-cases have several common properties:
- They can be represented as passive "queries" about the state of individual elements with respect to some other element (or the global viewport)
- They do not impose hard latency requirements; that is to say, the information can be delivered asynchronously (e.g. from another thread) without penalty
- They are poorly supported by nearly all combinations of existing web platform features, requiring extraordinary developer effort despite their widespread use.
A notable non-goal is pixel-accurate information about what was actually displayed (which can be quite difficult to obtain efficiently in certain browser architectures in the face of filters, webgl, and other features). In all of these scenarios the information is useful even when delivered at a slight delay and without perfect compositing-result data.
The Intersersection Observer API addresses the above issues by giving developers a new method to asynchronously query the position of an element with respect to other elements or the global viewport. The asynchronous delivery eliminates the need for costly DOM and style queries, continuous polling, and use of custom plugins. By removing the need for these methods it allows applications to significantly reduce their CPU, GPU and energy costs.
var observer = new IntersectionObserver(function(changes) {
for (var i in changes) {
console.log(changes[i].time); // Timestamp when the change occurred
console.log(changes[i].rootBounds); // Unclipped area of root
console.log(changes[i].intersectionRect); // Unclipped area of target intersected with rootBounds
console.log(changes[i].boundingClientRect); // target.boundingClientRect()
console.log(changes[i].target); // the Element target
}
}, {});
// Watch all threshold events on a specific descendant of the viewport
observer.observe(childElement);
observer.disconnect(); // removes all
2. Intersection Observer
The Intersection Observer API enables developers to understand the visibility and position of DOM elements relative to a root element or the top level document’s viewport.2.1. The IntersectionObserverCallback
callback IntersectionObserverCallback = void (sequence<IntersectionObserverEntry> entries, IntersectionObserver observer)
This callback will be invoked when there are changes to target’s intersection with root, as per the processing model.
2.2. The IntersectionObserver interface
TheIntersectionObserver
interface can be used to observe changes in
the intersection of a target Element
and a root Element
(or the top-level document’s viewport).
Note: In MutationObserver
, the MutationObserverInit
options are
passed to observe()
while in IntersectionObserver
they are passed to the constructor. This is because for MutationObserver,
each Node
being observed could have a different set of attributes to
filter. For IntersectionObserver, having different root
, rootMargin
or threshold
values for each target seems to introduce more
complexity without solving additional use-cases. Per-observe()
options
could be provided in the future if V2 introduces a need for it.
[Constructor(IntersectionObserverCallback callback, optional IntersectionObserverInit options), Exposed=Window] interface IntersectionObserver { readonly attribute Element? root; readonly attribute DOMString rootMargin; readonly attribute sequence<double> thresholds; void observe (Element target); void unobserve (Element target); void disconnect (); sequence<IntersectionObserverEntry> takeRecords (); };
-
- Let this be a new
IntersectionObserver
object - Set this’s internal
[[callback]]
slot to callback. - Set this.
root
to options.root
- Set this.
rootMargin
to options.rootMargin
- Let thresholds be a list equal to options.
threshold
. - If any value in thresholds is less than 0.0 or greater
than 1.0, throw a
RangeError
exception. - Sort thresholds in ascending order
- If thresholds is empty, append 0 to thresholds.
- Set this.
thresholds
to thresholds. - Append this to the unit of related similar-origin browsing contexts’s IntersectionObservers list.
- Return this.
- Let this be a new
-
- If target is in this’s internal
[[ObservationTargets]]
slot, return. - If target is NOT a descendent of this.
root
, throw aTypeError
. - Let intersectionObserverRegistration be a dictionary with an observer property set to this and a previousVisibleRatio property set to 0.
- Append intersectionObserverRegistration to target’s
internal
[[RegisteredIntersectionObservers]]
slot. - Add target to this’s internal
[[ObservationTargets]]
slot.
- If target is in this’s internal
-
- Remove the element whose observer property is equal
to this from target’s internal
[[RegisteredIntersectionObservers]]
slot. - Remove target from this’s internal
[[ObservationTargets]]
slot.
Note:
MutationObserver
does not implementunobserve()
. For IntersectionObserver,unobserve()
addresses the lazy-loading use case. After a target becomes visible, it does not need to be tracked. It would be more work to eitherdisconnect()
all targets andobserve()
the remaining ones, or create a separateIntersectionObserver
for each target. - Remove the element whose observer property is equal
to this from target’s internal
-
For each target in this’s internal
[[ObservationTargets]]
slot- Remove the element whose observer property is equal
to this from target’s internal
[[RegisteredIntersectionObservers]]
slot. - Remove target from this’s internal
[[ObservationTargets]]
slot.
- Remove the element whose observer property is equal
to this from target’s internal
-
- Let queue be a copy of this’s internal
[[QueuedEntries]]
slot. - Clear this’s internal
[[QueuedEntries]]
slot. - Return queue.
- Let queue be a copy of this’s internal
-
root, of type Element, readonly, nullable
-
The root to use for intersection. If null, use the top-level document’s viewport.
-
rootMargin, of type DOMString, readonly
-
Same as margin, can be 1, 2, 3 or 4 components, possibly negative lengths. See IntersectionObserverInit/
rootMargin
. -
thresholds, of type sequence<double>, readonly
-
List of thresholds at which to trigger callback.
2.3. The IntersectionObserverEntry interface
[Constructor(IntersectionObserverEntryInit intersectionObserverEntryInit)] interface IntersectionObserverEntry { readonly attribute DOMHighResTimeStamp time; readonly attribute DOMRectReadOnly rootBounds; readonly attribute DOMRectReadOnly boundingClientRect; readonly attribute DOMRectReadOnly intersectionRect; readonly attribute Element target; }; dictionary IntersectionObserverEntryInit { required DOMHighResTimeStamp time; required DOMRectInit rootBounds; required DOMRectInit boundingClientRect; required DOMRectInit intersectionRect; required Element target; };
-
boundingClientRect, of type DOMRectReadOnly, readonly
-
A
DOMRectReadOnly
obtained by the same algorithm as that ofElement
'sgetBoundingClientRect()
performed on target. -
intersectionRect, of type DOMRectReadOnly, readonly
-
boundingClientRect
, intersected by each of target’s ancestors' clip rects (up to but not includingroot
), intersected withrootBounds
. This value represents the portion of target actually visible withinrootBounds
. -
rootBounds, of type DOMRectReadOnly, readonly
-
The content-box dimensions of
root
, adjusted byrootMargin
, in the coordinate space of the document the root element is in. Ifroot
is null, thenrootBounds
will be null. -
target, of type Element, readonly
-
time, of type DOMHighResTimeStamp, readonly
-
The attribute must return a
DOMHighResTimeStamp
that corresponds to the time the intersection was recorded.
2.4. The IntersectionObserverInit dictionary
dictionary IntersectionObserverInit { Element? root = null; DOMString rootMargin = "0px"; (double or sequence<double>) threshold = 0; };
-
root, of type Element, nullable, defaulting to
null
-
The root to use for intersection. If not provided, use the top-level document’s viewport.
-
rootMargin, of type DOMString, defaulting to
"0px"
-
Same as margin, can be 1, 2, 3 or 4 components, possibly negative lengths.
If there is only one component value, it applies to all sides. If there are two values, the top and bottom margins are set to the first value and the right and left margins are set to the second. If there are three values, the top is set to the first value, the left and right are set to the second, and the bottom is set to the third. If there are four values, they apply to the top, right, bottom, and left, respectively.e.g.
"5px" // all margins set to 5px "5px 10px" // top & bottom = 5px, right & left = 10px "-10px 5px 8px" // top = -10px, right & left = 5px, bottom = 8px "-10px -5px 5px 8px" // top = -10px, right = -5px, bottom = 5px, left = 8px
-
threshold, of type
(double or sequence<double>)
, defaulting to0
-
List of threshold(s) at which to trigger callback. callback will be invoked when intersectionRect’s area changes from greater than or equal to any threshold to less than that threshold, and vice versa.
Threshold values must be in the range of [0, 1.0] and represent a percentage of the area as specified by target.
getBoundingClientRect()
.Note: 0.0 is effectively "any non-zero number of pixels".
3. Processing Model
This section outlines the steps the user agent must take when implementing the Intersection Observer API.3.1. Internal Slot Definitions
3.1.1. Browsing Contexts
Each unit of related similar-origin browsing contexts has an IntersectionObserverTaskQueued flag which is initialized to false and an IntersectionObservers list which is initially empty.3.1.2. Element
Element
objects have an internal [[RegisteredIntersectionObservers]] slot,
which is initialized to an empty list.
3.1.3. IntersectionObserver
IntersectionObserver
objects have internal [[QueuedEntries]] and [[ObservationTargets]] slots,
which are initialized to empty lists and an internal [[callback]] slot which is
initialized by IntersectionObserver(callback, options)
.
3.2. Algorithms
3.2.1. Queue an Intersection Observer Task
To queue an intersection observer task for a unit of related similar-origin browsing contexts unit, run these steps:- If unit’s IntersectionObserverTaskQueued flag is set to true, return.
- Set unit’s IntersectionObserverTaskQueued flag to true.
- Enqueue a task to notify intersection observers in the list of idle request callbacks with a timeout of 100.
3.2.2. Notify Intersection Observers
To notify intersection observers for a unit of related similar-origin browsing contexts unit, run these steps:- Set unit’s IntersectionObserverTaskQueued flag to false.
- Let notify list be a copy of unit’s IntersectionObservers list.
- For each
IntersectionObserver
object observer in notify list, run these steps:- If observer’s internal
[[QueuedEntries]]
slot is empty, continue. - Let queue be a copy of observer’s internal
[[QueuedEntries]]
slot. - Clear observer’s internal
[[QueuedEntries]]
slot. - Invoke callback with queue as the first argument and observer as the second argument and callback this value. If this throws an exception, report the exception.
- If observer’s internal
3.2.3. Queue an IntersectionObserverEntry
To queue an IntersectionObserverEntry for observer, given a unit of related similar-origin browsing contexts unit, observer, time, rootBounds, boundingClientRect, intersectionRect and target, run these steps:- Construct an
IntersectionObserverEntry
, passing in time, rootBounds, boundingClientRect, intersectionRect and target. - Append it to observer’s internal
[[QueuedEntries]]
slot. - Queue an intersection observer task for unit.
3.2.4. Run the Update Intersection Observations Steps
To run the update intersection observations steps for an event loop loop given a timestamp time, run these steps:- Let unit be the unit of related similar-origin browsing contexts for loop.
- For each observer in unit’s IntersectionObservers list
- Let rootBounds be the content-box of observer.
root
(or the top-level document’s viewport if observer.root
is null), adjusted by observer.rootMargin
. - For each target in observer’s internal
[[ObservationTargets]]
slot- Let boundingClientRect be a
DOMRectReadOnly
obtained by the same algorithm as that ofElement
'sgetBoundingClientRect()
performed on target. - Let intersectionRect be the intersection of boundingClientRect with rootBounds, intersected with
the clip rect of each ancestor between target and observer.
root
(or the top-level document’s viewport if observer.root
is null).TBD: Do the clip rects include clip-path and other clipping properties or just overflow clipping?
- Let area be boundingClientRect’s area.
- Let visibleArea be intersectionRect’s area.
- Let visibleRatio be visibleArea divided by area if area is non-zero, and 0 otherwise.
- Let threshold be the index of the first entry in observer.
thresholds
whose value is greater than or equal to visibleRatio. If visibleRatio is equal to 0, let threshold be -1. - Let intersectionObserverRegistration be the element in target’s internal
[[RegisteredIntersectionObservers]]
slot whose observer property is equal to observer. - Let oldVisibleRatio be set to intersectionObserverRegistration’s previousVisibleRatio property.
- Let oldThreshold be the index of the first entry in observer.
thresholds
whose value is greater than or equal to oldVisibleRatio. If oldVisibleRatio is equal to 0, let oldThreshold be -1. - If threshold does not equal oldThreshold, queue an IntersectionObserverEntry for unit, passing in observer, time, rootBounds, boundingClientRect, intersectionRect and target.
- Assign visibleRatio to intersectionObserverRegistration’s previousVisibleRatio property.
- Let boundingClientRect be a
- Let rootBounds be the content-box of observer.
3.2.5. Removing Steps
Whenever the removing steps run with an oldNode, run these steps:- Let nodes be oldNode’s inclusive descendants, in tree order.
-
For each node in nodes, run this substep:
- For each observer in node’s internal
[[RegisteredIntersectionObservers]]
slot, run theunobserve()
algorithm on observer, passing in node as target.
- For each observer in node’s internal
3.3. External Spec Integrations
3.3.1. HTML Processing Model: Event Loop
An Intersection Observer processing step should take place AFTER the layout and rendering steps have been performed in the update the rendering event loop in the HTML Processing Model.This step is:
- Run the update intersection observations steps for the event loop in question, passing in now as the timestamp.


Genre: Novel
Don Quixote has become so entranced reading tales of chivalry that he decides to turn knight errant himself. In the company of his faithful squire, Sancho Panza, these exploits blossom in all sorts of wonderful ways. While Quixote's fancy often leads him astray, he tilts at windmills imagining them to be giants, Sancho acquires cunning and a certain sagacity. Sane madman and wise fool, they roam the world together-and together they have haunted readers' imaginations for nearly four hundred years.
Click to get the ebook for free on Amazon
Genre: Novel
Under the influence of their charismatic classics professor, a group of clever, eccentric misfits at an elite New England college discover a way of thinking and living that is a world away from the humdrum existence of their contemporaries. But when they go beyond the boundaries of normal morality their lives are changed profoundly and forever, and they discover how hard it can be to truly live and how easy it is to kill.
Click to get the ebook for free on Amazon
Genre: Novel
In a remote Hertfordshire village, far off the good coach roads of George III's England, Mr. and Mrs. Bennet -- a country squire of no great means and his scatterbrained wife -- must marry off their five vivacious daughters. At the heart of this all-consuming enterprise are the headstrong second daughter Elizabeth and her aristocratic suitor Fitzwilliam Darcy, two lovers in whom pride and prejudice must be overcome before love can bring the novel to its magnificent conclusion.
Click to get the ebook for free on Amazon
Genre: Novel
A classic coming of age story, “Jane Eyre” is the tale of its title character, a poor orphaned girl who comes to live with her aunt at Gateshead Hall. While there she endures great emotional and physical abuse at the hands of her aunt and cousins. Jane subsequently ships off to Lowood, a Christian boarding school for poor and orphaned girls. The conditions at the school are quite brutal. The students are subjected to cold lodgings, poor food, inadequate clothing, and the harsh rule of the administrator, Mr. Brocklehurst. The maltreatment of the students is eventually discovered and after some changes life becomes more bearable. She eventually finishes her coursework and spends a period of time as a teacher at the school. After leaving Lowood she gains a position as a governess at Thornfield Hall working for Edward Rochester, a man whom she will eventually fall in love with. “Jane Eyre” is the story of one woman’s struggle to overcome adversity.
Click to get the ebook for free on Amazon
Genre: Novel
When her father leaves the Church in a crisis of conscience, Margaret Hale is uprooted from her comfortable home in Hampshire to move with her family to the north of England. Initially repulsed by the ugliness of her new surroundings in the industrial town of Milton, Margaret becomes aware of the poverty and suffering of the local mill workers and develops a passionate sense of social justice. This is intensified by her tempestuous relationship with the mill-owner and self-made man, John Thornton, as their fierce opposition over his treatment of his employees masks a deeper attraction. In North and South, Elizabeth Gaskell skillfully fuses individual feeling with social concern, and in Margaret Hale creates one of the most original heroines of Victorian literature.
Click to get the ebook for free on Amazon
Genre: Novel
Victor Hugo's tale of injustice, heroism and love follows the fortunes of Jean Valjean, an escaped convict determined to put his criminal past behind him. But his attempts to become a respected member of the community are constantly put under threat: by his own conscience, and by the relentless investigations of the dogged policeman Javert. It is not simply for himself that Valjean must stay free, however, for he has sworn to protect the baby daughter of Fantine, driven to prostitution by poverty.
Click to see the book on Amazon
Genre: Novel
Night is a work by Elie Wiesel about his experience with his father in the Nazi German concentration camps at Auschwitz and Buchenwald in 1944–1945, at the height of the Holocaust and toward the end of the Second World War. In just over 100 pages of sparse and fragmented narrative, Wiesel writes about the death of God and his own increasing disgust with humanity, reflected in the inversion of the father–child relationship as his father declines to a helpless state and Wiesel becomes his resentful teenage caregiver.
Click to see the book on Amazon


ChainReplicator is an autogenerated mock type for the ChainReplicator type
type ChainReplicator struct { mock.Mock }
func (_m *ChainReplicator) ReplicateChains(lastConfigBlock *common.Block, chains []string) []string
ReplicateChains provides a mock function with given fields: lastConfigBlock, chains
Factory is an autogenerated mock type for the Factory type
type Factory struct { mock.Mock }
func (_m *Factory) ChainIDs() []string
ChainIDs provides a mock function with given fields:
func (_m *Factory) Close()
Close provides a mock function with given fields:
func (_m *Factory) GetOrCreate(chainID string) (blockledger.ReadWriter, error)
GetOrCreate provides a mock function with given fields: chainID
type HealthChecker struct { RegisterCheckerStub func(string, healthz.HealthChecker) error // contains filtered or unexported fields }
func (fake *HealthChecker) Invocations() map[string][][]interface{}
func (fake *HealthChecker) RegisterChecker(arg1 string, arg2 healthz.HealthChecker) error
func (fake *HealthChecker) RegisterCheckerArgsForCall(i int) (string, healthz.HealthChecker)
func (fake *HealthChecker) RegisterCheckerCallCount() int
func (fake *HealthChecker) RegisterCheckerCalls(stub func(string, healthz.HealthChecker) error)
func (fake *HealthChecker) RegisterCheckerReturns(result1 error)
func (fake *HealthChecker) RegisterCheckerReturnsOnCall(i int, result1 error)


<!-- LAB_1.1 --> C:\Pentaho\server\pentaho-server\tomcat\webapps
Now that your local environment is setup we need to change some configuration files
This embedded sample will use username and password in the url to authenticate the user.
In a real world project we would probably use a SSO mechanism or a token here.
<!-- Modify Line 2 --> requestParameterAuthenticationEnabled=true
Now you can use your local version of this workshop.
(You can skip this task if you are already familiar with it)
Now we'll play with an example of website that embed Pentaho
In the area above you can see an image as placeholder. In the image is written the Id of the container Div.
In this task we'll replace the first Image with a Dashboard from Pentaho Server.
Now let's add the code to render the dashboard in our webpage!
var dashboard_url='/pentaho/api/repos/%3Apublic%3ASteel%20Wheels%3ASales%20Performance%20(dashboard).xdash/viewer'; $("#div_dashboard_1").html('<iframe border="0" frameborder="0" src="'+dashboard_url+'" style="width:100%;height:100%"></iframe>');
Using iFrame and the Pentaho HTTP Api require you to know how to structure the Url to get a specific result.
Also, after you have a pentaho resource embedded you can interact with it (as example to save it).
Sll this logic can be included in a Javascript helper file, to avoid code repetition.
We have done so for this workshop, feel free to have a look at the underlying code if you want :)
Now let's change the previous sample to use this helper class:
//LAB 2 - Task 2 var usernameP = "admin"; var passwordP = "password"; var pentahoSrv = new PentahoRestApis("/pentaho",usernameP,passwordP); //INTEGRATE RESOURCES FROM PENTAHO SERVER var dashboardUri = "/public/Steel Wheels/Sales Performance (dashboard).xdash"; pentahoSrv.loadResourceInDiv(dashboardUri,"view","div_dashboard_1");
In this Lab you will integrate other kind of resources from the Pentaho Server in this webpage!
So you will learn the basics that will let you create an example like the one we just seen. Ready?
You can search a Report on Pentaho Server if you want.
Otherwise just use the code in the next step
Now let's add the code to render the interactive report in our webpage!
//LAB 3 - Task 2 var reportUri = "/public/Steel Wheels/Top Customers (report).prpt"; pentahoSrv.loadResourceInDiv(reportUri,"view","div_report_1");
Now let's add the code to render an Analysis report in our webpage!
//LAB 3 - Task 3 var reportUri2 = "/public/Steel Wheels/Widget Library/Analysis Views/Geomap.xanalyzer"; pentahoSrv.loadResourceInDiv(reportUri2,"view","div_report_2");
In this task we'll get the list of resources from a specific Path in the Pentaho Repository and we'll display the result in the following div
Container Div Id: resourcesList
//LAB 3 - Task 4 var dashboardsPath = "/public/Steel Wheels/Widget Library"; pentahoSrv.loadFileList(dashboardsPath,"*.xdash","resourcesList");
In this previous task we got a list of resources. Here we'll turn them into a selector, and on change of this selector we'll load the selected resource in page!
Container Div Id: resourceSelector
//LAB 3 - Task 5 function _fileListHandler(data, textStatus, jqXHR, containerDivId, rootPath) { $('#'+containerDivId).empty(); var sel = $('<select>').appendTo('#'+containerDivId); sel.append($("<option>").attr('value',"").text("-- Select a Resource --")); $(data).find('file').each (function() { var fileTitle = $(this).find('title').text(); var filePath = $(this).find('path').text(); if (filePath != rootPath) { // ignore the root. sel.append($("<option>").attr('value',filePath).text(fileTitle)); } }); sel.change(function() { if(this.value==""){ $("#div_dashboard_2").attr('src', ""); }else{ pentahoSrv.loadResourceInDiv(this.value,"view","div_dashboard_2"); } }); } pentahoSrv.loadFileList(dashboardsPath,"*.xdash","resourceSelector",_fileListHandler);
In this Lab you will integrate the self-service designers that are available in the Pentaho Server.
Visualize content is important but one of Pentaho unique feature is to being able to offer an end-to-end experience to the user, also when integrated into another application
In this we'll integrate the Interactive Report Designer in this web page!
Button Id: save_button_report
We'll integrate the Interactive Report Designer in this page!
//LAB 4 - Task 1.1 pentahoSrv.loadResourceInDiv(".prpti","create","div_report_designer");
//LAB 4 - Task 1.2 function saveFile (divId,folderPath) { var filename = prompt("Enter file name"); pentahoSrv.saveResource(divId+'_iframe',filename,folderPath); } var folderPath = "/public/Steel Wheels/Widget Library"; $("#save_button_report").click(function() { saveFile("div_report_designer",folderPath); });
In this we'll integrate Analyzer in this web page!
Button Id: save_button_analyzer
//LAB 4 - Task 2 pentahoSrv.loadResourceInDiv(".xanalyzer","create","div_analyzer"); $("#save_button_analyzer").click(function() { saveFile("div_analyzer",folderPath); });
In this we'll integrate the Dashboard Designer. This is a bit more complicated, because there is no rest API that retun you a ready to use environment.
Use the code below:
Button Id: save_button_dashboard
//LAB 4 - Task 3 var folderPathDash = "/public/Steel Wheels"; pentahoSrv.loadResourceInDiv(".xdash","create","div_dashboard_des"); function _fileListHandlerForDashboardRes(data, textStatus, jqXHR, containerDivId, rootPath) { var cList = $('<ul>').addClass('widgetSelectorWs').appendTo('#'+containerDivId); $(data).find('file').each (function() { var fileTitle = $(this).find('title').text(); var filePath = $(this).find('path').text(); var fileName = filePath.substr(filePath.lastIndexOf('/') + 1); //var localizedFileName = ($(this).find('localePropertiesMapEntries')[0]).getElementsByTagName("properties")[0].getElementsByTagName("value")[0].innerHTML; localizedFileName = fileTitle; var solution=""; if (filePath != rootPath) { // ignore the root. var li = $('<li/>') .addClass('widgetSelector-item') .text(fileTitle) .appendTo(cList); li.click(function(e) { pentahoSrv.addWidgetToDashboard("div_dashboard_des_iframe",solution, filePath, fileName, localizedFileName); }); } }); } $("#save_button_dashboard").click(function() { saveFile("div_dashboard_des",folderPathDash); }); $("#resourceSelDashDiv").empty(); pentahoSrv.loadFileList(folderPath,"*.xanalyzer%7C*.prpti","resourceSelDashDiv",_fileListHandlerForDashboardRes);
cd /cygdrive/c/themes/ ./createNewTheme.sh
DELIVERING THE FUTURE OF BIG DATA INTEGRATION AND ANALYTICS Hitachi Vantara elevates your innovation advantage by merging operational and informational experience to offer you a data partner with unprecedented range and depth in data management. We are analytics, industrial expertise, technology and outcomes rolled into one great solution provider. We listen. We understand. We work with you. Pentaho is a leading data integration and business analytics company with an enterprise-class, open source-based platform for diverse big data deployments. Our mission is to help organizations across industries harness the value from all their data, including big data and Internet of Things (IoT), enabling them to find new revenue streams, operate more efficiently, deliver outstanding service and minimize risk. The Sales Engineering Team is dedicated to support prospects in their evaluation of Pentaho.
Created by Gianluca Natali


Tomato is an online food delivery application. It is a restaurant aggregator and food delivery company. You have been hired as a consultant for the company. They have started their business in one location only, Bangalore. They target one area, Electronic city, in a group of 4 societies with middle-class families. They started their promotion and sales as follows-
Scenerio 2
Oops, the marketing team forgot to mention that they also gave a discount coupon of X% on the orders. It was done for the users to give feedback, and 100% did do that. We offered a discount which made it just a break-even scenario (Zero profit). (Revenue margin is 20% on the amount of purchase still)


Dashboard
Home
(current)
About
Services
Contact
기기명
모델 종류
Sensor
Voltage
Pressure
Lorem Ipsum
Lorem Ipsum
Error Log
#
First
Last
Handle
1
Mark
Otto
@mdo
2
Jacob
Thornton
@fat
3
Larry
the Bird
@twitter


Start again...
What has the cat been up to?
{%for video in videos%}
{{video.displayName}}
{%endfor%}


NEIL GAIMAN
INSTRUCTIONS
CHARLES VESS
This one is for Terri Windling, for going on
ahead and illuminating the twisting path through the wild wood. —CV
For Ellen Kushner & Delia Sherman,
for coming back and telling us what they found. —NG
HARPER
An Imprint of HarperCollinsPublishers


Extended: Run Test 7 (WIP) Run Test 8 Run Test Scripting
AcFun (Experimental) Run Test 1
Source: YouTube DailyMotion Vimeo HTML5 None Reload
Filters: Apply Center-Transparency Apply Center-Speedup Clear Runtime Filters
APIs: Fullscreen Windowed Fullscreen
Links: Demo with video Experimental CSS3 Transition Library CCL /w Transition Library (Alpha)
Scripting: Scripting Sandbox test Using scripting with CCL (Alpha)


Iíve always tried to explain to people how some drugs just arenít meant for everyone and recently I verified this personally. Iím a big fan of LSD and have used it for years without problems. Many people however have explained to me how much they donít like it so I accepted the fact that it wasnít for everyone.
A short while ago I started using meth regularly simply because my town was dry of LSD and meth is everywhere and cheap. I soon realized that I wasnít meant for all drugs either. I had used meth several times in the past but never for days at a time. Well one day I tweeked as usual after doing about 2 lines and waited another 8 hours to do more to renew my high. The next 2 lines I did made me feel the usual tweek until about 4 hours into it when I noticed that things were glowing as if I was mildly hallucinating.
I remember thinking to my self that this wasnít too strange because a lot of people I know had commented that they had mild hallucinations sometimes. So I ignored this and occupied myself by talking to my friends online.  I looked over at my cats who happened to be fighting and out of nowhere they started shouting obscenities at each other. My face had a look of shock upon it as I realized that this wasnít something that happened to other people with such small amounts. By this time the glowing had intensified greatly and everything around me was a different color than usual and many things were shooting sparks and rays of light. There was a shadow of another person constantly next to mine who kept whispering random words in my ear. I could no longer breathe without consciously making myself do it so I spent every few seconds remembering to breathe for fear I would die.
I walked to the bathroom to splash some water on my face which was very hot and there was a man pointing to the light switch with enthusiasm as if waiting for me to turn it on. I couldnít even see myself in the mirror because it had turned white. I was worried but I did not panic because I didnít feel any different than when I was normally on meth I was just hallucinating. I continued to have many hallucinations that would take forever to list and I became worried that I may end up schizophrenic when the drug wears off. The only blessing in disguise I had was that when I realized I was unable to sleep for obvious reasons I just stopped making myself breathe and within a minute or two I was unconscious. I considered the fact that doing this may kill me but I figured that when I fell asleep my body would return to breathing automatically and thankfully I was right.
I now choose to wait for LSD and donít particularly feel the need to become schizophrenic out of boredom. I donít really know if this will help anyone but I felt the need to express the fact that drugs do different things to different people. Id also like to add that 4 other people did the exact same meth with me and none of them experienced anything like this so there is no chance of it having an additive such as PCP unless they are all immune. So experiment carefully and find your drug of choice.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


My name is Alex, but my close friends call me Buck. I have been playing FiveM for 5 years now, But I am best known from the first BCDPSRP. Mike and I have played together since the beginning. I am currently getting an education in Wildfire Fire Science, and on my way to becoming a Type 1 wildland firefighter. I hope to use this knowledge and experience to open new roleplay possibilities within the server
Michael James
CO SERVER OWNER
My name is Michael but most call me Mike for short. Ive been playing FiveM for nearly 4 years and originally ran a server called BCDPSRP back in 2017 which nearly topped 100 members. I also am a volunteer firefighter which I hope to transfer that knowledge to people whom are interested in becoming one in the server or even irl! I am a pretty chill guy and I hope to meet you when you join our server!
Orion Rotolo
My name is Orion, people call me Fitz. I've been with this community from 2017. All my education comes from playing with some of the best. im active with my local pd and love working with them and will love working with you in our FiveM community.
CAMERON FLACK
Description Coming Soon
Mathew Miller
My name is Mathew but people call me Miller. I have been apart of this community since 2017. I have learned a lot being in this community and want to share that experience with everyone that joins.
Braxton Kallaus
My name is Braxton Kallaus, I am a trained and aspiring firefighter from Rural Colorado. I have been apart of this community since 2018, mostly in communications, and am happy to be assisting in the recreation of BCDPSRP. I am also learning more about being a texture designer and hopefully before long a modeler. If you have any questions, please do not hesitate to ask me and I hope to see you in RP soon.
About Us
We are three members that have been playing FiveM since 2017, with plenty experience in the server hosting side. We are dedicated to bring you things you wouldnt see on other servers.


Configuration¶
Running photconfig¶
When you first install phot2lc, you will need to change some of the default settings before it works properly on your machine and with your data. A script named photconfig is provided for this purpose. Run photconfig from the command line by simply typing
photconfig
at which a point you will be lead through a series of prompts to edit the configuration file "config.dat." The parameters that need to be set are:
author
image_list_name
pixloc_name
stardat_location
default_telescope
default_source
default_image
default_object
Below are detailed descriptions for each parameter's meaning and use:
author: phot2lc User name (e.g. your name).
image_list_name: Name of the file which contains the list of FITS images corresponding to each photometric data point, for time stamp generation.
If using MAESTRO output, it is assumed that the time stamps will come from the counts files, so this parameter can be set to None.
If using ccd_hsp output, this file is only needed if you want to generate time stamps for your light curve by grabbing times from each individual FITS header. An alternative is to use only the first image, in which case the time stamps will be generated using the exposure time multiplied by the number of exposures since the first image. In this case, you can also set this parameter to None.
pixloc_name: Name of the file containing initial guesses for the pixel coordinates of each star.
This is optional, used only by phot2lc for marking stars when displaying the first image, and can be set to None if unavailable.
stardat_location: Path and filename for file containing the RA and Dec corresponding to a given object (e.g. /Users/zvander/stars.dat). This parameter is required, as is the stars.dat file.
default_telescope: Default telescope code.
Telescope codes correspond to an entry within teledat.py and describe both the telescope, instrument, and FITS header keywords needed to set some phot2lc parameters. For a list of currently supported telescope codes, type phot2lc -c on the command line. This default setting can be overridden with the -t command line option.
default_source: Default photometry source program. Must be either hsp for ccd_hsp source photometry, or mae for MAESTRO source photometry. This default can be overridden using the -s command line option.
default_image: Default image name.
When using MAESTRO output, or ccd_hsp output with only the first image for time stamp generation, you may anticipate all of your first images to have the same name (e.g. firstimage.fits). In such a case, you can use this parameter to automatically set the image name instead of having to define it with the -i command line argument each time phot2lc is invoked. If set, you can still use the -i option to override the default in the event a different image name is used. If unused, set to None.
default_object: Default object name.
A useful parameter to set if you intend to reduce a lot of light curves at once for a single object whose name cannot be obtained directly from the FITS header. This object name needs to correspond to an object name within your stars.dat file, since this is how the object's coordinates are acquired for barycentric time corrections. If unused, set to None. This default can be overridden using the -o command line option.
The stars.dat File¶
stars.dat is a seven-column, whitespace-delimited text file used to store object names and their corresponding RA and Dec coordinates (sound familiar WQED users?!). The RA and Dec must be ICRS J2000 coordinates for proper barycentric corrections. You can actually name the stars.dat file whatever you want, as long as it matches the filename you provide in your config.dat file, but from here on out this documentation will refer to the file as stars.dat. Below are three example lines within a stars.dat file:
GD358 16 47 18 +32 28 32
ZTFJ0139+5245 01 39 06.17 +52 45 36.89
V386ser 16 10 33.62889 -01 02 23.20995
As you can see, each entry needs an object name (no spaces allowed!), and an RA and Dec in HMSDMS format with only spaces as delimiters. The decimal values can be to any precision you want, and you can put as many spaces between each column as you want. When you run phot2lc, the program will look for an entry in stars.dat that matches the object name retrieved from the FITS header or given as a command line argument.


I was challenged to produce an interactive visualisation and a story with text and other embedded static visualisations as a complete webpage.
I chose to explore the relationship between tobacco consumption and tax. Using Spreadsheet, D3.js and Adobe Illustrator, I did data analysis and made a webpage, which contains an interactive map and diagram, as well as other visualisation graphs.
FOCUS: Interactive Information Visualisation
TOOLS: HTML/CSS, D3.js, Adobe Illustrator
DATE: Mar-Jun 2017
It is generally acknowledged that tobacco has detrimental effects on health. However, smoking remain prevalent these years all over the world. Governments of different countries has taken various measures to prevent tobacco consumption. Among all the effective preventions, tax levy is one of the most significant measures.
The aim of this story is to explore the effectiveness of the tax levy as a tobacco control measure. Specifically, the story maps the overall information on the global smoking rate from 2000 to 2025, compared with the tobacco tax in different country/regions, to reveal the relationship between the tobacco consumption and tax.
The intend audience is the general public, including both smokers and non-smokers, taxpayers, as well as the policy makers. The story intends to provide with comprehensive information on the global smoking rate and its trend and forecast, then inform the audience about the effectiveness of tobacco tax in different countries.
As for smokers, they may want to know how much tax they pay for the cigarettes and the trend of smoking phenomenon. For the taxpayers, they have the rights to acquire information about every dollar they give for the tobacco control. Additionally, the policy makers can also have better understanding of the tax levy effectiveness by looking at data from other countries.
This story begins by introducing the prevalence of tobacco consumption over the world, which is supported by a global map of smoking rate. This is an interactive map with information about the trend from 2000 to 2025. Then the tobacco tax in different countries/regions is introduced to give the audience a general view of the tax rate range. With that in mind, people may wonder the effectiveness of tax on tobacco control.
Therefore, a few countries with the highest tax are selected, compared with their smoking rate changes to reveal the correlation. In the end, Australia is taken as an example to show price elasticity of demand for tobacco products and the quit smoking trend.
download (coming soon)
The original data set has been processed by deleting redundant information and integrating into an array. Only the data from year, country, sex and numeric are extracted.
The original data set has been split into six csv files, which represent six regions. For each single region, ‘international dollar’ is chosen as the price because this amount can best represent purchasing power parity. Similarly, ‘total tax’ is extracted as the tax figure. Then the average of price and tax ratio is calculated.
This data set combines the previous two sets and selected the top 12 countries with the highest tobacco tax rate (over 80%). Since the tax rate is from 2014 data, two years of smoking rate are selected; one is before this tax rate (2010), the other is after this tax rate (2020 prediction). The smoking rate takes the average of male and female in the specific country that year.
At the end, the selected countries’ average and world’s average rates are calculated. Also the differences (smoking rate decrease) are found for comparison purpose later.


Try out our Premium Member services: Virtual Legal Assistant, Query Alert Service and an ad-free experience. Free for one month and pay only if you like it.
CWP-8073-2014 (O&M) -1- IN THE HIGH COURT OF PUNJAB AND HARYANA AT CHANDIGARH CWP-8073-2014 (O&M) Date of Decision: August 13, 2019 Harjinder Singh ... Petitioner vs. State of Punjab and Ors .. Respondents CORAM: HON'BLE MR. JUSTICE ARUN MONGA Present : None. ***** ARUN MONGA, J.
Petitioner herein, inter alia, seeks issuance of a writ in the nature of mandamus directing the official respondents to stop/restrain the running of a Saw Mill i.e. M/s Gobind Saw Mill Beer Road, Jeewan Nagar, Kotkapura in District Faridkot (Punjab) which is stated to be run by respondent No.6 allegedly without any authorization/permit/license from the Government/State as the same creates nuisance and hazard to life and health of the general public.
2. In the return filed on behalf of respondents No. 1 and 4, it has been deposed in the affidavit that respondent No.6 (Bhupinder Singh) applied for grant of license vide application dated 19.09.2006 for running the Saw Mill. After thoroughly scrutinizing and verifying the authenticity of the particulars stated in the application alongwith the related documents appended thereto, a license No.341/FDK/2008-2009 dated 10.06.2008 (Annexure R-4/1) was granted to run the Mill with one 36" vertical band saw, 42" vertical band saw and one 42" horizontal band saw. The said license is stated to be valid up to 10.06.2018. It is further stated that the Saw 1 of 4 ::: Downloaded on - 06-10-2019 00:22:16 ::: CWP-8073-2014 (O&M) -2-
Mill is, therefore, being run by respondent No.6 in accordance with Rules and Regulations and under a valid license.
3. In the replication filed by the petitioner, the abovesaid specific averments qua grant of license have not been controverted by the petitioner
4. Respondent No.6 in his return has further produced on record other requisite permission/sanction as, more particularly, stated by him in Para 2 of his reply/affidavit in the following terms:
"That in reply to para no.2 of the writ petition, it is submitted that M/s Gobind Saw Mill was originally set up by Gurcharan Singh father of the answering respondent and after his death, the same is being run by the answering respondent as its proprietor. Originally all documentation etc. with the concerned government departments was done by the father of the answering respondent and after his death, the answering respondent is dealing with the requisite departments. The licence dated 10.6.2008 Annexure R-4/1 to establish/renew/expand/operatesaw mill/veneer/plywood industry as M/s Gobind Saw Mill, Beer Road, Jiwan Nagar, Kotkapura has already been granted to the petitioner by Divisional Forest Officer, Faridkot Forest Division, Faridkot. This licence is valid up to 10.6.2018.
Further, Consent to Operate u/s 21 of Air (Prevention and Control of Pollution) Act, 1981 dated 4.11.2014, Annexure R-6/1 has been granted to the answering respondent to operate M/s Gobind Saw Mill. Said consent has been renewed up to 30.9.2019 vide renewal letter dated 19.5.2015, Annexure R-6/2. Similarly, Consent to Operate u/s 25, 26 of Water (Prevention and Control of Pollution) Act, 1974 dated 4.11.2014, Annexure R-6/3 has been granted to the answering respondent to operate M/s Gobind Saw Mill. Said consent has been renewed up to 30.9.2019 vide renewal 2 of 4 ::: Downloaded on - 06-10-2019 00:22:17 ::: CWP-8073-2014 (O&M) -3-
letter dated 19.5.2015, Annexure R-6/4. The answering respondent has also been granted Licence No.27 for the year 2006-07, Licence No.31 for the year 2007-08, Licence No. 41 for the year 2010-11, Licence No. 33 for the year 2011-12, Licence No. 34 for the year 2012-13 and Licence No.50 for the year 2013-14 u/s 121 of the Punjab Municipal Act for operating the M/s Gobind Saw Mill. As such, answering respondent is dealing with various departments etc. in relation to M/s Gobind Saw Mill."
5. In the replication filed by the petitioner, none of the aforesaid pleading has been controverted or denied.
6. Having gone through the pleadings and after perusal of the record appended thereto, I am of the opinion that the writ petition is devoid of any merit and the same is liable to be dismissed for the reasons stated hereinafter.
7. The prayer in the writ petition is based on the premise that the official respondents are allowing private respondent No.6 to run/operate the Saw Mill illegally without any authorization/permit/license from the competent authorities. However, as is borne out from the record appended with the return filed by official respondents as also by respondent No.6 that appropriate sanction/permission/ license have been granted to respondent No.6. Thus, the entire edifice of the writ petition in view thereof collapses. The petitioner has had the liberty to challenge the said permission/sanction, in the event, he so wished or was advised that the same have not been granted in accordance with law. Yet the same have never been challenged by him either by instituting any other collateral proceedings or even in the present writ proceedings.
3 of 4
::: Downloaded on - 06-10-2019 00:22:17 :::
CWP-8073-2014 (O&M) -4-
8. There are many other allegations levelled in the writ petition which though have been threadbare dealt with by respondent No.6 as also by official respondents in the respective affidavits filed by them in response to the writ petition but I need not dwell on the same in view of the fact that scope of the writ petition is confined to seek mandamus on the ground that the Saw Mill is running/operating illegally without any sanction.
9. Accordingly, confining myself to the legality of running of the Saw Mill, I am of the view that the same is operating/running after having obtained the necessary sanction/permission. The writ petition is, therefore, dismissed being devoid of any merit. However, liberty is granted to the petitioner to take appropriate steps to challenge the permission/license granted to the petitioner, if so advised, by instituting appropriate proceedings, in accordance with law.
10 Any other pending civil miscellaneous application(s), if any, also stands disposed of.
11. Disposed of in above terms.
August 13, 2019 (ARUN MONGA)
smriti JUDGE
Whether speaking/reasoned : Yes/No
Whether Reportable : Yes/No
4 of 4
::: Downloaded on - 06-10-2019 00:22:17 :::


(Web Authoring CMP1130M)
Designer, Developer, Director & Senior Lecturer
have uploaded
Missing
Not only should have the wireframes completed
You should have started creating your site
Have a clear direction and plan to develop your site pages and customiser
Have a good understanding of the assessment requirements
The milestone was designed to focus your HTML and CSS so that you can concentrate on beautification and dynamic interfaces through JS
Many of you have not taken this seriously
Many of you are not spending the required time in your self directed study
Expectations
Understand the strengths and weaknesses of current web specifications and standards over previous version iterations.
- This is a report looking at HTML 4 and 5!
Expectations
Design and implement interactive web pages featuring:
Multimedia (video, sliders etc)
Advanced interaction (customiser, jquery libraries)
Local storage (storing data)
Add a video demo page
Expectations
Apply appropriate web standards ensuring maximum interoperability. i.e
Responsive Design (mobile, tablet, desktop)
Cross browser
Check code is w3c compliant
The next few weeks we will be covering
Canvas and mouse events
Drag and drop (jquery)
Local storage and JSON
Support / validation / submissions
Last week we looked at
Canvas element
Drawing to context2d
Set stroke and fill colour.
For and While Loops
Simple mouse click.
Animate using set interval
Clear Canvas
why is this still happening?
Not waiting for the DOM to be Loaded
Variable Scope
Drawing to canvas not context
function order
Closing paths
window.onload = function()
{
var canvas = document.getElementById("canvas");
var ctx = canvas.getContext('2d');
}
If you assign a value to a variable that has not been declared, it will automatically become a GLOBAL variable.
not efficient
Make a var global then assign it when you need to
var canvas;
var ctx;
window.onload = function()
{
canvas = document.getElementById("canvas");
ctx = canvas.getContext('2d');
}
Remember we can only draw to graphics inside the container (context)
var canvas = document.getElementById("canvas");
var ctx = canvas.getContext('2d');
ctx.fillRect(246,246,10,10);
NOT
canvas.fillRect(246,246,10,10);
Set a colour
my_context.fillStyle='white';
Used methods
my_context.fillRect();
my_context.fill();
my_context.stroke();
my_context.moveTo();
my_context.lineTo
2 methods for Transparencies
ctx.globalAlpha = 0.8;
ctx.fillStyle = "rgba(255, 255, 255, 0.8)";
Animations synchronized with CSS transitions.
If you’re running a loop that is not visible, the browser won’t keep it running, which means less CPU, GPU, and memory usage, & longer battery life.
You cant choose a colour after it has been filled!
my_context.fillRect(5,5,5,5);
my_context.fillStyle='white';
You can not add a stroke to a shape that is not there!
my_context.stroke();
my_context.fillStyle='#ffffff';
my_context.fillRect(x*width,y*height,10,10);
With circle and lines make sure you close path!
my_context.beginPath();
my_context.arc(10, 10 10, 0, 2 * Math.PI);
my_context.stroke();
my_context.closePath();
The <canvas> element
Drawing to canvas & mouse co-ordinates
Although i expect yours to be a bit like...
Doing the above!


--- layout: page category: spec title: "WebCrypto Key Discovery" ---
| Current Status: | Note (NOTE) |
|---|---|
| Canonical URI: |
http://www.w3.org/TR/webcrypto-key-discovery
|
| Abstract: | This note describes a JavaScript API for discovering named, origin-specific pre-provisioned cryptographic keys for use with the Web Cryptography API. Pre-provisioned keys are keys which have been made available to the UA by means other than the generation, derivation, importation and unwrapping functions of the Web Cryptography API. Origin-specific keys are keys that are available only to a specified origin. Named keys are identified by a name assumed to be known to the origin in question and provisioned with the key itself. This note concerns only keys which have all three of these properties. |
WebCrypto Key DiscoveryUpdates:


MCCE3.5_TRY1
Main Page
Classes
Files
Class List
Class Index
Public Attributes
|
List of all members
CONFSTAT Struct Reference
Public Attributes
int *
nc_start
int *
nc_rmdup
int *
nc_swap
int *
nc_rotate
int *
nc_vdw
int *
nc_hdir
int *
nc_repack
int *
nc_ioniz
int *
nc_h
int *
nc_oh
int *
nc_elect
The documentation for this struct was generated from the following file:
/home/salah/mcce3.5/lib/rotamers.c
Generated by
1.8.10


backbone-es6/src/ModuleRuntime.js
/**
* ModuleRuntime.js -- Provides the standard / default configuration that is the same as Backbone 1.2.3
*/
'use strict';
import Backbone from './Backbone.js';
import Collection from './Collection.js';
import Events from 'typhonjs-core-backbone-events/src/Events.js';
import History from './History.js';
import Model from './Model.js';
import Router from './Router.js';
import View from './View.js';
import extend from './extend.js';
import sync from './sync.js';
const options =
{
// Current version of the library. Keep in sync with Backbone version supported.
VERSION: '1.2.3',
// Turn on `emulateHTTP` to support legacy HTTP servers. Setting this option will fake `"PATCH"`, `"PUT"` and
// `"DELETE"` requests via the `_method` parameter and set a `X-Http-Method-Override` header.
emulateHTTP: false,
// Turn on `emulateJSON` to support legacy servers that can't deal with direct `application/json` requests ... this
// will encode the body as `application/x-www-form-urlencoded` instead and will send the model in a form param
// named `model`.
emulateJSON: false
};
const backbone = new Backbone(Collection, Events, History, Model, Router, View, sync, options);
// Set up older extends inheritance support for the model, collection, router, view and history.
backbone.Model.extend = backbone.Collection.extend = backbone.Router.extend = backbone.View.extend =
backbone.History.extend = extend;
export default backbone;


HTML is a Hyper Text Markup Language. HTML is the standard markup language for Web pages. The element in HTML are the building blocks of HTML pages. It is also the standard for creating web applications. With the use of JavaScript(JS) and Cascading Style Sheets(CSS). The elements are represented by <>tags.
With the internet being so accessible to people all over the world, learning can be done anywhere anytime. There are many online teachers and websites to help you get started. Some of the best websites are to learn are W3schools.com and Codecademy.com.
There are so many reasons why one should learn HTML with CSS and JavaScript. HTML and CSS are the basic programming languages for web development and design. This is not only beneficial for developers but marketers too. With HTML you can use it for formatting a blog or email. The advantages of learning HTML are limitless, both creativity and career wise. You have the ability to make a lot of money while having a relaxed life.


The Password Reminder email message is sent to a user when they request a password reminder. To locate this resource file, use the Find option on your web browser and search for EMAIL_PASSWORD_REMINDER_SUBJECT.Text and EMAIL_PASSWORD_REMINDER_BODY.Text.
Here is the subject title and message for this email as provided in the default DNN core language pack:
[Portal:PortalName] Password Reminder
Dear [User:DisplayName],
You have requested a Password Reminder from [Portal:PortalName].
Please login using the following information:
Portal Website Address: [Portal:URL]
Username: [Membership:Username]
Password: [Membership:Password]Sincerely,
[Portal:PortalName]*Note: If you did not request a Password Reminder, please disregard this Message.


Podcast: Play in new window | Download
Listen to the review by Dennis Morton, above.
Tags: Dennis Morton, film, kusp film review, Stand Up Guys
Comments are closed.
Check local movie times
Good Times reviews


US Presidential Elections from 1940 to 2012
Name: Hsuan Lee; E-Mail<EMAIL_ADDRESS>UID: u1076070
Brush selection is:
Select states from electoral vote chart, and then choose years you want to explore