Hi, this is a research using topic modeling techniques to analyze FINRA TRACE. This research is supervised under professor Louiqa Raschid at the University of Maryland.


Lorem ipsum dolor sit, amet consectetur adipisicing elit. Minima alias perferendis, aliquam ab maxime ipsa natus fuga exercitationem, dolorem nostrum assumenda enim soluta nesciunt reiciendis quis, dicta quod beatae quibusdam. Lorem ipsum dolor sit amet...
Read More »You are only few steps away from getting close to us.
If you haven't registerd yet, what are you waiting for... Just simply register and order our products online
-- Tech Wolves --


Your Chrome app "Read Later Fast" has been updated with some bug fixes.
In the meantime, we would also like to introduce a brand-new Chrome extension,SearchO, by the Diigo team.
In the meantime, we would also like to introduce a brand-new Chrome extension,SearchO, by the Diigo team.
SearchO makes it super-easy to switch among the most widely used search options, so that searching the same terms on different search engines is just one-click away. (customization of search engines coming soon)
SearchO is a perfect complement to Chrome's Omnibox, and can really speed up your search process See more details.
SearchO is a perfect complement to Chrome's Omnibox, and can really speed up your search process See more details.


The SUV was stolen around 9:30 p.m. Sunday. The vehicle containing the 6-year-old boy and his 9-month-old brother was then found a short time later less than two blocks away.
Authorities say two women put a note on the SUV because it was blocking their driveway, unaware that the children were sleeping in the back. The women soon learned police were looking for the vehicle and they notified authorities.
Authorities say the children appeared to be unharmed but were being evaluated by doctors as a precaution.
The person who stole the SUV remained at large Monday.


CopyrightMuchYes FoodsEvenMoreMuch YesYes. Yay.
There was an error with error handling. Too bad. Not your day, man.


