Cisco-IOS-XR-wdsysmon-fd-oper API API Reference
API generated from<EMAIL_ADDRESS>API Endpoint
http://{Controller-IP}:{Controller-Port}/restconf/config/network-topology:network-topology/topology/topology-netconf/node/inetri/yang-ext:mount/
URL '/' code: %2F
Schemes: http
Version: 1.0.0
Paths
SYSTEM-MONITORING - Retrieve
Retrieve operation of resource: system-monitoring
Successful operation
Internal Error
Response Content-Types: application/json
Response Example (200 OK)
{
"cpu-utilization": [
{
"node-name": "string",
"total-cpu-fifteen-minute": "integer",
"total-cpu-one-minute": "integer",
"total-cpu-five-minute": "integer",
"process-cpu": [
{
"process-cpu-one-minute": "integer",
"process-cpu-fifteen-minute": "integer",
"process-cpu-five-minute": "integer",
"process-name": "string",
"process-id": "integer"
}
]
}
]
}
CPU-UTILIZATION - Retrieve
Retrieve operation of resource: cpu-utilization
ID of node-name
Successful operation
Internal Error
Response Content-Types: application/json
Response Example (200 OK)
{
"node-name": "string",
"total-cpu-fifteen-minute": "integer",
"total-cpu-one-minute": "integer",
"total-cpu-five-minute": "integer",
"process-cpu": [
{
"process-cpu-one-minute": "integer",
"process-cpu-fifteen-minute": "integer",
"process-cpu-five-minute": "integer",
"process-name": "string",
"process-id": "integer"
}
]
}
PROCESS-CPU - Retrieve
Retrieve operation of resource: process-cpu
ID of node-name
Successful operation
Internal Error
Response Content-Types: application/json
Response Example (200 OK)
{
"process-cpu-one-minute": "integer",
"process-cpu-fifteen-minute": "integer",
"process-cpu-five-minute": "integer",
"process-name": "string",
"process-id": "integer"
}
Schema Definitions
NODE-CPU-UTIL:
Node CPU utilization information
- total-cpu-fifteen-minute: integer
-
Total CPU utilization in past 15 minute
- total-cpu-one-minute: integer
-
Total CPU utilization in past 1 minute
- total-cpu-five-minute: integer
-
Total CPU utilization in past 5 minute
- process-cpu: PROCESS-CPU-UTIL
-
Per process CPU utilization
-
PROCESS-CPU-UTIL
Example
{
"total-cpu-fifteen-minute": "integer",
"total-cpu-one-minute": "integer",
"total-cpu-five-minute": "integer",
"process-cpu": [
{
"process-cpu-one-minute": "integer",
"process-cpu-fifteen-minute": "integer",
"process-cpu-five-minute": "integer",
"process-name": "string",
"process-id": "integer"
}
]
}
PROCESS-CPU-UTIL:
Process CPU utilization information
- process-cpu-one-minute: integer
-
Process CPU utilization in percent for past 1 minute
- process-cpu-fifteen-minute: integer
-
Process CPU utilization in percent for past 15 minute
- process-cpu-five-minute: integer
-
Process CPU utilization in percent for past 5 minute
- process-name: string
-
Process name
- process-id: integer
-
Process ID
Example
{
"process-cpu-one-minute": "integer",
"process-cpu-fifteen-minute": "integer",
"process-cpu-five-minute": "integer",
"process-name": "string",
"process-id": "integer"
}
system-monitoring_schema:
Processes operational data
- cpu-utilization: object[]
-
Processes CPU utilization information
-
- node-name: string
-
Node name
Example
{
"cpu-utilization": [
{
"node-name": "string",
"total-cpu-fifteen-minute": "integer",
"total-cpu-one-minute": "integer",
"total-cpu-five-minute": "integer",
"process-cpu": [
{
"process-cpu-one-minute": "integer",
"process-cpu-fifteen-minute": "integer",
"process-cpu-five-minute": "integer",
"process-name": "string",
"process-id": "integer"
}
]
}
]
}
cpu-utilization_schema:
- node-name: string
-
Node name
Example
{
"node-name": "string",
"total-cpu-fifteen-minute": "integer",
"total-cpu-one-minute": "integer",
"total-cpu-five-minute": "integer",
"process-cpu": [
{
"process-cpu-one-minute": "integer",
"process-cpu-fifteen-minute": "integer",
"process-cpu-five-minute": "integer",
"process-name": "string",
"process-id": "integer"
}
]
}


Class Payment
A payment request.
To init new payment, you need to create an instance of this class and fill its properties with real information from the order.
public
|
#
__construct( string $orderNo = '', mixed $merchantData = null, string $customerId = null, boolean|null $oneClickPayment = null )
|
public
|
#
addCartItem( string $name, number $quantity, number $totalAmount, string $description = "" )
Add one cart item. |
public
|
#
setMerchantData( string $data, boolean $alreadyEncoded = false )
Set some arbitrary data you will receive back when customer returns |
public
string
|
|
public
string
|
|
public
string
|
|
public
number
|
|
public
array
|
|
public
|
|
public
|
#
setRecurrentPayment( boolean $recurrent = true )
Mark this payment as a template for recurrent payments. |
public
|
string |
OPERATION_PAYMENT
Běžná platba |
#
"payment"
|
string |
OPERATION_RECURRENT
Opakovaná platba |
#
"recurrentPayment"
|
string |
OPERATION_ONE_CLICK
Platba na klik |
#
"oneclickPayment"
|
public
string
|
$orderNo
Number of your order, a string of 1 to 10 numbers (this is basically the Variable symbol). |
|
public
string
|
$currency
Currency of the transaction. Default value is "CZK". |
|
public
boolean|null
|
$closePayment
Should the payment be processed right on? See Wiki on ČSOB's github for more information. |
#
null
|
public
string
|
$returnUrl
Return URL to send your customers back to. |
|
public
string
|
$returnMethod
Return method. Leave empty to use the default one. |
|
public
string
|
$description
Description of the order that will be shown to customer during payment process. |
|
public
string
|
$customerId
Your customer's ID (e-mail, number, whatever...) |
|
public
string
|
$language
Language of the gateway. Default is "CZ". |
|
public
string
|
$payOperation
payOperation value. Leave empty to use the default (and the only one valid) value. |
|
public
string
|
$payMethod
payMethod value. Leave empty to use the default (and the only one valid) value. |
|
protected
string
|
$foreignId
The PayID value that you will need fo call other methods. It is given to your payment by bank. |
|
public
integer
|
$ttlSec
Lifetime of the transaction in seconds. Number from 300 to 1800. |
|
public
integer
|
$logoVersion
Version of logo. |
|
public
integer
|
$colorSchemeVersion
Color version |


@Scale is a series of technical conferences for engineers who build or maintain systems that are designed for scale. Building applications and services that scale to millions or even billions of people presents a complex set of engineering challenges, many of them unprecedented. The @Scale community is focused on bringing people together to openly discuss these challenges and collaborate on the development of new solutions.
Upcoming on:
The conference is addressed to everyone who works and lives in the Internet environment and faces the challenge of integrating the work of project managers, programmers, web developers and content managers. The dynamic growth of e-business requires the continuous improvement of web stability and web performance knowledge. There is no better way to avoid mistakes than the exchange of experiences between people that solve similar problems. Our aim is to deliver this knowledge with the help of Polish and international leaders in the field.
Next occurence not yet announced.
ConfigManagementCamp is the event for people interested in open source configuration management to meet each other. ConfigManagementCamp will be the event where different communities will meet and exchange ideas both internally and within the broader community.
Upcoming on:
The conference that brings development and operations together.
Upcoming on:
We're bringing together DevOps and SecOps in a unique conference that’s run by practitioners, for practitioners. This is your chance to learn from key industry figures, meet with your peers and hear how DevOps and SecOps work together in the real world.
Upcoming on:
dotScale is a unique tech conference on Scalability, DevOps and Distributed Systems. Our mission is to invite the best hackers worldwide to share their insights on stage!
Next occurence not yet announced.
Gluecon covers topics like NoSQL, APIs, Node.js, HTML5, Backend-as-a-Service, cloud management and security, cloud storage, Hadoop, DevOps, Mobile App development, cloud platforms, and many, many others.
Upcoming on:
LISA is the premier conference for IT operations, where systems engineers, operations professionals, and academic researchers share real-world knowledge about designing, building, and maintaining the critical systems of our interconnected world.
Upcoming on:
An open source monitoring conference and hackathon.
Upcoming on:
OSCON celebrates, defines, and demonstrates the power of open source in the world today.
Next occurence not yet announced.
PIPELINE is an annual not-for-profit one day conference focussed on Continuous Delivery.
Next occurence not yet announced.
QCon empowers software development by facilitating the spread of knowledge and innovation in the developer community. A practitioner-driven conference, QCon is designed for technical team leads, architects, engineering directors, and project managers who influence innovation in their teams.
Upcoming on:
Rootconf will help you to plan and develop a strategy map for infrastructure and devops. It will show you the building blocks for reaching a strategy for Infrastructure Scaling, Continuous Integration, Deployment and Delivery.
Next occurence not yet announced.
Each year ScaleConf brings international and local experts together to talk about their experience building sites and services that can handle the rigours of today's internet.
Upcoming on:
Scale Summit is an annual unconference event, bringing together professionals from the operations and software development communities who have a particular interest in scalable, high performance systems.
Next occurence not yet announced.
Two days of highly technical subjects around site reliability and production systems at scale.
Upcoming on:
A Conference for Web Operations, End-to-End Optimization, IT as a Business Driver, Ubiquitous Delivery for all including Mobile Platforms, Deliberately Unstable Systems & Performance
Upcoming on:


Consider this your friendly semi-regular reminder from me that a really tightly-edited podcast is an enormous amount of work. A ~30-minute Winning Slowly episode normally takes a solid 3–4 hours of “production” work!


Zumud is the missing link of successful educational investment and worry-free education.
If you are accepted at a tier 1 school outside Iran, it is going to be very hard for you to finance your education.
An income share agreement is a financial structure in which an individual or organization provides something of value to a recipient who, in exchange, agrees to pay back a percentage of their income for a fixed number of years.
The ISA Financing Fund diversifies risk through highly curated financing assets to mitigate risk.
ISA Financing Fund returns have an ideal profile of low volatility and high returns because they are pegged to income growth.
Investing in college graduates and dynamic correlation with the market minimizes default, interest rate, and nonpayment risk.
You are a few steps away from this goal
You are a few steps away from this goal


