I am a web developer specializing in building full-stack software solutions. Since 2015 I have worked with a variety of companies to bring their ideas to life. I am very comfortable working with technologies like Go, Javascript, SQL, React, Angular and Flutter.
<Full Stack Web Developer>
I currently contract with Rooster Park as part of an ad hoc team that is creating a groundbreaking medical device managment product. Objectives include creating and scaling a full-stack data collection service to optimize surgical tool usage within multiple surgery facilities.<Full Stack Web Developer / Mobile Developer>
As a founding member of this development agency our main client has been creating an end to end sales software for a Portland area car dealership. Our main objectives included: integrating with multiple third party software services that sync with dealership inventory and pricing, creating a cloud-based API server for the mobile and web sales presentations and updating existing dealership services to a modern cloud-based infrastructure.<Full Stack Web Developer / Mobile Developer>
A connected car platform that can do anything from helping a dealership manage and track inventory, to help a Turo host connect with local service providers such a detailing, fuel and repairs.


{% extends "base.html" %} {% block content %}
Here is the API link for events
Here is the API link for muni detail
Here is the Admin Panel


Implementation of the Generalized Pairwise Comparisons (GPC). GPC compare two groups of observations (intervention vs. control group) regarding several prioritized endpoints. The net benefit and win ratio statistics can then be estimated and corresponding confidence intervals and p-values can be estimated using resampling methods or the asymptotic U-statistic theory. The software enables the use of thresholds of minimal important difference as well as stratification. Censored observations can be handled using Gehan's modification of the Wilcoxon statistic, inverse probability of censoring weights, or, in the case of right censoring, using the empirical survival curves in each group to estimating the expected score of the censored pairs.
| Version: | 1.6 |
| Depends: | R (≥ 2.10), prodlim, Rcpp, data.table |
| Imports: | doParallel, foreach, methods, lava, parallel, stats, stats4, utils |
| LinkingTo: | Rcpp, RcppArmadillo |
| Suggests: | pbapply, R.rsp, survival, testthat |
| Published: | 2018-10-17 |
| Author: | Brice Ozenne [aut, cre], Julien Peron [aut] |
| Maintainer: | Brice Ozenne <brice.ozenne at orange.fr> |
| BugReports: | https://github.com/bozenne/BuyseTest/issues |
| License: | GPL-3 |
| URL: | https://github.com/bozenne/BuyseTest |
| NeedsCompilation: | yes |
| SystemRequirements: | C++11 |
| Citation: | BuyseTest citation info |
| Materials: | NEWS |
| CRAN checks: | BuyseTest results |
| Reference manual: | BuyseTest.pdf |
| Vignettes: |
overview |
| Package source: | BuyseTest_1.6.tar.gz |
| Windows binaries: | r-devel: BuyseTest_1.6.zip, r-release: BuyseTest_1.6.zip, r-oldrel: BuyseTest_1.6.zip |
| OS X binaries: | r-release: BuyseTest_1.6.tgz, r-oldrel: BuyseTest_1.6.tgz |
| Old sources: | BuyseTest archive |
Please use the canonical form https://CRAN.R-project.org/package=BuyseTest to link to this page.


--- layout: post title: no title date: '2016-11-17T02:11:30+01:00' categories: - Storyboards picture_url: https://film-Storyboards.tumblr.com/post/153294721856 ---


{% extends 'base.html' %} {% load i18n %} {% load static %} {% block title %}{% trans "CARPE - Basic Necessities Survey and Natural Resource Governance Tool" %}{% endblock %} {% block content %}
{% trans "During the last decade, the conservation community has made significant progress developing robust methods for monitoring the status of conservation species, habitat targets and threats (these include: camera trapping, line transects, remote sensing image analysis, ranger patrol/law enforcement monitoring, and community monitors). However, we have not made similar progress in developing tools for regularly and credibly monitoring and reporting progress on governance systems that ensure sustainable resource use, nor on how to best assess the impacts (positive and negative) of conservation investments on the livelihoods and well-being of people whose lives are influenced by conservation actions." %}
{% trans "Without access to a suitable governance assessment tool, conservation and development practitioners may have no clear sense of the factors most likely to facilitate good governance, and no clear process for identifying how to remediate factors that militate against good governance. After 2 years of investment and field testing, USAID and its conservation partners launched, at the 2014 World Parks Congress in Sydney Australia, a new, credible, low-cost, expert-opinion based, quantitative tool for assessing the strengths and weaknesses of all governance bodies with jurisdiction over natural resource management within a given landscape or seascape : the Natural Resource Governance Tool (NRGT)." %}
{% trans "The Basic Necessities Survey (BNS), originally developed by Rick Davies, is the result of comparable effort led by the Wildlife Conservation Society with support from USAID, to bring to conservation practitioners a low-cost tool for credibly assessing how conservation actions affect families’ livelihoods and sense of well-being, and tracking changes within and across villages over time. Given that secure livelihoods and conservation stewardship are deeply connected and that conservation should, at worst, do no harm to people’s livelihoods, the conservation community needs a way to track and assess the effect of conservation actions on the well-being of people who live within the landscapes and seascapes where conservationists work." %}


