text:
<img src="Images/AnchorKit.png" alt="AnchorKit" />

![Swift Version](https://img.shields.io/badge/swift-5-orange.svg?style=flat)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/AnchorKit.svg)](https://img.shields.io/cocoapods/v/AnchorKit.svg)
[![Platform](https://img.shields.io/cocoapods/p/AnchorKit.svg?style=flat)](http://cocoapods.org/pods/AnchorKit)
[![Build Status](https://travis-ci.org/Weebly/AnchorKit.svg?branch=master)](https://travis-ci.org/Weebly/AnchorKit)

### ***AnchorKit** provides a simple, intuitive way to create layouts using anchors.*

# Quick Start
Here's some example code:

````swift
// Multiple constraints on one line
myView.constrain(.leading, .top, .trailing, to: anotherView)

// One-line edge constraints with insets
myView.constrainEdges(to: anotherView).inset(10)
myView.constrainEdges(to: anotherView).insetVertical(20).insetHorizontal(30)

// Set height/width equal to a constant
myView.constrain(.height, .width, toConstant: 200)
myView.constrainWidth(to: 42)

// Set the height/width equal to a CGSize
myView.constrain(to: CGSize(width: 100, height: 200))

// Set offset (constant)
myView.constrain(.leading, to: .trailing, of: anotherView).offset(20)

// Set insets
myView.constrain(.leading, .trailing, to: anotherView).inset(24)

// Set the relation and multiplier
myView.constrain(.height, relation: .lessThanOrEqual, to: anotherView, multiplier: 1.6)

// Set the priority
myView.constrain(.centerY, to: anotherView, priority: .high).offset(-15)

// Easily center items
myView.constrainCenter(to: anotherView)

// Return value for single constraint is NSLayoutConstraint
let bottomConstraint = myView.constrain(.bottom, to: .top, of: anotherView.layoutMarginsGuide)

// Return value for multiple constraints is [NSLayoutConstraint]
let topAndSideConstraints = myView.constrain(.leading, .trailing, .top, to: anotherView)
````

# Features

- Simple, intuitive, Swifty syntax
- No more `isActive = true` after every line (**constraints are returned pre-activated** 🎉)
- Automatically takes care of `translatesAutoresizingMaskIntoConstraints = false`
- Works with both **layout guides and views**
- Works on **all 3 platforms** that support AutoLayout constraints (iOS, macOS, tvOS)
- No proprietary classes to deal with; return values are `NSLayoutConstraint` or `[NSLayoutConstraint]`
- Use any number types (`Int`, `Double`, `Float`, etc.), no need to cast to `CGFloat`

# Requirements

- iOS 9.0+, macOS 10.12+, tvOS 9.0+
- Swift 3.1+
- Xcode 8+

# Installation

### CocoaPods:
````
pod 'AnchorKit'
````

### Carthage:
````
github "Weebly/AnchorKit"
````

### Swift Package Manager:
````
package(url: "https://github.com/Weebly/AnchorKit.git", .from("2.3.0"))
````

# Usage

## The `Anchor` Enum
**AnchorKit**'s API is primarily based on an enum representing the different anchor types available on views and layout guides.

````swift
public enum Anchor {
    case leading
    case trailing
    case left
    case right
    case top
    case bottom
    case width
    case height
    case centerX
    case centerY

    // These two are only available on views, not layout guides.
    case firstBaseline
    case lastBaseline
}
````

AutoLayout defines 3 types of anchors, and you can only constrain anchors to other anchors within the same group.

- **X-axis anchors**: `leading`, `trailing`, `left`, `right`, `centerX`
- **Y-axis anchors**: `top`, `bottom`, `centerY`, `firstBaseline`, `lastBaseline`
- **Dimension anchors**: `width`, `height`

Under the hood, each of these map to an actual `NSLayoutAnchor` on the view or layout guide you are constraining.

## Creating Constraints

### The `Anchorable` Protocol
**AnchorKit** works on both layout guides and views. To consolidate these two, we use a protocol called `Anchorable`. Views conform to another protocol, `ViewAnchorable`, which gives them the ability to use baseline anchors. Mentions of "item" in the docs below refer to views and layout guides.

### Anchor to Item Constraints

Constrain anchors of one item to the corresponding anchors of another item.

````swift
myView.constrain(.leading, .trailing, .top, to: anotherView)
````

Calling this method with a single anchor will implicitly return `NSLayoutConstraint`. Otherwise, the return type is `[NSLayoutConstraint]`. The full signatures of these methods are shown below.

````swift
// Single constraint
@discardableResult
public func constrain<AnchorableType: Anchorable>(_ anchor: Anchor, relation: NSLayoutRelation = .equal, to item: AnchorableType, multiplier: CGFloatRepresentable = 1, priority: LayoutPriority = .required) -> NSLayoutConstraint

// Multiple constraints
@discardableResult
public func constrain<AnchorableType: Anchorable>(_ anchors: Anchor..., relation: NSLayoutRelation = .equal, to item: AnchorableType, multiplier: CGFloatRepresentable = 1, priority: LayoutPriority = .required) -> [NSLayoutConstraint]
````

### Anchor to Anchor Constraints

Constrain an anchor of one item to an anchor of another item.

````swift
myView.constrain(.top, to: .bottom, of: anotherView.readableContentGuide)
````

This method only supports the creation of a single constraint.

````swift
@discardableResult
public func constrain<AnchorableType: Anchorable>(_ anchor: Anchor, relation: NSLayoutRelation = .equal, to otherAnchor: Anchor, of item: AnchorableType, multiplier: CGFloatRepresentable = 1, priority: LayoutPriority = .required) -> NSLayoutConstraint
````

### Anchor to Constant Constraints

Constrain an anchor of an item to a constant. This is is especially useful (and more readable) for the `width` and `height` anchors.

````swift
myView.constrain(.height, toConstant: 200)
myBoxView.constrain(.width, .height, toConstant: 50) // Creates a box

// Even easier:
myView.constrainHeight(to: 42)
myView.constrainWidth(to: 60)
````

Calling this method with a single anchor will implicitly return `NSLayoutConstraint`. Otherwise, the return type is `[NSLayoutConstraint]`. The full signatures of these methods are shown below.

````swift
// Single constraint
@discardableResult
public func constrain(_ anchor: Anchor, relation: NSLayoutRelation = .equal, toConstant constant: CGFloatRepresentable, priority: LayoutPriority = .required) -> NSLayoutConstraint

// Multiple constraints
@discardableResult
public func constrain(_ anchors: Anchor..., relation: NSLayoutRelation = .equal, toConstant constant: CGFloatRepresentable, priority: LayoutPriority = .required) -> [NSLayoutConstraint]
````

This method can also work on items with anchors other than `width` and `height`. The resulting behavior is equivalent to constraining the anchor to the corresponding anchor on the view's `superview` (or layout guide's `owningView`). So `myView.constrain(.leading, toConstant: 10)` translates to `myView.constrain(.leading, to: myView.superview!).offset(10)`.

### Constrain to Edges

Constrains the edges of the current item to another item.

````swift
myView.constrainEdges(to: anotherView)
````

This is just a convenience method for constraining the `leading`, `trailing`, `top`, and `bottom` anchors. For better autocomplete behavior, there is a separate equivalent method if you would like to add a `relation` other than `.equal` to the constraints.

````swift
@discardableResult
public func constrainEdges<AnchorableType: Anchorable>(to item: AnchorableType, priority: LayoutPriority = .required) -> [NSLayoutConstraint]

// With a relation other than .equal
@discardableResult
public func constrainEdges<AnchorableType: Anchorable>(_ relation: NSLayoutRelation, to item: AnchorableType, priority: LayoutPriority = .required) -> [NSLayoutConstraint]
````

### Constrain to Center

Constraints the center of the current item to another item.

````swift
myView.constrainCenter(to: anotherView)
````

Thiis is just a convenience method for constraining the `centerX` and `centerY` anchors. For better autocomplete behavior, there is a separate equivalent method if you would like to add a `relation` other than `.equal` to the constraints.

````swift
@discardableResult
public func constrainCenter<AnchorableType: Anchorable>(to item: AnchorableType, priority: LayoutPriority = .required) -> [NSLayoutConstraint]

// With a relation other than .equal
@discardableResult
public func constrainCenter<AnchorableType: Anchorable>(_ relation: NSLayoutRelation, to item: AnchorableType, priority: LayoutPriority = .required) -> [NSLayoutConstraint]
````

### Constrain to Size

Constrains the width and height of an item to a specific `CGSize`.

````swift
myView.constrain(to: CGSize(width: 10, height: 20))
````

This is a convenience method for setting the `width` and `height` anchors to the respective width and height of a `CGSize`. For better autocomplete behavior, there is a separate equivalent method if you would like to add a `relation` other than `.equal` to the constraints.

````swift
@discardableResult
public func constrain(to size: CGSize, priority: LayoutPriority = .required) -> [NSLayoutConstraint]

@discardableResult
public func constrain(_ relation: NSLayoutRelation, to size: CGSize, priority: LayoutPriority = .required) -> [NSLayoutConstraint]
````

For views, because width and height constraints belong to the view itself, you can update the those constraints directly from the view:

````swift
myView.updateSize(newSize)
myView2.updateWidth(100)
myView3.updateHeight(200)
````

### Constrain to UIViewController `topLayoutGuide` and `bottomLayoutGuide`

The `topLayoutGuide` and `bottomLayoutGuide` properties on `UIViewController` have a type of `UILayoutSupport`, which is a protocol. Constrain to these just as you would to any other item.

Note that the only anchors available on these are `height`, `top`, and `bottom`.

````swift
myView.constrain(.top, to: .bottom, of: topLayoutGuide).offset(10)
otherView.constrain(.height, to: bottomLayoutGuide)
````
The signatures for these methods are identical to the anchor-to-anchor and anchor-to-item methods except that the second item has a type of `UILayoutSupport`.

## The `CGFloatRepresentable` Protocol

This protocol allows you to use any number types for constraint offsets, insets, and multipliers without the need to cast all values to `CGFloat`.

````swift
public protocol CGFloatRepresentable {
    var cgFloatValue: CGFloat { get }
}
````

Adopted by the following types:

- `Int`, `Int8`, `Int16`, `Int32`, `Int64`
- `UInt`, `UInt8`, `UInt16`, `UInt32`, `UInt64`
- `Double`
- `Float`, `Float80`
- `CGFloat`
- `NSNumber`

## Offsets and Insets

To set constants on constraints, **AnchorKit** uses *offsets* and *insets*. An offset has equivalent behavior to `constant` on `NSLayoutConstraint`. An inset, however, *negates* the constant for the `trailing`, `right`, `bottom`, and `lastBaseline` anchors and behaves normally for all other anchors.

````swift
// The top of bottomView will be 20 points below the top of topView
bottomView.constrain(.top, of: topView).offset(20)

// The innerView will be "inside" the outerView, with 10 points of padding on the sides
innerView.constrain(.leading, .trailing, to: outerView).inset(10)
````

As you may have noticed in the second example, `offset(_:)` and `inset(_:)` work on both single constraints and sequences of constraints.

When updating constraints, for the sake of proper Swift naming conventions, **AnchorKit** also provides the methods `updateOffset(_:)` and `updateInset(_:)`.

You can also use `UIEdgeInsets` (or `EdgeInsets` on macOS) to set the insets. The insets will be applied to the corresponding constraints.

````swift
innerView.constrainEdges(to: outerView).inset(UIEdgeInsets(top: 10, left: 12, bottom: 14, right: 16))
````

For multiple constraints, it's also possible to only set the *horizontal* and *vertical* insets, like so:

````swift
// The innerView will have an inset of 10 on the top and bottom sides and an inset of 20 on the leading and trailing sides
innerView.constrainEdges(to: outerView).insetVertical(10).insetHorizontal(20)`
````
When updating horizontal/vertical inset, use `updateHorizontalInsets(_:)` and `updateVerticalInsets(_:)`.

## Layout Priorities

To set priorities on constraints, **AnchorKit** provides an enum called `LayoutPriority`.

````swift
public enum LayoutPriority: RawRepresentable {
    case low        // Priority: 250
    case medium     // Priority: 500
    case high       // Priority: 750
    case required   // Priority: 1000
    case custom(Float)
}
````

All of the constraint creation methods have a default priority of `required`, but you can set your own when needed.

````swift
myView.constrain(.centerX, to: anotherView, priority: .medium)
````

For complex layouts, sometimes you want just a *slightly* higher priority for one constraint. Good news: you can use addition and subtraction operators with layout priorities.

````swift
myView.constrain(.left, to: anotherView, priority: .low + 1) // Priority = 251
````

You can get/set the layout priority on `NSLayoutConstraint`s with the `layoutPriority` extension method.

````swift
let topConstraint = myView.constrain(.top, to: anotherView, priority: .medium)
topConstraint.layoutPriority = .high
````

And finally, use layout priorites to set your content compression resistance and content hugging:

````swift
myView.hug(with: .low, for: .vertical)
myView.resistCompression(with: .high, for: .horizontal)
````

## Other Goodies

### Activation & Deactivation

**AnchorKit** constraints come *preactivated*. However, you can also deactivate constraints and capture them on the same line:

````swift
let centerYConstraint = myView.constraint(.centerY, to: anotherView).deactivate()
// ...
centerYConstraint.activate()
````
These methods also work on sequences of constraints.

### iOS 11 System Spacing Constraints

In iOS 11 and tvOS 11, UIKit gave us a new way to define constraints using system-defined spacing with methods such as `constraintEqualToSystemSpacingAfter(_:multiplier:)`. These are useful when constraining items to the new `safeAreaLayoutGuide` found on `UIView`, which is now the recommended API to use instead of `topLayoutGuide` and `bottomLayoutGuide` on `UIViewController` (those are now deprecated).

AnchorKit provides a higher level method for system spacing constraints:

````swift
myView.constrainUsingSystemSpacing(.top, .below, .bottom, of: anotherView.safeAreaLayoutGuide)
myView.constrainUsingSystemSpacing(.leading, .after, .trailing, of: anotherView.safeAreaLayoutGuide)
````

The full signature for this method is below:

````swift
@discardableResult
public func constrainUsingSystemSpacing<AnchorableType: Anchorable>(_ anchor: Anchor, relation: Relation = .equal, _ position: SystemSpacingPosition, _ otherAnchor: Anchor, of item: AnchorableType, multiplier: CGFloatRepresentable = 1, priority: LayoutPriority = .required) -> NSLayoutConstraint
````

# Support
For questions, support, and suggestions, please open up an issue.

# License
**AnchorKit** is available under the MIT license. See the LICENSE file for more info.

repository: Weebly/AnchorKit

gha_language: Swift

repo_name: Weebly/AnchorKit


text:
---
title: Ticks
page_title: Ticks - UI for WinForms Documentation
description: Ticks
slug: winforms/chart/understanding-radchart-elements/ticks
tags: ticks
published: True
position: 11
previous_url: chart-undestanding-radchart-elements-ticks
---

# Ticks

Axis ticks are the small marks that identify the position of items on the axes and the starting points of gridlines.

Vertical ticks are controlled by the __XAxis__ and horizontal ticks are controlled by __YAxis__ and __YAxis2__. Ticks can be "major", e.g. falling on the labeled axis __Step__ values.  "Minor" ticks fall between __Step__ values for __YAxis__ and __YAxis2__. See the figure below where major ticks fall on 50, 100, 150, 200, 250 of the __YAxis__ and minor ticks fall between the major ticks.
>caption

![WinForms RadChart Axis Ticks](images/chart-undestanding-radchart-elements-ticks001.png)

To control the visibility and general appearance of gridlines use the the PlotArea.<axis>.Appearance property to reach __MajorTick__ and __MinorTick__ properties.  __XAxis__ has only a __MajorTick__ property while __YAxis__ and __YAxis2__ have both __MajorTick__ and __MinorTick__ properties.  Both major and minor tick objects include the following properties:

* __Visible__ : Set this property false to hide the ticks.

* __Cap__ : The terminator for each tick can be __Flat__, __Square__, __Round__, __Triangle__, __NoAnchor__, __SquareAnchor__, __DiamondAnchor__, __ArrowAnchor__, __AnchorMask__ or __Custom__. In the example above the Y Axis major ticks have a __Square__ cap, minor ticks have a __RoundCap__ and X Axis major ticks have an __ArrowAnchor__ cap.

* __Color__ of the line and cap.

* __Length__: The length of the tick in pixels.  To reverse the direction of the ticks and have them appear above the axis line use a negative value for __Length__.

* __PenStyle__ : values can be __Solid__, __Dash__, __Dot__, __DashDot__, __DashDotDot__ and __Custom__.

* __Width__ in pixels.

## Layout

The __LayoutMode__ property of each the X axis object specifies how axis marks are positioned with regard to series items. Layout modes change the chart appearance while the underlying data remains the same. The available __LayoutMode__ values are __Normal__, __Inside__ and __Between__.
>caption

![WinForms RadChart Axis Ticks LayoutMode](images/chart-undestanding-radchart-elements-ticks002.png)

repository: telerik/winforms-docs

branch_name: refs/heads/master

extension: md

gha_language: JavaScript

license_type: permissive

repo_name: telerik/winforms-docs


text:
# Pioco ry website

## Pre-requisites

- [Git](https://git-scm.com/)
- [Ruby](https://www.ruby-lang.org/)
- [Bundler](https://bundler.io/)
- [Jekyll](https://jekyllrb.com/)
- [Node.js](https://nodejs.org/en/)

## Development

Install ruby gems and npm dependecies

    bundle install
    npm install

Run the site locally

    bundle exec jekyll serve

Build the CSS styles

    npm run build

## Production

The site is hosted in [GitHub Pages](https://help.github.com/en/articles/setting-up-a-github-pages-site-with-jekyll). All the changes to `master` branch are automatically deployed to production.

Before deploying to the production (= pushing to `master` branch), remember to build the CSS styles with `npm run build`. Styles will be built to `assets/css/main.css`, which needs to be included in the repository.


text:
# Module 2: Legal Ethics and the Legal Profession

## Becoming a Lawyer

All Canadian provinces have a governing body (e.g., the Law Society of Upper Canada in Ontario) that is controlled by lawyers and has a monopoly over the certification and discipline of the legal profession. All provincial Bar Associations belong to the Canadian Bar Association (CBA) which produces the CBA Code of Professional Conduct (the Rules).

In order to become a lawyer, applicant must:

1. possess a law degree from an accredited law school;
2. they must work with a law firm under an apprenticeship known as articling;
3. they must pass their bar admission exams

The law degree is an undergraduate degree (a Bachelor in Law) but typically requires completion of a first degree for admission to law school (This is true for Canada but no the UK or Australia).

Articling is largely an unstructured affair in which students learn from more experienced lawyers in order to find out what it's like to work under the pressure of deadlines. This varies from province to province but typically lasts no more than a year.

During the bar admission ceremony, graduates take an oath to uphold the highest standards of moral integrity.

This dates back to Rome's *Theodesian Code* and also to Anglo-Saxon England where lawyers have always been required to take an oath to fulfill their professional responsibilities in a good and virtuous manner.

Before even being admitted to the legal profession, applicants must also be certified as being "of good character". You can be refused admission to the bar if you are deemed to be of low character. However, there is little consensus on what the requirement of moral character entails or demands. It is generally thought to include traits such as honesty, integrity and reliability.

Provincial Bar Associations seldom use this provision to deny applicants admission to the bar. Even in cases in which they do, the standards are not clear nor consistent.

In general, applicants are presumed to be of good character and suitable for legal practice unless there is evidence to the contrary.

Law schools and bar Associations do not do in-depth background checks. They make only a brief inquiry into an applicant's moral character and this is largely confined to questions asked on their application forms and relies on the applicant being truthful.

It is relatively rare for the Bar Association to disbar lawyers. Most disciplinary proceedings focus on "professional misconduct" and lead to sanctions much less severe than disbarment.

## Public Perception of Lawyers -- Ambivalence

Public perception is not everything but it is vitally important. The legal profession is as much admired as it is reviled.

The public have a love-hate relationship with lawyers.

The law profession has an image as a noble and honorable vocation -- defenders of the poor and dispossessed (e.g., See the movie *To Kill a Mockingbird* in which Gregory Peck defends a black man falsely accused of rape).

Lawyers are also viewed with disgust and contempt by many. The negative image revolves around what is perceived to be the unethical conduct of lawyers.

The practice of law places lawyers in ethical dilemmas on an everyday basis.

In addition, lawyers are often tainted by the people they defend -- criminals who have committed serious and disreputable crimes.

Lawyers are also over-represented in positions of power and are frequently at the center of corruption and other scandals.

## The Legal Monopoly

In all provinces, there is a statutory framework that prohibits unauthorized persons from engaging in the practice of law.

This prohibition is intended to ensure that clients can be confident that the person they consult has received appropriate training and is answerable to the Law Association.

Although this is intended to protect the public, it also permits the legal profession to maintain its monopoly over the provision of legal services.

Recently, the Law Society of Upper Canada has gained the legal authority to set standards for paralegals and for their accreditation.

## The Canadian Bar Association's Code of Professional Conduct

The code is used to impose a set of ethical standards that lawyers must follow in the practice of law.

Lawyers are viewed as protectors of the public trust and it is important that they act ethically and be of good moral character.

Members of the law profession are key players in the administration of justice and must not do things that undermine public trust in our system of justice. People will not resort to the justice system if they lose confidence in the system.

Compliance with the rules is not an option. It is demanded by the profession and is used as the basis for disciplining and sanctioning its members.

The Code establishes specific behaviors and expectations for lawyers and it is a mix of prohibitive language: "Thou shalt not" and exhortations: "You are encouraged to".

The Code is supposed to benefit both the public and the profession but critics argue that such codes are little more than ethical window-dressing and serve mainly to legitimate that lawyers do.

Generally, the Rule focus on three aspects of a lawyer's role:

1. As a representative of clients

Once lawyers have taken on clients and decided to act as their representatives, they assume a set of special obligations to those persons or organizations.

They must advise their clients about their legal rights and responsibilities, the possible courses of action, and the likely consequences.

They must advocate their clients' position and defend their interests in a vigorous and competent manner.

They must negotiate on their clients' behalf so as to obtain the best possible result.

And they must pursue litigation when appropriate and in a prompt and diligent way.

2. As an officer of the legal system

Lawyers must act within the law and show respect for the legal system and to all the players including judges, juries, clients, witnesses, and other lawyers.

They must make use of legal procedures in a legitimate and non-abusive way.

And they must act at all times in a way that does not bring the administration of justice into disrepute.

3. As a public citizen

These responsibilities are quite vague. Lawyers must seek to ensure that access to the law is made available to as many people as possible, especially the poor and disadvantaged;

They must contribute to the reform and improvement of the legal process;

And they must support efforts to ensure that the legal profession fulfills its civic and public duties.

The Rules are best seen as a rudimentary framework within which lawyers can debate and develop an ethical practice of law.

The main problem with the rules is that they are quite vague and can be interpreted in many ways and may even direct lawyers to act in contradictory ways.

## The Traditional Role of Lawyers -- The Advocate as a Hired Hand

The predominant image of lawyers is that of a professional person who is hired by a client to represent his/her interests.

This "hired hand" image can also be viewed as a theoretical model that guides and justifies what they do and gives lawyers a particular identity.

Cynic have caricatured lawyers as "hired guns" rather than hired hands because they engage in all kinds of vicious battles on behalf of their clients.

The hired hand image is the operating model on which lawyers are trained, under which they function, and is sanctioned by the provincial law societies in their codes of conduct.

This is the traditional image of lawyering and is based on the idea that lawyers are professionals who have acquired specialized knowledge and expertise, which they use on behalf of their clients.

Lawyers see themselves as neutral when it comes to the issues or the law. They will take either side in a dispute and they accept and make use of the law as given.

From this perspective, all clients are citizens who have been victimized and who seek relief and/or vindication.

## The Adversarial System

This traditional view of law has its roots in the adversarial system. The adversary model is the basis of our justice system and involves lawyers doing battle in the courts on behalf of their clients.

The adversary system has its historical origins in trails by ordeal and by battle. Historically, adversaries (or their champions) would compete in a physical contest in the belief that good would triumph over evil and that justice would be served.

There are several characteristics of the adversary system:

1. An aggrieved party initiates the proceedings
2. Both sides may have legal representation
3. Lawyers act on behalf of their clients' best interests
4. Lawyers do battle in court by presenting evidence, making arguments and through cross-examination
5. The judge and/or jury are neutral observers and adjudicators
6. There is a winner and a loser

The rationale for the use of an adversarial system of justice includes several arguments:

1. It facilitates the pursuit and discovery of the truth
2. It protects basic rights and freedoms
3. And it satisfies litigants by giving them their day in court

Critics of the adversarial system argue that:

1. It obscures rather than illuminates truth
2. It foster injustice by allowing the strong or the rich to triumph over the weak and the poor
3. It undermines respect for the judicial system when injustices result and fosters bitterness and cynicism among the public.

It is very costly to use the courts and because of that the system favors the rich over the poor. A client's wealth can have a strong impact on the outcome of legal proceedings.

This means that injustices will result and bring the justice system into disrepute.

Critics argue that many lawyers are unconcerned about justice and are more than willing to sell themselves and their consciences to the highest bidder.

Some critics argue that certain lawyers and law firms consistently defend bad causes and act in an immoral manner. Firms that make millions defending tobacco companies are often condemned for their cause and the tactics used. Lawyers are also criticized because they represent the powerful and thus help keep the poor and minorities poor, subjugated, and powerless.

Tax lawyers are also criticized because they earn a lot of money by advising rich clients on how to get around tax laws.

## Ethical Norms when Dealing With Clients

### Obligations to Clients

Lawyers assume a wide variety of obligations to clients. These include: (1) partisanship, (2) competence, (3) loyalty, (4) candour, (5) pro-action, and (6) confidentiality.

1. Partisanship

In legal terms, the lawyers acts in a fiduciary capacity in relation to client interests.

Because there is an imbalance of power between lawyers and clients, clients have a right to receive a higher standard of attention than other service contracts.

The power imbalance imposes special and exclusive duties on lawyers to act with good faith and loyalty to the client.

Some commentators believe that lawyers have an exclusive obligation to put their client's interest above and beyond those of everyone else and at almost any cost to anyone else.

The Law Society Code prohibits harming third parties and there is an ongoing debate over when the duty of zealous partisanship should give way to the public interest.

2. Competence

Code of professional conduct also require lawyers to be competent and to deliver services "in a conscientious, diligent, and efficient manner".

The standard demanded of lawyers is that expected of "a competent lawyer in a like situation."

Lawyers should only accept cases in their area of expertise and to be up front with their clients about their lack of knowledge and experience in other areas.

It is extremely rare for lawyers to be disciplined for lack of competence. Law Societies are reactive and put little effort in monitoring the competence of lawyers on any regular or serious basis.

It is more common -- but still infrequent  -- for lawyers to be brought to task for disgraceful or dishonorable conduct.

3. Loyalty and Conflicts of Interest

Lawyers must be loyal to their clients and place their client's interests above all else.

Lawyers are prohibited from engaging in conduct that jeopardizes the clients' interests.

They must complete disclosure to clients about conflicting interests that exists or are likely to arise. These include personal or family interests and those of associates.

4. Candour

It is incumbent on lawyers to deal with their clients in an entirely open and honest way. They must provide candid advice and guidance to clients on all legal and professional matters including the merits of the case and the probable outcomes.

5. Pro-activity

It is the lawyer's duty to actively pursue their clients' interests.

They must be pro-active rather than reactive and should pursue their clients' case vigorously even if it involves asking certain distasteful (but necessary) questions.

The Law Society Code cautions lawyers not to let their zeal get the better of them and engage in disreputable practices. Lawyers must represent their clients by fair and honorable means.

They also have a duty to treat the court with respect and courtesy. It is inappropriate to engage in tactics or initiatives that will taint the overall process of the court. Lawyers should not engage in frivolous behavior that will delay proceedings or harass the other side.

Lawyers should not facilitate their clients efforts to deliberately harm another's interests especially if such actions would not improve the situation of their clients.

6. Confidentiality -- The Lawyer-Client Privilege

### The Evidentiary Privilege

Lawyers have a clear and demanding obligation to "**hold in strict confidence**" all information that comes intro their possession while fulfilling their professional duties toward clients.

This duty aries both from the lawyer's contract with the client and the duty placed on lawyers by law and by professional codes.

Confidentiality covers all communications between clients and themselves and lawyers are relieved of this duty only through the client's waiver or the courts' order.

Lawyers cannot divulge information to others nor can they use such information for their own benefit -- even if it will have no detrimental effect on their clients' interests.

Under evidentiary rules, lawyers are entitled and required to keep confidential all communications between clients and themselves that pertain to the giving of legal advice.

Under the law of evidence, communications between lawyers and their clients are privileged and impose on lawyers a duty not to reveal them or use them in any way to the clients' disadvantage.

### The Paul Bernardo Case

Paul Bernardo's first lawyer, Ken Murray, was charged with obstructing justice for removing six videotapes from Bernardo and Karla Homolka's house. The tapes had been hidden in the ceiling of the home and Murray learned about them through Bernardo. The police failed to find them in a 71 day search of the home during which they dismantled the interior.

From his jail cell, Bernardo wrote his lawyer asking him to attend to his house after the police had finished their search and retrieve the tapes. Murray did so in the company of an associate Carolyn MacDonald and a law clerk.

A pact was made at Murray's suggestion that they would not reveal to anyone what they had found. The tapes were later viewed by both Murray and MacDonald and then kept in a safe in his office for 17 months.

The tapes depicted the rapes of two teenage girls and the rapes and torture of Leslie Mahaffy and Kristen French whom Bernardo later killed.

Murray later asked another lawyer, John Rosen, to defend Bernardo at trail but did not immediately inform Rosen of the existence of the tapes.

Murray handed the tapes to Rosen only 17 months after taking them from the house and a month after Rosen had taken over the case. The change in lawyers led to an additional one year delay in the trial.

Rosen handed the tapes over to authorities but it was too late to undo the infamous deal the Crown had already made with Karla Homolka who was allowed to plead guilty to manslaughter and receive a sentence of 12 years in prison in exchange for testifying against Bernardo.

Rosen later testified that when he aw the tapes, he felt an ethical obligation to give them to the police. He stated that he was stunned by what he saw and that the tapes showed clearly that Bernardo was guilty of abduction, unlawful confinement, and aggravated sexual assault on French and Mahaffy. The tapes also showed Homolka taking part in the rapes and torture of the two victims.

The judge in Bernardo's murder trail described the rapes as undescribably horrible. They revealed the two murder victims being forced to participate with Bernardo and Homolka in the grossest sexual perversions. In the course of the sexual assaults they are forced to pretend to be enjoying the experience through scripted dialogue and to smile at the camera. Obedience is obtained through physical assault and Bernardo threatening each of them with death if they do not perform as directed.

Before he handed them over to authorities, Rossen tried to use them as leverage to plea-bargain for a reduced charge of second-degree murder against Bernardo and a chance of parole after 15 years. He told prosecutors that a first-degree murder trial would be "dreadful" and "devastating" to the victims' families and "humiliating to the memory of their children." He said that prosecutors had a good idea of what evidence had been passed on to him by Murray and he warned them "if a picture is worth a thousand words then start multiplying it."

Bernardo was convicted of both murders and sentenced to life imprisonment without the possibility of parole for 25 years.

### Murray's Trail for Obstructing Justice

In his trial for obstructing justice, Murray pleaded solicitor-client privilege. He claimed that he had to wait before turning over the tapes because of a confidential client-solicitor arrangement with Bernardo.

Murray's lawyer argued that clients have a right to attorney loyalty and confidentiality and that Murray was under no legal obligation to hand over the tapes to the police.

At Murray's trial, the judge rejected the contention that solicitor-client privilege allowed Murray to maintain possession of the videotapes. The tapes were dramatic evidence of a crime and pre-existed before the solicitor-client relationship.

While the discussions Murray may have had with Bernardo may been privileged, the tapes themselves were not. The judge ruled that Murray could not use the lawyer-client privilege to defend his actions. Murray was a party to concealing evidence and obstructing justice.

The judge stated that once Murray had viewed tha tapes and learned of their evidentiary value, he had three legal options:

1. Immediately turn over the tapes to the prosecution
2. Deposit them with the trial judge
3. Disclose their existence to the prosecution and prepare to do battle to retain them

The judge found that by retaining the tapes, Murray had in fact obstructed justice. The question remained of intent or mens rea.

Ultimately, the judge accepted the defence's contention that Murray retained the tapes so that he could use them in his client's defence. The judge accepted this defence even though he found it difficult to conceive how the tapes could possible be used to defend Bernardo.

The judge acknowledged that the Law Society of Upper Canada had few guidelines for someone in Murray's position and that even by consulting others, Murray could have been confused over the proper course of action.

The judge reluctantly accepted Murray's contention that he believed that under the circumstances, he had no legal duty to disclose tha tapes until trail and acquitted him of obstruction.

The Law Society of Upper Canada also charged Murray with professional misconduct. Later they withdrew the charge stating that the "The Professional Regulation Committee concluded that the public interest would be better served by clarification of lawyers' professional responsibilities when confronted with such a dilemma than by the continuation of misconduct proceedings against Mr. Murray."

The Committee concluded that the rules were too vague and recommended that a committee be set up to report on issues raised in the case.

### The Role of the Crown Attorney

A Crown Attorney is a representative of the government and is trusted with ensuring that due process occurs. He/she must not proceed with a charge unless there is a "substantial likelihood of conviction."

The Crown decides whether to continue with charges, when to drop them, in what circumstances to accept a plea bargain, what tactics to use at trial, and whether to stay proceedings.

The Crown represents the public's interests and must be fair and impartial. The duty of prosecutors is not to seek convictions, but to seek the truth and ensure that the accused has a fair trail.

Unlike defence counsel, they can only pursue a line of argument they have good reason be believe to be true.

The duty of prosecutors is to present all credible and relevant evidence to the court so "that justice may be done through a fair trail."

The Crown must disclose all relevant evidence as early as possible.

### Critiques of the Legal Profession from a Conflict Perspective

The argument that lawyers treat all clients the same is scoffed at by conflict theorists.

The practice of law is a business and lawyers prefer clients with money.

The poor are often under-represented and overwhelmed in legal cases.

Lawyers make the situation of poorer people worse by representing the interests of the rich.

The types of life problems faced by the poor differ from the problems faced by the more privileged classes.

The lives of the rich are relatively problem free and problems are not systemic. Instead, the privileged classed will face problems only sporadically and will use the legal profession to deal with these occasional bumps in their otherwise smooth life.

The problems faced by the poor in contrast are numerous, continuous, and systemic.

Social, economic and legal problems constitute and define much of their life.

Whereas advantaged clients want their lawyers to use the system to remedy a discrete conflict, poor people want lawyers to change the system so they can escape life's continual round of legal difficulties and bureaucratic hassles.

The practice of law from this perspective is not a neutral exercise. One group wants change the other resists change.

Conflict theorists argue that lawyers are the enlisted custodian of the statue quo.

By pretending otherwise and renouncing responsibility for the system that their actions hold in place, lawyers are able to maintain a false image of themselves as independent and impartial.

Critics further suggest that the practice of law not only prevents meaningful social change that would benefit the poor, it also:

1. Wastes energy and undermines efficiency
2. Fails to involve citizens as democratic participants in the process of change

license: MIT


text:
---
layout: kanji-remain
v4: 2987
kanji: 嶽
keyword: Point [old]
strokes: 17
on-yomi: ガク
permalink: /rtk/嶽/
---

## Koohii stories:

1) [mantixen] 2-8-2009(18): A long time ago the Monkey King was kept in prison under a mountain Point.

2) [blannk] 11-12-2009(8): It's an old point to say that land developers don't always provide full disclosure. Brochures touting the 'New Point', an artificial hill atop the mountain, fail to mention the notorious prison on the Old Point just below.

3) [koohiikun] 17-3-2011(1): The Point [old] is a prison under a mountain where the Dementors are locked away.

4) [kapalama] 8-11-2010(1): Place/People names: 嶽川奈美子 , 嶽六所神社 , 嶽温泉 Point [old] (#2987 嶽) たけ ... Parts: 山 , 獄 prison (#338 獄) ... Similar Keywords: 岡本 Mount (#1961 岡), 山岳 Point (#1330 岳), 嶽 Point [old] (#2987 嶽) ... Story: (using 山 as a intensifier as in 嵐 , etc.) The Old Point guard was forced to retire, got in a barfight, killed a man, and then he got sent to Super Prison.

5) [gfb345] 1-6-2010(1): What's the POINT of dropping a MOUNTAIN on top of a PRISON? (placement) This may have made sense in the old days, but not now.


text:
Mon May 20 16:01:42 PDT 2019

Outline of topics to present at RTG lunch event on 24 May 2019.

- Slides
- Monitoring
- SSH keys
    - one time setup
    - public / private key pair
- SSH login
- `module avail`, `module load` commands

What follows is a standard, reasonable way to do things.
There are plenty of variations and other valid approaches.

- structure of a submission script
    - `#SBATCH is not a comment
- R script content
- Run an R script
    - I can close my terminal and it won't kill the job.
- Parallelism: array jobs are an option
- Manage your code with version control (Git)
- Resources available

repository: clarkfitzg/slurm-example

repo_name: clarkfitzg/slurm-example


text:
# nrex
**NREX**(or nrecs) stands for "**n**ot **r**eally **e**ntity **c**omponent **s**ystem", and is a simple library, meant to implement the "composition-over-intheritance" principle.


text:
# Delivering the example with a canary release using ArgoCD

_NOTE : you have to be into `delivery/ArgoRollout` folder to run the commands below._

## Install Argo Rollout

You can install [Argo Rollouts](https://argoproj.github.io/argo-rollouts/concepts/#concepts) to your cluster by following the [documentation](https://argoproj.github.io/argo-rollouts/installation/#installation).

For your convenience, the installation commands are given below :

```
kubectl create namespace argo-rollouts
kubectl apply -n argo-rollouts -f https://raw.githubusercontent.com/argoproj/argo-rollouts/stable/manifests/install.yaml
```

You can also install the [Argo Rollouts kubectl plugin](https://argoproj.github.io/argo-rollouts/installation/#kubectl-plugin-installation) :

```
curl -LO https://github.com/argoproj/argo-rollouts/releases/latest/download/kubectl-argo-rollouts-linux-amd64
sudo chmod +x ./kubectl-argo-rollouts-linux-amd64
sudo mv ./kubectl-argo-rollouts-linux-amd64 /usr/local/bin/kubectl-argo-rollouts
kubectl argo rollouts version
```

## Create a project

```
kubectl create ns demospace-argo
helm install ph-rollout . -n demospace-argo
```

Check resources :

```
kubectl get all -n demospace-argo
kubectl get rollouts.argoproj.io -n demospace-argo
```

A `Rollout` resource has been deployed along with the other resources of the chart.
A copy of the `Rollout` resource is visible at `./sample/rollout.yaml`

## Find our current rollout with the command line

```
kubectl argo rollouts list rollouts -n demospace-argo
```

## Watch the current rollout on the command line

Keep the following command running in a separate terminal to follow the rollout evolution :

```
kubectl argo rollouts get rollout ph-rollout-podtatohead-demo  -w -n demospace-argo
```

## Update the release in the values file

```
helm upgrade ph-rollout . -n demospace-argo --set image.tag=v0.1.2
```

Look at the rollout watched in the other terminal : a canary is started and paused, as defined in the rollout yaml definition.
To continue, you will have to promote it manually on the next step.

## Manually promote the rollout after the first canary steps

```
kubectl argo rollouts promote ph-rollout-podtatohead-demo -n demospace-argo
```

Observe the rollout evolution to progressively switch from the current revision to the new revision, by adjusting the pods in the two replicasets and routing the traffic from one to the other.
Once the rollout is finished, the revision 2 is stable, and the revision 1 is scaled down to 0.

_Note: In a GitOps spirit, our rollout manifest should of course be saved in your git repository to be synchronized by ArgoCD of Flux !_

repository: ZeBidule/podtato-head

branch_name: refs/heads/main

repo_name: ZeBidule/podtato-head


text:
## Dionysus & Company
## All natural Hair Care Products

![Animated GIF-downsized_large](https://user-images.githubusercontent.com/59499644/92282107-a3f48a80-eec2-11ea-9ecc-57843db513df.gif)

![dionysus](https://user-images.githubusercontent.com/59499644/92282203-c9819400-eec2-11ea-8bd1-13f8ce1bc411.jpg)

### Users can view information about the company as well as view products and make purchases. Users are encouraged to leave a testimonial about their personal experience with each product that they have used.

## Deployed App https://arandall88.github.io/Dionysus/
### Support Black Owned Businessess


text:
This is for releasing the source code of the IEEE TDSC 2021 paper "Design and evaluation of a multi-domain Trojan detection method on deep neural networks".

If you find it is useful and used for publication. Please kindly cite our work as:

```
@article{gao2019design,
  title={Design and evaluation of a multi-domain Trojan detection method on deep neural networks},
  author={Gao, Yansong and Kim, Yeonjae and Doan, Bao Gia and Zhang, Zhi and Zhang, Gongxuan and Nepal, Surya and Ranasinghe, Damith C and Kim, Hyoungshick},
  journal={IEEE Transactions on Dependable and Secure Computing},
  year={2021}
}
```
## STRIP-ViTA
This work corroborates a run-time Trojan detection method exploiting STRong Intentional Perturbation of inputs, is a multi-domain Trojan detection defence across Vision, Text and Audio domains---thus termed as STRIP-ViTA. Specifically, STRIP-ViTA is the first confirmed input-agnostic Trojan detection method that is effective across multiple task domains and independent of model architectures.


text:
---
title: Church Hymnal 1941 - 171-180
metadata:
    description: |
        Church Hymnal 1941 - 171-180
    keywords:  |
        Church Hymnal 1941, adventhymnals, advent hymnals, 171-180
    author: Brian Onang'o
---

#### Advent Hymnals
## Church Hymnal 1941 - 171-180

# Index of Titles
# | Title
-- |-------------
171|[There Is a Name I Love](/church-hymnal/101-200/171-180/There-Is-a-Name-I-Love)
172|[Come, Sound His Praise](/church-hymnal/101-200/171-180/Come,-Sound-His-Praise)
173|[O Brother, Be Faithful](/church-hymnal/101-200/171-180/O-Brother,-Be-Faithful)
174|[Come, Lord, and Tarry Not](/church-hymnal/101-200/171-180/Come,-Lord,-and-Tarry-Not)
175|[Awake, Ye Saints](/church-hymnal/101-200/171-180/Awake,-Ye-Saints)
176|[Lo! He Comes](/church-hymnal/101-200/171-180/Lo!-He-Comes)
177|[The Church Has Waited Long](/church-hymnal/101-200/171-180/The-Church-Has-Waited-Long)
178|[In the Sun, and Moon, and Stars](/church-hymnal/101-200/171-180/In-the-Sun,-and-Moon,-and-Stars)
179|[He Reigns! the Lord, the Saviour, Reigns](/church-hymnal/101-200/171-180/He-Reigns!-the-Lord,-the-Saviour,-Reigns)
180|[Watchman, Tell Me](/church-hymnal/101-200/171-180/Watchman,-Tell-Me)

repository: GospelSounders/adventhymnals

repo_name: GospelSounders/adventhymnals


text:
image-reader
============

Allow you to control and switch an image source to play as a MovieClip.

Installation
============

```
npm install -S image-reader
```

How to use
==========

```javascript
var ImageReader = require('image-reader');

var reader;

// preload all your images, then

reader = new ImageReader([
	'/media/img1.jpg',
	'/media/img2.jpg',
	'/media/img3.jpg',
	'/media/img4.jpg',
	'/media/img5.jpg'
]);

anim();

function anim() {

	requestAnimationFrame(anim);

	reader.update();
}
```

Documentation
=============

### Constructor

```javascript
new ImageReader(images[, options]);
```

#### images `Array[String]`
The image urls that are going to be switched. Preloading them will avoid flickering.

---

### Options

#### autoplay `Boolean` `true`
Start playing immediately when instanciated

#### el `Image` `null`
The targeting image element. If not provided, one will be created and must be inserted, accessible through `el` property.

#### fps `Number` `30`
FPS of the animation

#### from `Number` `0`
Starting url, indexed from the array you pass at constructor.

#### loop `Boolean` `false`
Loop when it reaches `to` value

#### onComplete `Function` `null`
Called when the animation complete. Does not work if repeat is set.

#### onRepeat `Function` `null`
Called at each repeat

#### onRepeatComplete `Function` `null`
Called when the animation has played all repeat

#### repeat `Number` `0`
How many time the animation should repeat

#### retina `Boolean` `false`
If true, the created image (if no one was provided) would be styled with `width` and `height` divided by 2

#### reverse `Boolean` `false`
If `true`, animation will be played in reverse side

#### to `Number` `null`
Frame to stop the animation, indexed from the array you pass at constructor.

---

### Methods

#### update([force])
Update the current image src according to `fps`. This method has to ba called by your own in a raf.
- **force** `Boolean` `false` : If `force` is set to `true`, FPS will be ignore and current src will be updated

#### play()
Start playing from last known position

#### pause()
Pause at current position

#### stop()
Stop playing and set current position to `from` value

#### reverse([side])
Switch playing side, optionaly forcing it
- **side** `Boolean` `null` : Switch playing side. If side is set to `true`, normal side will be forced; `false` will force reverse.

#### goFromTo([from, to])
`from` or `to` can be omitted.
- **from** `Number` : Set starting frame and go to it
- **to** `Number` : Set ending frame

#### goToAndPlay(frame)
- **frame** `Number` : Move cursor to `frame` and start playing

#### goToAndStop(frame)
- **frame** `Number` : Move cursor to `frame` and stop playing

#### destroy()
Stop playing and remove image element from the DOM

---

### Properties

###### Getters

#### el `Image`
Return the targeting image element. If no `el` was given to the constructor, you will have to add this to your page.

#### current `Number`
Return the current frame, index0 based

#### total `Number`
Return images array length

###### Setters

#### fps `Number`
FPS of the animation

#### loop `Boolean`
Loop when it reaches `to` value

#### repeat `Number`
How many time the animation should repeat

#### onComplete `Function`
Called when the animation complete. Does not work if repeat is set.

#### onRepeat `Function`
Called at each repeat

#### onRepeatComplete `Function`
Called when the animation has played all repeat

---

Browser compatibility
---------------------

If relies on `performance.now()`. You could need a polyfill for IE9
- `perfnow` polyfill installation with `npm install -S perfnow`

Contribute
----------

First you should install [EditorConfig](http://editorconfig.org/) package in your code editor. Then,

```
cd .git/hooks
ln -s ../../hooks/pre-commit

npm install
```

Then 2 commands are available :
- `npm run watch` watch and build js files
- `npm run build` clean, build and uglify js files

repository: arthurmchr/image-reader

repo_name: arthurmchr/image-reader


text:
# Drawing

The drawing API is used to draw primitives. It can be used for debugging or as part of an experience.

## Registration and Filtering

```javascript
var drawing = require('drawing');

// this is part of my experience
drawing.register('ex', function(ctx) {
    //
});

// this is another part of my experience
drawing.register('ex.touch', function(ctx) {
    //
});

// this is for debugging!
drawing.register('debugging', function(ctx) {
   	//
});
```

> The `filter` method will include every drawing method registered that *starts with* the specified string.

```javascript
debug.filter(''); // render everything
debug.filter('ex'); // render all functions that start with "ex"
debug.filter('ex.touch'); // render all functions that start with "ex.touch"
```

To start rendering with the drawing API, register a function. This function will be called every frame until unregistered. This function is registered with a category that defines when the function will be used. The category can be used later to filter out different drawing methods.

## Context

```javascript
drawing.register('ex', function(ctx) {
    ctx
    	.stroke(0, 0, 1)
    	.line(vec3(0, 0, 0), vec3(1, 0, 0));
});
```

Each registered function will be called with a drawing context. This context object has many useful properties for debugging or creative coding. Each function on the context returns the context so that calls may be chained together.

## Matrices

> Make the existing matrix an identity matrix.

```javascript
resetMatrix()
```

> Push a new identity matrix onto the stack.

```javascript
pushMatrix()
```

> Get rid of the current matrix and pop the previous one off the stack.

```javascript
popMatrix()
```

Before drawing, it's important to understand the matrix stack. This stack is used to transform primitives that are drawn. The current matrix transformation with be applied to any subsequent drawing calls.

Each time a registered callback is called, the stack will be cleared and the current matrix will be reset.

## Building a Matrix

```javascript
ctx
	.rotate(Math.PI, 0, 0)
	.translate(0, 0, 1)
	.translate(0, 1, 0)
	.scale(1, 2, 2);
```

Building a matrix sounds hard but it's been made quite simple by the translation, rotation, and scale methods. These methods immediately transform the current matrix.

## Drawing Properties

```javascript
stroke(col4(1, 0, 0, 1))
stroke(r, g, b)
stroke(r, g, b, a)
```

Currently the only supported property is line color. The `stroke` methods set the color that all primitives will be drawn with.

## Lines

> The `line` functions draw a line from a start point to end point.

```javascript
line(vec3(0, 0, 1), vec3(0, 0, 0))
line(0, 0, 1, 0, 0, 0)
```

> `lines` draws an array of line segments. These line segments must be specified with beginning and end.

```javascript
lines([
    vec3(0, 0, 0), vec3(0, 0, 1),
    vec3(0, 0, 0), vec3(0, 1, 0),
    vec3(0, 0, 0), vec3(1, 0, 0)
])
```

> `linestrip` is useful for chains rather than segments. Instead of each line segment needing two points, each point draws a line to the next.

```javascript
linestrip([
    vec3(0, 0, 0), vec3(1, 0, 1), vec3(0, 1, 0)
])
```

Lines may be drawn using one of the three types of `line` methods.

## 3D Primitives

> Draw a wire box.

```javascript
var width = 10,
    height = 7,
    depth = 5,
    size = 20;
ctx.box(width, height, depth);
ctx.box(size);
```

> Draw a unit sphere with configurable smoothness. Use matrices to scale. The smoothness parameter passed into `sphere` uses a subdivision method to construct the sphere geometry. In general a value higher than 2 or 3 will never be necessary as the number of vertices doubles each time.

```javascript
// default quality
ctx.sphere();

// higher quality
ctx.sphere(1);
ctx.sphere(2);
ctx.sphere(3);
```

> Draw an octohedron.

```javascript
ctx.octohedron();
```

> Draw a dodecahedron.

```javascript
ctx.dodecahedron();
```

Several types of 3D primitives are supported as well.

## Triangles

```javascript
var verts = [];
var triangles = [];

// construct the geo in some way
constructGeo(verts, triangles);

ctx.triangles(verts, triangles);
```

When drawing custom 3D shapes, it's best to use the `triangles` API rather than iterating and drawing triangles in JavaScript.

repository: enklu/enkluplayer-jsapi-docs

gha_license_id: NOASSERTION

repo_name: enklu/enkluplayer-jsapi-docs


text:
## What's dbudwm UWP app?
This app is an experiment of mine to work with the 'new' Microsoft Universal Platform ecosystem.
This approach should allow to write an app once and deployed it to the desktop, tablet, phone, console and IoT devices. Sounds nice, ain't it?
for this example I focused exclusively on the smartphone.

## How it looks

## Features
* List latest dbudwm articles
* Shows a neat thumbnail image
* Allows to share interest articles via the  Windows 10 share menu (not working)

## Planned features
* 100% functional
* Additional platforms like desktop or IoT
* whatever it be might ...

## How to run
1. Use Windows 10 as the host operating system
1. Install Visual Studio 2015 or later
1. Clone repository
1. Open `*.sln` file
1. Deploy it to a test device or to an emulator of your choice

## Other platforms
* [iOS Version of the dbudwm app](https://itunes.apple.com/de/app/der-bayer-und-der-wurschtlmann/id1052855779?l=en&mt=8)

## License
The App is licensed under [MIT](https://en.wikipedia.org/wiki/MIT_License) License.

repository: tscholze/dotnet-dbudwm-blog-mobile-app

repo_name: tscholze/dotnet-dbudwm-blog-mobile-app


text:
### Responses

Each route must return a Response object,
the protocol will use these objects to encode the HTTP response and
send through the socket.

There are many different response types but they all inherit from
the base Response class.

Bellow there are the most important ones:

### JSON Response

Automatically dumps Python objects and adds the correct headers to match the JSON format.

```py
from vibora import Vibora, JsonResponse

app = Vibora()

@app.route('/')
async def home():
    return JsonResponse({'hello': 'world})
```

### Streaming Response

Whenever you don't have the response already completely ready,
be it because you don't want to waste memory by buffering,
be it because you want the client to start receiving the response as soon as possible,
a StreamingResponse will be more appropriate.

**A StreamingResponse receives a coroutine that yield bytes.**

Differently from simple responses, streaming ones have more timeout options
because they are often long running tasks.
Usually a route timeout works until the client consumes the entire response
but with streaming responses this is not true.
After the route return a StreamingResponse two new timeouts options take its place.

> **complete_timeout: int**: How many seconds the client have to consume the **entire** response.
So if you set it to 30 seconds the client will have 30 seconds to consume the entire response,
in case not, the connection will be closed abruptly to avoid DOS attacks.
You may set it to zero and completely disable this timeout,
when chunk_timeout is properly configured this is a reasonable choice.

> **chunk_timeout: int**: How many seconds the client have to consume each response chunk.
Lets say your function produces 30 bytes per yield and the chunk_timeout is 10 seconds.
The client will have 10 seconds to consume the 30 bytes, in case not, the connection will be closed abruptly to avoid DOS attacks.

```py
import asyncio
from vibora import Vibora, StreamingResponse

app = Vibora()

@app.route('/')
async def home():
    async def stream_builder():
        for x in range(0, 5):
            yield str(x).encode()
            await asyncio.sleep(1)

    return StreamingResponse(
           stream_builder, chunk_timeout=10, complete_timeout=30
    )
```

### Response

A raw Response object would fit whenever you need a more
customized response.

```py
from vibora import Vibora, Response

app = Vibora()

@app.route('/')
async def home():
    return Response(b'Hello World', headers={'content-type': 'html'})
```

repository: PranayJain/vibora

gha_license_id: MIT

repo_name: PranayJain/vibora


text:
Iiwa Bi-Manual Manipulation Example : Box Rotation
==================================================

The following instructions assume Drake was
[built using bazel](http://drake.mit.edu/bazel.html?highlight=bazel).

Prerequisites
-------------

Ensure that you have installed the drake visualizer with
```
bazel build //tools:drake_visualizer
```

Ensure that you have built the iiwa controller with
```
bazel build //drake/examples/kuka_iiwa_arm:iiwa_controller
```

Ensure that you have built the box rotation demo with
```
bazel build //drake/examples/kuka_iiwa_arm/dev/box_rotation/...
```

All instructions assume that you are launching from the `drake`
workspace directory.
```
cd drake
```

Basic IIWA Box Rotation Simulation
----------------------------------

Launch the visualizer
```
bazel-bin/tools/drake_visualizer
```

### To run the demo using terminals
Start three terminals from Drake's home directory. Then
execute:

tty1:

```
$ ./bazel-bin/examples/kuka_iiwa_arm/dev/box_rotation/iiwa_box_simulation
```

tty2:
```
$ ./bazel-bin/examples/kuka_iiwa_arm/iiwa_controller --interp_type FOH --urdf examples/kuka_iiwa_arm/dev/box_rotation/models/dual_iiwa14_primitive_sphere_visual_collision.urdf
```
Note the ```gflag``` option ```--interp_type FOH```. This specifies a first-order hold
interpolation scheme for the piece-wise polynomial joint position source. The
box rotation demo does not currently work with other interpolation types.

tty3:
```
$ ./bazel-bin/examples/kuka_iiwa_arm/dev/box_rotation/box_rotation_demo
```

### To run the demo using `procman`
Simply run `./run_procman.sh`. This shell script assumes the existence of
the environment variables `DRAKE_WORKSPACE` and `PROCMAN_PATH`.
See `run_procman.sh` for more info.

repository: osrf/drake-release

repo_name: osrf/drake-release


text:
---
layout: default
---

# 1998-11-12 - Re: IP: Clinton Wants Loophole In U.S. Free Speech Closed

## Header Data

From: b!X<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 92b728c49018258eb59a6a1e3b62faf52b65d4b95e4d3fb87ca04c868cd80221

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1998-11-12 00:50:43 UTC

Raw Date: Thu, 12 Nov 1998 08:50:43 +0800

## Raw message

```
{% raw  %}From: b!X<EMAIL_ADDRESS>Date: Thu, 12 Nov 1998 08:50:43 +0800
To<EMAIL_ADDRESS>Subject: Re: IP: Clinton Wants Loophole In U.S. Free Speech Closed
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

On Wed, 11 Nov 1998, Declan McCullagh wrote:

# Without endorsing Tim's "need killing" views, I would like to point out
# that Mr. b!X has a deeply flawed understanding of the Second Amendment and
# constitutional history.

Which would in no way affect the fact that it's asinine to try and use the
First Amendment to make a point about the Second Amendment (as the parody
does) because they are approached in entirely different ways to address
entirely different things.

Which was my central point.

- b!X (Guerrilla Techno-fetishist @ GEEK Force)

{% endraw %}
```

## Thread

+ Return to [November 1998](/archive/1998/11)

+ Return to "[b!X <bix@geekforce.org>](/authors/bx_bix_at_geekforce_org_)"
+ Return to "[Declan McCullagh <declan@well.com>](/authors/declan_mccullagh_declan_at_well_com_)"
+ Return to "[Reeza! <howree@cable.navy.mil>](/authors/reeza_howree_at_cable_navy_mil_)"
+ Return to "[Tim May <tcmay@got.net>](/authors/tim_may_tcmay_at_got_net_)"
+ Return to "["Vladimir Z. Nuri" <vznuri@netcom.com>](/authors/vladimir_z_nuri_vznuri_at_netcom_com_)"

+ 1998-11-10 (Wed, 11 Nov 1998 06:09:58 +0800) - [IP: Clinton Wants Loophole In U.S. Free Speech Closed](/archive/1998/11/ec50695df97dfcf99e686b702b830890d9f93e318166c6d41d27fe601fc05b9a) - _"Vladimir Z. Nuri"<EMAIL_ADDRESS>  + 1998-11-11 (Wed, 11 Nov 1998 11:49:38 +0800) - [Re: IP: Clinton Wants Loophole In U.S. Free Speech Closed](/archive/1998/11/aedddeaf6c680c453e1a410ae5acf29f542ed8e886e3fac32556529f6a78dfa1) - _b!X<EMAIL_ADDRESS>    + 1998-11-11 (Wed, 11 Nov 1998 21:44:25 +0800) - [Re: IP: Clinton Wants Loophole In U.S. Free Speech Closed](/archive/1998/11/a50b8976e29a694f389b7e7eae79e85d6558cc7d575c956fcaaee70d0f7f7f25) - _Declan McCullagh<EMAIL_ADDRESS>      + 1998-11-12 (Thu, 12 Nov 1998 08:50:43 +0800) - Re: IP: Clinton Wants Loophole In U.S. Free Speech Closed - _b!X<EMAIL_ADDRESS>  + 1998-11-11 (Wed, 11 Nov 1998 12:56:19 +0800) - [Re: IP: Clinton Wants Loophole In U.S. Free Speech Closed](/archive/1998/11/a19f56c905ae306262bff77a6f43a9a6552229736a81acf53a888825f17053f4) - _Tim May<EMAIL_ADDRESS>  + 1998-11-11 (Wed, 11 Nov 1998 16:47:00 +0800) - [Re: IP: Clinton Wants Loophole In U.S. Free Speech Closed](/archive/1998/11/7ee99657c6aaa25fa8b0818c3a99f1da6f93999eadfee69d15c9ad8eb0c12edb) - _Reeza<EMAIL_ADDRESS>    + 1998-11-11 (Wed, 11 Nov 1998 21:44:59 +0800) - [Re: IP: Clinton Wants Loophole In U.S. Free Speech Closed](/archive/1998/11/24ee32c47975008198562f9ed98ed4f891045ca45dd4c442480305135e698b43) - _b!X<EMAIL_ADDRESS>    + 1998-11-11 (Wed, 11 Nov 1998 23:42:04 +0800) - [Re: IP: Clinton Wants Loophole In U.S. Free Speech Closed](/archive/1998/11/2069b4e2bc6776ea7e8103eef2147a3cef7aa0de4e8d5fff7a8e0d760f4ba2c2) - _Reeza<EMAIL_ADDRESS>


text:
Backup and Restore Plugin for CakePHP
=====================================
Version 1.0 for cake 2.x

This backup and restore plugin enables developers to quickly and easily backup and restore both database schema and data based on backup dates.

As you develop your application, changes to the database need to be managed in a consistent and easy manner, especially in a team environment where different people bring in different changes and this can get extremely difficult at times. Backup and restore enables you to share and co-ordinate database changes as well as data in a manageable fashion distributed using git itself, hence significantly removing the complexity of handling these changes (no more phpmyadmin for database updates). We have used backup and restore Plugin in production environments with multiple backups and for database roll-outs for fast deployments, without any hiccups. However, in the event we have missed a scenario we cannot be held responsible for any data loss, use this at your own risk. Said that we would love to fix any bug found by you! :)

Installation
=============

* Unzip or clone this plugin into your app/Plugin/Backups folder or the shared plugins folder for your CakePHP installation.
* Add the plugin to your app/Config/bootstrap.php using CakePlugin::load('Backups')

Usage
======

Backups
-------
* In your cakePHP application root folder (in a terminal) execute

	./app/Console/cake Backups.backup

It will backup all the tables in the database and zip (if ZipArchive exits!)
the backup files are stored in ./app/Backups

![Backup](https://lh3.googleusercontent.com/-zPRwqzgjb7s/ULVo939aa3I/AAAAAAAACYQ/e85juiba1zg/s400/Selection_067.png)

Restoring
----------
* In your cakePHP application root folder (in a terminal) execute

	./app/Console/cake Backups.backup restore

It will prompt you all available backup versions with date and time, just type a corresponding version (eg: 0) and hit enter

![Restore](https://lh5.googleusercontent.com/-O7FI-eLyiWc/ULVVtVhCmtI/AAAAAAAACXk/LNerKNlBQc8/s400/Selection_068.png)

Troubleshooting
----------------
* In case of any errors that is not predicted in the script you can always (manually) restore from one of the backup.

Notes
------
* The database user (in cakephp database config) must have rights to drop tables for restore to work! As the restore process drops the tables and restore them one by one.

Requirements
==============
PHP version: PHP 5.2+
CakePHP version: 2.1

Support
=========
For support and feature request, please create an issue:
https://github.com/Maldicore/Backups/issues

ToDo List
==========
* UnitTesting
* Settings to choose datasource and output directory

Contributing to this Plugin
=============================
Please feel free to contribute to the plugin with new issues, requests, unit tests and code fixes or new features. If you want to contribute some code, create a feature branch and send us your pull request.

License
Copyright 2012, Maldicore Group Pvt Ltd

Licensed under The MIT License: http://www.opensource.org/licenses/mit-license.php
Redistributions of files must retain the above copyright notice.

Copyright
==========
Copyright 2012
Maldicore Group Pvt Ltd
G. Reethimaage Aage
Male', Republic of Maldives
http://maldicore.com


text:
---
description: Monitoring and metrics
---

# Use metrics to monitor performance

Enable the [Prometheus](https://prometheus.io/) monitoring and alerting service for
Teku metrics using the [`--metrics-enabled`](../../Reference/CLI/CLI-Syntax.md#metrics-enabled)
option.

## Install Prometheus

To use Prometheus with Teku, install the
[Prometheus main component](https://prometheus.io/download/). On MacOS, install with
[Homebrew](https://formulae.brew.sh/formula/prometheus):

 ```bash
 brew install prometheus
```

## Setting up and running Prometheus with Teku

To configure Prometheus and run with Teku:

1. Configure Prometheus to poll Teku. For example, add the following YAML fragment to the
   `scrape_configs` block of the `prometheus.yml` file:

    !!! example "Example configuration"

        ```yml
        global:
          scrape_interval: 15s
        scrape_configs:
          - job_name: "prometheus"
            static_configs:
            - targets: ["localhost:9090"]
          - job_name: "teku-dev"
            scrape_timeout: 10s
            metrics_path: /metrics
            scheme: http
            static_configs:
            - targets: ["localhost:8008"]
        ```

1. Start Teku with the
   [`--metrics-enabled`](../../Reference/CLI/CLI-Syntax.md#metrics-enabled) option. To start a
   node for testing with metrics enabled:

     ```bash
     teku --eth1-deposit-contract-address=dddddddddddddddddddddddddddddddddddddddd \
     --eth1-endpoint=http://localhost:8545 --validators-key-file=validator_keys \
     --p2p-port=9000 --rest-api-enabled=true --rest-api-docs-enabled=true \
     --metrics-enabled=true --metrics-categories=BEACON,PROCESS,LIBP2P,JVM,NETWORK,PROCESS
     ```

     To specify the host and port on which Prometheus accesses Teku, use the
     [`--metrics-interface`](../../Reference/CLI/CLI-Syntax.md#metrics-interface) and
     [`--metrics-port`](../../Reference/CLI/CLI-Syntax.md#metrics-port) options. The default host
     and port are <IP_ADDRESS> and 8008.

1. In another terminal, run Prometheus specifying the `prometheus.yml` file:

    ```bash
    prometheus --config.file=prometheus.yml
    ```

1. View the [Prometheus graphical interface](#view-prometheus-graphical-interface).

!!! tip
    Use a log ingestion tool, such as Logstash, to parse the logs and alert you to configured
    anomalies.

## View Prometheus graphical interface

1. Open a web browser to `http://localhost:9090` to view the Prometheus graphical interface.

1. Choose **Graph** from the menu bar and click the **Console** tab below.

1. From the **Insert metric at cursor** drop-down, select a metric such as
   `libp2p_peers` or `beacon_finalized_epoch` and click **Execute**. The
   values display.

    !!! note
        The available metrics are prefixed with the category type specified using
        [`--metrics-categories`](../../Reference/CLI/CLI-Syntax.md#metrics-categories).

        The [Ethereum 2.0 specification] lists the minimum set of metrics implemented by
        beacon chain clients.

Click the **Graph** tab to view the data as a time-based graph. The query string displays below
the graph.

## Visualize collected data

Use
[Grafana] to visualize the collected data. See the sample
[Teku Grafana dashboard](https://grafana.com/grafana/dashboards/13457).

<!-- Links -->
[Ethereum 2.0 specification]: https://github.com/ethereum/eth2.0-metrics/blob/master/metrics.md
[Grafana]: https://grafana.com/docs/grafana/latest/guides/getting_started/


text:
https://github.com/CommonAccord/Agt-NDA-CmA

NDA based originally on a CooleyGo form (with permission but without endorsement). It has been significantly modified.

The sections (in /Sec/) have common-sense names.  There are a number of alternative provisions that show some ways to create and share alternatives.

This repo is also mounted as part of commonaccord.org - with demos of completed NDAs at http://commonaccord.org/index.php?action=list&file=G/Agt-NDA-CmA/Demo/.

DEPENDENCIES:

Agt-Form-CmA
CmA_Z

repository: CommonAccord/Cmacc-Org

gha_language: CSS

repo_name: CommonAccord/Cmacc-Org


text:
# zotero_to_orgmode
Zotero translator allowing copy paste references into org-mode for annotation

## Usage
The `Zotero_to_Orgmod.js` file is a small translator for zotero. When in the Zotero preferences, Zotero to Orgmode is selected in the quick copy menu, it allows copying references which may then be pasted into an org-mode document.

I am using this to add noted behind the entry and keep track of reading notes.

Formatting is copied from the format of org-ref [notes](https://github.com/jkitchin/org-ref/blob/master/org-ref.org#setting-up-notes-to-work-with-multiple-notesorg-files)

## Installation
Place the `Zotero_to_Orgmod.js`file in the `Zotero/translator` folder. To find the folder location see [The Zotero Data Directory](https://www.zotero.org/support/zotero_data).

## Example
Here is the result of pasting this [paper](https://www.nature.com/articles/d41586-019-00857-9) into an org-mode file after it was imported into my Library:

```org
** Amrhein | 2019 | Scientists rise up against statistical significance | Nature [2019-05-30 22:19]
:PROPERTIES:
 :Custum_ID: amrhein2019
 :TITLE: Scientists rise up against statistical significance
 :AUTHORS: Amrhein, Greenland, McShane,
 :JOURNAL: Nature
 :YEAR: 2019
 :VOLUME: 567
 :PAGES: 305
 :TYPE: journalArticle
 :DOI: doi:10.1038/d41586-019-00857-9
 :URI: http://zotero.org/users/xxxxxxx/items/XXXXXXXXX
 :URL: http://www.nature.com/articles/d41586-019-00857-9
 :ABSTRACT: Valentin Amrhein, Sander Greenland, Blake McShane and more than 800 signatories call for an end to hyped claims and the dismissal of possibly crucial effects.
 :FILES: file:/path/to/file/amrhein_2019_nature.pdf ;
:END:
Here come my notes
```


text:
---
templateKey: blog-post
title: Python Automation Workshop
date: 2019-08-20T12:33:31.974Z
author: CodeCell - Bhuvnesh, Tejas
description: A workshop to commence an era of automated tasks
featuredpost: false
featuredimage: /img/pythonatuomationbanner.png
tags:
  - python
  - automation
---
![](/img/pythonatuomationbanner.png)

<!--StartFragment-->

**Automation** being at the heart of **[KJSCE Codecell](http://kjscecodecell.com/)**, a workshop on the same topic was inevitable. What better way to start a year! Automation is important in the software world because it reduces human effort, improves productivity and quality while decreasing human error.

Various libraries like BeautifulSoup, Selenium, requests, CSV, SMTPlib, PIL, etc. make python favorable for writing scripts for automating various repetitive tasks. There is also an added fun to automation since it allows you to fool around with your friends by spamming their emails and freaking them out.

To demonstrate how effective and practical automation is, we employed it in the actual registration process for our workshop to draw attention to how cool and interesting automation actually is. We made our own website that employed the skills of automation.

> automate.kjscecodecell.com was an example of how the registration process can be done without any human intervention.

<!--EndFragment-->

![Automate with Python](/img/pic-2.png)

<!--StartFragment-->

The system was such that the attendee had to go to the registration website where a terminal was displayed in which all the important details were to be entered. On successful registration, an automated mail was sent to the attendee along with a generated pass and details of the workshop. This entire process was automated without any human intervention (except for writing the code and removing bugs). People were intrigued by these features and we believe it led to an increase in registrations. Soon, we had more than 200 registrants from our college as well as from colleges all across Mumbai.

All paths are filled with obstacles and for us, with the weather on the day of action being the biggest. Our workshop was scheduled to start on 27th July at 10 am and on that very day, it was pouring heavily since morning and an orange alert was declared throughout Mumbai. Calls started pouring in and we had no choice but to postpone the workshop. The CodeCell team was very reluctant to take this decision and we were deeply saddened by it. But the safety of our participants and team members was most important so it had to be done.

The workshop was postponed to Saturday, 3rd August. Registrations were also reopened. A few who had registered before dropped out but we still had a good number of participants. The team was in good spirits. We were going to come back stronger this time.

On 3rd August too, the weather was not our closest friend. It was just as bad as (if not worse than) the Saturday before. But the CodeCell team took the tough decision to go ahead with the workshop, because finding another date seemed unlikely and because we were doing it for the people and it just felt right. In spite of the heavy rains and transportation problems, around 70 people attended our workshop. While the number was much less than the people who had originally registered, the team was still delighted by this response and we were determined to do our best. We were grateful to all enthusiasts who braved the harsh weather that day to attend our workshop.

The workflow of the workshop was the process of registration itself. We had a similar registration process during our last Bootcamp a few months back and the participants were very curious about how it was implemented and hence we decided on this workflow as the participants had also been through this process and would really have the wow effect after actually understanding the entire working of the system.

<!--EndFragment-->

![Workshop in progress](/img/pic-3.jpeg "Workshop in progress in the lab B215")

<!--StartFragment-->

We first introduced the entire workflow of what we were going to do that day and explained to them the importance of automating every task and why various modules were required.

The workshop flow consisted of the following topics:

1. Web scraping using beautiful soup
2. Interacting with files and folders (CSV format)
3. Templating
4. Working with images and PDF (PIL)
5. Emailing using SMTPLIB
6. Cronjobs

The participants were initially acquainted with Ubuntu and working with the terminal etc. they were made to install the python packages like pip(python package installer). For scraping, python’s BeautifulSoup and requests libraries were introduced. Different concepts of HTML like divisions classes, id and different types of requests like GET and POST were briefly explained. The hierarchical structure created using the soup object was explained. Thus after a proper understanding of the task, we commenced by scraping a [website](http://scrape.kjscecodecell.com/) made by us with details(name, dob, email, phone no., city, payment) of a few people that was updated at regular intervals using cronjob. Hence, the first module was finished.

The details scraped from the website had to be stored in a structured format such as CSV, JSON, XML, etc. We began with the second module which consisted of working and handling of CSV(Comma-separated values) files. They were first taught the importance of structured format and how it helps to increase our efficiency they were made to use the built-in “CSV” library of python. Then some sample data was given to read and write the data from CSV files. After getting acquainted with the CSV library they converted the scraped details into CSV file. Thus module 2 was done.

Thus two modules were covered and a lunch break was given.

We resumed with the workshop after a short break beginning with Templating (Jinja2). Jinja 2, a templating engine was introduced to the participants which consisted of the syntax of how it will help in our task with the help of various examples. Jinja was required for templating the content in the emails that were going to be sent. Thus the templating concept was included in our task after a fruitful 45 mins experience by exploring the conditional and looping statements.

PIL (python imaging library) is a python library used for editing images and posters. Thus, with understanding PIL we began with the next module. It was rather a short module as compared to others as it included the basic standard things of how to draw and write on images using PIL. The passes generated for each participant that was sent via emails were generated using PIL.

The final task involved sending mail to the registered people the participants were made familiar with MIME (Multipurpose Internet Mail Extension) which is a python library used for formatting the content of the mail that included the template created by Jinja and the pass generated using PIL. This formatted content of the email needed to be sent. The SMTP protocol was taught which is used for sending these emails. Thus, the script was written by the participants for formatting the content and sending the emails using MIME and SMTP.

Since this was for learning and testing purposes we used YOPmail. It provides a number of disposable email ids. It’s always a good practice to find such testing services before actually deploying it on a large scale.

One final script was written by the participants that connected all modules with each other. Thus, all the modules were connected and the process was concluded.

<!--EndFragment-->

![](/img/pic-4.jpeg)

<!--StartFragment-->

In the evening, we reached one last and a small part of the workshop i.e Cronjobs. Cronjobs are used to schedule tasks thus we can schedule the mails sent to registered people in the tasks using it after a certain fixed amount of time

Cron has a very unique format of date-time for scheduling tasks. Hence, the script that connected all the modules was scheduled using Cron.

Thus with cronjobs, all the different modules were covered and the codes corresponding to different modules were combined and the task was completed.

We saw enthusiastic participation from all the attendees throughout the 6-hour workshop. At the end of the workshop, a test was conducted on all the topics covered in the workshop. All participants scoring 8 and above would get a certificate indicating successful completion of the workshop. Feedbacks are the true face of any workshop and we here at CodeCell are always open for it as improvement is always possible through constructive criticism.

> “CodeCell Members planned it pretty well” — Attendee
>
> “It was much easy to understand and communicate with the students who were as tutor.” — Attendee

The participants were made familiar with the CodeCell council, what we do, and were given a brief idea of all the different events and workshops conducted by the council throughout the year.

We were very satisfied and glad about the response and feedback received by the participants.

A big thanks to the entire team of CodeCell who worked hard to make it happen. Thank you very much.

You can know more about the codes taught in the workshop [here](https://github.com/kjsce-codecell/Python-Automation/).

And for you readers, thanks a lot for reading, we have many more workshops and competitions lined up for the year.

Follow us on [Instagram](https://www.instagram.com/kjsce_codecell/?hl=en) and [Facebook](https://www.facebook.com/kjscecodecell/) to get updated.

<!--EndFragment-->

repository: VedantMahadik/Blogs

repo_name: VedantMahadik/Blogs


text:
# API Reference

## Defining tests

### `ably.addTest(options)`

Define a test.

| Parameter            | Type                   | Required                     | Description
| -------------------- | :--------------------- | ---------------------------- | :--------------------------------------
| `options.name`       | `string`               | Yes                          | Name of the test. It has to be unique.
| `options.sampler`    | `function`             | Yes                          | A sampler assigns test subjects to groups (`ably.samplers.default` supplied with an array of variants will generate a sampler, see the *Samplers* section below).
| `options.scope`      | `string` or `object`   | No (default: `'device'`)     | A scope marks the boundary of where the experiment begins and where it ends (`'device'`, `'memory'` or a custom object, see the *Scopes* section below).

### Samplers

A sampler assigns test subjects to groups.

#### Predefined samplers

##### `ably.samplers.default`

Supplied with an array of variants, it will generate a sampler that assigns users to groups with a uniform distribution.

Example:

```js
ably.samplers.default([a,b,c])
```

Supplied with an object, it will treat it as mapping between variants and their weights and generate an according sampler.

Example:

```js
ably.samplers.default({
    a: 50,
    b: 25,
    c: 15
})
```

#### Use your own sampler

Supply a function that matches the following prototype:

```js
/**
 * Assigns to a variant.
 * @param  {AblyTest} test The test being randomized
 * @return {String} The assigned variant.
 */
function sampler(test) {
    return 'a';
}
```

### Scopes

A scope marks the boundary of where the experiment begins and where it ends.

#### Predefined scopes

##### The `memory` scope

The experiment lives as long as the temporary in-memory storage is alive. For instance, in browsers users will be reassigned to a new group upon a page reload and will get a new group in other browser windows.

##### The `device` scope

The experiment lives within the scope of a device. In browsers, users will retain their group through page reloads and multiple windows but will get a new group on a different device, if they use private mode or when they clear browser data.

#### Use your own scope

Supply an object that matches the following prototype:

```js
{
    /**
     * Save data in the scope
     * @param   {*} data Data to save in the scope
     */
    save: function(data) {},

    /**
     * Load data from the scope
     * @returns {*} Data loaded from the scope
     */
    load: function() {},

    /**
     * Is scope supported
     * @returns {boolean} True if scope is supported, false otherwise
     */
    isSupported: function() {},
}
```

#### Registering scopes

If you want Ably to manage your scope and be able to purge old expositions, you may register it with `registerScope`.

```js
ably.registerScope('myScope', myScopeObj);
```

Then refer to it by name when adding your tests.

```js
ably.addTest({
  name: 'myExperiment',
  sampler: ably.samplers.default(),
  scope: 'myScope'
});
```

## Subscribing to tests

### `ably.on(test, variant, callback)`

Subscribe to a particular variant of a test.

| Parameter  | Type       | Required | Description
| ---------- | :--------- | -------- | :--------------------------------------
| `test`     | `string`   | Yes      | Name of the test to subscribe to.
| `variant`  | `string`   | Yes      | Variant to subscribe to.
| `callback` | `function` | Yes      | Function to call when the variant is chosen.

### `ably.on(test, callback)`

Subscribe to any variant of a test.

| Parameter  | Type       | Required | Description
| ---------- | :--------- | -------- | :--------------------------------------
| `test`     | `string`   | Yes      | Name of the test to subscribe to.
| `callback` | `function` | Yes      | Function to call when the variant is chosen.

repository: aptomaKetil/ably

repo_name: aptomaKetil/ably


text:
# Unit-19-React-Homework-Employee-Directory
The purpose of this project was to familiarize myself with REACT. The objective was to create a table that was populated with data gathered from the [Random User API](https://randomuser.me/) API. This app contains a very basic home page as a place holder and a Roster page that actually satisfies the objective.

The Roster page populates a lightly styled table with data gathered from the aforementioned API. A user can sort the table by Nationality or filter by name using the search field.

# Deployed Link

[Live Site](https://thecoaxial.github.io/Unit-19-React-Homework-Employee-Directory/)

# Demo GIF
![Gid](Demo.Roster.gif)

# Future Plans
- Fix the semi wonky deployment
- Make each field name into a link to sort by relevant data
- Add logic to take care of special characters in the search field
- make the search more forgiving to typos ect.
- fix the minor css issues

# License
Begin license text.
Copyright 2021 Cory Scanlon

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

End license text.

# Author
### Cory Scanlon

repository: TheCoaxial/Employee-Directory

repo_name: TheCoaxial/Employee-Directory


text:
# PSU-Portable-CLI - A command line executable based application that interacts with the PSU API.

# Usage:
```powershell
  psu-cli -s ./Script.lua -k api_key
```

# Installation
- You can head up to the **releases** page to download a pre-built executable.
- Or.. you can compile it yourself using the **pkg** package

**Initalization**:
- Install ``pkg`` by using the npm install command
```powershell
npm install --global pkg
```
- Then clone the repository in your desired directory.
```powershell
git clone https://github.com/psuDevelopment/obf-cli-portable
```
- Install the **required** modules then run the start script
```powershell
npm install
npm run start
```
- It will create an executable for MacOS, Linux, Windows.

# Avaliable options
You can use our help command by:
```powershell
psu-cli --help
```

repository: psuDevelopment/obf-cli-portable

repo_name: psuDevelopment/obf-cli-portable


text:
<!-- TOC -->

- [What is esportsinitiative.github.io?](#what-is-esportsinitiativegithubio)
- [Updating Events](#updating-events)
- [Webmaster Stuff](#webmaster-stuff)
    - [1. Setup](#1-setup)
    - [2. Setup - Local](#2-setup---local)
    - [2. Setup - Docker](#2-setup---docker)
    - [Helpful Stuff:](#helpful-stuff)
    - [What isn't possible in Jekyll?](#what-isnt-possible-in-jekyll)

<!-- /TOC -->

# What is esportsinitiative.github.io?
The 5th iteration of ESI website. Main goals:

- [x] Static site hosted on GitHub Pages
- [x] Easy content creation and editing
- [x] Pages for:
  - [x] Events
  - [x] Sponsors
  - [x] Teams
  - [x] Games
  - [ ] Short Links

All easily solved and maintained by ***Jekyll!***

# Updating Events

*Notes*: Follows the example file in `_drafts/1995-01-01-template.md`

1. Create a new file in the folder `_events/`
2. Name the file `<date of event>-<name of event>.md` (e.g. `2016-09-01-smash-weekly.md` is the **Smash Weekly** on **Sept 1st, 2016**)
3. In the new file add the **metadata** and fill in the content:
    - Leave content which is **unknown** or **non-existent** blank
      ```yaml
      ---
      layout: "event"
      title:  "General Meeting"
      date:   2016-01-01 00:00:00
      date-end: 2016-01-01 00:00:00
      categories: "event"
      location: "Round Meeting Room"
      games:
      - "lol"
      tags:
      - "something"
      image-link: "/images/logos/esi/esi.png"
      event-link:
      ticket-link:
      rules-link:
      description: "This is a general meeting"
      ---

      // Event info
      ```
4. Add event discription with links, images, text, headers, etc.
    - Markdown styling (symbolized by the `.md` extension) follows the following [syntax](https://guides.github.com/features/mastering-markdown/)

# Webmaster Stuff
## 1. Setup

1. Pre-Setup
    - Are you on *Linux* or *OSX/MacOS*?
        - You have a good console! Proceed.
        - Optional [GitHub for Desktop](https://desktop.github.com/)
    - Are you on *Windows*?
        - Download [Git](https://git-scm.com/) and [GitHub for Desktop](https://desktop.github.com/)
        - Git includes the amazing ***Git Bash*** console!
2. Clone this repository into a good folder
    - Use: `git clone https://github.com/esportsinitiative/esportsinitiative.github.io.git`
    - **NOTICE**: If you installed [GitHub for Desktop](https://desktop.github.com/) you could clone through that for simplicity :)
3. Proceed to either the [Setup - Local](#2-setup---local) or [Setup - Docker](#2-setup---docker) instructions.

## 2. Setup - Local

4. Install Ruby:
    - Are you on *Linux* or *OSX/MacOS*?
        - Installing [Ruby](https://www.ruby-lang.org/en/)
    - Are you on *Windows*?
        - Installed with [RubyInstaller](https://rubyinstaller.org/)
        - Remember to check the box to add **Ruby** to your path
5. Install [Jekyll](https://jekyllrb.com/)
6. Navigate to the project folder. (Command `pwd` should print something like `.../esportsinitiative.github.io/`)
    - Navigate with the `cd` (change directory) and `ls` (list) commands
7. Install the required gems: `bundle install`
8. Bring up the Jekyll site locally: `bundle exec jekyll serve`
9. Navigate to the site: `http://<IP_ADDRESS>:4000`

## 2. Setup - Docker
**NOTE:** There are problems with the auto rebuilding support, at least on Windows, as such this method will be less produce when making edits. This also

4. Install [Docker](https://www.docker.com/)
5. Navigate to the project folder. (Command `pwd` should print something like `.../esportsinitiative.github.io/`)
6. Either run:
    - Docker:
      ```BASH
      # Replace `pwd` with $pwd` on PowerShell
      docker build -t esi .
      docker run -it --rm -v `pwd`:/srv/jekyll -p 4000:4000 esi bash
      jekyll serve
      # If the site doesn't reload between changes reload the server with
      # ctrl + c
      # jekyll serve
      ```
    - Docker Compose
      ```BASH
      docker-compose up
      ```
7. Navigate to the site: `http://<IP_ADDRESS>:4000`

## Helpful Stuff:
It helped us! May it help you!

- [Jekyll](https://jekyllrb.com/)
- [Bootstrap](https://getbootstrap.com/css/)
- [Font Awesome Icons](http://fontawesome.io/icons/)
- [Sass Bootstrap](http://kvurd.com/blog/my-jekyll-blog-setup-bootstrap-sass-pygments/)
- [Flex Boxes <3](https://philipwalton.github.io/solved-by-flexbox/demos/vertical-centering/)
- [Jekyll Data Files](https://jekyllrb.com/docs/datafiles/)
- [Jekyll Collections](https://jekyllrb.com/docs/collections/)

Building stuff:

- [Jekyll Concat Strings](https://stackoverflow.com/questions/23688939/contatenate-append-a-string-to-another-one-in-jekyll-liquid)

## What isn't possible in Jekyll?

1. Use liquid in *.yaml* front matter (e.g. when creating posts) [discussed here](https://stackoverflow.com/questions/14487110/include-jekyll-liquid-template-data-in-a-yaml-variable)