Open the console and use the global method tryServiceMethod
.
It should log responses and errors to the console.
Here's its signature:
tryServiceMethod(
service: string,
method: string,
config: ?Object,
accessToken: ?string,
callback: ?(response) => void,
)
You can paste an access token as the last argument or set it as the global variable MAPBOX_ACCESS_TOKEN
.
Only use public or very temporary access tokens! This is not a secure place to put a secret token.
An example:
MAPBOX_ACCESS_TOKEN = 'pk....';
tryServiceMethod('styles', 'getStyle', {
styleId: 'cjgzfhs7k00072rnkgjlcuxsu'
});


--- layout: archive title: Zulip Chat Archive permalink: /stream/113488-general/topic/user_attribute.2Ecache_cfg.html ---
Hi, what is the purpose of user_attribute.cache_cfg
. In particular, what does to_additive.cache_cfg
do?
Here is the code:
cache_cfg := ⟨λ ns, ns.mfoldl (λ dict n, do val ← to_additive_attr.get_param n, pure $ dict.insert n val) mk_name_map, []⟩
Unfortunately this is poorly documented... Simon Hudon has explained it to me at least once, but since none of my tactics have ended up using it I still don't know the details.
The ns
input is a list of all declarations that have the attribute, and the function is responsible for filling the cache from the list
In this case, the cache keeps track of the mapping of mul -> add definitions, and the data is stored in the attribute data, so we have to look up each definition and put the stored parameter in the map
@Mario Carneiro When Lean calls this function?
when the user attribute is applied to a new theorem
@Mario Carneiro I think it might applied more lazily than that. The cache may be invalidated every time you apply the attribute to a new definition / theorem but you don't actually need to rebuild the cache right then and there. You can wait until the next time the cache gets queried.
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


@
Would you like a photo of your team
and your sponsor's message
on football.mitoo this season?
here are some examples from last season - please click on these buttons above
Yes, I am interested .... please email me details


| SN | Status | Priority | Subject | Assignee | Author | Created | Related |
|---|---|---|---|---|---|---|---|
| Open | High | Work1 | Rohit | Prem | 5 Jan 2017 | Project Name | |
| Open | High | Work1 | Rohit | Prem | 5 Jan 2017 | Project Name | |
| Open | High | Work1 | Rohit | Prem | 5 Jan 2017 | Project Name | |
| Open | High | Work1 | Rohit | Prem | 5 Jan 2017 | Project Name | |
| Open | High | Work1 | Rohit | Prem | 5 Jan 2017 | Project Name | |
| Open | High | Work1 | Rohit | Prem | 5 Jan 2017 | Project Name | |
| Open | High | Work1 | Rohit | Prem | 5 Jan 2017 | Project Name | |
| Open | High | Work1 | Rohit | Prem | 5 Jan 2017 | Project Name | |
| Open | High | Work1 | Rohit | Prem | 5 Jan 2017 | Project Name | |
| Open | High | Work1 | Rohit | Prem | 5 Jan 2017 | Project Name | |
| Closed | High | Work1 | Rohit | Prem | 5 Jan 2017 | Project Name | |
| Closed | High | Work1 | Rohit | Prem | 5 Jan 2017 | Project Name | |
| SN | Status | Priority | Subject | Assignee | Author | Created | Related |


For today's code I wanted to get a sense of proportion and available space for my blog interface. On the iPhone 5 I have 320px/460px screen to work with. It seems like it will be enough space for me to present a good interface for my blog's admin home screen. Working small helps to prioritize content and to keep the interface simple. Today is the 18th consecutive day I've coded up a page and today's date is January 12, 2017. Good to go!


Graph of Vk friends API
Parameters:
- user_id(int)[required]: User ID in the social network Vk.
- email(str)[required]: Email where we will send the result. Result it's a high resolution photo and a brief description.
- accuracy(float)[optional]: Part of the friends of each friend of the main user. Must be in range [0,1].
Methods: GET
Description: The API analyzes the primary user's friends and each friend's friends and creates a graph.
Examples:
-<EMAIL_ADDRESS>- https://immense-headland-77050.herokuapp.com/graph/user_id=123456789&email=your_email@gmail.com?accuracy=0.2
Thank you for attention!


| Engine | Interpreter | Analyzer |
|---|---|---|
An engine is made up of an interpreter, an analyzer and a reactor. Together they will be formed into a pipeline by the saij engine. OverviewCreation Events |
The interpreter manages raw input encoding and decoding, translations, nlp and deconstruction of words, sentences and phrases. Interpreter with parser and translator |
The analyzer organizes and distributes data through the layers. It also provides Feedback to any layer/Model or layer/Math Analyzer with layers and feedback. |
| Layers | Reactor | Plugins and Models |
|
Layers are lightweight containers that get their functionality from plugins and models. layer/Mathlayer/Model layer/Neural layer/Request layer/Skill |
The reactor is a session configured module that will decide stimulus attention, ingest a stimulus when given an analysis, decide the response. Reactor stimulusReactor response All interactions |
Math plugins and Math models for layer/Math
Neural plugins and Neural models for layer/Neural Request plugins for layer/Request Skill plugins for layer/Skill Formats for reading/writing model data format/Models |
| Plugins | Observable objects | Use in components |
All plugins have to conform to the plugin structure outline in Base plugin in order to be sucessfully run by the engine |
Changes to all saij/Objects can be observed by calling the object.on('propertychange') method. Listeners receive a saij/Object~ObjectEvent with information on the changed property and old value. |
saij/Target saij/React |
API change policy
The saij API consists of
- names and signatures of constructors
- names and signatures of instance methods and properties
- names and signatures of functions
- names of constants
Within a major release series, the API will not be changed. Any changes to the API will be accompanied by a new major release.
Note: The API change policy does not cover internal use functions. It also does not cover any typedefs and enums.