Simplest way to generate secure passwords on the fly
Features:
- Secure - Everything is done inside your browser, no data leave your device, either to our servers, or anywhere else.
- Easy to use - Well designed and polished UI for both desktops and mobile devices.
- Helpful - No need to remember lots of complicated passwords to be secure.
- Fast - Your password is generated instantly.
What does it do?
Generator helps you with the problem of creating and remembering unique passwords for all the
social networks, online services and websites you need passwords for. With just the help of an
easy to remember alias and one passphrase, generator creates unique strong passwords for your
services.
And what if you forget the generated password? That's the best part: You don't
even have to remember it! Just come back to the generator and type in your alias and secret, and
generator's algorithm generates the same password for you once again.
How it works?
All you need to remember for a website is its alias, for example its domain or service name
(facebook for https://facebook.com, onedrive for Microsoft's One Drive, etc..) and
one strong secret passphrase. Generator then combines your alias and secret to
together and generates a unique strong password for you. For the more tech-savvy of you, this is
the meta algorithm. You can even create your own version of generator based on this algorithm:
String alias = ...; // Get alias
String secret = ...; // Get secret
String s = alias + secret; // Simply join alias and secret into one string
String hash = hash('sha256',s); // Generate hash of string s using SHA256 algorithm
String base = base64Encode(hash); // Encode hash from previous step into base64 encoding
String password = base.substring(17,49); // Take 32 characters from generated base64, starting with 18th character, all the way up to 48th
App & developer
Feel free to use, download, explore, modify or share any and all parts of the source code.


This project is an adaptation of the Geometry of Light install in Barcelona, but this time, a little closer to home. We put the laser installation up in the Mies van der Rohe designed Farnsworth House in Plano, IL. This installation was larger in scale, as it included the surrounding grounds as well as the house. On the second pass, I was able to make improvements on the stability of the code, and I was able to be more flexible on site with programming changes.
The technical backend of this project is nearly identical to the installation in Barcelona, for this project, I only had to scale up the number of recievers and lasers. We also added a second, self contained network that ran a seperate routine from the main house. For more information on the technical elements of this project, look at Geometry of Light - Barcelona.
GEOMETRY OF LIGHT - FARNSWORTH HOUSE from MAS Studio on Vimeo.
Visual Design: Luftwerk and Iker Gil
Technical Design: Andy Kauff
Programming Support: Aaron Gallagher
Composition: Oriol Tarragó
Photography: Kate Joyce
Supported by:
The Graham Foundation
MAS Context
Bosch Tools


British backpacker allegedly strangled by man she met on Tinder
The accused's lawyer said Gracie Millane's death was the accidental result of consensual activity.
A British backpacker was allegedly strangled to death by a man she met on Tinder, prosecutors told a New Zealand court on Wednesday, in a case that has shocked the Pacific nation.
Grace Millane, 22, who was travelling after finishing university, went missing in Auckland on December 1.
Police found her body on December 9 in bushland just a few metres from a scenic drive in Auckland's Waitakere Ranges.
The accused, a 27-year-old man, met Millane on the evening of December 1 through the dating app, Tinder, the jury heard. Closed-circuit cameras filmed the pair kissing before heading to the man's hotel apartment, prosecutor Robin McCoubrey told the Auckland court.
McCoubrey said the Crown's case was that Millane died in the accused's apartment from sustained pressure to the neck. Her body also showed bruising to her chest and upper arms, the court heard.
The accused, whose name has been suppressed by the court, has pleaded not guilty to murder.
"Only two people know what happened in that room," McCoubrey told the court, New Zealand Herald reported.
"One of them can't tell us and the other one hasn't told the truth about what happened," he added.
McCoubrey said the accused took several photos of Millane's body on December 2. Later that day, he placed the body in a suitcase and drove it in a hire car to the Waitakere Ranges where he buried her, the jury heard.
McCoubrey told the court the accused initially told police he had met Millane for a drink before parting ways with her but then changed his story, saying he and Millane went back to his apartment and where they engaged in "rough sex".
The accused's lawyer, Ian Brookie, told the jury Millane's death was an accident.
"Ms Millane died as a result of what they consensually engaged in," Brookie was quoted as saying by Herald.
"An act designed to enhance their sexual pleasure that went wrong and she died as a result."
The killing shocked New Zealand, where serious crime was once considered relatively rare and its cities and countryside considered safe. It also sparked intense debate about New Zealand's record on violence against women.
Thousands of people held candlelight vigils after Millane's death in a national outpouring of grief. Prime Minister Jacinda Arden held back tears as she apologised to Millane's family on behalf of New Zealand.
Her parents, David and Gillian Millane, were present in court.
The trial is expected to last about five weeks.


| table/8 | Creating tables. |
| table_from_xml/8 | Take an XML string and generate a table from it in the PDF. |
table(PDF, Rows, X, Width, Start, Bottom, FontSize, FontChoice) -> any()
Creating tables
1. work out number of columns
2. split space evenly, leaving an extra 4 Pts for white space around each, and an extra 1 Pt for each vertical Line
2 bis. OR Turn each cell into RTF as if it had the full width to use.
Then find a bunch of metrics about the table which will help us find a good set of column widths.
Find the longest word in each column. This sets the minimum column width.
If the sum of the longest words is greater than the total width avaialable then issue a warning, but carry on with the table extending off the page to the right (really trick would be to switch to landscape mode automatically :)
Ideally we want to fit into the minimum vertical space, so if there is a solution where every or most rows can fit on one line this would be very nice.
Could do proportional split based on total volume of text in each column
We could find the longest cell for each column
If all cells in a column will fit on a single line within what would be an even split between the columns, allow that column to take up the space it needs to fit everything one one line? OK, but at the limit might really penalise another column with lots of text.
3. Convert the text into RTF lines for each cell
4. For each row work out the number of lines required (largest number of lines).
5. Output the table, drawing lines as we go
TODO - Parameterise by: Spacing around text, table width, row background Clever algorithm to arrange column widths Do page breaks in the middle of a table
spec table(PDF, Rows, X, Y, SO) -> Total_Ytable_from_xml(PDF, XML, X, Width, Start, Bottom, FontSize, FontChoice) -> any()
Take an XML string and generate a table from it in the PDF
| PID of PDF being produced | |
| XML | string of XML defining the table and its contents |
| X | X coordinate of the top left corner of the table box |
| Width | maximum width of the table |
| Start | Y coordinate of top left corner of the box |
| Bottom | Y coordinate of maximum bottom of the box |
| FontSize | size of the letters in points |
| FontChoice | font name |
with an XML string like the following:
<row><cell>Escape Sequence</cell><cell>Value</cell></row>
<row><cell>\\b</cell><cell>Backspace</cell></row>
<row><cell>\\d</cell><cell>Delete</cell></row>
<row><cell>\\e</cell><cell>Escape</cell></row>
You get the following PDF results
Generated by EDoc, Jun 15 2010, 14:11:29.


@* * Copyright 2023 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *@ @import models._ @import views.html.helpers._ @import views.html.lookup.common._ @import views.html.lookup.search._ @import views.html.main_template @this(mainTemplate: main_template, no_result_warning: no_result_warning) @( searchForm: Form[Query], action: Call, searchTerm: Option[String] = None, errorMessage: Option[String] = None )(implicit request: Request[AnyContent], messagesProvider: MessagesProvider, messagesApi: MessagesApi, lang: Lang ) @noResults = { @searchTerm match { case Some(term) => {


{% include 'partial/partial_navbar.html' with current_user=current_user %}
Hello and welcome to QuizSite!
Register


Reza Shokri, Marco Stronati, Congzheng Song, and Vitaly Shmatikov (2017)
Presented by Christabella Irwanto
E.g. patients’ clinical records in disease-related models.
For a given labeled data record \((\mathbf{x}, y)\) and a model \(f\)’s prediction vector \(\mathbf{y} = f(\mathbf{x})\), determine if \((\mathbf{x}, y)\) was in the model’s training dataset \(D^{train}_{target}\)
If using method 1, model-based synthesis, the records used in both \(D^{training}_{target}\) and \(D^{test}_{target}\) have high confidence
| Real data | 10% noise | 20% noise | |
| Precision | 0.678 | 0.666 | 0.613 |
| Recall | 0.98 | 0.99 | 1.00 |
Models with higher generalizability are less vulnerable to membership inference attack


A small physics sandbox.
Controls
✖
Grab objects
LMB
Spawn objects
RMB
Switch to box
1
Switch to circle
2
Switch to triangle
3
Switch to pentagon
4
Delete all objects
\
Open controls menu
C


<learningGroupMap>
Use a <learningGroupMap>
to create standalone aggregations of
<learningObject>
and <learningGroup>
elements, as
well as overviews, summaries, and assessments, according to the needs identified by the
learning goals and objectives.
Category: Learning and training: map types


The following documents will be deleted locally:
Please choose a destination folder:
Please select your Markdown files here:
Or drag and drop your Markdown files here:
Drop files here
This will save "" to your
Dropbox
account and keep it synchronized.
Note:
- Dropbox file path does not depend on document title.
- The title of your document will not be synchronized.
- Destination folder must exist.
- Any existing file at this location will be overwritten.
"" is synchronized with the following location(s):
Note: Removing a synchronized location will not delete any file.
Tip: You can use a YAML front matter to specify the title and the tags/labels of your publication.
Interpreted variables:
title
,tags
,published
,date
.
Tip: You can use a YAML front matter to specify the title of your page.
Interpreted variables:
title
.
About URL: For newly created page , Blogger API will append a generated number to the url like
about-me-1234.html
, if you deeply care about your URL naming, you should first create the page on Blogger and then update them with StackEdit specifying the pageId when publishing.About page visibility: Blogger API does not respect published status for pages.When publishing the page to Blogger, the page will be live but not added to the page listing. You should arrange the page listing from Blogger dashboard.
"" is published on the following location(s):
Note: Removing a publish location will not delete the actual publication.
"" can be shared using the following link(s):
No sharing link yet!
To collaborate on this document, use Google Drive or Dropbox synchronization from the menu.
To share a frozen version of this document within StackEdit, just publish it as a Gist in Markdown format from the menu.
Tip: You can open any URL within StackEdit using viewer#!url=
.
StackEdit has stopped because another instance was running in the same browser.
If you want to reopen StackEdit, click on "Reload".
This feature is restricted to sponsor users as it's a web service hosted on Amazon EC2. Note that sponsoring StackEdit would cost you only $5/year.
To see how a PDF looks click here.
Tip: PDFs are fully customizable via Settings>Advanced>PDF template/options.


This is a UI component dev environment for your plain HTML snippets.
We've added some basic stories inside the
stories
directory.
A story is a single state of one or more UI components. You can have as many
stories as you want.
(Basically a story is like a visual test case.)
See these sample stories
Just like that, you can add your own snippets as stories.
You can also edit those snippets and see changes right away.
Usually we create stories with smaller UI components in the app.
Have a look at the
Writing Stories
section in our documentation.


Your Team
Bob
Manager
ID: 123
Email:
Office Number: 567
Tim
Engineer
ID: 456
Email:
<EMAIL_ADDRESS>Github Username: "timbob"
Joe
Intern
ID: 678
Email:
School: "Northwestern"


The Salesforce Commerce SDK allows easy interaction with the Salesforce B2C Commerce platform APIs on the Node.js runtime. For a more lightweight SDK, which works in a browser and Node.js for the shopper experience, see our Isomorphic SDK
Visit the Commerce Cloud Developer Center to learn more about Salesforce Commerce. The developer center has API documentation, getting started guides, community forums, and more.
Due to an issue with the generation of the type definitions, an upcoming release of the SDK will change type definitions to include namespaces. As this is a breaking change, a new major version will be released (v3.0.0). Only the names of the types will change, not their contents or any of the exported code. If you only use JavaScript, or if you use TypeScript but only import the client classes, then your usage will not change. You will likely only need to make changes if you import the type definitions directly.
Download and install Node.js and npm here.
Note: Only Node.js version 12 and 14 LTS are supported. Other versions can cause unexpected results. To use a different version of Node.js for other projects, you can manage multiple versions of Node.js with nvm.
Use npm to install the Commerce SDK.
npm install commerce-sdk
To use an SDK client, instantiate an object of that client and configure these parameters.
Note: These are optional parameters.
| Parameter | Description |
|---|---|
| baseUri | URL of the service with which the SDK interacts. If the baseUri isn't provided, the default baseUri for the relevant RAML file is used. |
| clientId | ID of the client account created with Salesforce Commerce. |
| organizationId | The unique identifier for your Salesforce identity. |
| shortCode | Region specific merchant ID. |
| siteId | A unique site ID (for example, RefArch or SiteGenesis). |
/**
* Sample TypeScript code that shows how Commerce SDK can access Salesforce Commerce
* APIs.
*
* To learn more about the parameters please refer to https://developer.commercecloud.com/s/article/CommerceAPI-Get-Started
*/
// Import the SDK in TypeScript
// tsc requires the --esModuleInterop flag for this
import * as CommerceSdk from "commerce-sdk";
// For Javascript, use:
// import CommerceSdk from "commerce-sdk";
const { ClientConfig, helpers, Search } = CommerceSdk;
// Older Node.js versions can instead use:
// const { ClientConfig, helpers, Search } = require("commerce-sdk");
// Create a configuration to use when creating API clients
const config = {
headers: {},
parameters: {
clientId: '<your-client-id>',
organizationId: '<your-org-id>',
shortCode: '<your-short-code>',
siteId: '<your-site-id>'
}
}
// Get a JWT to use with Shopper API clients, a guest token in this case
helpers.getShopperToken(config, { type: "guest" }).then(async (token) => {
try {
// Add the token to the client configuration
config.headers["authorization"] = token.getBearerHeader();
// Create a new ShopperSearch API client
const searchClient = new Search.ShopperSearch(config);
// Search for dresses
const searchResults = await searchClient.productSearch({
parameters: {
q: "dress",
limit: 5
}
});
if (searchResults.total) {
const firstResult = searchResults.hits[0];
console.log(`${firstResult.productId} ${firstResult.productName}`);
} else {
console.log("No results for search");
}
return searchResults;
} catch (e) {
// Print the status code and status text
console.error(e);
// Print the body of the error
console.error(await e.response.text());
}
}).catch(async (e) => {
console.error(e);
console.error(await e.response.text());
});
SDK methods return an appropriate object by default when the API call returns a successful response. The object is built from the body of the response. If the API response is not successful, an Error is thrown. The error message is set to the status code plus the status text. The Error object includes a custom 'response' attribute with the entire Response object for inspection.
try {
await productClient.getProduct({
parameters: {
id: "non-existant-id"
}
});
} catch (e) {
console.error(await e.response.text());
}
{
"title": "Product Not Found",
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/product-not-found",
"detail": "No product with ID 'non-existant-id' for site 'RefArch' could be found.",
"productId": "non-existant-id",
"siteId": "RefArch"
}
When using an IDE such as VSCode, the autocomplete feature lets you view the available method and class definitions, including parameters.
To view the details of a method or a variable, hover over methods and variables.
Autocomplete also shows the available properties of the data returned by SDK methods.
The SDK currently supports two types of caches - In-memory and Redis. Both the implementations respect standard cache headers. To use another type of cache, write your own implementation of the CacheManager. See the default cache manager to design your implementation.
The default cache storage is limited to 10,000 distinct entities before applying a simple least recently used policy for cache replacement. The limit can be changed by creating a quick-lru storage adapter.
import { CacheManagerKeyv } from '@commerce-apps/core';
import { QuickLRU } from 'quick-lru';
const cacheManagerKeyv = new CacheManagerKeyv({
keyvStore: new QuickLRU({ maxSize: 50000 }),
});
const config = {
cacheManager: cacheManagerKeyv,
parameters: {
clientId: '<your-client-id>',
organizationId: '<your-org-id>',
shortCode: '<your-short-code>',
siteId: '<your-site-id>'
},
};
See these directions to create a cache storage adapter.
In-memory caching of responses is enabled by default. To disable caching for a client, set cacheManager to 'null'.
const config = {
cacheManager: null,
parameters: {
clientId: '<your-client-id>',
organizationId: '<your-org-id>',
shortCode: '<your-short-code>',
siteId: '<your-site-id>'
},
};
To use a Redis cache, instantiate a CacheManagerRedis object with a Redis URL and add it to your client config object.
import { CacheManagerRedis } from '@commerce-apps/core';
const cacheManager = new CacheManagerRedis({
connection: 'redis://localhost:6379',
});
const config = {
cacheManager: cacheManager,
parameters: {
clientId: '<your-client-id>',
organizationId: '<your-org-id>',
shortCode: '<your-short-code>',
siteId: '<your-site-id>'
},
};
Redis can be configured to apply an eviction policy when the specified memory limit is reached. See this article to set up Redis as an LRU cache and to learn more about supported eviction policies.
Use the node-retry package to facilitate request retries. The following retry type definition is taken from the node-retry package.
type RetrySettings = {
/**
* Whether to retry forever.
* @default false
*/
forever?: boolean;
/**
* Whether to [unref](https://nodejs.org/api/timers.html#timers_unref) the setTimeout's.
* @default false
*/
unref?: boolean;
/**
* The maximum time (in milliseconds) that the retried operation is allowed to run.
* @default Infinity
*/
maxRetryTime?: number;
/**
* The maximum amount of times to retry the operation.
* @default 10
*/
retries?: number;
/**
* The exponential factor to use.
* @default 2
*/
factor?: number;
/**
* The number of milliseconds before starting the first retry.
* @default 1000
*/
minTimeout?: number;
/**
* The maximum number of milliseconds between two retries.
* @default Infinity
*/
maxTimeout?: number;
/**
* Randomizes the timeouts by multiplying a factor between 1-2.
* @default false
*/
randomize?: boolean;
};
All options can be set per client or per request.
Example:
productClient = new Product({
retrySettings: {
// This means 3 total calls are made
retries: 2,
// Max wait between retries
maxTimeout: 200,
// Min wait between retries
minTimeout: 100
}
}
Default log level of the SDK is WARN (warning). SDK uses loglevel npm package. All the log levels supported by loglevel package are supported in SDK.
To change the loglevel, set the desired level on the SDK logger.
import { sdkLogger } from 'commerce-sdk';
sdkLogger.setLevel(sdkLogger.levels.INFO);
INFO level logging enables:
DEBUG level logging enables logging of:
Note: Debug level logging may expose sensitive data in the logs
This library doesn't store or refresh authentication tokens. Storing and refreshing authentication tokens is the responsibility of the SDK consumer.
This library limits its runtime dependencies to reduce the total cost of ownership as much as possible. However, we recommend that you have security stakeholders review all third-party products (3PP) and their dependencies.
For more information about security considerations related to developing headless commerce applications, see Security Considerations for Headless Commerce on the Commerce Cloud Developer Center.
If you discover any potential security issues, please report them to<EMAIL_ADDRESS>as soon as possible.
The Commerce SDK is licensed under BSD-3-Clause license. See the license for details.
Generated using TypeDoc


--- title: Source To Refined keywords: fastai sidebar: home_sidebar summary: "Monitors three dataflows" description: "Monitors three dataflows" nb_path: "nbs/04_source_to_refined.ipynb" ---
# Benchmark Test
# 1. Update a valid 1 GB file in to the S3 bucket, i.e., campaigns.csv
# 2. Run *source_to_refined* and track its execution time
source_to_refined()


All Classes
AudioFileLoader
Car
CarBounds
CarInGameDisplayLabel
CarSelectionPanel
CollisionManager
Controller
CurrentGameSession
EasyMapML
EasyMapVL
GameEngine
GameMode
HeadsUpDisplayPanel
ImageFileLoader
InGameObjectType
InGameScreen
KeyBoardLayoutLabel
LaunchScreen
Main
MainMenuScreen
MapModel
MapObject
MapSelectionLabel
MapSelectionPanel
MapView
MediumMapML
MediumMapVL
Player
SharedResources
SoundEngine
SwingUICore


⚡ Bandwidth Checker ⚡ - Here's the last day of results of my download bandwidth speed tests. - Ran via cron on my Raspberry Pi via speedtest-cli. Open-sourced @ https://github.com/healeycodes/bandwidth-checker - Optionally included: a headless browser test via Netflix's fast.com.


Post Title
Post Subtitle
March 1, 2019
The goal of my original post on client-side web mapping for large datasets was to create an inexpensive, robust county-wide parcel viewer web application. The base functionality would include the ability to both identify and search the parcel data. The result of this effort was the Open Parcel Viewer. That project consists of a Leaflet map with Leaflet.VectorGrid cutting GeoJSON into vector-tiles on-the-fly. The app is performant, with the drawback being a potentially large file is loaded directly into the browser. This method works well for small datasets, but breaks down when the size and complexity of the data exceeds device or network capabilities. For example, load time for a typical 70k polygon county parcel map on mobile might exceed 30 seconds. To get around this dilema, one option is to create the vector tiles first, then serve these tiles out via static pbf or mvt files (see vtile), via a simple mbtiles server, or even host the data directly on Mapbox. These tiles can then be viewed with virtually any web mapping library such as Mapbox GL JS. However, creating this type of vector tile cache solves one problem but creates another: since only the data within the current viewport is loaded, data outside the viewport is unknown to the client and therefore not searchable. So how do we go about searching for data that exists outside the viewport, especially if we are unwilling to host a dedicated server-side geocoding application for our data? Data outside the viewport is unknown to the client and therefore not searchable, which is one of the two key components needed for this application. The answer to this is a simple Node script that minimizes our GeoJSON into a JSON with only those fields we need to search, using the .map() function on the GeoJSON features object. Utilizing the turf.center() function we can also create a centroid that is used to pan the map to the search result. The original data would ideally contain a unique ID field in order for map.queryRenderedFeatures() in Mapbox GL JS to work properly. If the dataset does not have a unique ID field, this can easily be created in the Node script before cutting out data into tiles, making sure to return this ID to our searchable JSON object.
var geojson = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"id":"0ABCDE",
"name": "point",
"label": "nowhere",
"type":"nothing"
},
"geometry": {
"type": "Point",
"coordinates": [
105.77636718749999,
69.76375692223178
]
}
}
]
}
var json = (geojson.features).map(function(feature) {
var keys = ["id","label","name"];
var obj = {};
for (prop in feature.properties) {
if (keys.includes(prop)) {
obj[prop] = feature.properties[prop]
}
}
return obj
});
There are a wide variety of JSON search plugins, and since I use Jekyll for my website I decided to use the simple-jekyll-search plugin for this project. This plugin has the advantage of having a built-in search results preview. This is shown in the image below. One final problem exists before we can call this project a success, and that is knowing when the Mapbox GL map has all loaded and rendered all the tiles after zooming to the search result. This is necessary in order to highlight the feature and access any additional attributes stored in the vector tile. One method to check for loaded tiles is to set an interval function on the sourcedataloading event, then check to see if this event still fired x seconds later. Once this event is no longer fired, then all the tiles have loaded. Another, more simpler method is to simply query the features and check if anything is returned, and if not query them again in 500ms or so, and do this for maybe five seconds. If nothing is returned simply send an alert to the client. As long as the searchable JSON file is small enough, this method allows for easily searching data beyond the viewport in Mapbox GL JS. Once the size of the data grows, this client-side operation will have to be moved server-side and replaced with some type of geocoder instance.


| Home | Trees | Indices | Help |
|---|
|
|
|
|||
|
|||
| list |
|
||
|
|||
|
|||
| numpy.array |
|
||
| numpy.array |
|
||
|
|||
| bool |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
| list[float] |
|
||
| list[float] |
|
||
| list |
|
||
| list[str] |
|
||
| list |
|
||
| list[libsbml.species] |
|
||
| list[libsbml.species] |
|
||
| list[libsbml.species] |
|
||
| list[libsbml.kineticLaw] |
|
||
| list[str] |
|
||
| list[str] |
|
||
| dict |
|
||
| dict |
|
||
| None |
|
|
|||
| numpy.array |
N get stoichiometric matrix of the model |
||
| list |
N_partitioned get partitioned stoichiometric matrix (N = L*Nr) |
||
| list |
kinetic_laws get kinetic laws |
||
| list |
external_species_concentrations get external species concentrations |
||
| dict |
rate_rules get rate rules (explicid ODEs) |
||
| dict |
assignment_rules get assignment rules |
||
| dict |
replacements get dictionary of parameter values and compartmets |
||
| dict |
species_2_position get dictionary mapping species to position in stoichiometric matrix |
||
| list | species_ids | ||
| list | parameter_ids | ||
| list | ode_variables | ||
| list | enzyme_positions | ||
| list | not_enzyme_positions | ||
| list |
species_volume_prefactor get a vector of conversion factors (particle number to concentration) for each species |
||
| list | reaction_ids |
|
|
get list of species
|
Get values for the specified parameters
|
Set list of parameters to new values
|
enter a an array of parameter deviations and names and get back the corresponding d_param vector for all parameters
|
get vector of initial concentrations
|
set the initial concentrations
|
function to filter out constant species
|
funtion to filter out non-constant species
|
get the initital concentrations for all species
|
get the initital concentrations for all species
|
get list of parameter names
|
get list of reaction IDs
|
get list of reaction names
|
get the substrates of a reaction
|
get the products of a reaction
|
|
|
|
gather string representation of the kinetic laws
|
replace references to reaction fluxes in rate rules
|
evaluate the intial assignment rules of the model with the given parameters
|
check for features in the sbml that are not supported yet
|
|
Nget stoichiometric matrix of the model
|
N_partitionedget partitioned stoichiometric matrix (N = L*Nr)
|
kinetic_lawsget kinetic laws
|
external_species_concentrationsget external species concentrations
|
rate_rulesget rate rules (explicid ODEs)
|
assignment_rulesget assignment rules
|
replacementsget dictionary of parameter values and compartmets
|
species_2_positionget dictionary mapping species to position in stoichiometric matrix
|
species_ids
|
parameter_ids
|
ode_variables
|
enzyme_positions
|
not_enzyme_positions
|
species_volume_prefactorget a vector of conversion factors (particle number to concentration) for each species
|
reaction_ids
|
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Mon Apr 24 21:05:11 2017 | http://epydoc.sourceforge.net |


exposure cases transmission rodents time data period incidence seasonal {border-style Lassa px;} #ffffff;} model rate fever humans risk virus infected used []. dynamics number reported disease supplementary figure weekly frequency infection rodent week available contact human-to-human illness material, rainfall year. analysis death human humans, incubation low-risk onset px; relative season {font-family Dis., Research Trop. animals case climatological estimated fatal font-size function high-risk modelling observed previously rodents. seasonality (CrI: (electronic Nigeria distribution double; environmental estimates expected factors i.e. outbreaks pattern set study surveillance variations zoonotic (./journal.pntd.) Data Negl. Nigeria. S). Soc. [,]. average awareness border-color border-width dataset describing distributions electronic epidemics epidemiological high identified important infectious issue likelihood population process reporting rodents, solid; {font-style {font-weight .–.) First, However, Japan Nigeria, Society West analysed areas bold boundaries counts courier; credible days death. defined did different diseases dry effect em; estimate findings fit higher importance increase indicates infection, infections laboratory likely low months newly nosocomial owing parameter period. periods plants: populations probability pt;} quantitative rainy records report rest second times total version viral year year, ‘Modelling


Simeone hails Atletico draw at Granada as arguably best performance of the season
by OmnisportDiego Simeone felt Atletico Madrid played perhaps their best game of the season in Saturday's 1-1 LaLiga draw with Granada.
Renan Lodi opened the scoring at Nuevo Estadio de Los Carmenes after an hour only for German Sanchez to equalise seven minutes later.
The draw was Atleti's seventh in their past 10 LaLiga matches and leaves them three points behind Barcelona and Real Madrid at the top of the table, having played a game more.
Simeone was happy with the performance, though, blaming Atletico's failure to hold on for a win on a "careless moment" that allowed Sanchez to head in from a corner.
"This was our best performance of those away from home and also possibly of those at home too," the coach told reporters.
"We were very consistent, especially in the first 30 minutes. Granada didn't get close to our penalty area.
"We played a quite complete match, but we had a careless moment in the goal we conceded. But the team didn't give up."
Joao Felix was fit enough only to appear as a second-half substitute, having been struggling with an ankle injury since last month.
Simeone insists the 20-year-old must be given time to regain full fitness before he can be expected to make a significant impact.
"I act as a result of what I see in training," he said. "He has to keep picking up the pace.
"He has great quality and talent and when he is fully fit he will contribute."


Quotes
- Bugs and issues: Not responsive on mobile screens
- Languages: HTML, CSS, JavaScript
CLOSE
Tic Tac Toe
- Bugs and issues: Not responsive on mobile screens
- Libraries: React.js
- Languages: HTML, CSS, JavaScript
CLOSE
NY Times Articles
- Bugs and issues: Not responsive on mobile screens
- Libraries: NY Times API
- Languages: HTML, CSS, JavaScript
CLOSE
Recursion
- Bugs and issues: Not responsive on mobile screens
- Languages: HTML, CSS, JavaScript
CLOSE
Caesars Cipher
- Bugs and issues: Not responsive on mobile screens
- Languages: HTML, CSS, JavaScript
CLOSE
Roman Numerals
- Bugs and issues: Not responsive on mobile screens
- Languages: HTML, CSS, JavaScript
CLOSE
Palindrome
- Bugs and issues: Not responsive on mobile screens
- Libraries: Canvas API, requestAnimationFrame API
- Languages: HTML, CSS, JavaScript
CLOSE
City Destination
- Bugs and issues: Not responsive on mobile screens
- Libraries: jQuery, Foursquare API, APIXU
- Languages: HTML, CSS, JavaScript
CLOSE
Byte Size
- Bugs and issues: Not responsive on mobile screens
- Libraries: jQuery, Rebrandly API
- Languages: HTML, CSS, JavaScript
CLOSE
Word Smith
- Bugs and issues: Not responsive on mobile screens
- Libraries: jQuery, Datamuse API
- Languages: HTML, CSS, JavaScript
CLOSE
Survey Form
- Bugs and issues: Not responsive on mobile screens
- Languages: HTML, CSS
CLOSE
Financial Modeling
- Bugs and issues: Not responsive on mobile screens
- Languages: HTML, CSS
CLOSE
Binary Search Algorithm
- Bugs and issues: Not responsive on mobile screens
- Languages: HTML, CSS, JavaScript
CLOSE
Ball Bouncing Game
- Bugs and issues: Not responsive on mobile screens
- Controls: Up (W), Left (A), Down (S), Right (D)
- Libraries: Canvas API, requestAnimationFrame API
- Languages: HTML, CSS, JavaScript
CLOSE
Image Gallery
- Bugs and issues: Not responsive on mobile screens
- Languages: HTML, CSS, JavaScript
CLOSE
Random Story Generator
- Bugs and issues: Not responsive on mobile screens
- Languages: HTML, CSS, JavaScript
CLOSE
Michael Jordan Greatest Moments
- Bugs and issues: Not responsive on mobile screens
- Languages: HTML, CSS, JavaScript
- Software: 4k Downloader, OpenShot Video Editor
CLOSE
The Drug Development Process
- Bugs and issues: Not responsive on mobile screens
- Languages: HTML, CSS, JavaScript
- Libraries: Particles.js
- Software: Microsoft Excel
CLOSE
Product Landing Page
- Bugs and issues: Not responsive on mobile screens
- Languages: HTML, CSS
- Software: 4k Downloader, OpenShot Video Editor
CLOSE
Piano Player
- Languages: HTML, CSS, JavaScript
CLOSE
Door Guessing Game
- Languages: HTML, CSS, JavaScript
CLOSE
Colors
- Languages: HTML, CSS, JavaScript
CLOSE
Accounting Case Competition
- Results - 3rd Place
- Skills - Teamwork, GAAP knowledge (IFRS), communication, financial modelling
- Software - Microsoft Excel, Microsoft PowerPoint
CLOSE
EBITDA
- Languages- HTML, CSS, JavaScript
CLOSE
Circle Game
- Languages- HTML, CSS, JavaScript
CLOSE
R.I.P Jackson Pullock
- Bugs and issues: Not responsive on mobile screens
- Languages: HTML, CSS
CLOSE
Magic 8 Ball
- Bugs and issues: Not responsive on mobile screens
- Languages: HTML, CSS, JavaScript
- Libraries: Particles.js
CLOSE


{% extends "frontend/base.html" %} {% block content %} {% if blog_posts %} {% for post in blog_posts %}
Category : {% for category in post.categories.all %} {{ category.name }} {% endfor %}
Posted on {{ post.pub_date }}
{{ post.description|safe|truncatechars:180 }}
Read more >>Sorry, but nothing matched your search terms. Please try again with some different keywords.


Shows how to source data from a CSV, control the y-axis tick labels, color ranges, tooltips, and chart size.


ABOUT
OFFICERS
EVENTS
GALLERY
SPONSORS
FAQ
CONTACT
Gallery
All
Chinese Heritage Festival
Banquet
Winter Retreat
Lunar New Year
Culture Night
Speeches and Superlatives
Banquet 2017
Dinner at BJs!
Banquet 2017
:(
Banquet 2017
Chinese Heritage Festival
2016
Chinese Heritage Festival
2016
Chinese Heritage Festival
2016
Chinese Heritage Festival
2016
Chinese Heritage Festival
2016
Lian!!!


Come join together in the Emerald Isle to celebrate the marriage of Brandon Bogan and Sarah Cooper
Reception, dinner, and dancing to follow at the same venue.
Attire: Semi-formal. Gents should wear a suit or blazer and slacks, while ladies can go with a nice cocktail dress.Location: Tulfarris Hotel and Golf Resort
| Start Time | Event |
|---|---|
| 3:30 | Ceremony in the Poulaphouca Suite (please be seated by 3:15) |
| 4:00 | Make your way to the Manor House for a reception with cocktails and refreshments. Following red carpet arrival and prosecco with bride and groom, guests who have not yet checked in may do so at their leisure. |
| 6:00 | Dinner call - begin making your way to your seats in the main ballroom, the Russborough Suite |
| 6:30 | 4-course dinner, plus desserts and cake. Toasts with drink of choice between dinner and dessert. |
| 8:30 | Band starts |
| 1:30 | Bar closes, residents' bar stays open until 3:00 |
Able to make it? Great! Doesn't fit your schedule? We'll miss you! Either way, let us know here, along with any dietary resitrictions we should be aware of.
If you need to fly, there are several direct flight options available. Travel within Europe is also very accessible and affordable.
If you need to fly, there are several direct flight options available. Travel within Europe is also very accessible and affordable.
Remember - you need a passport! Make sure yours is valid, and don't wait to renew.
From New England: Aer Lingus is the least expensive airline to offer multiple daily direct flights from Logan Airport to Dublin. In some cases, you can get even better fares flying Norwegian Air out of Providence.
From Philadelphia: Aer Lingus is the least expensive airline flying direct from Philadelphia to Dublin, though there is only one daily option. Finnair is a reasonably priced alternative.
Getting to Dublin: Aer Lingus and Ryanair cover most destinations in Europe. Ryanair tends to be the cheapest.
Car Rental: The wedding venue, Tulfarris, is outside of the city, so you will likely want to rent a car if you are coming from abroad. You can rent a car at Dublin Airport, which offers many of the same rental companies as those found in the U.S. (Avis, Budget, Enterprise, and Hertz) as well as several European companies.
Note that in Ireland, there are stricter drunk driving laws, and you drive on the left side of the road (opposite the U.S.).
Taxis and Public Transit: Uber and Lyft aren't as mainstream as in the U.S. MyTaxi is an option for hailing taxis from your phone. There is also public transit via busses, trains, and trolleys for travel in and arround Dublin.
Once across the Atlantic, it's very easy to get around Europe. We have gotten flights for as low as 20 Euro! Aer Lingus and Ryanair cover most destinations in Europe. Ryanair tends to be the cheapest.
We recommend staying over, since the wedding venue isn't in the city. Here are the details for booking your stay for the wedding and your travels in Ireland.
We recommend staying over, since the wedding venue isn't in the city. Here are the details for booking your stay for the wedding and your travels in Ireland.
Do Not Book Online - In order for Tulfarris to associate you with our wedding, you need to call or email to book.
Deadline to Book: July 1st
Cost per 2 people sharing B&B for the night of the Wedding: 119 Euro
By Phone (Recommended for guests living in Ireland): +353 45 867600
By Email (Recommended for guests living abroad<EMAIL_ADDRESS>If coming from abroad, we've pulled together a list of some of the top attractions in the Dublin area for you to check out.
If coming from abroad, we've pulled together a list of some of the top attractions in the Dublin area for you to check out.
Powerscourt Estate, one of Ireland's leading tourism attractions featuring Powerscourt House & Gardens and Two Championship Golf Courses. Come for a walk around and grab lunch at avoca in the centre. Avoca, an Irish, family-run business that is one of the oldest surviving manufacturers in the world, home to some of Ireland’s best-loved cafés and retail. Avoca boasts assortments of fresh salads, and the best brown bread and desserts.
Take the scenic road to Tulfarris and drive on the Sally’s Gap road. On the road to Sally Gap, there are spectacular views of the surrounding blanket bog and the Wicklow Mountains. Sally Gap is one of two east-to-west passes across the Wicklow Mountains. Sally Gaps is a cross-road that leads you North to Dublin, West to Blessington, South to Glendalough or East to Roundwood. the Sally Gap got its road after the Irish rebellion of 1798. It was built by British Army forces looking to flush rebels from the hills, and to this day is known as the Military Road. Whatever about giving the army a better view of the rebels, the Military Road certainly provides an enviable view of some of Ireland’s most filmed scenery. Highlights of this winding, twisting feat of engineering include the Glencree valley, the dark waters of Lough Tay, Kippure Mountain and Glenmacnass Waterfall.
Glendalough is home to one of the most important monastic sites in Ireland. This early Christian monastic settlement was founded by St. Kevin in the 6th century and from this developed the “Monastic City”. Most of the buildings that survive today date from the 10th through 12th centuries. Despite attacks by Vikings over the years, Glendalough thrived as one of Ireland’s great ecclesiastical foundations and schools of learning until the Normans destroyed the monastery in 1214 A.D. and the dioceses of Glendalough and Dublin were united. Glendalough also boasts some breathtaking walks with very scenic views. So get yours walking shoes on and check it out.
Remember - you need a passport! Make sure yours is valid, and don't wait to renew.
From New England: Aer Lingus is the least expensive airline to offer multiple daily direct flights from Logan Airport to Dublin. In some cases, you can get even better fares flying Norwegian Air out of Providence.
From Philadelphia: Aer Lingus is the least expensive airline flying direct from Philadelphia to Dublin, though there is only one daily option. Finnair is a reasonably priced alternative.
Getting to Dublin: Aer Lingus and Ryanair cover most destinations in Europe. Ryanair tends to be the cheapest.
Car Rental: The wedding venue, Tulfarris, is outside of the city, so you will likely want to rent a car if you are coming from abroad. You can rent a car at Dublin Airport, which offers many of the same rental companies as those found in the U.S. (Avis, Budget, Enterprise, and Hertz) as well as several European companies.
Note that in Ireland, there are stricter drunk driving laws, and you drive on the left side of the road (opposite the U.S.).
Taxis and Public Transit: Uber and Lyft aren't as mainstream as in the U.S. MyTaxi is an option for hailing taxis from your phone. There is also public transit via busses, trains, and trolleys for travel in and arround Dublin.
Once across the Atlantic, it's very easy to get around Europe. We have gotten flights for as low as 20 Euro! Aer Lingus and Ryanair cover most destinations in Europe. Ryanair tends to be the cheapest.
Do Not Book Online - In order for Tulfarris to associate you with our wedding, you need to call or email to book.
Deadline to Book: July 1st
Cost per 2 people sharing B&B for the night of the Wedding: 119 Euro
By Phone (Recommended for guests living in Ireland): +353 45 867600
By Email (Recommended for guests living abroad<EMAIL_ADDRESS>Powerscourt Estate, one of Ireland's leading tourism attractions featuring Powerscourt House & Gardens and Two Championship Golf Courses. Come for a walk around and grab lunch at avoca in the centre. Avoca, an Irish, family-run business that is one of the oldest surviving manufacturers in the world, home to some of Ireland’s best-loved cafés and retail. Avoca boasts assortments of fresh salads, and the best brown bread and desserts.
Take the scenic road to Tulfarris and drive on the Sally’s Gap road. On the road to Sally Gap, there are spectacular views of the surrounding blanket bog and the Wicklow Mountains. Sally Gap is one of two east-to-west passes across the Wicklow Mountains. Sally Gaps is a cross-road that leads you North to Dublin, West to Blessington, South to Glendalough or East to Roundwood. the Sally Gap got its road after the Irish rebellion of 1798. It was built by British Army forces looking to flush rebels from the hills, and to this day is known as the Military Road. Whatever about giving the army a better view of the rebels, the Military Road certainly provides an enviable view of some of Ireland’s most filmed scenery. Highlights of this winding, twisting feat of engineering include the Glencree valley, the dark waters of Lough Tay, Kippure Mountain and Glenmacnass Waterfall.
Glendalough is home to one of the most important monastic sites in Ireland. This early Christian monastic settlement was founded by St. Kevin in the 6th century and from this developed the “Monastic City”. Most of the buildings that survive today date from the 10th through 12th centuries. Despite attacks by Vikings over the years, Glendalough thrived as one of Ireland’s great ecclesiastical foundations and schools of learning until the Normans destroyed the monastery in 1214 A.D. and the dioceses of Glendalough and Dublin were united. Glendalough also boasts some breathtaking walks with very scenic views. So get yours walking shoes on and check it out.
Like many other aspects of this wedding, we have to go a bit untraditional here...
Because we have to travel back to the U.S. after, we can't take very much with us, and so don't have a registry. So if you insist on getting us a gift, we kindly request that you keep it to one of the following:


public class StaticRenderer extends java.lang.Object implements ImageRenderer
| Modifier and Type | Field and Description |
|---|---|
protected java.awt.image.WritableRaster |
currentBaseRaster
Offscreen image where the Renderer does its rendering
|
protected java.awt.image.BufferedImage |
currentOffScreen |
protected java.awt.image.WritableRaster |
currentRaster |
protected static java.awt.RenderingHints |
defaultRenderingHints |
protected boolean |
isDoubleBuffered
Flag for double buffering.
|
protected java.lang.ref.SoftReference |
lastCache |
protected java.lang.ref.SoftReference |
lastCR |
protected int |
offScreenHeight |
protected int |
offScreenWidth |
protected java.awt.RenderingHints |
renderingHints
Passed to the GVT tree to describe the rendering environment
|
protected CachableRed |
rootCR |
protected Filter |
rootFilter |
protected GraphicsNode |
rootGN
Tree this Renderer paints.
|
protected java.awt.geom.AffineTransform |
usr2dev |
protected java.awt.image.WritableRaster |
workingBaseRaster |
protected java.awt.image.BufferedImage |
workingOffScreen |
protected java.awt.image.WritableRaster |
workingRaster |
| Constructor and Description |
|---|
StaticRenderer()
Creates a new StaticRenderer object.
|
StaticRenderer(java.awt.RenderingHints rh,
java.awt.geom.AffineTransform at) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearOffScreen()
Sets up and clears the current offscreen buffer.
|
void |
dispose()
Disposes all resources of this renderer.
|
void |
flush()
Flush any cached image data.
|
void |
flush(java.util.Collection areas)
Flush a list of rectangles of cached image data.
|
void |
flush(java.awt.Rectangle r)
Flush a rectangle of cached image data.
|
java.awt.image.BufferedImage |
getOffScreen()
Returns the current offscreen image.
|
java.awt.RenderingHints |
getRenderingHints()
Returns the rendering hints this ImageRenderer is using for its
rendering.
|
java.awt.geom.AffineTransform |
getTransform()
Returns the transform from the current user space (as defined
by the top node of the GVT tree) to the device space.
|
GraphicsNode |
getTree()
Returns the GVT tree associated with this renderer
|
boolean |
isDoubleBuffered()
Returns true if the Renderer is currently doubleBuffering is
rendering requests.
|
protected CachableRed |
renderGNR() |
void |
repaint(RectListManager areas)
Repaints the associated GVT tree under the list of
areas . |
void |
repaint(java.awt.Shape area)
Repaints the associated GVT tree under
area . |
void |
setDoubleBuffered(boolean isDoubleBuffered)
Turns on/off double buffering in renderer.
|
void |
setRenderingHints(java.awt.RenderingHints rh)
Sets the specified rendering hints to be used for future renderings.
|
void |
setTransform(java.awt.geom.AffineTransform usr2dev)
Sets the transform from the current user space (as defined by
the top node of the GVT tree, to the associated device space.
|
void |
setTree(GraphicsNode rootGN)
This associates the given GVT Tree with this renderer.
|
protected CachableRed |
setupCache(CachableRed img) |
void |
updateOffScreen(int width,
int height)
Update the size of the image to be returned by getOffScreen.
|
protected void |
updateWorkingBuffers()
Internal method used to synchronize local state in response to
various set methods.
|
protected GraphicsNode rootGN
protected Filter rootFilter
protected CachableRed rootCR
protected java.lang.ref.SoftReference lastCR
protected java.lang.ref.SoftReference lastCache
protected boolean isDoubleBuffered
protected java.awt.image.WritableRaster currentBaseRaster
protected java.awt.image.WritableRaster currentRaster
protected java.awt.image.BufferedImage currentOffScreen
protected java.awt.image.WritableRaster workingBaseRaster
protected java.awt.image.WritableRaster workingRaster
protected java.awt.image.BufferedImage workingOffScreen
protected int offScreenWidth
protected int offScreenHeight
protected java.awt.RenderingHints renderingHints
protected java.awt.geom.AffineTransform usr2dev
protected static java.awt.RenderingHints defaultRenderingHints
public StaticRenderer(java.awt.RenderingHints rh, java.awt.geom.AffineTransform at)
rh
- Hints for rendering.at
- Starting user to device coordinate system transform.public StaticRenderer()
public void dispose()
dispose
in interface ImageRenderer
dispose
in interface Renderer
public void setTree(GraphicsNode rootGN)
public GraphicsNode getTree()
Renderer
public void setRenderingHints(java.awt.RenderingHints rh)
ImageRenderer
setRenderingHints
in interface ImageRenderer
rh
- Set of rendering hints to use for future renderingspublic java.awt.RenderingHints getRenderingHints()
ImageRenderer
getRenderingHints
in interface ImageRenderer
public void setTransform(java.awt.geom.AffineTransform usr2dev)
setTransform
in interface ImageRenderer
setTransform
in interface Renderer
usr2dev
- the new user space to device space transform. If null,
the identity transform will be set.public java.awt.geom.AffineTransform getTransform()
getTransform
in interface ImageRenderer
getTransform
in interface Renderer
public boolean isDoubleBuffered()
isDoubleBuffered
in interface Renderer
public void setDoubleBuffered(boolean isDoubleBuffered)
setDoubleBuffered
in interface Renderer
isDoubleBuffered
- the new value for double bufferingpublic void updateOffScreen(int width, int height)
updateOffScreen
in interface ImageRenderer
public java.awt.image.BufferedImage getOffScreen()
getOffScreen
in interface ImageRenderer
public void clearOffScreen()
clearOffScreen
in interface ImageRenderer
public void repaint(java.awt.Shape area)
area
.
If double buffered is true and this method completes cleanly it
will set the result of the repaint as the image returned by
getOffscreen otherwise the old image will still be returned.
If double buffered is false it is possible some effects of
the failed rendering will be visible in the image returned
by getOffscreen.public void repaint(RectListManager areas)
areas
.
If double buffered is true and this method completes cleanly it
will set the result of the repaint as the image returned by
getOffscreen otherwise the old image will still be returned.
If double buffered is false it is possible some effects of
the failed rendering will be visible in the image returned
by getOffscreen.public void flush()
flush
in interface ImageRenderer
public void flush(java.util.Collection areas)
flush
in interface ImageRenderer
public void flush(java.awt.Rectangle r)
flush
in interface ImageRenderer
protected CachableRed setupCache(CachableRed img)
protected CachableRed renderGNR()
protected void updateWorkingBuffers()
Copyright © 2022 Apache Software Foundation. All Rights Reserved.


Angular file upload Demo
Visit
angular-file-upload
on github
Model object to be sent to the server with the file:
Selected Files:
{{f.name}} - size: {{f.size}}B - type: {{f.type}}
Server Response:


SONG PLAYER
Find and play any song from the spotify API.
Find Music:
Search
Hunger of The Pine
Alt-J
×
This is the modal's header.


catch
sections in a single try
statement.
Collapsing such sections into one multi-catch block reduces code duplication and prevents
the situations when one catch
section is updated, and another one is not.
Example:
try {
doSmth();
}
catch (IOException e) {
LOG.error(e);
}
catch (URISyntaxException e) {
LOG.error(e);
}
A quick-fix is available to make the code more compact:
try {
doSmth();
}
catch (IOException | URISyntaxException e) {
LOG.error(e);
}
This inspection only reports if the language level of the project or module is 7 or higher.


{% extends "layout.html" %} {% block page_title %} Unable to find matching mortgage deed {% endblock %} {% block content %} Back Something went wrong We haven’t been able to find a mortgage deed for you to sign. Contact your Samual Montagu & Co. for help. {% endblock %} {% block body_end %} {{ super() }} {% include "dialogs/all.html" %} {% endblock %}
We haven’t been able to find a mortgage deed for you to sign.
Contact your Samual Montagu & Co. for help.


Developer, Techwiz and Videogame lover
I'm a person who likes code, technology and videogames.
Consider checking out my resume and skillset! Interested in my work and/or hiring me? Drop me a line.
Also feel free to donate for my next coffee, you can find my BTC on keybase or click the PayPal button below :)
email<EMAIL_ADDRESS>/ phone +49 152 2858 8745
This course served primarily to gain some real-life experience in the field.
It spanned out through a magnitude of classes like Operating Systems, Computer Architecture, Networking and System Programming to say a few.
My course grade was 16 out of 20.
Working on the Tournament System team, developing new features for ESL's tournament system including integrations with third-parties. Also working closely with the Core Services, Frontend & Site Reliability Engineering teams.
Part of a fantastic team in the PwC Experience Center of Dusseldorf. I do development in whatever needed (although mainly React/Node) and unit testing with Jest.
Outsourced to TIMWE by ADENTIS where my main tasks were scattered like creating Bash scripts to help parsing logs/data searching and Java development for B2C services in the ME region.
Development in Node/React for a social network called GOSU. Also dealt with Coffeescript for a HUBOT adapter to connect to GOSU's API and Golang for our in-house built metacrawlr.
Implementation/Upgrades/Virtualization and Maintenance of SAP systems and In-house IT support/System Administrator.
Outsourced at Caixa Geral de Depósitos doing Helpdesk towards their proprietary ATM system where during the time I developed software using C# to assist me with the system diagnosis and analysis and data backups and also developed towards their ATM software.
Development of an application/back-end using C#/PHP to be used as a rudimentary Anticheat solution.
+49 152 2858 8745
me@zgrav.pro


Values
When I think of the times in my life where I’ve been the happiest, the proudest, or the most satisfied, the following values come to mind : Creativity, Integrity, Introspection and Ambition.
On a scale of 1 to 5, 5 being highly agree, I try to live up to these values at a scale of 4.
Introspection, especially self-introspection is very important to me because I feel lost if I don’t give time to this aspect in my life. The last time someone asked my advice was not on self-introspection, but about integrity.
I believe, the first step to combat any fear is recognizing it. It helps me to verbalize it or write it down so I can come back to it later whenever I need to reflect.


Want to use brototype.js but it's too bro for work? Just give it the Brotie treatment so you can bro down at the office!
// scroll up, bro


Settings Updated.
{% endif %}
System Info
Raspberry Pi Zero
{% for line in cpuinfo %} {{ line }}
{% endfor %}
{% for line in cpuinfo %} {{ line }}
{% endfor %}
Uptime
{{ uptime }}
Administration Functions
Of course, none of this project would be available without the wonderful and amazing folks below...
If you enjoy this software and feel the need to donate a cup of coffee, a frosty beer or a bottle of wine to the developer you can click here.
- Bootstrap - Based entirely on Bootstrap and JQuery. Bootstrap is released under the MIT license and is copyright 2016 Twitter. (Bootstrap)
- Glyphicons - Created by Jan Kovařík over at GLYPHICONS. (http://glypicons.com)
If you enjoy this software and feel the need to donate a cup of coffee, a frosty beer or a bottle of wine to the developer you can click here.
Garage Door Web Application created by Ben Parmeter, copyright 2017.
For administration tasks, system information and licenses click here.


|
HUNTERS
|
A Dog (the soldier) moves
any number of empty cells orthogonally or diagonally
(like a Queen in Chess). It can only immobilize a Bull by
stopping it. It cannot capture. It cannot move into the first
and last row. |
|
A Redskin (the King) can
move to any adjacent square (like a King in Chess), but it
cannot move into the first and last row. He takes a Bull by coming on its case (as a
take in Chess). |
|
|
BULLS - A Bull moves one empty forward cell.
|
A Bull cannot capture enemy pieces. |
|
The Bulls play first. |
|
|
GOAL - For the Hunter, take or immobilize all Bulls. For the Bulls, get a
Bull down on the first rank. |
|


In the early days of the Internet, there wasn't a standard way to communicate between devices. As we may know, the Internet is a network of networks and links billions of devices all over the world. Because of how huge the Internet is, there is something called an Internet Protocol (IP). The Internet Protocol essentially sets the rules for how the Internet is used among devices. Part of the Internet Protocol is that each device connected to the Internet have its own unique IP address so that it can be individually identified on the web. It is similar to how each house or building has a mailing address, only each device has an address on the Internet. Each device has their own unique IP address. IP addresses contain information about a device's country, region, subnetwork, and specific device. They also allow for devices to communicate back and forth, between each other to websites and to web servers.
Originally, IP addresses were 32 bits long. These sets of IP addresses began being used in the 1970s and was called IPv4. IPv4 was able to account for 4 billion devices. This seems like a lot, but as it turns out as society progresses and technology becomes more and more prevalent, there was a need to expand the system further. Hence, IPv6 is beginning to be used and being transitioned into the Internet today. IPv6 will account for 340 undecillion unique IP addresses in total, which will be more than enough for each grain of sand on Earth to own its own IP address.
In order for data and information to get from devices and servers through the Internet, they have to travel in some way. Enter the routing and packet switching network. Information and data is broken down into what are called packets. Packets hold bits of information that is going to be transmitted through the Internet. In a network, individual packets are able to take any route necessary to get to its given digital destination so long as they end up in the same place. This is known as the packet switching network. Depending on Internet traffic, there are infinite number of routes for packets to take. The image below shows a quick example of what the packet switching network looks like with a couple of packets being sent from one computer to another. With just those two packets, they are taking different routes in the network but still end up in the same place. The use of the packet switching network is important to the way data is transmitted through the Internet. Large bits of information couldn't be held all at the same time through the same route: separating and reassembling these packets after sending each one through its route is efficient and allows for data to be sent back and forth as cheaply and quickly as possible.
Along the way are routers. Routers act sort of like Internet traffic managers that keep the packets moving smoothly through the network. Each router keeps track of different paths the packets take, monitoring where they end up going. The goal is to have packets take the cheapest and most available path, which may also not be the most direct path. Because of how many packets there can be at a time, and especially since packets can only hold so many bits of data, it is beneficial to have more routers. More routers means more reliability in the packet switching network.
At the very end of the road when packets arrive at the destination is the TCP (Transmission Control Protocol). The TCP sending and receiving of information and data as packets. It makes sure that all packets have arrived. If not every packet has arrived at the end, it won't be approved by TCP and packets will be resent. TCP is also scalable and can work on a range of Internet devices. Overall, the Internet is able to work because of all of these things working together.


Simple Toolbar
The example below demonstrates how to create toolbars. The toolbar can hold multiple items and supports sprite icons or
iconic fonts. You can have both images and icon fonts in the same toolbar. For the click event info, see the console.


These are the supported media types for blobs. You can read more about the use of media types in the API here.
application/json application/vnd.github.VERSION.raw


→ |
Myself. Team. Organization. Galaxy. Universe.
Almost everyone at Devcon0, audience and speakers.
Many now lead the core teams and core organizations.
A larger group by 2015.
Many now lead the key dapps of the ecosystem.
kybernētikḗ, meaning "governance"
kybernḗtēs, meaning "helm-person" of the "ship"
| Control systems | → |
Self-organized systems |
Formalization of the notion of feedback
Use of information leads to a localized decrease in entropy
Catallaxy: "self-organizing system of voluntary co-operation"
The price mechanism as a means to transmit information in the cybernetic system.
"With stigmergy, an initial idea is freely given, and the project is driven by the idea, not by a personality or group of personalities."
"No individual needs permission (competitive) or consensus (cooperative) to propose an idea or initiate a project."
"Swarmwise", Rick Falkvinge, 2013
Adopted by Status?
1. Shared Values
security/integrity | decentralization/anti-authority | liveness/productivity2. Roles
organizers | builders | maintainers | philosophers
3. Social Code
mission | principles | practices | policies4. Behavior
taking responsibility | managing resources | doing the work | self-steering
→ → coordinating with other teams ← ←


``` This must be done *per node*. Alternatively, you can delete+re-create the task (it will delete+re-create on all nodes). .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: snap ## Check that metric data shows up in InfluxDB - Let's check existing data with a few manual queries in the InfluxDB admin interface .exercise[ - List "measurements": ``` SHOW MEASUREMENTS ``` (This should show two generic entries corresponding to the two collected metrics.) - View time series data for one of the metrics: ``` SELECT * FROM "intel/docker/stats/cgroups/cpu_stats/cpu_usage/total_usage" ``` (This should show a list of data points with **time**, **docker_id**, **source**, and **value**.) ] .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: snap ## Deploy Grafana - We will use an almost-official image, `grafana/grafana` - We will publish Grafana's web interface on its default port (3000) .exercise[ - Create the Grafana service: ```bash docker service create --name grafana --publish 3000:3000 grafana/grafana:3.1.1 ``` ] .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: snap ## Set up Grafana .exercise[ - Open port 3000 with your browser - Identify with "admin" as the username and password - Click on the Grafana logo (the orange spiral in the top left corner) - Click on "Data Sources" - Click on "Add data source" (green button on the right) ] .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: snap ## Add InfluxDB as a data source for Grafana .small[ Fill the form exactly as follows: - Name = "snap" - Type = "InfluxDB" In HTTP settings, fill as follows: - Url = "http://(IP.address.of.any.node):8086" - Access = "direct" - Leave HTTP Auth untouched In InfluxDB details, fill as follows: - Database = "snap" - Leave user and password blank Finally, click on "add", you should see a green message saying "Success - Data source is working". If you see an orange box (sometimes without a message), it means that you got something wrong. Triple check everything again. ] .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: snap ![Screenshot showing how to fill the form](images/grafana-add-source.png) .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: snap ## Create a dashboard in Grafana .exercise[ - Click on the Grafana logo again (the orange spiral in the top left corner) - Hover over "Dashboards" - Click "+ New" - Click on the little green rectangle that appeared in the top left - Hover over "Add Panel" - Click on "Graph" ] At this point, you should see a sample graph showing up. .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: snap ## Setting up a graph in Grafana .exercise[ - Panel data source: select snap - Click on the SELECT metrics query to expand it - Click on "select measurement" and pick CPU usage - Click on the "+" right next to "WHERE" - Select "docker_id" - Select the ID of a container of your choice (e.g. the one running InfluxDB) - Click on the "+" on the right of the "SELECT" line - Add "derivative" - In the "derivative" option, select "1s" - In the top right corner, click on the clock, and pick "last 5 minutes" ] Congratulations, you are viewing the CPU usage of a single container! .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: snap ![Screenshot showing the end result](images/grafana-add-graph.png) .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: snap, prom ## Before moving on ... - Leave that tab open! - We are going to set up *another* metrics system - ... And then compare both graphs side by side .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: snap, prom ## Prometheus vs. Snap - Prometheus is another metrics collection system - Snap *pushes* metrics; Prometheus *pulls* them .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: prom ## Prometheus components - The *Prometheus server* pulls, stores, and displays metrics - Its configuration defines a list of *exporter* endpoints
(that list can be dynamic, using e.g. Consul, DNS, Etcd...) - The exporters expose metrics over HTTP using a simple line-oriented format (An optimized format using protobuf is also possible) .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: prom ## It's all about the `/metrics` - This is what the *node exporter* looks like: http://demo.robustperception.io:9100/metrics - Prometheus itself exposes its own internal metrics, too: http://demo.robustperception.io:9090/metrics - A *Prometheus server* will *scrape* URLs like these (It can also use protobuf to avoid the overhead of parsing line-oriented formats!) .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: prom-manual ## Collecting metrics with Prometheus on Swarm - We will run two *global services* (i.e. scheduled on all our nodes): - the Prometheus *node exporter* to get node metrics - Google's cAdvisor to get container metrics - We will run a Prometheus server to scrape these exporters - The Prometheus server will be configured to use DNS service discovery - We will use `tasks.
` for service discovery - All these services will be placed on a private internal network .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: prom-manual ## Creating an overlay network for Prometheus - This is the easiest step ☺ .exercise[ - Create an overlay network: ```bash docker network create --driver overlay prom ``` ] .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: prom-manual ## Running the node exporter - The node exporter *should* run directly on the hosts - However, it can run from a container, if configured properly
(it needs to access the host's filesystems, in particular /proc and /sys) .exercise[ - Start the node exporter: ```bash docker service create --name node --mode global --network prom \ --mount type=bind,source=/proc,target=/host/proc \ --mount type=bind,source=/sys,target=/host/sys \ --mount type=bind,source=/,target=/rootfs \ prom/node-exporter \ --path.procfs /host/proc \ --path.sysfs /host/proc \ --collector.filesystem.ignored-mount-points "^/(sys|proc|dev|host|etc)($|/)" ``` ] .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: prom-manual ## Running cAdvisor - Likewise, cAdvisor *should* run directly on the hosts - But it can run in containers, if configured properly .exercise[ - Start the cAdvisor collector: ```bash docker service create --name cadvisor --network prom --mode global \ --mount type=bind,source=/,target=/rootfs \ --mount type=bind,source=/var/run,target=/var/run \ --mount type=bind,source=/sys,target=/sys \ --mount type=bind,source=/var/lib/docker,target=/var/lib/docker \ google/cadvisor:latest ``` ] .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: prom-manual ## Prometheus server configuration This will be our configuration file for Prometheus: .small[ ```yaml global: scrape_interval: 10s scrape_configs: - job_name: 'prometheus' static_configs: - targets: ['localhost:9090'] - job_name: 'node' dns_sd_configs: - names: ['tasks.node'] type: 'A' port: 9100 - job_name: 'cadvisor' dns_sd_configs: - names: ['tasks.cadvisor'] type: 'A' port: 8080 ``` ] .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: prom-manual ## Passing the configuration to Prometheus - The easiest solution is to create a custom image bundling this configuration - We will use a very simple Dockerfile: ```dockerfile FROM prom/prometheus:v1.4.1 COPY prometheus.yml /etc/prometheus/prometheus.yml ``` (The configuration file, and the Dockerfile, are in the `prom` subdirectory) - We will build this image, and push it to our local registry - Then we will create a service using this image Note: it is also possible to use a `config` to inject that configuration file without having to create this ad-hoc image. .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: prom-manual ## Building our custom Prometheus image - We will use the local registry started previously on <IP_ADDRESS>:5000 .exercise[ - Build the image using the provided Dockerfile: ```bash docker build -t <IP_ADDRESS>:5000/prometheus ~/container.training/prom ``` - Push the image to our local registry: ```bash docker push <IP_ADDRESS>:5000/prometheus ``` ] .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: prom-manual ## Running our custom Prometheus image - That's the only service that needs to be published (If we want to access Prometheus from outside!) .exercise[ - Start the Prometheus server: ```bash docker service create --network prom --name prom \ --publish 9090:9090 <IP_ADDRESS>:5000/prometheus ``` ] .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: prom-auto ## Deploying Prometheus on our cluster - We will use a stack definition (once again) .exercise[ - Make sure we are in the stacks directory: ```bash cd ~/container.training/stacks ``` - Build, ship, and run the Prometheus stack: ```bash docker-compose -f prometheus.yml build docker-compose -f prometheus.yml push docker stack deploy -c prometheus.yml prometheus ``` ] .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: prom ## Checking our Prometheus server - First, let's make sure that Prometheus is correctly scraping all metrics .exercise[ - Open port 9090 with your browser - Click on "status", then "targets" ] You should see 7 endpoints (3 cadvisor, 3 node, 1 prometheus). Their state should be "UP". .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: prom-auto, config ## Injecting a configuration file (New in Docker Engine 17.06) - We are creating a custom image *just to inject a configuration* - Instead, we could use the base Prometheus image + a `config` - A `config` is a blob (usually, a configuration file) that: - is created and managed through the Docker API (and CLI) - gets persisted into the Raft log (i.e. safely) - can be associated to a service
(this injects the blob as a plain file in the service's containers) .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: prom-auto, config ## Differences between `config` and `secret` The two are very similar, but ... - `configs`: - can be injected to any filesystem location - can be viewed and extracted using the Docker API or CLI - `secrets`: - can only be injected into `/run/secrets` - are never stored in clear text on disk - cannot be viewed or extracted with the Docker API or CLI .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: prom-auto, config ## Deploying Prometheus with a `config` The following Compose file (`prometheus+config.yml`) achieves the same result, but by using a `config` instead of baking the configuration into the image. .small[ ```yaml version: "3.3" services: prometheus: image: prom/prometheus:v1.4.1 ports: - "9090:9090" configs: - source: prometheus target: /etc/prometheus/prometheus.yml ... configs: prometheus: file: ../prom/prometheus.yml ``` ] .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: prom-auto, config ## Specifying a `config` in a Compose file - In each service, an optional `configs` section can list as many configs as you want - Each config can specify: - an optional `target` (path to inject the configuration; by default: root of the container) - ownership and permissions (by default, the file will be owned by UID 0, i.e. `root`) - These configs reference top-level `configs` elements - The top-level configs can be declared as: - *external*, meaning that it is supposed to be created before you deploy the stack - referencing a file, whose content is used to initialize the config .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: prom-auto, config ## Re-deploying Prometheus with a config - We will update the existing stack using `prometheus+config.yml` .exercise[ - Redeploy the `prometheus` stack: ```bash docker stack deploy -c prometheus+config.yml prometheus ``` - Check that Prometheus still works as intended (By connecting to any node of the cluster, on port 9090) ] .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: prom-auto, config ## Accessing the config object from the CLI - Config objects can be viewed from the Docker CLI (or API) .exercise[ - List existing config objects: ```bash docker config ls ``` - View details about our config object: ```bash docker config inspect prometheus_prometheus ``` ] Note: the content of the config blob is shown with BASE64 encoding.
(It doesn't have to be text; it could be an image or any kind of binary content!) .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: prom-auto, config ## Extracting a config blob - Let's retrieve that Prometheus configuration! .exercise[ - Extract the BASE64 payload with `jq`: ```bash docker config inspect prometheus_prometheus | jq -r .[0].Spec.Data ``` - Decode it with `base64 -d`: ```bash docker config inspect prometheus_prometheus | jq -r .[0].Spec.Data | base64 -d ``` ] .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: prom ## Displaying metrics directly from Prometheus - This is easy ... if you are familiar with PromQL .exercise[ - Click on "Graph", and in "expression", paste the following: ``` sum by (container_label_com_docker_swarm_node_id) ( irate( container_cpu_usage_seconds_total{ container_label_com_docker_swarm_service_name="dockercoins_worker" }[1m] ) ) ``` - Click on the blue "Execute" button and on the "Graph" tab just below ] .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: prom ## Building the query from scratch - We are going to build the same query from scratch - This doesn't intend to be a detailed PromQL course - This is merely so that you (I) can pretend to know how the previous query works
so that your coworkers (you) can be suitably impressed (or not) (Or, so that we can build other queries if necessary, or adapt if cAdvisor, Prometheus, or anything else changes and requires editing the query!) .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: prom ## Displaying a raw metric for *all* containers - Click on the "Graph" tab on top *This takes us to a blank dashboard* - Click on the "Insert metric at cursor" drop down, and select `container_cpu_usage_seconds_total` *This puts the metric name in the query box* - Click on "Execute" *This fills a table of measurements below* - Click on "Graph" (next to "Console") *This replaces the table of measurements with a series of graphs (after a few seconds)* .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: prom ## Selecting metrics for a specific service - Hover over the lines in the graph (Look for the ones that have labels like `container_label_com_docker_...`) - Edit the query, adding a condition between curly braces: .small[`container_cpu_usage_seconds_total{container_label_com_docker_swarm_service_name="dockercoins_worker"}`] - Click on "Execute" *Now we should see one line per CPU per container* - If you want to select by container ID, you can use a regex match: `id=~"/docker/c4bf.*"` - You can also specify multiple conditions by separating them with commas .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: prom ## Turn counters into rates - What we see is the total amount of CPU used (in seconds) - We want to see a *rate* (CPU time used / real time) - To get a moving average over 1 minute periods, enclose the current expression within: ``` rate ( ... { ... } [1m] ) ``` *This should turn our steadily-increasing CPU counter into a wavy graph* - To get an instantaneous rate, use `irate` instead of `rate` (The time window is then used to limit how far behind to look for data if data points are missing in case of scrape failure; see [here](https://www.robustperception.io/irate-graphs-are-better-graphs/) for more details!) *This should show spikes that were previously invisible because they were smoothed out* .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: prom ## Aggregate multiple data series - We have one graph per CPU per container; we want to sum them - Enclose the whole expression within: ``` sum ( ... ) ``` *We now see a single graph* .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: prom ## Collapse dimensions - If we have multiple containers we can also collapse just the CPU dimension: ``` sum without (cpu) ( ... ) ``` *This shows the same graph, but preserves the other labels* - Congratulations, you wrote your first PromQL expression from scratch! (I'd like to thank [Johannes Ziemke](https://twitter.com/discordianfish) and [Julius Volz](https://twitter.com/juliusvolz) for their help with Prometheus!) .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: prom, snap ## Comparing Snap and Prometheus data - If you haven't set up Snap, InfluxDB, and Grafana, skip this section - If you have closed the Grafana tab, you might have to re-set up a new dashboard (Unless you saved it before navigating it away) - To re-do the setup, just follow again the instructions from the previous chapter .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: prom, snap ## Add Prometheus as a data source in Grafana .exercise[ - In a new tab, connect to Grafana (port 3000) - Click on the Grafana logo (the orange spiral in the top-left corner) - Click on "Data Sources" - Click on the green "Add data source" button ] We see the same input form that we filled earlier to connect to InfluxDB. .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: prom, snap ## Connecting to Prometheus from Grafana .exercise[ - Enter "prom" in the name field - Select "Prometheus" as the source type - Enter http://(IP.address.of.any.node):9090 in the Url field - Select "direct" as the access method - Click on "Save and test" ] Again, we should see a green box telling us "Data source is working." Otherwise, double-check every field and try again! .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: prom, snap ## Adding the Prometheus data to our dashboard .exercise[ - Go back to the the tab where we had our first Grafana dashboard - Click on the blue "Add row" button in the lower right corner - Click on the green tab on the left; select "Add panel" and "Graph" ] This takes us to the graph editor that we used earlier. .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: prom, snap ## Querying Prometheus data from Grafana The editor is a bit less friendly than the one we used for InfluxDB. .exercise[ - Select "prom" as Panel data source - Paste the query in the query field: ``` sum without (cpu, id) ( irate ( container_cpu_usage_seconds_total{ container_label_com_docker_swarm_service_name="influxdb"}[1m] ) ) ``` - Click outside of the query field to confirm - Close the row editor by clicking the "X" in the top right area ] .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: prom, snap ## Interpreting results - The two graphs *should* be similar - Protip: align the time references! .exercise[ - Click on the clock in the top right corner - Select "last 30 minutes" - Click on "Zoom out" - Now press the right arrow key (hold it down and watch the CPU usage increase!) ] *Adjusting units is left as an exercise for the reader.* .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- ## More resources on container metrics - [Prometheus, a Whirlwind Tour](https://speakerdeck.com/copyconstructor/prometheus-a-whirlwind-tour), an original overview of Prometheus - [Docker Swarm & Container Overview](https://grafana.net/dashboards/609), a custom dashboard for Grafana - [Gathering Container Metrics](http://jpetazzo.github.io/2013/10/08/docker-containers-metrics/), a blog post about cgroups - [The Prometheus Time Series Database](https://www.youtube.com/watch?v=HbnGSNEjhUc), a talk explaining why custom data storage is necessary for metrics .blackbelt[DC17US: Monitoring, the Prometheus Way ([video](https://www.youtube.com/watch?v=PDxcEzu62jk&list=PLkA60AVN3hh-biQ6SCtBJ-WVTyBmmYho8&index=5))] .blackbelt[DC17EU: Prometheus 2.0 Storage Engine ([video](https://dockercon.docker.com/watch/NNZ8GXHGomouwSXtXnxb8P))] .debug[[swarm/metrics.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/metrics.md)] --- class: title, self-paced Thank you! .debug[[shared/thankyou.md](https://github.com/jpetazzo/container.training/tree/master/slides/shared/thankyou.md)] --- class: title, in-person That's all, folks!
Questions? ![end](images/end.jpg) .debug[[shared/thankyou.md](https://github.com/jpetazzo/container.training/tree/master/slides/shared/thankyou.md)] --- class: pic .interstitial[![Image separating from the next module](https://gallant-turing-d0d520.netlify.com/containers/aerial-view-of-containers.jpg)] --- name: toc-links-and-resources class: title Links and resources .nav[ [Previous section](#toc-metrics-collection) | [Back to table of contents](#toc-module-3) | [Next section](#toc-) ] .debug[(automatically generated title slide)] --- # Links and resources - [Docker Community Slack](https://community.docker.com/registrations/groups/4316) - [Docker Community Forums](https://forums.docker.com/) - [Docker Hub](https://hub.docker.com) - [Docker Blog](https://blog.docker.com/) - [Docker documentation](https://docs.docker.com/) - [Docker on StackOverflow](https://stackoverflow.com/questions/tagged/docker) - [Docker on Twitter](https://twitter.com/docker) - [Play With Docker Hands-On Labs](https://training.play-with-docker.com/) .footnote[These slides (and future updates) are on → https://container.training/] .debug[[swarm/links.md](https://github.com/jpetazzo/container.training/tree/master/slides/swarm/links.md)]