Breakout With Tkinter
Table of Contents
A tkinter breakout implementation from the book Python Game Programming by Example
. Although Tkinter is referred to primarily as a GUI builder, this example shows you how to use it to re-create the arcade game Breakout using only the python standard library.
Pre-Installation
Although the tkinter
python library is part of the standard python installation, it relies on Tcl/Tk and a c-python binary that you have to build or install. To get it in ubuntu you can use apt-get
.
sudo apt-get python3-tk
Imports
# python standard library
from abc import ABCMeta
from abc import abstractproperty
from collections import namedtuple
from copy import copy
import re
import string
import tkinter
Constants
BLUE = "#0000ff"
LAVENDER = "#aaaaff"
WHITE = "#ffffff"
NUMERIC = (int, float)
REVERSE_DIRECTION = -1
LEFT = -1
RIGHT = LEFT * REVERSE_DIRECTION
UP = -1
EDGE_OF_SCREEN = 0
NO_MOVEMENT = 0
Base Classes
Coordinates
This is a named tuple to see if I can keep the coordinates returned by tkinter straight.
Coordinates = namedtuple("Coordinates", ["top_left_x",
"top_left_y",
"bottom_right_x",
"bottom_right_y"])
Base Widget
A base-class to implement the methods common to all the game objects. The python 3 syntax seems to have changed slightly so you have to use metaclass=ABCMeta
in place of object
instead of putting __metaclass__==ABCMeta
the way I used to in python 2.7.
The item
property
class BaseWidget(metaclass=ABCMeta):
"""base class for game object's
Parameters
----------
canvas: tkinter.Canvas
canvas to draw on
"""
@abstractproperty
def item(self):
"""the canvas item"""
return
The item
will be an identifier pointing to a tkinter widget. It gets returned by the function call to create the widget (e.g. canvas.create_oval
).
Position
@property
def position(self):
"""the coordinates of the object on the canvas
Returns
-------
tuple: x0, y0, x1, y1
"""
x0, y0, x1, y1 = self.canvas.coords(self.item)
return Coordinates(top_left_x=x0,
top_left_y=y0,
bottom_right_x=x1,
bottom_right_y=y1)
The call to canvas.coords
returns the coordinates of the bounding-box for the widget. The first two values are the x and y coordinates for the upper-left corner of the box and the last two values are the x and y coordinates of the bottom-right corner.
Move
def move(self, horizontal_offset, vertical_offset):
"""move this object to the coordinates
Parameters
----------
horizontal_offset: int
x-axis pixels to move
vertical_offset: int
y-axis pixels to move
"""
self.canvas.move(self.item, horizontal_offset, vertical_offset)
return
This moves the object. Rather than giving it coordinates, the move
method moves the object vertically and horizontally the number of pixels you pass in for each axis. You could think of the values as being added to each of the coordinates (so negative numbers will move the object in the opposite direction from positive numbers).
Delete
def delete(self):
"""destroy this canvas item"""
self.canvas.delete(self.item)
return
This deletes the object from the canvas. If you attempt to use it after this tkinter will raise an exception.
Base Settings
A base class to hold settings. It (partly) implements the fluent interface design pattern. I'm not one-hundred percent convinced that it's a good idea in python, but I wanted to add value checking and document the values I expect a little better.
class BaseSettings(metaclass=ABCMeta):
"""fluent interface"""
_hex_pattern = None
@abstractproperty
def attributes(self):
"""list of attribute names
This is used by the call to check the attributes
"""
return
The attributes
will be a list (or tuple) of strings that match the variable-names in the settings objects that are required (e.g. to require that self.table
has a value other than None, put "table" in the list). This gets used by the __call__
method (defined below).
@property
def hex_pattern(self):
"""compiled regex to match hex-colors"""
if BaseSettings._hex_pattern is None:
hex_character = "\da-fA-f"
base = "(?P<{{0}}[{0}])(?P={{0}})".format(hex_character)
BaseSettings._hex_pattern = re.compile("#" +
base.format("r") +
base.format("g") +
base.format("b"))
return BaseSettings._hex_pattern
The hex_pattern
will match any string that starts with a pound sign (#) followed by three sets of hex-digit pairs. A hex-digit is an integer from 0 to 9 or one of the letters from a to f (case insensitive). Since it requires pairs, each hex-digit has to be repeated twice. So it will match #aabbff but not #abf or #0123ab. It's used by the next method.
def check_hex_color(self, value, identifier):
"""checks the color is a valid hex-code
Parameters
----------
value: string
color-code to check
identifier: string
error-message identifier
Raises
------
TypeError: if string is malformed
"""
if not re.match("#" + "[{0}]".format(string.hexdigits) * 6, value):
raise TypeError("{0} must be a 6-digit hex string, not {1}".format(
identifier, value))
return
The colors set in this code are based on RGB hex-strings. The check_hex_color
method validates that they are look something like "#aabbcc".
def assert_positive_number(self, value, identifier):
"""checks the value
Parameters
----------
value: int or float
value to check
identifier: string
something for the error message
Raises
------
TypeError if value is not a positive number
"""
self.check_numeric(value, identifier)
self.check_positive(value, identifier)
return
assert_positive_number
checks that the value
passed in is a number greater than 0.
def check_positive(self, value, identifier):
"""check that value is greater than zero
Parameters
----------
value: numeric
value to check
identifier: str
description for error messages
Raises
------
TypeError: if value is <= 0
"""
if not value > 0:
raise TypeError("{0} must be greater than 0 not {1}".format(
identifier,
value))
return
The check_positive
method raises a TypeError
if the value
passed in isn't greater than zero. It doesn't check that the value
is numeric so if it isn't it will still raise a TypeError
but the error message won't be as helpful. I did it this way because I (at least originally) assumed some values had to be integers so I wanted to leave the check for type as a separate operation.
def check_type(self, thing, identifier, expected):
"""checks that the value is the correct type
Parameters
----------
thing:
object to check
identifier: string
message to identify the thing
expected: object
what the thing is expected to be
Raises
------
TypeError: if thing isn't as expected
"""
if not isinstance(thing, expected):
raise TypeError("Expected {0} to be {1} not {2}".format(identifier,
expected,
thing))
return
The check_type
was the original method I created. I'm not sure it's as useful as checking ranges of values (which I'm not doing enough of yet), but it's at least useful to check if my expectations of what's being passed in to the methods is correct.
def check_types(self, thing, identifier, expected):
"""check that thing is one of multiple types
Parameters
----------
thing: object
thing to check
identifier: string
identifier for error message
expected: collection
types that thing might be
Raises
------
TypeError if type of thing not in expected
"""
if not type(thing) in expected:
raise TypeError("{0} should be one of {1}, not {2}".format(
identifier,
expected,
thing))
return
check_types
allows you you specify a collection of possible types for the value.
def check_numeric(self, thing, identifier):
"""check if thing is int or float
Parameters
----------
thing: object
thing to check if is numeric
identifier: string
identifier for error message
Raises
------
TypeError if thing is not numeric
"""
self.check_types(thing, identifier, NUMERIC)
return
check_numeric
will raise a TypeError
if the value isn't an integer or float.
def __call__(self):
"""checks that everything was set
Raises
------
TypeError:
if any attributes weren't set
Returns
-------
GameSettings: this object
"""
for attribute in self.attributes:
if getattr(self, attribute) is None:
raise TypeError("{0} attribute not set".format(attribute))
return self
The __call__
is meant to be the final method called when the parameters are set. It checks that all the properties in the attributes
list have been set to something other than None
and raises a TypeError
if any of them hasn't been set.
The Ball Class
Ball Directions
This is an object to use instead of the list like they use in the book. The first value (x-direction) is set positive to make it move from left to right, and negative to move right to left. The second value is set positive to move the ball downwards and negative to move it upwards.
class BallDirections(object):
"""holds the current direction of the ball
Parameters
----------
horizontal: int
positive to move left to right, negative otherwise
vertical: int
positive to move down, negative to move up
"""
def __init__(self, horizontal, vertical):
self.horizontal = horizontal
self.vertical = vertical
return
Ball Settings
class BallSettings(BaseSettings):
"""settings for the ball"""
def __init__(self):
self.x = None
self.y = None
self.radius = None
self.direction = None
self.speed = None
self.fill = None
self._attributes = None
return
@property
def attributes(self):
"""required attributes"""
if self._attributes is None:
self._attributes = ("x",
"y",
"radius",
"direction",
"speed",
"fill")
return self._attributes
def x_position(self, x):
"""initial horizontal position
Parameters
----------
x: int or float
pixels from the left of the canvas to start the ball
"""
self.x = x
self.assert_positive_number(x, "x")
return self
def y_position(self, y):
"""initial vertical position
Parameters
----------
y: int
pixels from the top of the canvas
"""
self.y = y
self.assert_positive_number(y, "y")
return self
The x
and y
values for the ball are actually set in the code based on the initial location of the paddle, so requiring them here is a bad idea. Oh, well.
def circle_radius(self, radius):
"""radius of the ball
Parameters
----------
radius: int
pixel width and height for the circle
"""
self.radius = radius
self.assert_positive_number(radius, "radius")
return self
Ovals in tkinter are set by specifying the corners of their bounding boxes, the same as with creating a rectangle. So the radius
is used as an offset to calculate where the corners should be. For example, if you have the center x-value for the oval, subtracting the radius gives you the top-left x-value and adding the radius gives you the bottom-right x-value. See the Game.ball
property to get an idea of how it's used.
def direction_vector(self, direction):
"""2-d vector for direction"""
self.direction = direction
self.check_type(direction, "ball direction", BallDirections)
return self
The direction
values determine what direction the object is moving on the vertical and horizontal axes. Positive values move to the right and down, while negative values move to the left and up.
| Horizontal | Vertical | Direction |
|---|---|---|
| Positive | Positive | Down-Right |
| Positive | Negative | Up-Right |
| Negative | Positive | Down-Left |
| Negative | Negative | Up-Left |
def velocity(self, speed):
"""speed of the ball
Parameters
----------
speed: number
pixels per move
"""
self.speed = speed
self.assert_positive_number(speed, "speed")
return self
def color(self, fill):
"""fill color
Parameters
----------
fill: str
hex-color to fill in the ball
"""
self.fill = fill
self.check_hex_color(fill, "fill")
return self
The speed
and fill
are the number of pixels to move the ball each time and the fill
is the color to put inside it.
The Ball
The ball-widget holds the reference to the ball that the player uses to smash bricks to try and break-out.
class BallWidget(BaseWidget):
"""representation of the ball
Parameters
----------
canvas: tkinter.Canvas
what to create the ball from
settings: BallSettings
initial ball settings
"""
def __init__(self, canvas, settings):
self.canvas = canvas
self.settings = settings
self._item = None
self.direction = self.settings.direction
self.speed = self.settings.speed
return
@property
def item(self):
"""canvas item representing the ball"""
if self._item is None:
x, y = self.settings.x, self.settings.y
radius = self.settings.radius
self._item = self.canvas.create_oval(
x-radius, y-radius,
x+radius, y+radius,
fill=self.settings.fill,
)
return self._item
def update(self):
"""moves the ball
if the ball hits something, reverses direction
"""
ball = self.position
width = self.canvas.winfo_width()
if ball.top_left_x <= EDGE_OF_SCREEN or ball.bottom_right_x >= width:
self.direction.horizontal *= REVERSE_DIRECTION
if ball.top_left_y <= EDGE_OF_SCREEN:
self.direction.vertical *= REVERSE_DIRECTION
self.move(self.direction.horizontal * self.speed,
self.direction.vertical * self.speed)
The update
method gets its current position and if it is off-screen on either side it inverts the horizontal direction. If the ball is above the top of the screen it reverses its vertical direction. It doesn't check the bottom of the screen because going off the bottom is how the player loses so it's an expected behavior. Once it has the directions set it moves the ball by the amount defined by the speed
variable.
def collide(self, others):
"""handles collisions
Parameters
----------
others: list
collection of ther objects that the ball collided with
"""
if len(others) > 1:
self.direction.vertical *= REVERSE_DIRECTION
elif len(others) == 1:
ball = self.position
x = (ball.top_left_x + ball.bottom_right_x)/2
other = others[0].position
if x > other.bottom_right_x:
self.direction.horizontal = RIGHT
elif x < other.top_left_x:
self.direction.horizontal = LEFT
else:
self.direction.vertical *= REVERSE_DIRECTION
for other in others:
if isinstance(other, BrickWidget):
other.hit()
return
The collide
method handles when a ball collides with another object. If it collided with more than one object it always reverses directions (this would only happen with bricks, not the paddle). If it collided with a single object then if the object is to the left of it (the ball's mean x-value is greater than the rightmost x-value for the object) then it sets its horizontal direction to move to the right (it bounces off it to the right). If the other object is to the right of the ball then the ball moves to the left. Otherwise the ball hit the object on top or below it so it changes vertical direction. If any of the objects are bricks then their hit
methods are called.
The Paddle
A representation of the player's paddle.
The Paddle Settings
class PaddleSettings(BaseSettings):
"""settings for the player's paddle"""
def __init__(self):
self._attributes = None
self.width = None
self.height = None
self.speed = None
self.x = None
self.y = None
self.fill = None
return
@property
def attributes(self):
"""list of required settings"""
if self._attributes is None:
self._attributes = ("width",
"height",
"speed",
"x",
"y",
"fill")
return self._attributes
def pixel_width(self, width):
"""width of the paddle
Parameters
----------
width: int
pixel-width for the paddle
"""
self.width = width
self.check_type(width, "width", int)
self.check_positive(width, "width")
return self
def pixel_height(self, height):
"""height of the paddle
Parameters
----------
height: int
pixel-height of the paddle
"""
self.height = height
self.check_type(height, "height", int)
self.check_positive(height, "height")
return self
The height and width are offsets to add to the upper-left corner coordinates of the bounding box to locate the lower-right corner of the bounding box, thus defining the size of the paddle.
def velocity(self, speed):
"""rate at which to move the paddle
Parameters
----------
speed: number
amount to move paddle with each key stroke
"""
self.speed = speed
self.assert_positive_number(speed, "paddle speed")
return self
The speed
of the paddle is the amount it will move every-time an arrow key is hit. I think it's in pixels, but the units aren't clear.
def x_position(self, x):
"""initial x-position
Parameters
----------
x: int
pixels from the left of the canvas
"""
self.x = x
self.check_numeric(x, "x")
self.check_positive(x, "x")
return self
def y_position(self, y):
"""initial y-position
Parameters
----------
y: int
pixels from the top of the canvas
"""
self.y = y
self.check_numeric(y, 'y')
self.check_positive(y, "y")
return self
The x
and y
settings determine where the paddle will be at the start (and since it only moves horizontally the y
value is where it will be vertically throughout the game).
def color(self, fill):
"""fill color for the rectangle
Parameters
----------
fill: str
hex-code for the fill color
"""
self.fill = fill
self.check_hex_color(fill, "fill")
return self
Like with the Ball the fill
value for the Paddle decides what color to fill it with.
The Paddle Class
class PaddleWidget(BaseWidget):
"""the player's paddle
Parameters
----------
canvas: tkinter.Canvas
the canvas to draw on
settings: PaddleSettings
initial settings for the paddle
"""
def __init__(self, canvas, settings):
self.canvas = canvas
self.settings = settings
self._item = None
self.ball = None
return
@property
def item(self):
"""the canvas item for the paddle"""
if self._item is None:
half_width = self.settings.width/2
half_height = self.settings.height/2
x, y = self.settings.x, self.settings.y
self._item = self.canvas.create_rectangle(
x - half_width, y - half_height,
x + half_width, y + half_height,
fill=self.settings.fill
)
return self._item
The item
property creates a rectangle of width x height
dimensions centered around (x, y)
.
def move(self, offset):
"""moves the paddle
if has a ball, also moves the ball
if already flush left or flush right, does nothing
Parameters
----------
offset: int
amount to move the paddle and ball horizontally
"""
coordinates = self.position
width = self.canvas.winfo_width()
if (coordinates.top_left_x + offset >= 0 and
coordinates.bottom_right_x + offset <= width): # noqa: E129
super(PaddleWidget, self).move(offset, 0)
if self.ball is not None:
self.ball.move(offset, 0)
return
The move
method moves the paddle horizontally by some offset. If moving it would place it offscreen to the left or right then it doesn't do anything. The paddle should only have the ball before the game starts (so that if the player moves the paddle the ball will stay with it until the game starts).
The Brick
Brick Settings
class BrickSettings(BaseSettings):
"""settings for the brick widget"""
def __init__(self):
self.x = None
self.y = None
self.width = None
self.height = None
self.colors = None
self.tags = None
self._attributes = None
self._hits = None
return
@property
def attributes(self):
"""list of required values"""
if self._attributes is None:
self._attributes = ("width",
"height",
"colors",
"tags",
"x",
"y",
"hits")
return self._attributes
@property
def hits(self):
"""the number of hits each brick will take
"""
if self._hits is None:
self._hits = max(self.colors)
return self._hits
def maximum_hits(self, hits):
"""number of hits brick will take
Parameters
----------
hits: int
number of hits before deleting bricks
"""
self._hits = hits
self.check_type(hits, "hits", int)
self.check_positive(hits, "hits")
return self
The hits
value is the number of times a brick gets hit by a ball before it deletes itself. I originally make it always use the largest value but then found out different rows use different values so I added a setter method.
def x_position(self, x):
"""horizontal position
Parameters
----------
x: int or float
pixels from the left
"""
self.x = x
self.check_numeric(x, "x")
self.check_positive(x, "x")
return self
def y_position(self, y):
"""vertical position
Parameters
----------
y: int or float
pixels from the top
"""
self.y = y
self.check_numeric(y, "y")
self.check_positive(y, "y")
return self
The x
and y
are the center-positions for a brick. Since they don't move this is their permanent position. Like the ball, this actually gets calculated when the game is set up so making this required was probably a bad ide.
def pixel_width(self, width):
"""width of the brick
Parameters
----------
width: int
pixel-width of the brick
"""
self.width = width
self.check_type(width, "width", int)
self.check_positive(width, "width")
return self
def pixel_height(self, height):
"""height of the brick
Parameters
----------
height: int
pixel-height of the brick
"""
self.height = height
self.check_type(height, "height", int)
self.check_positive(height, "height")
return self
The height
and width
give the dimensions of the brick.
def level_colors(self, colors):
"""map of level to colors
Parameters
----------
colors: dict
map of integers to colors
"""
self.colors = colors
for level in range(1, len(colors) + 1):
if level not in colors:
raise TypeError("colors keys must be range starting at 1")
for level, color in colors.items():
self.check_hex_color(color, "level {0} color".format(level))
return self
As a brick gets hit it changes colors. The colors
dictionary is a mapping between the number of remaining times the brick can be hit before being deleted (the level of the brick) and the color for that level.
def label(self, tags):
"""string to tag bricks
Parameters
----------
tags: str
identifier for bricks
"""
self.tags = tags
self.check_type(tags, "tags", str)
return self
The tags
attribute is a string given to tkinter to identify a class of related widgets.
Brick Widget
class BrickWidget(BaseWidget):
"""represents a single brick
Parameters
----------
canvas: tkinter.Canvas
what to draw the brick on
settings: BrickSettings
initial settings for the brick
"""
def __init__(self, canvas, settings):
self.canvas = canvas
self.settings = settings
self.hits = self.settings.hits
self._item = None
return
@property
def item(self):
"""canvas rectangle"""
if self._item is None:
half_height = self.settings.height/2
half_width = self.settings.width/2
x, y = self.settings.x, self.settings.y
self._item = self.canvas.create_rectangle(
x - half_width, y - half_height,
x + half_width, y + half_height,
fill=self.settings.colors[self.hits],
tags=self.settings.tags
)
return self._item
The item
creation is almost the same as the one for the Paddle except that the color is based on the number of remaining hits it starts with and it gets a tag
def hit(self):
"""the brick has been hit event
Decrements the counter and changes the color or deletes the brick
"""
self.hits -= 1
if self.hits == 0:
self.delete()
else:
self.canvas.itemconfig(self.item,
fill=self.settings.colors[self.hits])
return
The hit
method decrements the number of hits the brick has remaining and deletes it if it doesn't have any left. If it does have hits left it re-colors the brick to match the number of hits remaining.
The Frame
The Frame Settings
These are settings for the Tkinter Frame.
class FrameSettings(BaseSettings):
"""holds the settings for the game"""
def __init__(self):
self.width = None
self.height = None
self.color = None
self.title = None
self._attributes = None
return
@property
def attributes(self):
"""list of required attributes"""
if self._attributes is None:
self._attributes = ("width",
"height",
"color",
"title")
return self._attributes
def window_width(self, width):
"""width of window
Parameters
----------
width: int
pixel-width for the tkinter window
Returns
-------
GameSettings: this object
"""
self.width = width
self.check_type(width, "width", int)
self.check_positive(width, "width")
return self
def window_height(self, height):
"""height of window
Parameters
----------
height: int
pixel height of the window
Returns
-------
GameSettings: this object
"""
self.height = height
self.check_type(height, "height", int)
self.check_positive(height, "height")
return self
def canvas_color(self, color):
"""background color
Parameters
----------
color: string
hex-color for canvas background
Returns
-------
GameSettings: this object
"""
self.color = color
self.check_hex_color(color, 'background color')
return self
def window_title(self, title):
"""title of the window
Parameters
----------
title: str
name to give the title
Returns
-------
GameSettings: this object
"""
self.title = title
self.check_type(title, "window title", str)
return self
The Frame Class
The Tk
class creates the main window. Within it the Frame
class creates a container which you pass the main window on instantiation. Within the frame a Canvas
is placed to actually draw things. The pack
method tells the children to display their widgets on their parents.
class BreakoutFrame(tkinter.Frame):
"""creates the breakout game
Parameters
----------
settings: GameSettings
object with the settings
parent: Tk
parent window for this frame
"""
def __init__(self, settings, parent):
super(BreakoutFrame, self).__init__(parent)
self.parent = parent
self.parent.title(settings.title)
self.settings = settings
self._canvas = None
self.height = settings.height
return
@property
def canvas(self):
"""canvas to render images"""
if self._canvas is None:
self._canvas = tkinter.Canvas(self,
width=self.settings.width,
height=self.settings.height,
bg=self.settings.color)
return self._canvas
def __call__(self):
"""runs the main-loop"""
self.canvas.pack()
self.pack()
self.parent.mainloop()
return
The Game
Game Settings
class GameSettings(BaseSettings):
"""settings for the game"""
def __init__(self):
self.lives = None
self.text_x = None
self.text_y = None
self.text_size = None
self.padding = None
self._attributes = None
return
@property
def attributes(self):
"""required attributes"""
if self._attributes is None:
self._attributes = ("lives",
"text_x",
"text_y",
"padding")
return self._attributes
def font_size(self, size):
"""text size in pixels
Parameters
----------
size: int
size for fonts
"""
self.text_size = size
self.check_type(size, "text size", int)
self.check_positive(size, "text size")
return self
def allowed_failures(self, lives):
"""number of times player can fail
Parameters
----------
lives: int
number of failures per game
"""
self.lives = lives
self.check_type(lives, "lives", int)
self.check_positive(lives, "lives")
return self
def text_horizontal_position(self, text_x):
"""pixel indent for text
Parameters
----------
text_x: int
number of pixels from the left
"""
self.text_x = text_x
self.check_type(text_x, "text indent", int)
self.check_positive(text_x, "text indent")
return self
def text_vertical_position(self, text_y):
"""pixel vertical position for text
Parameters
----------
text_y: int
pixels from the top
"""
self.text_y = text_y
self.check_type(text_y, "text y", int)
self.check_positive(text_y, "text y")
return self
def outer_padding(self, padding):
"""outer margins
Parameters
----------
padding: int
pixels to put around the edge of the canvas
"""
self.padding = padding
self.check_type(padding, "padding", int)
self.check_positive(padding, "padding")
return self
Game Class
class Game(object):
"""builds and holds the game
Parameters
----------
game_settings: GameSettings
settings for the game overall
frame_settings: FrameSettings
settings to set-up the tkinter window
paddle_settings: PaddleSettings
settings to set-up the paddle_settings
brick_settings: BrickSettings
settings to set-up the bricks
ball_settings: BallSettings
settings to set-up the ball
"""
def __init__(self, game_settings, frame_settings, paddle_settings,
brick_settings, ball_settings):
self.game_settings = game_settings
self.frame_settings = frame_settings
self.paddle_settings = paddle_settings
self.brick_settings = brick_settings
self.ball_settings = ball_settings
self.collidable = {}
self.hud = None
self._frame = None
self._canvas = None
self._paddle = None
self._bricks = None
self._ball = None
return
@property
def frame(self):
"""the tkinter frame"""
if self._frame is None:
self._frame = BreakoutFrame(self.frame_settings, tkinter.Tk())
return self._frame
@property
def canvas(self):
"""tkinter canvas to draw on"""
if self._canvas is None:
self._canvas = self.frame.canvas
return self._canvas
@property
def paddle(self):
"""the paddle widget"""
if self._paddle is None:
(self.paddle_settings.x_position(self.frame_settings.width/2)
.y_position(self.frame_settings.height -
self.game_settings.padding -
self.paddle_settings.height))
self._paddle = PaddleWidget(self.canvas, self.paddle_settings)
return self._paddle
The Paddle is created centered horizontally and at the height specified in the settings.
@property
def ball(self):
"""the ball widget"""
if self._ball is None:
paddle = self.paddle.position
(self.ball_settings
.x_position((paddle.top_left_x + paddle.bottom_right_x)/2)
.y_position(paddle.top_left_y - 2 * self.ball_settings.radius)
.direction_vector(BallDirections(RIGHT, UP)))
self._ball = BallWidget(self.canvas, self.ball_settings)
return self._ball
The ball is created sitting on top of the paddle in its horizontal center (the mean of its x-coordinates). Even though I'm forcing the user to set the x and y values they actually get overwritten here. I also had to make sure that the ball is created above the paddle, which is why I'm adding twice the radius to the y-position, otherwise it would register as a collision and end up going down instead of up.
def add_brick(self, x, y, settings):
"""add a brick to items
Parameters
----------
x: int
pixels from the left
y: int
pixels from the top
"""
settings = (copy(settings)
.x_position(x)
.y_position(y))
brick = BrickWidget(self.canvas, settings)
self.collidable[brick.item] = brick
return
def add_bricks(self):
"""adds the bricks"""
half_width = self.brick_settings.width/2
first_row = 50
second_row = first_row + self.brick_settings.height
third_row = second_row + self.brick_settings.height
first_settings = copy(self.brick_settings).maximum_hits(3)
second_settings = copy(self.brick_settings).maximum_hits(2)
third_settings = copy(self.brick_settings).maximum_hits(1)
for x in range(5, self.frame_settings.width - 5, 75):
this_x = x + half_width
self.add_brick(this_x, first_row, first_settings)
self.add_brick(this_x, second_row, second_settings)
self.add_brick(this_x, third_row, third_settings)
return
The add_bricks
method creates three rows of bricks with a 5-pixel left margin and a 50 pixel top margin. The top-row of bricks takes three hits each, the second two hits each and the bricks in the bottom row will be deleted after one hit.
def setup_canvas(self):
"""sets up some canvas settings"""
self.canvas.focus_set()
self.canvas.bind(
"<Left>",
lambda _: self.paddle.move(-self.paddle_settings.speed)
)
self.canvas.bind(
"<Right>",
lambda _: self.paddle.move(self.paddle_settings.speed)
)
self.canvas.bind("<space>", lambda _: self.start())
return
The setup_canvas
causes the canvas to steal focus and then sets up the keys the user uses to control the paddle and start the game.
def draw_text(self, x, y, text):
"""draws the text
Parameters
----------
x: int
left indent
y: int
right indent
text: string
what to output
Returns
-------
text-object
"""
font = ("Helvetica", self.game_settings.text_size)
return self.canvas.create_text(x,
y,
text=text, font=font)
def update_lives_text(self):
"""updates the text when a player fails"""
text = "Lives: {0}".format(self.lives)
if self.hud is None:
self.hud = self.draw_text(self.game_settings.text_x,
self.game_settings.text_y,
text)
else:
self.canvas.itemconfig(self.hud, text=text)
return
def reset(self):
"""sets up the game after it's ended"""
self.lives = self.game_settings.lives
self.add_bricks()
self.setup_canvas()
self.ball.delete()
self._ball = None
self.paddle.ball = self.ball
self.update_lives_text()
return
def set_up(self):
"""populates the collidable items dict"""
self.lives = self.game_settings.lives
self.collidable[self.paddle.item] = self.paddle
self.add_bricks()
self.setup_canvas()
self.ball.delete()
self._ball = None
self.paddle.ball = self.ball
self.update_lives_text()
self.text = self.draw_text(300, 200, "Press Space to Start")
return
def set_up_in_between(self):
"""sets things up when the player still has lives"""
self.ball.delete()
self._ball = None
self.paddle.ball = self.ball
self.update_lives_text()
self.setup_canvas()
self.text = self.draw_text(300, 200, "Press Space to Start")
return
def start(self):
"""starts the game"""
self.canvas.unbind("<space>")
self.canvas.delete(self.text)
self.paddle.ball = None
self.game_loop()
return
The start
method un-binds the spacebar from the start
method so the game won't restart if the player accidentally hits the spacebar. It also deletes the message to hit the spacebar to start the game, removes the ball from the paddle and starts the game-loop
def game_loop(self):
"""runs the game"""
self.check_collisions()
num_bricks = len(self.canvas.find_withtag("brick"))
if num_bricks == 0:
self.ball.speed = None
self.text = self.draw_text(300, 200, "You Win. Whatever. (Hit the spacebar to restart)")
self.reset()
elif self.ball.position.bottom_right_y >= self.frame.height:
self.ball.speed = None
self.lives -= 1
if self.lives < 0:
self.text = self.draw_text(300, 200, "Loser (Hit the spacebar to restart)")
self.reset()
else:
self.frame.after(1000, self.set_up_in_between)
else:
self.ball.update()
self.frame.after(50, self.game_loop)
return
Besides checking for collisions, the game_loop
method check's if the bricks have all been removed (in which case the player has won) or if the ball has fallen off the screen. If the ball has fallen off the screen and the player is out of lives then it ends the game, otherwise it decrements the players remaining lives. If there are still bricks and the ball is on the screen then it calls the ball's update
method to move it.
The frame.after
method sets a timer that will call the callback function you pass in after the delay (in milliseconds) that you pass in has expired.
def check_collisions(self):
"""checks if the ball has collided with anything"""
ball = self.ball.position
items = self.canvas.find_overlapping(*ball)
collisions = [self.collidable[item] for item in items
if item in self.collidable]
self.ball.collide(collisions)
return
check_collisions
finds all the items that we added whose coordinates overlap with those of the ball then passes those items to the BallWidget.collide
method to process. The overlapping widgets are filtered so that they only contain items of interest (not text-widgets, for instance).
def __call__(self):
"""sets up the game"""
self.set_up()
self.frame()
return
The Main Loop
if __name__ == '__main__':
frame_settings = (FrameSettings()
.window_width(600)
.window_height(400)
.canvas_color(WHITE)
.window_title("Breakout! Not Pong!")())
ball_settings = (BallSettings()
.x_position(10)
.y_position(10)
.circle_radius(10)
.direction_vector(BallDirections(horizontal=NO_MOVEMENT,
vertical=UP))
.velocity(10)
.color(LAVENDER)())
paddle_settings = (PaddleSettings()
.pixel_width(80)
.pixel_height(5)
.x_position(40)
.y_position(80)
.velocity(10)
.color(BLUE)
())
brick_settings = (BrickSettings()
.x_position(75)
.y_position(20)
.label("brick")
.pixel_width(75)
.pixel_height(20)
.level_colors({1: "#999999",
2: "#555555",
3: "#222222"})())
game_settings = (GameSettings()
.allowed_failures(3)
.text_horizontal_position(50)
.text_vertical_position(20)
.font_size(15)
.outer_padding(20)()
)
game = Game(game_settings, frame_settings, paddle_settings, brick_settings,
ball_settings)
game()


On 27 March 2017, 9 new articles were published in 5 journals.
Note: although this article was published on 9 March 2017, the publisher only added it to the journal RSS feed on 27 March 2017, which is why it is shown in the list of articles for that date.
Note: although this article was published on 9 March 2017, the publisher only added it to the journal RSS feed on 27 March 2017, which is why it is shown in the list of articles for that date.
Neo-Liberal Criminologists Demand Freedom From Oppression
Note: although this article was published on 9 March 2017, the publisher only added it to the journal RSS feed on 27 March 2017, which is why it is shown in the list of articles for that date.
Note: although this article was published on 9 March 2017, the publisher only added it to the journal RSS feed on 27 March 2017, which is why it is shown in the list of articles for that date.
Note: although this article was published on 9 March 2017, the publisher only added it to the journal RSS feed on 27 March 2017, which is why it is shown in the list of articles for that date.
Police Officers' Beliefs About, and Use Of, Cues to Deception
Proximity, Pain, and State Punishment


Audio Fingerprinting¶
Audio fingerprinting refers to the act of turning audio into a set of hashes. The first step of this process involves obtaining the spectrogram of the song/audio, which is effectively a measure of the intensity of the sound frequencies of the audio over the course of the song. The spectrogram of the song Phenomenal by Benjai is shown below.
Note
The images in this section were generated by the yamfp command line tool.
Next, we find the peaks in the spectrogram, i.e., the points in the spectrogram with the greatest amplitude. The spectrogram for the first 10 seconds of the song is shown below, with the peaks represented by red dots.
The song’s fingerprints are generated from pairs of peaks in a process known as combinatorial hashing, in which we iterate through the peaks and, for each peak, pair it with its neighbors. The number of neighbors we consider is termed the fanout value. This is shown in the figures below, which are taken from the paper by Avery Wang, the founder of Shazam (see Acknowledgments).
The figure defines a “target zone” that determines which neighbors to consider for each peak. Each peak pair is used to generate a hash based on the frequency and time difference between each point—this constitutes a fingerprint. If we use a target zone of +1 s to +10 s (and no restriction on the frequency) with a fanout value of 2, the first 10 seconds of the song generate the following hash constellation:
If we increase the fanout value to 6, it looks more like the following:
Increasing the fanout value results in more hash pairs, increasing the robustness of the fingerprints but also increasing storage requirements and computation time to find matches, since there can be tens or hundreds of thousands of hash pairs for an entire song.
More on the algorithm used to match audio fingerprints to fingerprints in the
database can be found in the paper and in the source code (see
youtube_audio_matcher.audio.align_matches()
).


Disgruntled LDP leaders form new committee dropping Oli Ahmad
by bdnews24.comA splinter of the Liberal Democratic Party or LDP has formed a new committee, leaving out Oli Ahmad, a retired colonel.
The party’s Joint Secretary General Shahadat Hossain Selim announced a new seven-member coordination committee, led by Abdul Karim Abbasi, from a news conference in Dhaka on Monday.
On Oct 9, LDP President Oli formed a 203-member central committee. Abbasi and Selim were dropped from the committee, making them unhappy.
“It’s impossible to work with Colonel Oli in politics. That’s why, we formed a new committee,” said Selim.
“We’ll take the future course of action by speaking to the coordination committee.”
In 2006, LDP was founded with AQM Badruddoza Chowdhury as president and Oli Ahmed executive president, bringing an end to Bikalpadhara Bangladesh.
In 2007, Oli unveiled a new committee of the LDP to split the party into two, a month after Badruddoza announced a new 11-member presidium, expelling Oli and former speaker Shaikh Razzak Ali.


A.DataType.DateMath Class
src/aui-datatype/js/aui-datatype.js:82
A.DataType.DateMath is used for simple date manipulation. The class is a static utility used for adding, subtracting, and comparing dates. Based on YAHOO.widget.DateMath.
Item Index
Methods
- _addDays
- add
- after
- before
- between
- clearTime
- clone
- compare
- findMonthEnd
- findMonthStart
- getDate
- getDayOffset
- getDayOffset
- getHoursOffset
- getJan1
- getMinutesOffset
- getSecondsOffset
- getWeekNumber
- isDayOverlap
- isMonthOverlapWeek
- isMonWedOrFri
- isNextDay
- isNextDayBoundary
- isSameMonth
- isToday
- isTueOrThu
- isWeekDay
- isYearOverlapWeek
- safeClearTime
- subtract
- toMidnight
Properties
- DAY static
- HOUR static
- MAX_MONTH_LENGTH static
- MINUTES static
- MONTH static
- ONE_DAY_MS static
- ONE_HOUR_MS static
- ONE_MINUTE_MS static
- ONE_SECOND_MS static
- SECONDS static
- WEEK static
- WEEK_LENGTH static
- WEEK_ONE_JAN_DATE static
- YEAR static
Methods
_addDays
-
d
-
nDays
Defined in
src/aui-datatype/js/aui-datatype.js:291
Private helper method to account for bug in Safari 2 (webkit < 420) when Date.setDate(n) is called with n less than -128 or greater than 127.
Fix approach and original findings are available here: http://brianary.blogspot.com/2006/03/safari-date-bug.html
add
-
date
-
field
-
amount
Defined in
src/aui-datatype/js/aui-datatype.js:231
Adds the specified amount of time to the this instance.
Parameters:
Returns:
after
-
date
-
compareTo
Defined in
src/aui-datatype/js/aui-datatype.js:369
Determines whether a given date is after another date on the calendar.
Parameters:
Returns:
before
-
date
-
compareTo
Defined in
src/aui-datatype/js/aui-datatype.js:353
Determines whether a given date is before another date on the calendar.
Parameters:
Returns:
between
-
date
-
dateBegin
-
dateEnd
Defined in
src/aui-datatype/js/aui-datatype.js:385
Determines whether a given date is between two other dates on the calendar.
Parameters:
Returns:
clearTime
-
date
Defined in
src/aui-datatype/js/aui-datatype.js:707
Clears the time fields from a given date, effectively setting the time to 12 noon.
Parameters:
-
date
DateThe JavaScript Date for which the time fields will be cleared
Returns:
clone
-
date
Defined in
src/aui-datatype/js/aui-datatype.js:741
Clone the passed date object.
Parameters:
-
date
DateThe JavaScript Date to clone
Returns:
compare
-
d1
-
d2
Defined in
src/aui-datatype/js/aui-datatype.js:321
Compare dates.
Parameters:
Returns:
findMonthEnd
-
date
Defined in
src/aui-datatype/js/aui-datatype.js:694
Gets the last day of a month containing a given date.
Parameters:
-
date
DateThe JavaScript Date used to calculate the month end
Returns:
findMonthStart
-
date
Defined in
src/aui-datatype/js/aui-datatype.js:683
Gets the first day of a month containing a given date.
Parameters:
-
date
DateThe JavaScript Date used to calculate the month start
Returns:
getDate
-
y
-
m
-
d
Defined in
src/aui-datatype/js/aui-datatype.js:751
Returns a new JavaScript Date object, representing the given year, month and date. Time fields (hr, min, sec, ms) on the new Date object are set to 0. The method allows Date instances to be created with the a year less than 100. "new Date(year, month, date)" implementations set the year to 19xx if a year (xx) which is less than 100 is provided.
NOTE:Validation on argument values is not performed. It is the caller's responsibility to ensure arguments are valid as per the ECMAScript-262 Date object specification for the new Date(year, month[, date]) constructor.
Parameters:
Returns:
getDayOffset
-
d1
-
d2
Defined in
src/aui-datatype/js/aui-datatype.js:426
Calculates the number of days between the specified dates.
Returns:
getDayOffset
-
date
-
calendarYear
Defined in
src/aui-datatype/js/aui-datatype.js:411
Calculates the number of days the specified date is from January 1 of the specified calendar year. Passing January 1 to this function would return an offset value of zero.
Parameters:
Returns:
getHoursOffset
-
d1
-
d2
Defined in
src/aui-datatype/js/aui-datatype.js:437
Calculates the number of hours between the specified dates.
Returns:
getJan1
-
calendarYear
Defined in
src/aui-datatype/js/aui-datatype.js:401
Retrieves a JavaScript Date object representing January 1 of any given year.
Parameters:
-
calendarYear
NumberThe calendar year for which to retrieve January 1
Returns:
getMinutesOffset
-
d1
-
d2
Defined in
src/aui-datatype/js/aui-datatype.js:448
Calculates the number of minutes between the specified dates.
Returns:
getSecondsOffset
-
d1
-
d2
Defined in
src/aui-datatype/js/aui-datatype.js:459
Calculates the number of seconds between the specified dates.
Returns:
getWeekNumber
-
date
-
firstDayOfWeek
-
janDate
Defined in
src/aui-datatype/js/aui-datatype.js:486
Calculates the week number for the given date. Can currently support standard U.S. week numbers, based on Jan 1st defining the 1st week of the year, and ISO8601 week numbers, based on Jan 4th defining the 1st week of the year.
Parameters:
-
date
DateThe JavaScript date for which to find the week number
-
firstDayOfWeek
NumberThe index of the first day of the week (0 = Sun, 1 = Mon ... 6 = Sat). Defaults to 0
-
janDate
NumberThe date in the first week of January which defines week one for the year Defaults to the value of YAHOO.widget.DateMath.WEEKONEJAN_DATE, which is 1 (Jan 1st). For the U.S, this is normally Jan 1st. ISO8601 uses Jan 4th to define the first week of the year.
Returns:
isDayOverlap
-
date1
-
date2
Defined in
src/aui-datatype/js/aui-datatype.js:618
Chechs if the passed date is between two days.
Returns:
isMonthOverlapWeek
-
weekBeginDate
Defined in
src/aui-datatype/js/aui-datatype.js:668
Determines if a given week overlaps two different months.
Parameters:
-
weekBeginDate
DateThe JavaScript Date representing the first day of the week.
Returns:
isMonWedOrFri
-
date
Defined in
src/aui-datatype/js/aui-datatype.js:583
Chechs if the passed date is a Monday, Wednesday or Friday.
Parameters:
-
date
DateDate
Returns:
isNextDay
-
date1
-
date2
Defined in
src/aui-datatype/js/aui-datatype.js:594
Chechs if the {date2} is the next day.
Returns:
isNextDayBoundary
-
date1
-
date2
Defined in
src/aui-datatype/js/aui-datatype.js:606
Chechs if the {date2} is the next day at 00:00:00.
Returns:
isSameMonth
-
d1
-
d2
Defined in
src/aui-datatype/js/aui-datatype.js:641
Chechs if the passed dates are in the same month.
Returns:
isToday
-
date
Defined in
src/aui-datatype/js/aui-datatype.js:630
Chechs if the passed date is today.
Parameters:
-
date
DateDate
Returns:
isTueOrThu
-
date
Defined in
src/aui-datatype/js/aui-datatype.js:572
Chechs if the passed date is a Tuesday or Thursday.
Parameters:
-
date
DateDate
Returns:
isWeekDay
-
date
Defined in
src/aui-datatype/js/aui-datatype.js:559
Chechs if the passed date is a week day.
Parameters:
-
date
DateDate
Returns:
isYearOverlapWeek
-
weekBeginDate
Defined in
src/aui-datatype/js/aui-datatype.js:653
Determines if a given week overlaps two different years.
Parameters:
-
weekBeginDate
DateThe JavaScript Date representing the first day of the week.
Returns:
safeClearTime
-
date
Defined in
src/aui-datatype/js/aui-datatype.js:718
Clears the time fields from a given date, effectively setting the time to 12 noon. This is "safe" because clones the date before clear, not affecting the passed reference.
Parameters:
-
date
DateThe JavaScript Date for which the time fields will be cleared
Returns:
subtract
-
date
-
field
-
amount
Defined in
src/aui-datatype/js/aui-datatype.js:341
Subtracts the specified amount of time from the this instance.
Parameters:
Returns:
toMidnight
-
date
Defined in
src/aui-datatype/js/aui-datatype.js:730
Set the time fields from a given date to midnight.
Parameters:
-
date
DateThe JavaScript Date for which the time fields will be set to midnight
Returns:
Properties
DAY
String
final
static
Defined in
src/aui-datatype/js/aui-datatype.js:101
Constant field representing Day
HOUR
String
final
static
Defined in
src/aui-datatype/js/aui-datatype.js:146
Constant field representing Hour
MAX_MONTH_LENGTH
Number
final
static
Defined in
src/aui-datatype/js/aui-datatype.js:164
Constant field representing the number of maximum days in a month
MINUTES
String
final
static
Defined in
src/aui-datatype/js/aui-datatype.js:137
Constant field representing Minutes
MONTH
String
final
static
Defined in
src/aui-datatype/js/aui-datatype.js:128
Constant field representing Month
ONE_DAY_MS
Number
final
static
Defined in
src/aui-datatype/js/aui-datatype.js:182
Constant field representing one day, in milliseconds
ONE_HOUR_MS
Number
final
static
Defined in
src/aui-datatype/js/aui-datatype.js:191
Constant field representing one hour, in milliseconds
ONE_MINUTE_MS
Number
final
static
Defined in
src/aui-datatype/js/aui-datatype.js:200
Constant field representing one minute, in milliseconds
ONE_SECOND_MS
Number
final
static
Defined in
src/aui-datatype/js/aui-datatype.js:209
Constant field representing one second, in milliseconds
SECONDS
String
final
static
Defined in
src/aui-datatype/js/aui-datatype.js:155
Constant field representing Seconds
WEEK
String
final
static
Defined in
src/aui-datatype/js/aui-datatype.js:110
Constant field representing Week
WEEK_LENGTH
Number
final
static
Defined in
src/aui-datatype/js/aui-datatype.js:173
Constant field representing the number of maximum days in a week
WEEK_ONE_JAN_DATE
Number
static
Defined in
src/aui-datatype/js/aui-datatype.js:218
Constant field representing the date in first week of January which identifies the first week of the year.
In the U.S, Jan 1st is normally used based on a Sunday start of week. ISO 8601, used widely throughout Europe, uses Jan 4th, based on a Monday start of week.
YEAR
String
final
static
Defined in
src/aui-datatype/js/aui-datatype.js:119
Constant field representing Year


Before Change
total_labels = 0
truth_n = truth.cpu().numpy()
// For fscore
gold_count = 0
guess_count = 0
overlap_count = 0
// For each sentence
for b in range(len(guess)):
sentence = guess[b].cpu().numpy()
sentence_length = sentence_lengths[b]
gold = truth_n[b, :sentence_length]
correct_labels += np.sum(np.equal(sentence, gold))
total_labels += sentence_length
gold_chunks = to_spans(gold, self.idx2label, self.span_type, self.verbose)
gold_count += len(gold_chunks)
guess_chunks = to_spans(sentence, self.idx2label, self.span_type, self.verbose)
guess_count += len(guess_chunks)
overlap_chunks = gold_chunks & guess_chunks
overlap_count += len(overlap_chunks)
// Should we write a file out? If so, we have to have txts
if handle is not None:
id = ids[b]
After Change
total_labels = 0
truth_n = truth.cpu().numpy()
// For f1
gold_chunks = []
pred_chunks = []
// For each sentence
for b in range(len(guess)):
sentence = guess[b].cpu().numpy()
sentence_length = sentence_lengths[b]
gold = truth_n[b, :sentence_length]
correct_labels += np.sum(np.equal(sentence, gold))
total_labels += sentence_length
gold_chunks.append(set(to_spans(gold, self.idx2label, self.span_type, self.verbose)))
pred_chunks.append(set(to_spans(sentence, self.idx2label, self.span_type, self.verbose)))
// Should we write a file out? If so, we have to have txts
if handle is not None and txts is not None:


Can you move all 3 disks to the right side? You cannot put a bigger disk on top of a smaller one, and you must select the disk on top of the column.
Click to select a 'disk', keyboard arrows to move it around, and Spacebar to get the next suggested move.
The Demo button will play out the most efficent method. The Arrow will reset the board. Have fun!


--- author: Colene Chow categories: app date: '2011-10-27 00:01:01' permalink: /2011/10/27/day-1-nitobi-joins-adobe/ slug: day-1-nitobi-joins-adobe status: publish title: 'Day 1: Nitobi joins Adobe' type: post format: html tags: - News ---
We’re excited to announce that Adobe’s acquisition of Nitobi closed today! The Nitobi team is looking forward to joining Adobe and with their support, continue to work on simplifying cross-platform mobile development via the PhoneGap project. We can’t wait to work on it full-time!
As part of that process, Nitobi has contributed the PhoneGap code to the Apache Software Foundation (ASF) under the name Apache Callback, where it will remain free and open source. That project has now been approved for incubation at the ASF, on its way to becoming a full Apache project.
“It’s been an exciting an interesting road to get PhoneGap to where it is today. The Nitobi team is made up of the smartest and most talented people I’ve ever worked with. I can’t wait to see what we can do with the platform now that we can apply 100% of our resources and focus to PhoneGap,” said Andre Charland, Nitobi's CEO.
Meanwhile, Adobe will continue to host the PhoneGap online community as well as the PhoneGap Build service, which is now in open beta.
More information below: What does Nitobi do? Nitobi is the creator and primary contributor to the open source PhoneGap framework, which allows developers to create device native mobile applications using HTML, CSS, and JavaScript. You can find out more at the Nitobiand PhoneGap sites.
Why did Adobe acquire Nitobi? Adobe is committed to enabling efficient, expressive design and development across devices. PhoneGap is a leading solution for cross-platform mobile development using web standards, and we’re excited to support PhoneGap’s growth by committing resources to the development of the open source project. We integrated support for PhoneGap in Dreamweaver CS5.5, and with this acquisition we will also be bringing PhoneGap’s capabilities to a much broader range of customers though a paid hosted service, PhoneGap Build, which is currently in open beta.
This investment also reinforces Adobe’s commitment to helping its customers be more expressive, regardless of underlying technology. Recent innovative product releases such as Adobe Edge and Adobe Muse, as well as contributions to the jQuery mobile UI framework and Webkit for layout and typography functionality, are all evidence of Adobe’s strong belief in moving the web forward.
What underlying technology did Adobe acquire? While the PhoneGap framework continues to be open source, PhoneGap Build incorporates additional proprietary code allowing developers to build their apps from anywhere without installing mobile platform SDKs.
Why did Nitobi contribute the PhoneGap code to the ASF? Nitobi contributed the PhoneGap code to the ASF to ensure open stewardship of the project over the long term. Adobe fully supports this contribution and will continue to host the PhoneGap community site with full participation from its contributors, as well as the PhoneGap Build service.


I'm a self taught front-end developer. I'm Ukrainian who lives in Wroclaw, Poland.
I have started learning programming with SoloLearn and FreeCodeCamp, and I have been exploring the world of software development.
My skiils & experience:
- Created and implemented a custom CSS grid system with CSS media queries for mobile responsive design;
- Developed a front-end code with a consistent shape and in a high quality manner;
- Designed and developed websites and microsites;
- Developed front-end applications using HTML5, CSS, JavaScript, jQuery, Bootstrap libraries
Languages and Frameworks:
JavaScript, ES6, HTML5, CSS3, jQuery, Bootstrap.>
Tools & expertise:
Git, Node.js, Webpack, Responsive Web Design, Agile Methodologies.
My certifications:
HTML5
CSS3
JavaScript
jQuery


Here is a link to my personal website.
Here is a link to my cookie-recipe.
Here is a link to my delani-studio.
Education:Kenyatta University Cisco Academy -Cisco 1 to Cisco 4,Studied Cyber Security Cisco Academy,IBM Africa-Cyber Security,Jommo Kenyatta University-Bachelor of Science Information Technology,Moringa School-Moringa prep course
Job experience:Technician at Kenyatta University Cisco Academy lab,Technician at Campus Solutions Cyber
I studied programming since i've always had the passion to know about software development,web design and to become a developer.I really want to transform Kenya technologically.I believe Moringa school is where i can get the necessary skills
Hobbies:Reading,travelling,exploring,cooking,blogging


Hi {{name}}! Here's your Johari window!
{{#with tallies}}Known to You |
Unknown to You |
|
Known to Friends |
Arena:
|
Blind Spot:
|
Unknown to Friends |
Façade:
|
Unknown:
|
You'll see that it's split into four quadrants:
In the "Arena" and "Blind Spot", each item includes a tally of how many of your friends picked that one.
Speaking of your friends, here's the public page you should share with your friends, so that they can pick what *they* think you're good at:
{{publicLink}}
... and you can always check on the results here at this private page (keep this to yourself, unless you want your friends to see all the results):
{{privateLink}}


@(elemicaForm: Form[(String, String)])(implicit flash: Flash, request: RequestHeader) @import helper._ @main("Welcome to Elemica") { @_nav()
By clicking Login you accept the Mercury Privacy Policy
Having trouble logging in?


We received a request to reset the password for your account ({{.Username}}).
To reset your password, click on the link below (or copy and paste the URL into your browser):
{{.ResetURL}}
Thanks,{{.ProjectName}}


| Top |
The user-font feature allows the cairo user to provide drawings for glyphs in a font. This is most useful in implementing fonts in non-standard formats, like SVG fonts and Flash fonts, but can also be used by games and other application to draw "funky" fonts.
cairo_status_t (*cairo_user_scaled_font_init_func_t) (cairo_scaled_font_t *scaled_font
,cairo_t *cr
,cairo_font_extents_t *extents
);
cairo_user_scaled_font_init_func_t is the type of function which is called when a scaled-font needs to be created for a user font-face.
The cairo context cr
is not used by the caller, but is prepared in font
space, similar to what the cairo contexts passed to the render_glyph
method will look like. The callback can use this context for extents
computation for example. After the callback is called, cr
is checked
for any error status.
The extents
argument is where the user font sets the font extents for
scaled_font
. It is in font space, which means that for most cases its
ascent and descent members should add to 1.0. extents
is preset to
hold a value of 1.0 for ascent, height, and max_x_advance, and 0.0 for
descent and max_y_advance members.
The callback is optional. If not set, default font extents as described in the previous paragraph will be used.
Note that scaled_font
is not fully initialized at this
point and trying to use it for text operations in the callback will result
in deadlock.
scaled_font |
the scaled-font being created |
|
cr |
a cairo context, in font space |
|
extents |
font extents to fill in, in font space |
Since 1.8
cairo_status_t (*cairo_user_scaled_font_render_glyph_func_t) (cairo_scaled_font_t *scaled_font
,unsigned long glyph
,cairo_t *cr
,cairo_text_extents_t *extents
);
cairo_user_scaled_font_render_glyph_func_t is the type of function which is called when a user scaled-font needs to render a glyph.
The callback is mandatory, and expected to draw the glyph with code glyph
to
the cairo context cr
. cr
is prepared such that the glyph drawing is done in
font space. That is, the matrix set on cr
is the scale matrix of scaled_font
,
The extents
argument is where the user font sets the font extents for
scaled_font
. However, if user prefers to draw in user space, they can
achieve that by changing the matrix on cr
. All cairo rendering operations
to cr
are permitted, however, the result is undefined if any source other
than the default source on cr
is used. That means, glyph bitmaps should
be rendered using cairo_mask()
instead of cairo_paint()
.
Other non-default settings on cr
include a font size of 1.0 (given that
it is set up to be in font space), and font options corresponding to
scaled_font
.
The extents
argument is preset to have x_bearing
,
width
, and y_advance
of zero,
y_bearing
set to -font_extents.ascent
,
height
to font_extents.ascent+font_extents.descent
,
and x_advance
to font_extents.max_x_advance
.
The only field user needs to set in majority of cases is
x_advance
.
If the width
field is zero upon the callback returning
(which is its preset value), the glyph extents are automatically computed
based on the drawings done to cr
. This is in most cases exactly what the
desired behavior is. However, if for any reason the callback sets the
extents, it must be ink extents, and include the extents of all drawing
done to cr
in the callback.
scaled_font |
user scaled-font |
|
glyph |
glyph code to render |
|
cr |
cairo context to draw to, in font space |
|
extents |
glyph extents to fill in, in font space |
CAIRO_STATUS_SUCCESS
upon success, or
CAIRO_STATUS_USER_FONT_ERROR
or any other error status on error.
Since 1.8
cairo_status_t (*cairo_user_scaled_font_text_to_glyphs_func_t) (cairo_scaled_font_t *scaled_font
,const char *utf8
,int utf8_len
,cairo_glyph_t **glyphs
,int *num_glyphs
,cairo_text_cluster_t **clusters
,int *num_clusters
,cairo_text_cluster_flags_t *cluster_flags
);
cairo_user_scaled_font_text_to_glyphs_func_t is the type of function which
is called to convert input text to an array of glyphs. This is used by the
cairo_show_text()
operation.
Using this callback the user-font has full control on glyphs and their positions. That means, it allows for features like ligatures and kerning, as well as complex shaping required for scripts like Arabic and Indic.
The num_glyphs
argument is preset to the number of glyph entries available
in the glyphs
buffer. If the glyphs
buffer is NULL
, the value of
num_glyphs
will be zero. If the provided glyph array is too short for
the conversion (or for convenience), a new glyph array may be allocated
using cairo_glyph_allocate()
and placed in glyphs
. Upon return,
num_glyphs
should contain the number of generated glyphs. If the value
glyphs
points at has changed after the call, the caller will free the
allocated glyph array using cairo_glyph_free()
. The caller will also free
the original value of glyphs
, so the callback shouldn't do so.
The callback should populate the glyph indices and positions (in font space)
assuming that the text is to be shown at the origin.
If clusters
is not NULL
, num_clusters
and cluster_flags
are also
non-NULL
, and cluster mapping should be computed. The semantics of how
cluster array allocation works is similar to the glyph array. That is,
if clusters
initially points to a non-NULL
value, that array may be used
as a cluster buffer, and num_clusters
points to the number of cluster
entries available there. If the provided cluster array is too short for
the conversion (or for convenience), a new cluster array may be allocated
using cairo_text_cluster_allocate()
and placed in clusters
. In this case,
the original value of clusters
will still be freed by the caller. Upon
return, num_clusters
should contain the number of generated clusters.
If the value clusters
points at has changed after the call, the caller
will free the allocated cluster array using cairo_text_cluster_free()
.
The callback is optional. If num_glyphs
is negative upon
the callback returning or if the return value
is CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED
, the unicode_to_glyph callback
is tried. See cairo_user_scaled_font_unicode_to_glyph_func_t.
Note: While cairo does not impose any limitation on glyph indices, some applications may assume that a glyph index fits in a 16-bit unsigned integer. As such, it is advised that user-fonts keep their glyphs in the 0 to 65535 range. Furthermore, some applications may assume that glyph 0 is a special glyph-not-found glyph. User-fonts are advised to use glyph 0 for such purposes and do not use that glyph value for other purposes.
scaled_font |
the scaled-font being created |
|
utf8 |
a string of text encoded in UTF-8 |
|
utf8_len |
length of |
|
glyphs |
pointer to array of glyphs to fill, in font space |
|
num_glyphs |
pointer to number of glyphs |
|
clusters |
pointer to array of cluster mapping information to fill, or |
|
num_clusters |
pointer to number of clusters |
|
cluster_flags |
pointer to location to store cluster flags corresponding to the
output |
CAIRO_STATUS_SUCCESS
upon success,
CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED
if fallback options should be tried,
or CAIRO_STATUS_USER_FONT_ERROR
or any other error status on error.
Since 1.8
cairo_status_t (*cairo_user_scaled_font_unicode_to_glyph_func_t) (cairo_scaled_font_t *scaled_font
,unsigned long unicode
,unsigned long *glyph_index
);
cairo_user_scaled_font_unicode_to_glyph_func_t is the type of function which
is called to convert an input Unicode character to a single glyph.
This is used by the cairo_show_text()
operation.
This callback is used to provide the same functionality as the text_to_glyphs callback does (see cairo_user_scaled_font_text_to_glyphs_func_t) but has much less control on the output, in exchange for increased ease of use. The inherent assumption to using this callback is that each character maps to one glyph, and that the mapping is context independent. It also assumes that glyphs are positioned according to their advance width. These mean no ligatures, kerning, or complex scripts can be implemented using this callback.
The callback is optional, and only used if text_to_glyphs callback is not
set or fails to return glyphs. If this callback is not set or if it returns
CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED
, an identity mapping from Unicode
code-points to glyph indices is assumed.
Note: While cairo does not impose any limitation on glyph indices, some applications may assume that a glyph index fits in a 16-bit unsigned integer. As such, it is advised that user-fonts keep their glyphs in the 0 to 65535 range. Furthermore, some applications may assume that glyph 0 is a special glyph-not-found glyph. User-fonts are advised to use glyph 0 for such purposes and do not use that glyph value for other purposes.
scaled_font |
the scaled-font being created |
|
unicode |
input unicode character code-point |
|
glyph_index |
output glyph index |
CAIRO_STATUS_SUCCESS
upon success,
CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED
if fallback options should be tried,
or CAIRO_STATUS_USER_FONT_ERROR
or any other error status on error.
Since 1.8
cairo_font_face_t *
cairo_user_font_face_create (void
);
Creates a new user font-face.
Use the setter functions to associate callbacks with the returned user font. The only mandatory callback is render_glyph.
After the font-face is created, the user can attach arbitrary data
(the actual font data) to it using cairo_font_face_set_user_data()
and access it from the user-font callbacks by using
cairo_scaled_font_get_font_face()
followed by
cairo_font_face_get_user_data()
.
a newly created cairo_font_face_t. Free with
cairo_font_face_destroy()
when you are done using it.
Since 1.8
void cairo_user_font_face_set_init_func (cairo_font_face_t *font_face
,cairo_user_scaled_font_init_func_t init_func
);
Sets the scaled-font initialization function of a user-font. See cairo_user_scaled_font_init_func_t for details of how the callback works.
The font-face should not be immutable or a CAIRO_STATUS_USER_FONT_IMMUTABLE
error will occur. A user font-face is immutable as soon as a scaled-font
is created from it.
Since 1.8
cairo_user_scaled_font_init_func_t
cairo_user_font_face_get_init_func (cairo_font_face_t *font_face
);
Gets the scaled-font initialization function of a user-font.
Since 1.8
void cairo_user_font_face_set_render_glyph_func (cairo_font_face_t *font_face
,cairo_user_scaled_font_render_glyph_func_t render_glyph_func
);
Sets the glyph rendering function of a user-font. See cairo_user_scaled_font_render_glyph_func_t for details of how the callback works.
The font-face should not be immutable or a CAIRO_STATUS_USER_FONT_IMMUTABLE
error will occur. A user font-face is immutable as soon as a scaled-font
is created from it.
The render_glyph callback is the only mandatory callback of a user-font.
If the callback is NULL
and a glyph is tried to be rendered using
font_face
, a CAIRO_STATUS_USER_FONT_ERROR
will occur.
Since 1.8
cairo_user_scaled_font_render_glyph_func_t
cairo_user_font_face_get_render_glyph_func
(cairo_font_face_t *font_face
);
Gets the glyph rendering function of a user-font.
Since 1.8
void cairo_user_font_face_set_unicode_to_glyph_func (cairo_font_face_t *font_face
,cairo_user_scaled_font_unicode_to_glyph_func_t unicode_to_glyph_func
);
Sets the unicode-to-glyph conversion function of a user-font. See cairo_user_scaled_font_unicode_to_glyph_func_t for details of how the callback works.
The font-face should not be immutable or a CAIRO_STATUS_USER_FONT_IMMUTABLE
error will occur. A user font-face is immutable as soon as a scaled-font
is created from it.
Since 1.8
cairo_user_scaled_font_unicode_to_glyph_func_t
cairo_user_font_face_get_unicode_to_glyph_func
(cairo_font_face_t *font_face
);
Gets the unicode-to-glyph conversion function of a user-font.
Since 1.8
void cairo_user_font_face_set_text_to_glyphs_func (cairo_font_face_t *font_face
,cairo_user_scaled_font_text_to_glyphs_func_t text_to_glyphs_func
);
Sets th text-to-glyphs conversion function of a user-font. See cairo_user_scaled_font_text_to_glyphs_func_t for details of how the callback works.
The font-face should not be immutable or a CAIRO_STATUS_USER_FONT_IMMUTABLE
error will occur. A user font-face is immutable as soon as a scaled-font
is created from it.
Since 1.8
cairo_user_scaled_font_text_to_glyphs_func_t
cairo_user_font_face_get_text_to_glyphs_func
(cairo_font_face_t *font_face
);
Gets the text-to-glyphs conversion function of a user-font.
Since 1.8


|
The Producer/Consumer Problem
0.0.1
|
#include <DaemonLoop.h>
Public Member Functions | |
| DaemonLoop (DaemonLoop &&)=default | |
| DaemonLoop (DaemonLoop const &)=delete | |
| DaemonLoop & | operator= (DaemonLoop &&)=delete |
| DaemonLoop & | operator= (DaemonLoop const &)=delete |
| void | turnOff () |
| bool | isRunning () const |
| void | runWith (const std::function< void()> &worker) |
Static Public Member Functions | |
| static DaemonLoop & | instance () |
A daemon (or service) is a background process that is designed to runOn autonomously, with little or no user intervention. This class executes a function continuously in the background and offers the controls to manage it. This is like a typical loop (i.e., while) but with explicit terminating controls.
Definition at line 18 of file DaemonLoop.h.
|
static |
It creates a single instance of the daemon loop.
Definition at line 7 of file DaemonLoop.cpp.
| bool Foundation::IPC::DaemonLoop::isRunning | ( | ) | const |
It checks if the daemon loop is running or not.
Definition at line 19 of file DaemonLoop.cpp.
| void Foundation::IPC::DaemonLoop::runWith | ( | const std::function< void()> & | worker | ) |
It runs the daemon loop with a function until it is explicitly stopped.
| worker | The function to execute continuously as a background process. |
Definition at line 24 of file DaemonLoop.cpp.
| void Foundation::IPC::DaemonLoop::turnOff | ( | ) |
It stops the daemon loop.
Definition at line 13 of file DaemonLoop.cpp.


PokéHub
Register
Already a member? Please
log in
instead.
First Name
Last Name
Email
Password
Submit


Charleston, SC
Date:
What's your temperature?
I'm cool!
Little Hot...
Hot.
Dripping!
!! Danger Zone !!
Before You Panic...

- Prepare for Heat Advisory Days (like you do for other natural disasters).
- Live in homes with heat-deflecting building materials.
- Pay attention to the news – listen for the heat warnings. (Learn about climate change!)
- Stay hydrated – drink water before you get thirsty.
- Never leave children or pets alone in enclosed vehicles.
- Consider your fashion choices…Wear loose-fitting, lightweight, light-colored clothing.
- Vote for government officials that understand science and technology and can apply this understanding to build real, practical climate policy solutions!


Thank you for installing Synthesis: An Autodesk Technology
In order to improve this product and understand how it is used, we collect non-personal product usage information. This usage information may consist of custom events like Replay Mode, Driver Practice Mode, Tutorial Link Clicked, etc. This information is not used to identify or contact you. You can turn data collection off from the Control Panel within the simulator. By installing, you agree that you have read the terms of service agreement and data collection statement above.
Copyright © 2021 Autodesk inc.


what
we did?
This is our result from
2014 up to now.
Our Company
Insurance is a means of protection from financial loss.it is a
form of risk management,primarily
used to hedge against the
risk of a contingent or uncertain loss.Property insurance
provides protection against risks to property,such as fire,theft
or wather damage
Insurance is the only product that both
the seller and buyer hope
is never actually used.
Home insurance provides protection
against risks to property, such as fire,
theft or
weather damage.
Home insurance provides protection
against risks to property, such as fire,
theft or
weather damage.
Home insurance provides protection
against risks to property, such as fire,
theft or
weather damage.
Home insurance provides protection
against risks to property, such as fire,
theft or
weather damage.
Home insurance provides protection
against risks to property, such as fire,
theft or
weather damage.
Home insurance provides protection
against risks to property, such as fire,
theft or
weather damage.
Get your easy and fast insurance services
just in 3 easy steps
Insurance is a means of protection from
financial loss. It is a form of risk.
Insurance is a means of protection from financial loss.
It is a form of risk.
Insurance is a means of protection
from financial loss. It is a form of risk.
This is our result from
2014 up to now.
travel protected
money saved
people saved
home protected
contracts signed
money paid
We have more then 42000 clients and counting.
We have been working with Xtra for
about five years and won't even
consider making any
changes.They
are super reponsive and it's always
a pleasure to work with them
Xtra has been taking great care of my
family for approx. 7 years.They have
met all my
needs for home
and
cars insurance.I will continue with
them for many more years.
I have my vehicles and home insured
with Xtra.Their product knowledge is
top notch and i
feel at ease knowing
i'm getting the best value and
coverege possible


I am a Software Engineer based in Seattle, Washington who is currently interning at Brak Software Solutions. I'm looking for full time positions starting in November 2017 or later. My current specialties are Microsoft Web and Mobile solutions with the C# .NET stack.
Developed framework to support offline data synchronization between customer facing web apps (Satori Reader and Human Japanese) and mobile apps. Assisting in the Design and Development of the Satori Reader Mobile Application for IOS and Android. Technologies used include C#, .NET, Xamarin, Xamarin.Forms, XAML, SQLite, Microsoft Azure, Azure Table Storage. https://satorireader.com/
Developed unit tests in C#/.Net to increase production code base coverage and create C# class objects to assist in Unit Test Functionality. I also performed minor refactoring of the code base to eliminate any unused or redundant code and perform bug fixes to both the Client Side and Server Side code base. Helped migrate .NET MVC controllers to Web API 2 standard.
Studied Full Stack Web Development. Technologies covered include C#, Angular 2.0, .Net Core, Javascript, HTML, and CSS. 800+ hours of pair programming experience and over 1000+ hours of development experience.
Worked as team of 3 to build a Web Application that allows users to simulate a Magic the Gathering Card Draft with 2 or more players and the specified card sets. Uses the magicthegathering.io API to retrieve correct card information. Responsible for developing data models and server side implementations to communicate between API, Firebase, and application client. Built with Angular, Html, Css, and Google Firebase.
View Project


| Pokemon Go GPS Data | Slams Google | Examples of us being careless with data | Asks who already has the extension | Our Culture |
| Diverse group of individuals | DuckDuckGo | Ghost Pun | Covered webcam | Amazon ads |
| Logos of all their technologies | Browsers no one's heard of | Free Space | Slams Facebook | Can't answer because of NDA |
| Best way to stay private is not use Web | Apply for internships in the fall | Windows | Points out a hole in UA's security | List of office locations |
| 4-letter word | Person takes stress ghost and leaves | Pun about browser cookies | We're better than Google | Filter bubble |


@@include('./views/mobile-header.html')
@@include('./views/header.html')
@@include('./views/main.html')
@@include('./views/mobile-main.html')
@@include('./views/why.html')
@@include('./views/philosophy.html')
@@include('./views/contact_us.html')
@@include('./views/more.html')
@@include('./views/page.html')


Pull Requests
Pull requests let you tell others about changes you've pushed to a branch in a repository on GitHub. Once a pull request is opened, you can discuss and review the potential changes with collaborators and add follow-up commits before your changes are merged into the base branch.
After initializing a pull request, you'll see a review page that shows a high-level overview of the changes between your branch (the compare branch) and the repository's base branch. You can add a summary of the proposed changes, review the changes made by commits, add labels, milestones, and assignees, and @mention individual contributors or teams. For more information, see "Creating a pull request."
Once you've created a pull request, you can push commits from your topic branch to add them to your existing pull request. These commits will appear in chronological order within your pull request and the changes will be visible in the "Files changed" tab.
You can see information about the branch's current deployment status and past deployment activity on the "Conversation" tab. For more information, see "Viewing deployment activity for a repository."
After you're happy with the proposed changes, you can merge the pull request. If you're working in a shared repository model, the proposed changes will be merged from the head branch to the base branch that was specified in the pull request. For more information, see "Merging a pull request."
If status checks are required for a repository, the required status checks must pass before you can merge your branch into the protected branch. For more information, see "About required status checks."
You can link a pull request to an issue to show that a fix is in progress and to automatically close the issue when someone merges the pull request. For more information, see "Linking a pull request to an issue."
You can visit your dashboard to quickly find links to recently updated pull requests you're working on or subscribed to. For more information, see "About your personal dashboard."


Displays a select box, bound to an ng-model
. Selectable options are defined using
the md-option element directive. Options can be grouped
using the md-optgroup element directive.
When the select is required and uses a floating label, then the label will automatically contain
an asterisk (*
). This behavior can be disabled by using the md-no-asterisk
attribute.
By default, the select will display with an underline to match other form elements. This can be
disabled by applying the md-no-underline
CSS class.
With a placeholder (label and aria-label are added dynamically)
With an explicit label
Using the md-select-header
element directive
When a developer needs to put more than just a text label in the md-select-menu
, they should
use one or more md-select-header
s. These elements can contain custom HTML which can be styled
as desired. Use cases for this element include a sticky search bar and custom option group
labels.
When using a md-select
to pick from a list of objects, it is important to realize how javascript handles
equality. Consider the following example:
At first one might expect that the select should be populated with "Bob" as the selected user.
However, this is not true. To determine whether something is selected,
ngModelController
is looking at whether $scope.selectedUser == (any user in $scope.users);
;
Javascript's ==
operator does not check for deep equality (ie. that all properties
on the object are the same), but instead whether the objects are the same object in memory.
In this case, we have two instances of identical objects, but they exist in memory as unique
entities. Because of this, the select will have no value populated for a selected user.
To get around this, ngModelController
provides a track by
option that allows us to specify a
different expression which will be used for the equality operator. As such, we can update our
html
to make use of this by specifying the ng-model-options="{trackBy: '$value.id'}"
on the
md-select
element. This converts our equality expression to be
$scope.selectedUser.id == (any id in $scope.users.map(function(u) { return u.id; }));
which results in Bob being selected as desired.
Note: We do not support AngularJS's track by
syntax. For instance
ng-options="user in users track by user.id"
will not work with md-select
.
Working HTML:
| Parameter | Type | Description |
|---|---|---|
* ng-model
expression
|
expression |
Assignable angular expression to data-bind to. |
ng-change
expression
|
expression |
Expression to be executed when the model value changes. |
multiple
boolean
|
boolean |
When present, allows for more than one option to be selected. The model is an array with the selected choices. Note: This attribute is only evaluated once; it is not watched. |
md-on-close
expression
|
expression |
Expression to be evaluated when the select is closed. |
md-on-open
expression
|
expression |
Expression to be evaluated when opening the select. Will hide the select options and show a spinner until the evaluated promise resolves. |
md-selected-text
expression
|
expression |
Expression to be evaluated that will return a string to be displayed as a placeholder in the select input box when it is closed. The value will be treated as text (not html). |
md-selected-html
expression
|
expression |
Expression to be evaluated that will return a string to be displayed as a placeholder in the select input box when it is closed. The value will be treated as html. The value must either be explicitly marked as trustedHtml or the ngSanitize module must be loaded. |
placeholder
string
|
string |
Placeholder hint text. |
md-no-asterisk
boolean
|
boolean |
When set to true, an asterisk will not be appended to the floating label. Note: This attribute is only evaluated once; it is not watched. |
aria-label
string
|
string |
Optional label for accessibility. Only necessary if no explicit label is present. |
md-container-class
string
|
string |
Class list to get applied to the |
md-select-only-option
string
|
string |
If specified, a |


Migrate Contract
Migrate old SEL token to new SEL Token
Input Amount
Swap
approve
get OldToken Address


Base App with JQuery Mobile
Your app goes here.
Device Ready Status
onDevicReady not fired.
Sample Button
This file is located at assets/www/index.html


Ocala events
-
where did fxcop come from
One Way Forward: AFI's Directing Workshop for Women
Aug 29, 2012 . When the AFI Directing Workshop for Women (DWW) was founded in . and such television shows as Mad Men, Gilmore Girls and 30 Rock. . under their SAG agreement, as well as equipment and insurance. . Up until roughly the time of the first AFI DWW, were only beginning to work outside the home at .
http://turnstylenews.com/2012/08/29/one-way-forward-afis-directing-workshop-for-women/High Noon - Detail view of Movies Page
Name Occurs Before Title, Offscreen Credit, Print Viewed By AFI . Will is relieved to see Harvey Pell, his deputy, still in town, but Harvey, angry that an . Will then visits the home of his friend, Sam Fuller, but as Sam listens from the next . at the end of production, as insurance in case the film seemed too claustrophobic.
http://www.afi.com/members/catalog/DetailView.aspx?s=&Movie=53629
89 chevie truck tail light Upcoming events in Ocala
broccoli and spaghetti casserole Hottest Tickets
-
Apr 11alliance to horde chat
Amway Center -
Apr 28invicta minute repeater price
Amway Center -
Jun 25california classics california millworks valencia
Bob Carr Performing Arts Center -
Mar 30lillian turner larsson escanaba
Amway Center -
Aug 27porcupine tree radioactive mp3
Amway Center -
Jun 21the movie tavern in humble tex
Amway Center -
Sep 13warehouse auto parts redding ca
Francis Field -
Mar 17carol hershey geriatric media pa
St Augustine Amphitheatre -
Oct 8free application to universities
Amway Center -
May 42007 gary fisher rig 29er
Bob Carr Performing Arts Center
Ocala's best venues
-
See more movie details - AFI: 10 Top 10
AFI Recognition: 100 YEARS 100 MOVIES #11 100 YEARS 100 PASSIONS # 8 . and a prison term for embezzlement, George goes home, angry and sullen. . against the building and loan, or even his life insurance, but Potter dismisses .
http://www.afi.com/10top10/moreDetail.aspx?id=27682&thumb=1 -
Suspicion (1941) - Overview - TCM.com
SIGN-IN. DATABASE HOME · PHOTO ARCHIVES · MediaRoom HOME . Release Date: 1941, Production Date: AFI; AFI-lib; Pat; Karl. Color/B&W: Black and .
http://www.tcm.com/tcmdb/title/1177/Suspicion/ -
NOW: Transcript - Bill Moyers Interviews Jon Stewart | PBS
NOW Home Page . STEWART: You don't want to get the Democrats angry, because then they'll . Dean: I believe it's time to put Americans back to work, to provide health insurance for every American. . Whatever however you place those stories, is a subjective ranking as much as AFI's "100 Best Films in the World" is.
http://www.pbs.org/now/transcript/transcript_stewart.htmlmegarotic most viewed videos
98 people's favorite
-
It's a Wonderful Life - Wikipedia, the free encyclopedia
When Harry graduates from college, he unexpectedly brings home a wife, . a bank examiner due that day, George takes his anger and frustrations out on his family. . feeling he is "worth more dead than alive" because of a life insurance policy. . In June 2008, AFI revealed its 10 Top 10, the best ten films in ten " classic" .
http://en.wikipedia.org/wiki/It's_a_Wonderful_Life -
IMDb: Great People who never got the AFI Life Achievement Award ...
So, it's not really the AFI's fault that they didn't receive an award. Sorry . Director, 12 Angry Men . The Newmans were a well-to-do family and Paul grew up in a nice home in Shaker Heights. . Robert Altman was born on February 20th, 1925 in Kansas City, Missouri, to B.C. (an insurance salesman) and Helen Altman.
http://www.imdb.com/list/z8PswaQ3xoc/


Contributing to
KIE websites
by Geoffrey De Smet
OptaPlanner lead
Website statistics (2018)
- drools.org
- 42 000 sessions / month
- 2500 dist zip downloads / month
- ? maven downloads / month
- optaplanner.org
- 16 000 sessions / month
- 900 dist zip downloads / month
- ? maven downloads / month
- jbpm.org
- 24 000 sessions / month
- 2200 dist/installer zip downloads / month
- ? maven downloads / month
Funnel
More website visitors
=>
- more budget
- more job security
- more usage of our work
Website repo's
- https://github.com/kiegroup/drools-website
- https://github.com/kiegroup/optaplanner-website
- https://github.com/kiegroup/jbpm-website
Changing text in an adoc page
DEMO
SEO
Search Engine Optimization
What is the best open source rule engine?
Let's ask Google: DEMO
What is the best open source DMN engine?
Let's ask Google: DEMO
Drools SEO positions (2018)
- "rule engine java": 9th
- "rule engine open source": 1th
- "rule engine software": 3th (behind Pega)
- "DMN java": none (behind Camunda, Flowable)
- "DMN open source": none (behind Open Rules, Activiti, Flowable, Camunda)
- "DMN software": none (behind ...)
- "decision tables java": none (although 5th talks about drools)
Not counting paid results (adds), using private browsing,
none is not in the first 2 pages (first 20 results)
OptaPlanner SEO positions (2018)
- "constraint solver java": 4th (behind Choco)
- "constraint solver open source": 3th
- "constraint solver software": 3th
- "employee rostering java": 1th
- "employee rostering open source": 1th
- "employee rostering software": 4th
- "vehicle routing java": 6th (behind JSprit)
- "vehicle routing open source": 2th (behind VROOM)
- "vehicle routing software": 5th
Not counting paid results (adds), using private browsing
Think like the potential customer
Do they want a constraint solver?
Or do they want to solve their vehicle routing problem?
Let Google Search Console guide you
Page rank algorithm 101
- Keyword visible on page => get ranked
- Use "DMN" in a sentence on drools.org
- Then give it time
- More external links to url/domain => higher ranking
- Write articles (voxxed, dzone, RHD) or blogs
- Record YouTube video's
- Events (JUG, ...)
- Academic papers
- 1000 other tips, see YouTube "Backlinko" video's
Click Through Rate (CTR)
When they see our link on Google,
do they click on it?
Losing page rank when moving?
Use 301 redirects
users.yml and the team page
DEMO
events.yml and latest events
DEMO
Blogging
DEMO
Social Media
- Drools
- OptaPlanner
- Twitter: 562 followers
- Facebook: 273 followers
- jBPM


Toggle navigation
About
MLR-PRO
{{ sonuc }}
Udacity
Learn only from the best
Explore More
Start Learning
HackerRank
Practice your coding skills
Solve Problems
Start Solving
Stack Overflow
Ask, answer, discuss
Help out
Start Answering


THOMAS CROWN AFFAIR, THE (director: Norman Jewison; screenwriter: Alan R. Trustman; cinematographer: Haskell Wexler; editor: Hal Ashby/Byron Brandt/Ralph Winters; cast: Steve McQueen (Thomas Crown), Faye Dunaway (Vicky Anderson), Paul Burke (Eddy Malone), Jack Weston (Erwin Weaver), Yaphet Kotto (Carl), Astrid Heeren (Gwen), Biff McGuire (Sandy), 1968)
Reviewed by Dennis Schwartz
A stylishly slick, romantic thriller, that is pleasing to the senses in a brainless manner. It brings together a hot director, Norman Jewison, who just finished "In the Heat of the Night," a superstar, Steve McQueen, at the peak of his popularity, and a fresh newcomer, Faye Dunaway, whose "Bonnie and Clyde" was just about to be released. It's a nonsense caper movie, about a bank robbery in Boston, done by the antihero, the self-made millionaire Thomas Crown (McQueen), mostly for the thrill of giving it to the Establishment. You have to remember that this film was made in the radicalized 1960s and that reason for robbing a bank might have been accepted back then in some circles of thinking.
A precision robbery is planned by Crown, as he hires five men who never know him, and don't know each other, to pull off the job. It is reminiscent of Kubrick's "The Killing," but Jewison's film pales in suspense when compared to the former. Jewison's film becomes more of a sexual showdown between the playboy Crown and the attractive insurance investigator, Vicky (Faye). Vicky will get a ten percent commission of the money recovered for her efforts to trap the bank robber. While for Crown, he is in love with how smart he is, and will be challenged by getting the double satisfaction of outwitting her while having a hot relationship with her, if he succeeds in romancing her while she tries to get evidence to convict him of the heist.
We see only one of the men, Erwin (Weston), being hired by Crown, who comes to a New York hotel to meet his unknown boss. The boss is hidden in the darkness and gives him money to buy a Ford stationwagon with wood paneling on the side and tells him he will get a number of payments from the heist go directly into his bank account, and he is told that this is done so the stolen money can't be traced to him. His job will be to drive the stationwagon to a cemetery and unload the money bags in a bin.
After the successful heist of two million and six hundred thousand dollars, Crown flies to Switzerland and opens a secret bank account and makes the arrangements with the bank to pay the men who pulled off the heist in installments. It will require him making many trips there to keep the account full. The idea being that the Swiss accounts are held in secrecy, as they ask no questions if the money is illegal.
The Boston policeman in charge of the investigation Eddy Malone (Burke), gets help from the insurance investigator. She figures out that it must have been Crown, by figuring out his flight plans to Geneva. She then attends a polo match to catch his attention, and she then meets him again at an art auction, where she tells him who she is and what she is after. It becomes a chess match to see who will outsmart the other. I mean it literally becomes a chess match, with Vicky winning a chess game between the two at his place, before Crown tells her to play his game, and the romance reaches a climax which ends in a minute kiss that cutely dissolves into a blur, instead of showing what took place next in the bedroom.
There's a closing scene with a twist of betrayal that was much influenced by the style of French New Wave films. But the film will not be remembered for its plot or the twists in it, but only for the good chemistry in it between the Cary Grant-like suave demeanor of McQueen and the the cool disposition of the good looking Dunaway. Though the sex scenes were not very fleshy, it was mostly foreplay via dialogue, the film, nevertheless, still sold itself on this game of sex between the two amoral fortune hunters.
The film also offered an Oscar winning song scored by Michael Legrand, Windmills of Your Mind, and some fancy camera work of split-screen images by cinematographer Haskell Wexler. But if you are looking for anything but a fun film, I think you'll be disappointed. It turns out to be an easily forgettable caper movie that was pleasing on the eyes as much as easy on the noodle.
REVIEWED ON 4/2/2000 GRADE: C+
Dennis Schwartz: "Ozus' World Movie Reviews"
http://www.sover.net/~ozus
<EMAIL_ADDRESS>© ALL RIGHTS RESERVED DENNIS SCHWARTZ
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


SiE
Home
(current)
Services
About
Login
Admin Login
Parent Login
Teacher Login
About Us
“Pressing the right buttons so that students are motivated to learn is often the key and that’s where the Sport in Education initiative can make a real difference.”
– Hon Murray McCully, Minister for Sport and Recreation
check more
Our Gallery
Contact US
username
email-id
mobile
comments
Submit


Problem: Runaround Numbers
Runaround numbers are integers with unique digits, none of which is
zero (e.g., 81362) that also have an interesting property, exemplified
by this demonstration:
- If you start at the left digit (8 in our number) and count that
number of digits to the right (wrapping back to the first digit when no
digits on the right are available), you'll end up at a new digit (a
number which does not end up at a new digit is not a Runaround Number).
Consider: 8 1 3 6 2 which cycles through eight digits: 1 3 6 2 8 1 3
6 so the next digit is 6.
- Repeat this cycle (this time for the six counts designed by the `6')
and you should end on a new digit: 2 8 1 3 6 2, namely 2.
- Repeat again (two digits this time): 8 1
- Continue again (one digit this time): 3
- One more time: 6 2 8 and you have ended up back where you started,
after touching each digit once. If you don't end up back where you
started after touching each digit once, your number is not a Runaround
number.
Given a number M (that has anywhere from 1 through 9 digits), find
and print the next runaround number higher than M, which will always
fit into an unsigned long integer for the given test data.
PROGRAM NAME: runround
INPUT FORMAT
A single line with a single integer, M
SAMPLE INPUT (file runround.in)
81361
OUTPUT FORMAT
A single line containing the next runaround number higher than
the input value, M.
SAMPLE OUTPUT (file runround.out)
81362
The analysis
Training Gateway


Image Compression
Output Destination
Choose
Output Folder:
Compression Configuration
Choose
File To compress:
Compressed Image
Compressed File Size:
Compression %:
Open At
Compress Image In Current Folder
Compress Image To Output Folder
Site Map Config
Sitemap.xml Url
Process Sitemap
Page URL Config
Page Url
Process Page Url


working...
Distributed System / Cloud Computing
Greater Seattle, WA
Namo is now working for Amazon Web Service Inc. His team is responsible for developing distributed lock service runing Paxos algorithm under Elastic Block Store service. He also took the master degree in Computer Science from Columbia University on 2017 December. His major was system track. This track enables students to understand and master classic and current software systems, and provides the fundamentals for later self-study as well as the construction of future software systems. During his first year at Columbia University, he has accomplished several projects including Mutable Replay, Restaurant.io, and Intra-domain Routing Emulation. There are more technical details on his resume. Besides, he finished his intern at Amazon in Prime team this summer. His project was to implement a validation workflow for website content and associated setup logic.
Sep 2016 - Dec 2017 | MS CS , Columbia University
Click here to view all courses taken in Columbia University.
working...
working...
working ...
working...
working


Main
Interactive notes for
Computational Geometry: Algorithms and Applications
Computational Geometry
SlowConvexHull
Determinant
ConvexHull
Time complexity
Extra
References