JuliaKara Examples
Table of Contents
1 Particle Swarm Optimisation using JuliaKara
1.1 Problem description
The aim of this example is to use multiple Karas to find the region with the highest food density (leafs), in order to feed all Karas. The current density \(d\) at a location \(p\) is determined by counting all the fields in a radius \(r\) around \(p\). Therefore,
\begin{equation} d = \frac{n_{leafs}}{n_{fields}} \end{equation}where \(n_{leafs}\) is the number of found leafs and \(n_{fields}\) is the number of total fields.
1.2 Implementation
The implementation is made based on particle swarm optimisation (PSO) 1. Herein the velocity \(v_{i,j}\) and position \(p_{i,j}\) of a particle \(i\) (or Kara) is updated as follows:
\begin{equation} v_{i,j+1} = v_{i,j} + c_1 \cdot r_1 \cdot (p_{i,j}^{best} - p_{i,j}) + c_2 \cdot r_2 \cdot (p_{j}^{gbest} - p_{i,j}) \end{equation} \begin{equation} p_{i,j+1} = p_{i,j} + v_{i,j+1} \end{equation}where \(j\) denotes the current step, \(p_{i,j}^{best}\) denotes the best known position for particle \(i\), \(p_{j}^{gbest}\) denotes the globally best known position, \(c_1\) and \(c_2\) are learning factors an usually \(c_1 = c_2 = 2\) and \(r_1\) and \(r_2\) are random numbers uniformly distributed between 0 and 1.
However, two problems arise:
- The best known points change as karas, of course, eat the leafs they find
- In this world Karas should only be able to move one step per iteration
Therefore, an alternative implementation based on PSO is derived in Section 1.3.
1.3 Solution
1.3.1 Startup
To startup JuliaKara
it is loaded and for convenience some additional methods
are imported
using JuliaKara
import JuliaKara.JuliaKara_noGUI.ActorsWorld:Location,
Orientation,
location_fix_ooBound,
actor_definition_at_location,
Actor
import JuliaKara.JuliaKara_noGUI.ACTOR_DEFINITIONS
1.3.2 Initialise the World
The world's size is defined by the following variables:
const world_width = 50
const world_height = 50
Initially the world is created empty.
world = World(world_width,world_height,"PSO Kara")
- Fill the world with random leafs
The leaf distribution is generated such that the world consists of large, medium and small sized spots. Therefore, two functions are defined which generate random points withing the world and random sizes relative to the world's size.
"Returns a random points withing the word of size world_width x world_height" function randP() Location(rand(1:world_width),rand(1:world_height)) end """ Returns a randomises size relative to the world The function takes the smalles dimension and mutliplies it with the desired relative size with a small randomisation. """ function randS(relSize::Float64) s = convert(Int,round( min(world_width,world_height)*(relSize + relSize*rand()) )) return max(s,1) end
Define the parameters for generating the areas of leaf. The leaf areas (combination of random location and random size) are stored in a Tuple where the first index is the location and the second index is the size.
# Number of leaf areas n_big = 1 n_medium = rand(5:10) n_small = rand(20:30) # Size of leaf areas points=[ [(randP(),randS(0.15)) for _ in 1:n_big]..., [(randP(),randS(0.03)) for _ in 1:n_medium]..., [(randP(),randS(0.005)) for _ in 1:n_small]... ]
Draw the leaf areas as circles using the radius p[2].
for p in points # Iterate of all possible coordinates from -r to +r in x and y direction. for dx in -p[2]:p[2], dy in -p[2]:p[2] # Catch errors which occour when placing leafs above each other try # Check if the current location is within the circle if dx^2+dy^2 <= p[2]^2 # The location is obtained by adding the dx and dy to the # coordinate stored in p[1]. loc_fix = location_fix_ooBound( world.world,Location(p[1].x+dx,p[1].y+dy) ) # Place a leaf at the calculated location. JuliaKara.JuliaKara_noGUI.place_leaf(world.world,loc_fix.x,loc_fix.y) end end end end # Redraw the world JuliaKara.world_redraw(world,true)
The code above generates the random world of leafs shown in Figure 1.
Figure 1: 50x50 World filled with random areas of leafs
1.3.3 Searching Algorithm
As described in Section 1.2 the "quality" of a location is determined by its density, meaning the ration of leafs and empty fields around the location.
"The function returns the current leaf density at location p"
function density_at(world::JuliaKara.World_GUI,p::Location,r::Int)
# Number of leafs
c_leafs = 0
# Iterated of all possible positions within -r and +r in x and y
for dx in -r:r, dy in -r:r
# Calculate the location by adding dx and dy to p.
pos = location_fix_ooBound(world.world,Location(p.x+dx,p.y+dy))
# Check if there is a leaf at the position
if actor_definition_at_location(world.world,pos,ACTOR_DEFINITIONS[:leaf])
c_leafs += 1
end
end
# The number of total fields is (2*r+1)
return c_leafs / (2r+1)^2
end
One of the problems mentioned in Section 1.2 is that the Karas eat the leafs they find. Therefore, it is difficult to implement the exact PSO algorithm as \(v_{i,j}\), \(p_{i,j}^{best}\) and \(p_{i,j}^{gbest}\) change in every iteration. Hence, for this implementation \(v_{i,j}\) is neglected for the step \(j+1\), \(p_{i,j}^{best}\) is assumed to the location of a (random) field around kara with a leaf and \(p_{i,j}^{qbest}\) is the currently best density.
To obtain \(p_{i,j}^{best}\) a function next_leaf
is defined as follows.
"The functions returns the movement (dx,dy) needed to reach a leaf."
function next_leaf(world::JuliaKara.World_GUI,p::Location)
# Shuffle the list of possible dx,dy movements around the current position to
# always return a different one.
for dp in shuffle([(1,0),(-1,0),(0,1),(0,-1),(-1,1),(1,1),(1,-1),(-1,-1)])
# Calculate the location
pos = location_fix_ooBound(world.world,Location(p.x+dp[1],p.y+dp[2]))
# Only take this location if a leaf and no other kara is there.
if (actor_definition_at_location(world.world,pos,ACTOR_DEFINITIONS[:leaf])
&& !actor_definition_at_location(world.world,pos,ACTOR_DEFINITIONS[:kara]))
return dp
end
end
# If no possible location was found return the current.
return (0,0)
end
In each iteration the Karas are updated by means of the implementation described in Section 1.2.
function update_kara!(world::JuliaKara.World_GUI,kara::Actor,p_gbest::Location)
# Parameters for the PSO
c_1,c_2,r_1,r_2 = 50,2,rand(),rand()
# Relativ movement to the next leaf as tuple
dL = next_leaf(world,kara.location)
# Relative movement to the currently highest density as tuple
dGg = ((p_gbest.x - kara.location.x), (p_gbest.y - kara.location.y))
# Ceck if moving out at one side of the world is faster than moving across
dGg = (
abs(dGg[1]) > world_width/2 ? -sign(dGg[1])*(world_width-abs(dGg[1])) : dGg[1],
abs(dGg[2]) > world_height/2 ? -sign(dGg[2])*(world_height-abs(dGg[2])) : dGg[2],
)
# Velocities or relative movements for the next step
# Round and convert to integer, as kara can only move by single fields
dx = convert(Int,round(c_1 * r_1 * dL[1] + c_2 * r_2 * dGg[1]))
dy = convert(Int,round(c_1 * r_1 * dL[2] + c_2 * r_2 * dGg[2]))
# At this point it is possible that dx and/or dy are 0.
# Therefore to prevent stagnation pick a random direction.
dx = dx==0 ? rand([-1,1]) : dx
dy = dy==0 ? rand([-1,1]) : dy
# Perform the movement under the restriction of only moving one field into x
# and y.
if dx<0
# Turn west
while kara.orientation != Orientation(:WEST)
turnLeft(world,kara)
end
move(world,kara)
elseif dx>0
# Turn east
while kara.orientation != Orientation(:EAST)
turnLeft(world,kara)
end
move(world,kara)
end
if dy<0
# Turn south
while kara.orientation != Orientation(:SOUTH)
turnLeft(world,kara)
end
move(world,kara)
elseif dy>0
# Turn north
while kara.orientation != Orientation(:NORTH)
turnLeft(world,kara)
end
move(world,kara)
end
# If Kara is on a leaf ... eat it!
if onLeaf(world,kara)
removeLeaf(world,kara)
end
end
As all Karas within the world need an update in the iteration another method is defined which updates a vector of Karas. In some cases it is possible that the maximum density is reached at multiple locations, therefore, the desired maximum is picked randomly from the list of multiple karas.
function update_kara!(world::JuliaKara.World_GUI,karas::Vector{Actor})
# All current densities
dens = [density_at(world,pi.location,2) for pi in karas]
# The maximum density
dens_max = maximum(dens)
# All indices where the maxmimum density occured
dens_inds = filter(i->dens[i]==dens_max,1:length(karas))
# Iterate over all karas
for (i,kara) in enumerate(karas)
# If kara itself is contained in the maximum densites then take this
# location
ind = i in dens_inds ? i : shuffle(dens_inds)[1]
# Update this kara
try
update_kara!(world,
kara,
karas[ind].location
)
end
end
end
The number of Karas to be placed in the world is defined by the following variable.
number_of_karas = 20
Place the Karas at random positions.
# Store all Karas in a vector
karas = Actor[]
sizehint!(karas,number_of_karas)
for i in 1:number_of_karas
# Generate a random positon
loc = randP()
# Place Kara there if no other Kara is placed there.
while actor_definition_at_location(world.world,loc,ACTOR_DEFINITIONS[:kara])
loc = randP()
end
# Add kara to the list of karas and place in, facing north, into the world.
push!(karas,place_kara(world,loc.x,loc.y,:NORTH))
end
Figure 2: Starting positions of 20 Karas
Run the optimisation for 500 steps.
for i in 1:500
update_kara!(world,karas)
end
Figure 3: Karas start to eat
2 Control Kara using the keyboard
2.1 Problem description
The aim of this example is to enable keyboard controls for Kara. The arrow keys shall be used to
- move forward,
- turn right and
- turn left.
l
shall be used to place or remove a leaf.
2.2 Implementation
To startup JuliaKara
it is loaded and for convenience some additional methods
are imported.
Furthermore to connect signal to functions and events Gtk
is loaded.
using JuliaKara
using Gtk
using Gtk.ShortNames
import JuliaKara.JuliaKara_noGUI.Actor
The world is initialised as follows.
@World (10,10)
To allow connection of various worlds (windows) to the contained Karas the function
kara_keybinding
is defined which brings world
and kara
into a local scope
to the returned function which actually performs the desired operations.
The possible operations are defined in a dictionary named actions
.
function kara_keybinding(world::JuliaKara.World_GUI,kara::Actor)
function (widget,event)
actions = Dict(
Gtk.GdkKeySyms.Up => ()->move(world,kara),
Gtk.GdkKeySyms.Left => ()->turnLeft(world,kara),
Gtk.GdkKeySyms.Right => ()->turnRight(world,kara),
Gtk.keyval("l") => function ()
if onLeaf(world,kara)
removeLeaf(world,kara)
else
putLeaf(world,kara)
end
end
)
if event.keyval in keys(actions)
actions[event.keyval]()
end
end
end
To connect the defined function the function signal_connect
is used, which
binds the function returned from kara_keybinding
to the key-release-event
2.
id = signal_connect(
kara_keybinding(world,kara),
world.window,
"key-release-event"
)
Now it's possible to move Kara using the arrow keys and place and remove leafs
using l
.


{include file="block/header" /} {block name="extra_css"}{/block}
{include file="block/base/nav" /} {include file="block/base/sidebar" /}
{include file="block/base/breadcrumb" /}
{block name="content"}无内容{/block}
{include file="block/footer" /} {block name="extra_js"}{/block}


foo
div
button
li 0
a
Nested Find
123
span with id=number
span with data-number=number
span with attr=number
span with prop=number
span with trailing space
jQuery


PART IV. LOANS
§412:10-400 Applicability of part. This part sets forth the requirements and restrictions for lending by all credit unions. A credit union may make loans and extensions of credit as permitted by this part and as provided elsewhere in this article. [L 1993, c 350, pt of §1]


Avoid returning from a finally block - this can discard exceptions.
This rule is deprecated, use {rule:squid:S1143} instead.


Create a nginx pod with an init container that populates the webroot of nginx pod with the homepage of Kubernauts.io


SLING BLADE A film review by Edwin Jahiel Copyright 1997 Edwin Jahiel
SLING BLADE (1996) *** 1/4. Written & directed by Billy Bob Thornton. Photography, Barry Markowitz. Editing, Hughes Winborne. Production design, Clark Hunter. Music, Daniel Lanois. Produced by Brandon Rosser & David L. Bushell. Cast: Billy Bob Thornton, Dwight Yoakam, J.T. Walsh, John Ritter, Lucas Black, Natalie Canerday, et al. A Miramax release. 135 minutes. Rated R (language). At the Art.
With a name like Billy Bob as writer, director and star of a movie, you may expect a bubba picture about good ol' boys. Instead you get something decidedly anti-drive-in, serious, somber, excellent in concept, direction and the protagonist's performance. All this was shot for peanuts.
With a title like "Sling Blade," you may expect theater of blood which could keep many away from the movie-house. Violence, however, is either recounted in sedate terms or takes place off-screen. Even so, the suggestive title was a miscalculation.
Thornton, from Malvern, Arkansas, has had supporting roles in several films. With his childhood friend Tom Epperson he also scripted the underrated "A Family Thing" and Carl Franklin's superior and quite bloody "One False Move" in which he has a major part.
"Sling Blade," set and made in Arkansas, is Thornton's debut as director as well as star. He plays Karl Childers, who, after a 25-year stay at the Arkansas Hospital for the criminally insane, is released. The opening -- a two-part introduction admirable in its simplicity --sets the mood.
 Then Karl, the only thing lit in a darkened room (it's like a parody of a police interrogation) relates for a journalist how, at age 12 he was the mistreated child of a fundamentalist couple.
Now asked if he thinks he can kill again, Karl answers in a masterful set of triple negatives: "I don't reckon I have no reason to kill nobody." Leaving the hospital with a bundle of books (all he owns -- he had spent years re-reading the Bible), he returns to his hometown, a wide spot on the road.
Karl is not all there mentally, but certainly does not deserve to be called jeeringly "a retard" by the film's heavy. There's sharpness and intuition about him, along with kindness and strong feelings. All this does not jump out at you but keeps coming bit by bit.
 He has the shuffling walk we associate with old movies where convicts step out of weeks in The Hole (solitary). His jaw juts out, his lower lip covers the upper one. He speaks little, slowly and hesitatingly, breathes heavily, grunts and concludes his phrases with "hmms" and"mmms."
Yet that strange man is a likable being that one might wish to adopt, like a stray. That's what happens, in a sense. Most people are kind to him. On his first night of "freedom," Karl, having nowhere to sleep, returns to the hospital. Regulations forbid his staying there now, so the director takes him to his own home for a family dinner and a room. The local rurals are un-fussily decent too. It helps that Karl is a whiz at fixing small engines, like lawn mowers. This gets him a modest job in a garage and gains the respect of many.
Frank makes friends with young Frankie (Lucas Black).
The cast of dramatis personae is small. The principal ones are essentially supporting characters to Karl. They are rounded up by Doyle (country singer Dwight Yoakam, impressively loutish), Linda's lover. A heavy drinker, he is constantly and disgustingly abusive of the fatherless Frank and nasty to Linda, yet he spends most his time in Linda's small house where he acts in insufferably dictatorial ways. A local fellow is right when he warns Karl that Doyle is a monster. Why the nice woman puts up with the monster is inexplicable, unless this indicates a major shortage of males in the area.
Young Frank soon talks his mother into letting Karl sleep in their garage. Soon he becomes something like a member of his hosts' small circle --which does not include Doyle. Only near the end of the film it became clear to me that Doyle was a construction worker. A nice bit of irony, since he is such a destructive man.
>From the start Doyle insults, and jibes at, Karl. He does the same, however, for his pals. Later, after a fit of violence that resulted in Linda kicking him out, Doyle returns with apologies. "Well, he's trying, but God knows for how long" she declares. Frank is more clear-eyed : "He's lying. I'm not stupid." Sure enough, Doyle proposes marriage but sets to Frank conditions worthy of a savage prison guard -- and he wants Karl out too.
The movie's pace is slow, but none of its scenes is protracted. Whether or not it would gain by getting trimmed down is something that I cannot decide on a single viewing. It seems to me, though, that since this is no ordinary, plot-and-action film but a character driven work, its emphasis on Karl does make the tempo fit the man's slowness.What is needed from the audience is that they adopt the old rhythm of a rural South.
Slowness does not mean boredom. There are enough bits of local color and people's traits to supply threads of realism and unforced humor.  Like Karl and his passion for french fries. Like the rapport between the two outcasts, the gay man in a tiny town and Karl. Like a rotund colleague of Linda's, the Employee of the Month,who complains about all shoes and brings Karl a bunch of flowers:"They're not fresh, they're a special at $2.99 plus my 10 % employee discount."
There is much I will not detail about this film, most of it positive. (Look for Jim Jarmusch and Robert Duvall in unexpected short appearances). While the outcome is rather predictable, Karl's part is especially well done, all the more so since Mr.Thornton had the very difficult task of directing the movie, directing himself and probably doing daily rewrites.
Inevitably, Thornton-the-actor will bring up the acting of Geoffrey Rush, the mature David Helfgott in "Shine." It is a pity, especially at Oscar-time, to have to compare two tour-de-force performances at the extremes of the spectrum -- apples and oranges: one minimalist, the other wildly eccentric.
Noticeable in "Sling Blade" is the strategy to keep the visuals underlit, plain and not colorful. This may be taken too far, too systematically. It applies to sunny outdoor shots where the characters are often in the shady part of the image, yet not even lit by reflectors.
The photography uses mostly natural light,but there are times when the crypt-like darkness of interiors made me think that electricity was rationed in that part of Arkansas. This causes problems, such as hardly ever allowing us to get a good look at Linda's face. But no matter.In ambience, description and speech the film feels authentic. And the last line is a classic, on a par with the last words of Paul Muni ( "I steal") in the 1932 "I Am A Fugitive From A Chain Gang." Here, back at the hospital, asked by his pal how he found the outside world, Karl replies:"It's too big."
In "The Autobiography of Gertrude Stein" by Alice B. Toklas, Ms. Stein says (and I quote from memory) "I always prefer the normal to the abnormal; it is so much more complex and interesting." Right she is, yet what films like "Sling Blade" and "Shine" have achieved is to make the abnormal as interesting as the normal.
(Written March 97)
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


--- layout: post title: "In the News: The Overselling of Personalized Learning" date: 2018-11-09 18:15:00 +0000 tags: image: https://s3.amazonaws.com/audreywatters/2017-11-03-news.jpg imagecredits: https://www.flickr.com/photos/62693815@N03/6277209256 ---
I’m cited in Ben Herold’s story this week in Education Week that asks “Are Companies Overselling Personalized Learning?” (I also provided some newspaper images from the 1960s to show that this overselling has a history of its own.


We welcome you to *sign
up* to be an early evaluator of new features on the EuPathDB sites.
This will be an opportunity for you to help us refine and improve
features early in the development process. In fact, the "My
Favorites" feature was the subject of our first survey and feature
evaluator's comments and suggestions contributed to enhancing this
feature.
Signing on is easy and will
require minimal effort on your part in the form of answering questions
or rendering your opinion.
To become a feature evaluator,
click
here.


|
The toolbox file, WEB-INF/toolbox.xml by
default, maps names of our choosing to the classes that they will
represent. It's easier than that sounds.
Think about asking our friend Jon to grab us a 'wrench' from a
real toolbox. Jon just needs to know which wrench we want (metric,
pipe, crescent etc,). He doesn't need to know what the wrench does
nor what we are planning to do with it.
The Velocity Toolbox works the same way, we must only specify
which tool to assign to a name, and then the Velocity engine takes
care of the rest by making any public method available to the
template. For example, from the definitions below, the template
could call $wrench.getSize() or $wrench.size .
PipeWrench.java
public class PipeWrench {
public String getSize() {
return "Large Pipe Wrench!";
}
}
|
|
toolbox.xml
<?xml version="1.0"?>
<toolbox>
<tool>
<key>wrench</key>
<scope>application</scope>
<class>PipeWrench</class>
</tool>
</toolbox>
|
|
Tool Scopes
The toolbox support built into the VelocityViewServlet also provides
support for specifying the scope of your tool with regards to the
servlet environment. Tools may be placed within the request,
session, or application scopes of your web app.
The scope that you set for your tool will determine both its
lifecycle and, if the tool has a public init(Object) method,
then the scope will also determine what data is passed to that method:
- application scoped tools will be instantiated only once and then
reused for each request. Due to this, it is strongly encouraged
that your application scoped tools be completely threadsafe. The MathTool
in the GenericTools section is a good example of tool meant to be application
scoped. If an application scoped tool implements ViewTool, then the
javax.servlet.ServletContext for the webapp will be passed to its
init(Object) method after it is instantiated.
- session scoped tools are instantiated once per unique session and
are then reused for every request associated with that particular session. If
a session scoped tool implements ViewTool, then its
init(Object)
method will be passed the
ViewContext
of the request during which the session was created.
- request is the default scope. If no scope is specified for a
<tool> in your toolbox.xml, then it will be automatically set as
request scope. Tools with this scope are instantiated for every
servlet request fed to the VelocityViewServlet. If a request scoped tool
implements ViewTool, then its
init(Object) method will be
passed the current ViewContext.
You can specify the scope of your tools by adding a <scope>
element to your toolbox.xml entries like this:
<tool>
<key>math</key>
<scope>application</scope>
<class>org.apache.velocity.tools.generic.MathTool</class>
</tool>
|
|
Tool Request Paths
You can specify a restriction on the request URIs for which the tool
will be put in the context using the <request-path> element.
It can be an exact request path (matching one page) or end with the
* wildard, meaning that incoming request paths need only
start with the provided value for the tool to be available in the context.
For instance:
<tool>
<key>catalog</key>
<scope>request</scope>
<request-path>/catalog/*</request-path>
<class>com.mycompany.tools.CatalogTool</class>
</tool>
|
|
For now, this request-path filter is only valid for request scoped tools.
In VelocityTools 2.0, we plan to support this for session and application
scoped tools as well.
Tool Parameters
The toolbox support built into the VelocityViewServlet also provides
support for passing configuration parameters to tools that have a
public void configure(java.util.Map params) method.
This method will only be called if parameters have been specified for the tool.
You can specify parameters for your tools by adding a <parameter>
element to your toolbox.xml entries like this:
<tool>
<key>math</key>
<scope>application</scope>
<class>com.foo.tools.MyTool</class>
<parameter name="my.parameter.name" value="my.parameter.value"/>
</tool>
|
|
Toolbox Data
In addition to specifiying arbitrary Java classes as tools
to be automatically available to your templates, the toolbox support
also includes the ability to specify arbitrary strings, booleans, and
numbers to be automatically available in your templates. The format
is as follows:
<?xml version="1.0"?>
<toolbox>
<data type="number">
<key>app_version</key>
<value>0.9</value>
</data>
<data type="string">
<key>app_name</key>
<value>Jon's Tool Shop</value>
</data>
<data type="boolean">
<key>debug</key>
<value>true</value>
</data>
</toolbox>
|
|
As with your tools, your data will be exposed to your templates
under the specified key (e.g. $app_version, $app_name, $debug).
|


WikipediaWrapper
WikipediaWrapper is a ruby gem that extracts information from Wikipedia and makes the information available in an easy-to-use API.
All information is extracted using the Wikipedia/MediaWiki API.
This gem is inspired by the Python wrapper for the Wikipedia API by Jonathan Goldsmith.
Installation
Install WikipediaWrapper like any other Ruby gem:
gem install wikipedia_wrapper
Or, if you're using Rails/Bundler, add this to your Gemfile:
gem 'wikipedia_wrapper'
and run at the command prompt:
bundle install
Usage
More examples can be found in the examples directory.
Tests
WikipediaWrapper comes with a test suite (just run rake test).
License
Copyright © 2015 Sybil Ehrensberger, released under the MIT license


REUTERS: Tottenham Hotspur defender Danny Rose says he is prepared to run down the final 18 months of his contract and leave for free after not being handed a new deal by the Premier League club.
Left back Rose, 29, who has started nine out of Spurs' 12 league games this season, told the London Evening Standard the club's hierarchy looked to offload him in the close season by leaving him out of their pre-season trip to Asia in July.
"It's obvious what happened. People upstairs at Tottenham were trying to do what they were trying to do. I've said I've got 18 months left on my contract and I'm not going anywhere until it has finished," England international Rose said.
"In January, you're probably going to hear something... I'm telling you right now I'm not going anywhere until my contract is finished," he was quoted as saying in the article on Wednesday.
Rose, who played in this year's Champions League final against Liverpool and has featured twice in their new European campaign, said club chairman Daniel Levy had told him he would not be offered a new deal.
"I respect that. We move on ... people (in the media) can save their time trying to get stuff ready for January about me being sold," Rose said.
"Because I can tell you now: it ain't happening. I know what people were trying to do in the summer ... there were no bids - that was rubbish."
Rose said he still enjoys the support of manager Mauricio Pochettino.
"When the manager stops calling me into his office, stops giving me advice, that's when I'll think it's time to leave Tottenham," Rose added.
"I'm lucky to have a manager... who, from the first day we met, has always stuck by me... regardless of the rubbish in the media about me being sold or not part of his plans," he said.
Tottenham are 14th in the table with 14 points and return to league action with a trip to West Ham United on Nov. 23.
(Reporting by Shrivathsa Sridhar in Bengaluru; Editing by Andrew Cawthorne)


2 Kings 22:6
Unto carpenters, and builders, and masons, and to buy timber and hewn stone to repair the house.


Hi guys! My name is Regin Ian Pioquinto. I'm from the Philippines.
I am a 3rd year BS Information Technology Student in Ateneo de Davao University.
I started streaming for fun and I want people to see how I play.
I also love to dance and watch anime.
So recommend me some anime to watch <3
Games:
• Valorant
• Apex Legends
• Dota 2
• Black Desert Online
Drop a chat and say hi, invite me in a game and lets play. That's all
Arigato Gosaimashita <3


{% extends 'base.html' %} {% import 'admin/static.html' as admin_static with context %} {% block page_content %}


First, tap the 'Re-sort' button to assign the students to new video boards.
Re-sort Student GroupsOnly after all students have signed in, tap 'Start' to begin principle sorting activity.
StartWhen students are done sorting or tagging, you will see the appropriate button's colour change to blue. (They are not clickable.)
If you had to reload the app you can use the skip button.


|
| {{name}}, |
|
Please verify your subscription to the Meandering.Rocks
newsletter by clicking the link below.
|
|
Thanks for subscribing to the Meandering.Rocks blog!
|
|
|
|
Verify Email Address
|
| — Ben & Bri |
|
If you did not expect to recieve this communication,
you may ignore this email.
|
|
|
|


Table of Contents
Regardless of whether you are using the DPL or the base API, you must use a database environment. Database environments encapsulate one or more databases. This encapsulation provides your threads with efficient access to your databases by allowing a single in-memory cache to be used for each of the databases contained in the environment. This encapsulation also allows you to group operations performed against multiple databases inside a single transaction (see the Berkeley DB, Java Edition Getting Started with Transaction Processing guide for more information).
If you are using the base API, most commonly you use database environments to create and open databases (you close individual databases using the individual database handles). You can also use environments to delete and rename databases. For transactional applications, you use the environment to start transactions. For non-transactional applications, you use the environment to sync your in-memory cache to disk.
If you are using the DPL, all of these things are still being done, but the DPL takes care of it for you. Under the DPL, the most common thing you will explicitly use an environment for is to obtain transaction handles.
Regardless of the API that you use, you also use the database environment for administrative and configuration activities related to your database log files and the in-memory cache. See Administering Berkeley DB Java Edition Applications for more information.
To find out how to use environments with a transaction-protected application, see the Berkeley DB, Java Edition Getting Started with Transaction Processing guide.
You open a database environment by instantiating an Environment
object. You must provide to the constructor the name of the on-disk directory where the
environment is to reside. This directory location must exist or the open will fail.
By default, the environment is not created for you if it does not exist. Set the creation property to true
if you
want the environment to be created. For example:
package je.gettingStarted; import com.sleepycat.je.DatabaseException; import com.sleepycat.je.Environment; import com.sleepycat.je.EnvironmentConfig; import java.io.File; ... // Open the environment. Allow it to be created if it does not // already exist. Environment myDbEnvironment = null; try { EnvironmentConfig envConfig = new EnvironmentConfig(); envConfig.setAllowCreate(true); myDbEnvironment = new Environment(new File("/export/dbEnv"), envConfig); } catch (DatabaseException dbe) { // Exception handling goes here }
Opening an environment usually causes some background threads to be started. JE uses these threads for log file cleaning and some administrative tasks. However, these threads will only be opened once per process, so if you open the same environment more than once from within the same process, there is no performance impact on your application. Also, if you open the environment as read-only, then the background threads (with the exception of the evictor thread) are not started.
Note that opening your environment causes normal recovery to be run. This causes your databases to be brought into a consistent state relative to the changed data found in your log files. See Databases and Log Files for more information.
Most JE applications only need a single database environment because any
number of databases can be created in a single environment, and the
total size of the data in an environment is not limited. That said,
your application can open and use as many environments as you have disk and
memory to manage. Also, you can instantiate
multiple Environment
objects
for the same physical environment.
The main reason for multiple environments is that an application must manage multiple unique data sets. By placing each data set in a separate environment, the application can gain real advantages in manageability of the data, and with application performance. By placing each data set in a unique environment, a separate set of log files is created and maintained in a separate directory, and so you can manipulate the log files for each data set separately. That is, you can:
Backup, restore or delete a single data set separately by copying or removing the files for its environment.
Balance the load between machines by moving the files for a single data set from one machine to another.
Improve I/O performance by placing each data set on a separate physical disk.
Delete individual data sets very efficiently by removing the environment's log files. This is much more efficient than deleting individual database records and is also move efficient than removing databases, and so can be a real benefit if you are managing large temporary data sets that must be frequently deleted.
Be aware that there is a downside to using multiple environments. In particular, understand that a single transaction cannot include changes made in more than one environment. If you need to perform a set of operations in more than one data set atomically (with a single transaction), use a single environment and distinguish the data sets using some other method.
For example, an application running a hosted service for multiple clients may wish to keep each client's data set separate. You can do this with multiple environments, but then you can operate on all data sets atomically. If you need to wrap operations for multiple data sets in a single transaction, consider some other approach to keeping the data sets separate.
You can, for example, distinguish each data set using a unique key range within a single database. Or you can create a secondary key that identifies the data set. Or you could use separate databases for each dataset. All of these approaches allow you to maintain multiple distinct dataset within a single environment, but each obviously adds a level of complexity to your code over what is required to simply use a unique environment for each data set.
You can spread your JE environment across multiple subdirectories. This allows you
to improve data throughput by spreading disk I/O across multiple disks or filesystems.
Environment subdirectories reside in the environment home directory and are named
data001/
through dataNNN/
, consecutively, where
NNN
is the number of subdirectories that you want to use. Typically,
each of the dataNNN/
names are symbolic links to actual directories
which reside on separate file systems or disks. Alternatively, each subdirectory can
be mount points for filesystems which reside on different disk drives.
You control the number of subdirectories you want to use with the
je.log.nDataDirectories
property in the
je.properties
file. This value must be set prior to opening the
environment, and the subdirectories must already exist at that time. The value set for
this property can not change over the course of the environment's lifetime, or an
exception is thrown when you attempt to open the environment.
The default value for je.log.nDataDirectories
is 0, and this means no
subdirectories are in use for the environment. A value greater than 0 indicates the
number of subdirectories to use, and that number of subdirectories must exist prior to
opening the environment.
For example, if you set je.log.nDataDirectories
to 3, then the first
time you open the environment (and for every environment open after that) your
environment home directory must contain three subdirectories named
data001
, data002
and data003
.
This causes your JE log files (the *.jdb
files) to be spread
evenly across those three subdirectories. Finally, if you change the value of
je.log.nDataDirectories
without first completely deleting your
environment, then your application will throw exceptions when you open your environment.
By default, each distinct JE environment has a separate, private in-memory cache. If a single JVM process will keep open multiple environments at the same time, it is strongly recommended that all such environments are configured to use a shared cache. A shared cache makes much more efficient use of memory than separate private caches.
For example, imagine that you open 5 environments in a single process and a total of 500 MB of memory is available for caching. Using private caches, you could configure each cache to be 100 MB. If one of the environments has a larger active data set than the others, it will not be able to take advantage of unused memory in the other environment caches. By using a shared cache, multiple open environments will make better use of memory because the cache LRU algorithm is applied across all information in all enviornments sharing the cache.
In order to configure an environment to use a shared cache, set
EnvironmentConfig.setSharedCache()
to true
. This must be set for every environment in the
process that you want to use the shared cache. For example:
package je.gettingStarted; import com.sleepycat.je.DatabaseException; import com.sleepycat.je.Environment; import com.sleepycat.je.EnvironmentConfig; import java.io.File; ... // Open the environment. Allow it to be created if it does not // already exist. Environment myEnv1 = null; Environment myEnv2 = null; try { EnvironmentConfig envConfig = new EnvironmentConfig(); envConfig.setAllowCreate(true); envConfig.setSharedCache(true); myEnv1 = new Environment(new File("/export/dbEnv1"), envConfig); myEnv2 = new Environment(new File("/export/dbEnv2"), envConfig); } catch (DatabaseException dbe) { // Exception handling goes here }


16 March 2006
The Ministry of Health and Family Welfare reported one case of polio, the first reported case of polio in Bangladesh since August 2000. On 8 March, polio was confirmed in a nine year-old girl from Chandpur district of Chittagong division who became paralyzed on 23 January.
On 10 March, genetic sequencing of the virus by the Global Specialized Polio Laboratory in Mumbai India, which tests all polio samples from Bangladesh, showed that the virus is closely related to viruses from western Uttar Pradesh in India.
The Ministry of Health and Family Welfare today announced that a nation-wide polio immunization campaign will kick-off on 16 April. Two additional campaigns will follow at four-week intervals.


Enter your email:
Create Password:
Date of Birth:
What is your class standing?
Freshman
Sophomore
Junior
Senior
Other
What is your favorite color?
Clear
Submit


Vulnerability - This measure is used to promote the N&CC Program’s goal of health equity, by targeting investment in pedestrian infrastructure in neighborhoods that would benefit most from increased walkability. Vulnerability scores are derived from socioeconomic and demographic indicators (Unemployment, Age Dependency, Educational Attainment, Housing Vacancy, and Poverty Rates) that correlate with high vulnerability to negative health outcomes.
Displayed on: Y-Axis
Circuity - This measure is used to identify areas of the city where street network topology is inefficient, and thus areas that could benefit from the addition of new links and nodes. Circuity scores are calculated using distances between census blocks and park access points. A high circuity score indicates that nearby residents have to travel a disproportionately long distance to reach their nearest park.
Displayed with: Circle Color
Pedestrian Safety - This measure is used to identify park service areas that are particularly unsafe for pedestrians. Pedestrian Safety scores are derived from an analysis of street typology, speed limits, and the presence or absence of sidewalks within the park service area.
Displayed in: Mouseover Tooltip
Population- The total number of people living within each park’s service area, which gives a sense of the potential number of people who could benefit from investments in each particular park.
Displayed with: Circle Size


Hi, we are the Wallace lab at King’s College London. We build artificial mimics of the cell membrane to improve our understanding of the physics underpinning cell biology and engineer new devices inspired by biology.
Our approach is to dismantle the membrane into its component parts, and then rebuild it from scratch to figure out what’s going on. We do this by developing new optical techniques capable of detecting individual molecules.
New paper - On demand modulation of lipid composition in an individual bilayer. Soft Matter 2017
PhD funding for 2017 We’re looking for three new PhD researchers to work on vesicle self-replication, new tools for optical imaging, and nanopore sequencing.


Integrate with other services that are relevant later
Extends your relevancy
Gives customers flexibility to do anything they want
Fit into their business and workflow over time
Document it well
Make it easy to understand and get started with
They can build their own integrations
Also helpful when you do integration work for clients
How do we do this?
As web developers
what general integration pattern
are we already familiar with?
APIs
Why do we have APIs?
APIs allow
people to get their data
How do APIs work?
The client calls us
Why do they want their data?
To do things with it!
How do they use the API?
Call our API
Frequently
In a script/application
This is
polling
Polling is straight-forward
But there are some
Downsides
#1
Your client writes the code
How long until
someone murders your servers?
#2
To react faster, they have to poll more
More polling means
more resources
development time
support time
processors
memory
bandwidth
#3
It’s mostly useless
Most polls won’t return new data
#4
And it’s still not Real-Time™
Okay
we see the disadvantages
But so what?
We already have an API
It exists
It works
Let’s come back to what’s important
Fast response time
is what’s valuable
&
Polling helps them react quickly
But it’s only one approach
How else can we help them react quickly?
Because, if we can do this…
It’ll make our service more valuable
And that means happier customers
Maybe even some extra revenue
We know that polling is
Client –> Us
But what about the other way around?
Us –> Client
Hmm, this is interesting
Instead of
them calling us
to see if data changes
We let them know
when data has changed
Let’s do this over the web
since it’s common infrastructure
Client gives us a URL
&
We have events we watch for
When an event happens,
we make an HTTP POST request
to our client’s URL
and deliver some data
Boom, Webhooks!
The Benefits
#1
We write the code
#2
Fewer resources required
#3
We send the data just as it changes
This is Real-Time™
This is what I mean by
Push Notifications for the web
Exciting for integration!
We’ll see real-world examples later
We’ve got our background!
How about implementing it?
Let’s see a small example
Show us making a single request
Start small & build momentum
Random Number Generator
require_relative '../lib/webhooks'
class RandomNumberGenerator
include Webhooks
def initialize
self.webhooks = %w{http://localhost:9000}
end
def generate
random_number = SecureRandom.random_number(1000)
send_webhooks(:random_number, :generate, random_number)
return random_number
end
end
require 'net/http'
require 'securerandom'
require 'json'
module Webhooks
attr_accessor :webhooks
def send_webhooks(resource, action, data)
event_type = "#{resource}:#{action}"
payload = JSON.generate({
event: event_type,
data: data })
webhooks.each do |webhook|
url = URI.parse(webhook)
Net::HTTP.start(url.host, url.port) do |http|
headers = { 'Content-Type' => 'application/json' }
response = http.post('/', payload, headers)
end
end
end
end
Client code
...
class Polis < Sinatra::Base
...
post '/' do
# Note: Thanks to this SO page: http://stackoverflow.com/a/6318491/249218
http_headers = env.select{|h| h =~ /HTTP_/}
body_string = request.body.read
...
logger.info <<-LOG
Logging POST request:
Headers:
#{http_headers}
Body:
#{body_string}
LOG
status 200
return body_string
end
...
end
We sent our first webhook!
There’s no official spec
It’s a general practice to
Send data to a URL
when something happens
Requires some effort
Because it’s a general pattern
people have to implement the specifics
How about another demo?
Push a button on a site
Generate a random number
Send a text message
Random Number Button
Before we push the button
After we push the button
And the text sent
Client code
...
class RandomNumberTexter < Sinatra::Base
...
post '/' do
request.body.rewind
post_body = request.body.read
if request.content_type == 'application/json'
payload = JSON.parse post_body
is_random_number_generate = payload['event'] == 'random_number:generate'
return unless is_random_number_generate
has_payload_data = payload['data']
return unless has_payload_data
random_number = payload['data']
send_text(random_number)
status 201
else
status 202
end
post_body
end
...
end


PEE WEE'S BIG ADVENTURE A film review by Jeff Alan Copyright 1997 Jeff Alan
For various reasons, Paul Reubens, who created and played Pee Wee Herman for more than a decade, is sometimes dismissed by critics. There is no question that Mr. Reubens's downfall was perpetuated (or climaxed) by the incident a few years back where he was enjoying himself a little too much in a movie theatre. America was stunned: The person that they let their children watch on Saturday morning was now a sexually ambiguous figure. Parents do not like ambiguity when it comes to sexual orientation: Take Ellen DeGeneres for example, she in a matter of weeks will come out of the closet in a television sitcom. No public outcries here folks (except for the always outspoken Rev. Jerry Falwell).
It is unforunate that Mr. Reubens's brilliancy is masked by one night in his life which turned out to be a huge mistake. Brilliancy? Why would I say that? Well it's fairly simple: The character in Pee Wee Herman that was created by Reubens was an extremely unique character that first started off being raunchy in specials he did in the late 70's for HBO, but then turned into kids' oriented, really being perpetuated by the movie Pee Wee's Big Adventure.
Some very creative talents collaborated on this film: Phil Hartman (co writer) who is of SNL fame, and Tim Burton, one of this earliest movies, which really showed how masterful he could direct with weird and make-believe worlds (just as he showed us with EDWARD SCISSORHANDS and THE NIGHTMARE BEFORE CHRISTMAS). It is my point, that this film and Mr. Reubens's are highly underrated: I think Mr. Reubens's has done a lot more than people think in the film industry.
Pee Wee's Big Adventure was a great film.  Some critics lauded it.  I don't think you can appreciate this movie if you do not appreciate the creative genius that Paul Reubens possesses.
Sure, Pee Wee Herman is now an old character. Sure, Mr. Reubens has went on to different projects, like playing small roles in films like BATMAN II and GEORGE, and even the annoying product of nepotism in MURPHY BROWN, playing a guy named Andrew. But Mr. Reubens's creative genius should be noted. Why? I think that if he and Burton and Hartman had not made that effort, there would not have been an EDWARD SCISSORHANDS, nor would there have been a MARS ATTACKS.
In a nutshell, Pee Wee's Big Adventure was an entertaining film that let creative genius be shown in the sheer limelight, allowing other directors to expand upon the efforts of the film's creators.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


|
Enlightenment
Version 0.17.0
What is Enlightenment? Enlightenment is a Window Manager for X11. This is the latest incarnation of code of the Enlightenment window manager (often referred to in short as WM). This WM is built on the EFL (Enlightenment Foundation Libraries) that have been worked on very hard over the last few years. These libraries provide a sound base on which to build the WM and related tools, utilities, and applications. Right now if you are just a "user" this code is NOT for you. You're on your own. If you are a developer wanting to work on the code - read on. But first we should take a break for some history... |
A Brief History of Time... err Enlightenment
In the past E has undergone 1 major rewrite since release DR (Development Release) 0.1. This rewrite occurred for DR 0.14). DR 0.17 heralds another major rewrite. We have to be honest here. The reason for this is the fact that we got lazy. Design went out the window in favor of quick fixes and fast features. Too many people worked on the code with too little care and attention to detail. Large design mistakes were made, that to undo would be paramount to half a rewrite. Patches were accepted without taking care to look at them in detail, clean them or even reject them if not “well done” enough for E's code. Thus the decision was made to fix things once and for all and split things up, have well defined interfaces (the EFL library API's) and clean and consistent code and naming schemes. No it's not perfect - probably it will never be, but we are trying. It is a massive improvement over anything Enlightenment had before, and we are proud enough to probably say it's some of the better API's and code of any available in the world or used in any application or WM. It's not the best, but it's pretty good. In doing this rewrite and split, we aim to not make those mistakes again that happened before DR 0.17.0.
With Enlightenment and EFL's massive break-up into smaller sized chunks, many users will complain about “how hard it is to install” because there are so many libraries and inter-dependencies to handle. We believe this is not our job, but the job of a package management system to handle. We have documented the dependencies for people to follow, but if anything, we aim to split things up more to make maintenance, in the long term, an easier task. So in an effort to avoid them, Here is a quick style and design guide for working on this code. Please follow it, and if what you want to do doesn't fit in, please discuss it first. Discuss your designs on the e-devel<EMAIL_ADDRESS>mailing list. Make your code consistent and easy to follow - make it follow the style of the rest in function naming, variable naming, access functions etc. Use existing infrastructures - or extend them cleanly as needed. Just because an infrastructure or system doesn't provide an accessor or way of doing something does NOT mean you can't or couldn't add it. Choose a clean “correct” implementation over a nasty hack, all the time. You get the idea. Now, on to the style guide.
Enlightenment Stylin' straight from the top of ma dome
Firstly comes naming. All functions are name spaced. The EFL libraries begin with library_something_something. It is object oriented naming so you will have system_subsystem_subsystem_object_verb() as a name. For example: e_config_load() or e_border_move() etc. All functions are all lower-case with underscores between "words". All functions that are accessed outside a file must have a prototype in the file's header. All files have their code file (e_file.c) and a header (e_file.h). The main "master" header (e.h) includes all the smaller ones. All functions within that file are the same name as the file. i.e. e_frog.c contains functions called e_frog_something(). All internal functions only used within that file should be declared as static and should begin with an underscore. i.e. _e_frog_something(). All "local" globals (global to that file only) should be declared static and beginning with _e_frog just like functions. All static local functions should be at the end of the file. All static function prototypes should be first at the top of each file. All static local variables should come next, then followed by the accessible functions. Any system that has "state" should have an init and shutdown function. The init and shutdown functions should be called from e_main.c during startup and shutdown of the WM. It is encouraged that even systems that do not have state have an init and shutdown call pair, just in case in future they will gain state internally.
Any system that returns objects (allocated structures) should probably use the E_Object system as a parent. See examples on its use in the code. E_Object provides a simple object wrapper with reference counting, object pointer and type checking and safety that should, runtime, trap a lot of potential problems and let the programmer know about them. Use the object type checking macros for checking if an object passed into a function as a parameter is a valid object.
Keep to the indentation and spacing style thats there - it makes it easier to read if all the code matches. All functions called as "callbacks" should be called _e_system_cb_something. The "cb" denotes that that function may get called by other code, maybe unpredictably, at any time in response to an event, timer, or something mostly out of the control of the program itself. Functions such as the free function for an object aren't the same kind of callback, since they are predictable and controllable, so they do not get "cb" in their name.
So that's the quick rundown on basic coding style. More will likely be added to this list, but the best way to put it all is "look at what's there and follow the same style".
Tree Layout
The E17 source tree is well structured, with a location for everything. In the top-level directory you will find a src directory that is the master directory for all the C source code for the WM and components. You will also find a doc and data directories. The doc directory contains all documentation (this document for example).
The data directory contains all cross-platform data needed for the WM to run as well as a basic default theme that it also needs to run. Currently the default theme is not complete at all and is no indication of Enlightenments final look when it is released. It is only just enough to make it work and demonstrate an example of how to make a theme. There is also other data used for things like low-level error dialogs (used for example if the theme doesn't work) as well as a default font and other system data such as data for the splash screen displayed while Enlightenment starts up.
The src directory contains 3 main repositories of code. They are bin, lib and modules. The bin directory contains all the source code for the WM itself and any primary executables it uses during execution. The modules directory contains all plug-in modules that E17 can load and unload dynamically at runtime, allowing the WM to be extended even after it has been compiled and installed by users, other developers or by the E development team itself. These modules are intended to provide clean modular boundaries for certain features of Enlightenment too, so if a feature isn't used it doesn't have to use any resources at all. Each module lives in its own subdirectory with the code and special module specific data like images, Edje .eet files etc. that are specific to that module. See further on for more information on modules.
Design Ethos
As for design, Enlightenment doesn't strictly follow a conservative WM design. It does some things quite differently, with the aim of providing more features with simpler internal design to achieve more features with more solidity than a conservative design. An example of this is the fact that E17 does away completely with the root window and puts all managed windows within a virtual root. Virtual roots are valid to be used in WM's but are rarely used and many client applications are badly written to hunt for windows on the screen ASSUMING there is no virtual root. These are bugs in the respective applications (some of which are: Mozilla, xwininfo, xprop, xkill) which when searching for an application window should walk the window tree correctly. The reason for Enlightenment to adopt virtual roots is not to make users annoyed or force application developers to change their code, but to allow certain things to be done much more efficiently. A virtual root allows the WM to scroll windows seamlessly and all in sync by using window gravity and resizing of the virtual root container. It also allows the WM to simulate different resolutions very easily since it can control the virtual root window, which is not normally possible to do with the real root window.
Managers
Managers are the basic unit of window management. One Manager object is created per root window to manage. For more people, even if they run Xinerama across multiple screens, there is only 1 root window, and thus E17 will only ever have 1 Manager object. If the user runs traditional Multihead there will be 1 root window per screen, that may be a different size and color depth. E17 will create 1 Manager object per screen in this situation. The Manager object handles redirection WM specific events for the root window into the WM, thus effectively being able to trap several kinds of events before a client gets to perform them, thus enabling it to be a WM. A Manager object actually creates a window the size of the root window it manages and covers the root window up completely. Each Manager object may contain 1 or more Container objects which in-turn create their own child windows of the Manager window.
Containers
Container objects create their own windows to CONTAIN managed window frames, the desktop window (the desktop background is actually just a big window that is always kept below all frame windows that contains a canvas for displaying the desktop background and all desktop objects such as a launcher bar, file icons, etc. etc.). The Container is responsible for holding this together and also managing a list of “obscuring” objects that fully obscure the desktop canvas, so it can help optimize drawing to the desktop canvas by avoiding to draw parts of the desktop background canvas that cannot be seen at all. This list is also used to draw soft drop shadows on the desktop canvas by the Dropshadow module. The Container object managed the desktop background, which is actually a complete EDJE object. This may seem strange as a simple JPEG or PNG or GIF may be enough, but by using an EDJE object for the background, the desktop wallpaper can be animated, react to events and input, scale intelligently (not just “stretch” or “tile”), where the desktop wallpaper designer can specify what elements of the wallpaper scale, align, where and how, if they tile, overlay, underlay each other, and how.
Currently the Container only responds to configuration change events to change the background, which needs to be a path to an Edje .eet file that contains a Edje group of the key “desktop/background”. It will load this group, if present in the file, as the background. What it needs is a configuration tool that can browse the filing system and directories for .eet files that are like this, display thumbnails and previews, allow a user to select a new background and maybe specify if the background file should change between different virtual desktops (which are currently not implemented), and also be able to browse normal JPEG, PNG etc. files and “import” them into a users wallpaper database (a directory of wallpaper .eet files) and thus convert into a Edje .eet file, which now retains the scaling, tiling and other preferences the user selected within the file. The user can now give this file to others and it will retain the same information, without them needing to know if the wallpaper needs to tile as a pattern, stretch etc.
The desktop canvas is also shared by many modules that may display things like battery meters, cpu load, launcher bars, drop shadows etc. on the desktop background. The desktop canvas lets this be a bit more organized than it would be with a “free for all” drawing to the root window under more conservative WM's.
Borders
Borders are the frame outside an application window that is controlled by the WM and that holds the application window within, and allows users to move, resize, shade, lower, close and otherwise control windows. This is currently buggy and not very useful and needs work in combination with the Manager system.
Menus
Enlightenment has its own Menu widget code to allow for highly themable menus that match your WM's theme. These menus are intended to act as ways to launch programs, select actions to perform with context sensitive menus and to provide basic on/off and option select options for simple enabling and disabling of features of states on objects. The menu code is fairly solid, but incomplete. It is efficient, able to let the user navigate with the keyboard, mouse wheel or mouse. It currently needs work to support shaped menu windows, be able to add, delete and modify menu items while the item is still realized, and a set of other things listed in the TODO list at the top of the e_menu.c source file.
Modules
Modules are a new and powerful way to extend E17 by being able to load and execute code during runtime that may be shipped with E17 or even developed after installation as enhancements and additions. This system still needs work in the configuration department, knowing what modules to load and not load, if they are to be enabled once they are loaded etc. It is possible to have “dormant” modules that are loaded but not enabled. They will use memory and resources for the module entry and the binary executable code loaded into memory, but nothing else. An enabled module will also use resources for objects, images, etc. etc.
Dropshadow Module
This module demonstrates the Container shape system allowing a module to monitor obscuring shapes in a container. This lets the module, in this case, draw soft shadows under these obscuring shapes. It is a fairly simple module and also demonstrates a module that has no visible elements on the screen you can click on or control directly with the mouse or keyboard. It could do with some optimization work with the blur algorithm, like clipping out the obscuring shape entirely from the blurring algorithm, and perhaps finding a way of blurring using a Gaussian blur that is faster.
IBar Module
The IBar module is a template for doing a “launcher panel” in E17. It allows the user to manage a list of frequently used applications to go into the IBar's panel. It is an attempt to unify the configuration of “bars” in E17 so if a user changes launcher bar modules, they can retain at least most of the basic configuration, like what applications are in the bar, and so-on. The IBar has some unique characteristics allowing a lot of applications to be held in a small bar, by having it auto-scroll on mouse over to the desired location in the list. It uses the Application interface to fetch a list of applications and monitor this list for changes on disk. The IBar also allows itself to be resized and dragged around the edges of the screen, set to fill a edge, auto-size to fit its contents, or be a fixed size.
It needs work to be done on auto hide and auto show, so on an auto show it could signal other parts of E17, for example, to slide all windows out of the way, or other such features. It needs work to display application names, descriptions and other such information as well. It also needs to support the icon size changing on the fly as well as saving and loading its configuration, On of the largest pieces of work is to support subdirectories in the bar's application list. How best to do this is still up in the air. For now this isn't supported.
Test Module
This is just a test module for playing with new module features. It will not make its way into a final E17 release, but can be used as a bare skeleton for building a new module.
Applications
This subsystem is responsible for being able to list applications held in E17 specific application directories. This system can inform other parts of E17 and modules of changes, such as an application being deleted or added, its name or icon changed, the order of applications in a directory changing, an application being executed or displaying its window, or finishing execution. It can share the application lists between multiple systems to save RAM and CPU and I/O in loading them multiple times.
It may be of surprise to find E17 is not loading the XML, .desktop entries etc. etc. than KDE and GNOME use. In all honesty that system is a little overcomplicated and hard to keep up with. It also is not as robust as E17's system. With E17's system the images for the icons are within the application file. They cannot be separately deleted. Also using an Edje .eet file for the application entry allows for fully scalable and animated icons as well, with excellent compression abilities. The intent is to have external tools that can import and create such files FROM existing system databases of applications and monitor these for changes, reflecting those changes in Enlightenments application directories.
IPC
IPC (inter process communication) is provided in E17 as a mechanism for another application to send commands and requests to Enlightenment and receive responses with information. This mechanism is intended to allow external utilities to be written and ask Enlightenment to do things via a communications channel built into the WM. E17 uses the Ecore IPC system to do this. So far it support no commands at all, but will accept clients connecting. Many commands need to be implemented here, such as being able to ask E17 to load or unload a module, change background, change focus mode, theme, restart etc.
Objects
This provides a basic Object Oriented handling system for E17. Any major “object” in E17 should use this system for handling reference counting, destruction and creation of objects, as it provides safety mechanisms to check if an object has accidentally been destroyed and still has a pointer to it, keep references on objects intact etc. This should be used as much as possible, as well as the macros it provides for checking on entry points into subsystem functions etc.
Pointers
This subsystem handles setting of X mouse cursors in an abstract fashion. In theory E just looks at a cursor as RGBA pixel data. In future Ecore will be expanded to be able to set full color cursors in X as well as monochrome versions of them. Currently it is very simplistic loading a fixed PNG as a cursor. This needs to be improved.
Box
This is a basic Evas Smart Object that acts as a horizontal or vertical box layout container. It needs more features for layout, like better non homogeneous layout. This is a handy object that is sued by menus and the IBar module for starters.
Icons
This is an Evas Smart Object that creates a icon display object That handles scaling the icon sensibly within the object bounds, so the application doesn't have to handle trying to retain aspect ratio for the object. This is a simple smart object and indicative of possibly more in future to go into E17's code to save time and effort.
Paths
This helps E17 find files in a list of paths/directories. There isn't a lot to say about this except that it works and may need some minimal expansion in future.
User Information
This returns information about a user such as their home directory. This will expand in future.
Virtual and Multiple Desktops
This is not implemented yet.
Error Dialogs
This displays very basic error dialogs right now, either as text in the console if E17 isn't ready to run graphically yet, or as text in a graphical dialog box. This needs to be made more robust, so it can display errors if it cannot find the font and images for the basic error dialog. It should also be expanded to support fully themed dialogs if the theme loads properly and properly supports theming of dialogs, so dialogs look good.
Initialization Splash Screen
This keeps the user amused while E17 starts up and launches all programs. For now it is artificially fixed to stay up for 4 seconds so you can enjoy its radiant splendor, as E17 starts so quickly you'd never see it, but in future it will stay up until the WM is all ready to go.
Configuration
Loading and saving configuration is a big task. E17 uses EET directly as its underlying layer for saving and loading configuration. The E17 Config system simply loads all the initial configuration values, and saves them when and if they change internally. It needs work to make it much simpler as many more config values will be added and it needs to be more efficient and loading them if they change runtime via a listener (the number of listeners needs to be reduced), so maybe loading config values in sections/groups and deferring a reload in a Ecore Job would limit the reloading effects. Also declaring config values and how to load and declare them is required. Maybe a big table with default values, min, max, step, descriptions etc.
File Operations
Files need to be accessed, listed, found, examined as part of E17 running. This file has simplified, easy-to-use functions for doing anything related to files. This file will expand over time as more file operations are needed.
Miscellaneous Utilities
Things that are useful in many places but do not have enough scope to have a file of their own go into this file.


Full example
// source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_shopping_cart_example_code.htm
trigger calculate on Item__c (after insert, after update, after delete) {
// Use a map because it doesn't allow duplicate values
Map<ID, Shipping_Invoice__C> updateMap = new Map<ID, Shipping_Invoice__C>();
// Set this integer to -1 if we are deleting
Integer subtract ;
// Populate the list of items based on trigger type
List<Item__c> itemList;
if(trigger.isInsert || trigger.isUpdate){
itemList = Trigger.new;
subtract = 1;
}
else if(trigger.isDelete)
{
// Note -- there is no trigger.new in delete
itemList = trigger.old;
subtract = -1;
}
// Access all the information we need in a single query
// rather than querying when we need it.
// This is a best practice for bulkifying requests
set<Id> AllItems = new set<id>();
for(item__c i :itemList){
// Assert numbers are not negative.
// None of the fields would make sense with a negative value
System.assert(i.quantity__c > 0, 'Quantity must be positive');
System.assert(i.weight__c >= 0, 'Weight must be non-negative');
System.assert(i.price__c >= 0, 'Price must be non-negative');
// If there is a duplicate Id, it won't get added to a set
AllItems.add(i.Shipping_Invoice__C);
}
// Accessing all shipping invoices associated with the items in the trigger
List<Shipping_Invoice__C> AllShippingInvoices = [SELECT Id, ShippingDiscount__c,
SubTotal__c, TotalWeight__c, Tax__c, GrandTotal__c
FROM Shipping_Invoice__C WHERE Id IN :AllItems];
// Take the list we just populated and put it into a Map.
// This will make it easier to look up a shipping invoice
// because you must iterate a list, but you can use lookup for a map,
Map<ID, Shipping_Invoice__C> SIMap = new Map<ID, Shipping_Invoice__C>();
for(Shipping_Invoice__C sc : AllShippingInvoices)
{
SIMap.put(sc.id, sc);
}
// Process the list of items
if(Trigger.isUpdate)
{
// Treat updates like a removal of the old item and addition of the
// revised item rather than figuring out the differences of each field
// and acting accordingly.
// Note updates have both trigger.new and trigger.old
for(Integer x = 0; x < Trigger.old.size(); x++)
{
Shipping_Invoice__C myOrder;
myOrder = SIMap.get(trigger.old[x].Shipping_Invoice__C);
// Decrement the previous value from the subtotal and weight.
myOrder.SubTotal__c -= (trigger.old[x].price__c *
trigger.old[x].quantity__c);
myOrder.TotalWeight__c -= (trigger.old[x].weight__c *
trigger.old[x].quantity__c);
// Increment the new subtotal and weight.
myOrder.SubTotal__c += (trigger.new[x].price__c *
trigger.new[x].quantity__c);
myOrder.TotalWeight__c += (trigger.new[x].weight__c *
trigger.new[x].quantity__c);
}
for(Shipping_Invoice__C myOrder : AllShippingInvoices)
{
// Set tax rate to 9.25% Please note, this is a simple example.
// Generally, you would never hard code values.
// Leveraging Custom Settings for tax rates is a best practice.
// See Custom Settings in the Apex Developer Guide
// for more information.
myOrder.Tax__c = myOrder.Subtotal__c * .0925;
// Reset the shipping discount
myOrder.ShippingDiscount__c = 0;
// Set shipping rate to 75 cents per pound.
// Generally, you would never hard code values.
// Leveraging Custom Settings for the shipping rate is a best practice.
// See Custom Settings in the Apex Developer Guide
// for more information.
myOrder.Shipping__c = (myOrder.totalWeight__c * .75);
myOrder.GrandTotal__c = myOrder.SubTotal__c + myOrder.tax__c +
myOrder.Shipping__c;
updateMap.put(myOrder.id, myOrder);
}
}
else
{
for(Item__c itemToProcess : itemList)
{
Shipping_Invoice__C myOrder;
// Look up the correct shipping invoice from the ones we got earlier
myOrder = SIMap.get(itemToProcess.Shipping_Invoice__C);
myOrder.SubTotal__c += (itemToProcess.price__c *
itemToProcess.quantity__c * subtract);
myOrder.TotalWeight__c += (itemToProcess.weight__c *
itemToProcess.quantity__c * subtract);
}
for(Shipping_Invoice__C myOrder : AllShippingInvoices)
{
// Set tax rate to 9.25% Please note, this is a simple example.
// Generally, you would never hard code values.
// Leveraging Custom Settings for tax rates is a best practice.
// See Custom Settings in the Apex Developer Guide
// for more information.
myOrder.Tax__c = myOrder.Subtotal__c * .0925;
// Reset shipping discount
myOrder.ShippingDiscount__c = 0;
// Set shipping rate to 75 cents per pound.
// Generally, you would never hard code values.
// Leveraging Custom Settings for the shipping rate is a best practice.
// See Custom Settings in the Apex Developer Guide
// for more information.
myOrder.Shipping__c = (myOrder.totalWeight__c * .75);
myOrder.GrandTotal__c = myOrder.SubTotal__c + myOrder.tax__c +
myOrder.Shipping__c;
updateMap.put(myOrder.id, myOrder);
}
}
// Only use one DML update at the end.
// This minimizes the number of DML requests generated from this trigger.
update updateMap.values();
}


I've had my share of speed. Every kid today has in this epidemic mess of mixed amphetamine salts, a.k.a Adderral, methylphenidate, a.k.a Ritalin and Concerta, and diet pills with the likes of phentermine brands like Fastin and Adipex taking ahold of the even educated, private school families i've grown to loathe.
If this was to be so, why not have my hayday with crank? Well, my education came a little late to tell the truth. My first speed experience came at the abnormally old age of 17, years after i'd tried phencyclidine(PCP) and even mother-fLuckin heroin. Adderral took hold of me the first day I tried it, and now I have forever respected amphetamines in a whole new light.
Now here I sit, almost a year later, but well immersed in a new world of drug knowledge having become a pseudo-moderator of 2 drug and lab related forums on a good message board. True impact was made when I successfully managed to finally get prescribed something for my ADD that had plagued my adolescence since -teen became a subfix to my age. Of course I worked up a tolerance to my first perscription, Adderral (Mixed amphetamine salts; DL), so I switched to Concerta (Methylphenidate hcl extended release capsules) to hopefully avoid a cross-tolerance which unfortuneately did not happen. Next, it was onto Dexedrine (Dextroamphetamine sulfate sustained release capsules) which for some reason was being metabolized or digested strangely which only left one more d-amph option; DextroStat tablets (Dextroamphetamine sulfate tablets).
Today's experiment:
I decided to see if smoking the d-amph in DextroStat tabs after I filtered the binders out of it would provide sufficient effects similar to an oral dose, potentially stronger in theory as to preserve my d-amph supply by using smaller amounts.
Time+ 0:00 = Binders successfully remove through a careful filteration leaving 5 mg of dextroamphetamine sulfate behind. The powder is dried, ground with a mortar and pestol, and poured onto a flat surface and further chopped with a razor.
Time+ 0:05 = First approximate 2 mg (2.1 mg) is smoked through a glass vaporizing pipe (tilt-pipe, chillum, crack-pipe, meth-pipe) that has been fitted with a small mesh screen to prevent draw-through. The smoke is rather harsh, typical of a sulfate salt but smells and tastes sweet yet artificial- as if a burning PLASTIC candle was nearby.
Time+ 0:07 = A cigarette and water break is taken and I feel a high dissimilar to the normal speed high yet closer to a marijuana or opium high. This is very euphoric, but i'm thinking too fast to enjoy it. My emotion-concious mind does not seem to adjust right in syncronization with the part of my mind getting the more sub/un-concious body-type high.
Time+ 0:11 = The second load is packed leaving some behind that is re-chopped and set into one line which is immedietly insufflated by means of a half of a hollowed-out ballpoint pen.
Time+ 0:12 = The second load, though larger, produces less hits. The sulfate smoke is really getting to me, yet I have an urge to screw up this experiment by smoking a bowl which I will not, because I want to keep my system uninhibited for this as much as possible.
Time+ 0:13 = This is nothing like a crank high. Nothing like a speed high. Nothing like anything speedy. I'd rather eat a ton of ephedrine than see my dextroamphetamine go to waste like this again. I know this high won't last long.
Time+ 0:20 = The high is very similar to marijuana with opium for some reason, but that shouldn't be so. It's strange but i'm being active with my hands, yet I lack vigilance. This is a common problem i'm noticing with ALL dosing forms of taking d-amph. The high is nice, but a bit ACTUALLY incapacitating. Suprisingly this is mellowing me out a bit mentally but my typing skills are wide awake and on cue, perhaps a bit before cue if that were possible.
Time+ 0:40 = Music sounds better, with more depth, but doesn't give me the drive that it would if I were to be on a different amphetamine, amphetamine analogue, or isomer/isomer combo of plain amph other than plain Dextro. Damn this mental shit; i'm begging to believe this is a ploy from the pharmaceutical developers who market brands of dextroamphetamine to make it more desirable and then not actually as worth while as a DL combination of levo and dextro.
Time+ 1:20-1:40 = Visual distortion shifting to sleepy eyes. The crash of smoking was not worth the high, at least not at this dose. Smoking 5 mg was a large dose to literally smoke in terms of the damage to my lungs and time taken to hit the pipe and physical size of the powder even after the binders were remove and it was chopped up. I would imagine that a large dose that will make me tweak on d-amph, though it is harder for me to feel anything on just one isomer than a combo of both dextro and levo (and I don't know about plain levo, because I have never had the pleasure to try it yet :(.), such as 15 mg and upwards would be more than enough when smoked. Then again, that might be completely disgusting so I think, the highest dose I would ever try smoking of d-amphetamine in one sitting would be 10 mg and definately no more.

Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Form visualizations of high dimensional mapping structures of random forests and feature contributions.
| Version: | 1.11.1 |
| Imports: | Rcpp (≥ 0.11.3), rgl, kknn, randomForest |
| LinkingTo: | Rcpp |
| Suggests: | caret, e1071 |
| Published: | 2017-05-30 |
| Author: | Soeren Havelund Welling |
| Maintainer: | Soeren Havelund Welling <SORHAWELL at GMAIL.COM> |
| License: | GPL-2 |
| URL: | http://forestFloor.dk |
| NeedsCompilation: | yes |
| SystemRequirements: | OpenGL, GLU Library, zlib |
| Citation: | forestFloor citation info |
| Materials: | NEWS |
| CRAN checks: | forestFloor results |
| Reference manual: | forestFloor.pdf |
| Package source: | forestFloor_1.11.1.tar.gz |
| Windows binaries: | r-devel: forestFloor_1.11.1.zip, r-release: forestFloor_1.11.1.zip, r-oldrel: forestFloor_1.11.1.zip |
| OS X binaries: | r-release: forestFloor_1.11.1.tgz, r-oldrel: forestFloor_1.11.1.tgz |
| Old sources: | forestFloor archive |
| Reverse enhances: | Rborist |
Please use the canonical form https://CRAN.R-project.org/package=forestFloor to link to this page.