| goog.Disposable | |
| goog.events.EventTarget | goog.Disposable |
| goog.ui.Component | goog.events.EventTarget |
| goog.ui.Container | goog.ui.Component |
| goog.ui.Menu | goog.ui.Container |
| goog.ui.FilteredMenu | goog.ui.Menu |
|
opt_renderer
: goog.ui.MenuRenderer=
Renderer used to render filtered menu; defaults to goog.ui.MenuRenderer.
|
|
opt_domHelper
: goog.dom.DomHelper=
Optional DOM helper.
|
|
createDom()
No description.
|
code » | |||
|
decorateChildren_(firstChild)
Decorates child nodes.
Arguments:
|
code » | |||
|
decorateInternal(element)
No description.
Arguments:
|
code » | |||
|
disposeInternal()
No description.
|
code » | |||
|
filterItems_(str)
Shows/hides elements based on the supplied filter.
Arguments:
|
code » | |||
|
getAllowMultiple()
⇒
No description.
Returns:
Whether multiple items can be entered comma separated.
|
code » | |||
|
getContentElement()
No description.
|
code » | |||
|
Gets a list of items entered in the search box.
|
code » | |||
|
getFilter()
⇒
Returns the filter string.
Returns:
Current filter or an an empty string.
|
code » | |||
|
getFilterFromIndex()
⇒
Returns the index of first item that is affected by the filter.
Returns:
Index of first item that is affected by filter.
|
code » | |||
|
getFilterInputElement()
⇒
Returns the filter input element.
Returns:
Input element.
|
code » | |||
|
getFilterLabel()
⇒
No description.
Returns:
The filter label.
|
code » | |||
|
handleFilterEvent(e)
Handles filter input events.
Arguments:
|
code » | |||
|
handleKeyEvent(e)
⇒
Handles the menu's behavior for a key event. The highlighted menu item will
be given the opportunity to handle the key behavior.
Arguments:
Returns:
Whether the event was handled.
|
code » | |||
|
hasPersistentVisibility(child)
⇒
Returns whether the specified child should be affected (shown/hidden) by the
filter criteria.
Arguments:
Returns:
Whether the menu item is persistent.
|
code » | |||
|
initFilterInput_()
Helper method that initializes the filter input element.
|
code » | |||
|
onFilterLabelClick_(e)
Handles clicks on the filter label. Focuses the input element.
Arguments:
|
code » | |||
|
setAllowMultiple(b)
Sets whether multiple items can be entered comma separated.
Arguments:
|
code » | |||
|
setFilter(str)
Sets the filter string.
Arguments:
|
code » | |||
|
setFilterFromIndex(index)
Sets the index of first item that should be affected by the filter. Menu
items with a lower index will not be affected by the filter.
Arguments:
|
code » | |||
|
setFilterLabel(label)
Sets the filter label (the label displayed in the filter input element if no
text has been entered).
Arguments:
|
code » | |||
|
setHighlightedIndex(index)
Sets the highlighted index, unless the HIGHLIGHT event is intercepted and
cancelled. -1 = no highlight. Also scrolls the menu item into view.
Arguments:
|
code » | |||
|
setPersistentVisibility(child, persistent)
Sets whether the specified child should be affected (shown/hidden) by the
filter criteria.
Arguments:
|
code » | |||
|
setUpFilterListeners_()
Sets up listeners and prepares the filter functionality.
|
code » | |||
|
setVisible(show, opt_force)
No description.
Arguments:
|
code » | |||
|
tearDownFilterListeners_()
Tears down listeners and resets the filter functionality.
|
code » |
|
addItem(item)
Adds a new menu item at the end of the menu.
Arguments:
|
code » | |||
|
addItemAt(item, n)
Adds a new menu item at a specific index in the menu.
Arguments:
|
code » | |||
|
canHighlightItem(item)
No description.
Arguments:
|
code » | |||
|
containsElement(element)
⇒
Returns whether the provided element is to be considered inside the menu for
purposes such as dismissing the menu on an event. This is so submenus can
make use of elements outside their own DOM.
|
code » | |||
|
getAllowAutoFocus()
⇒
No description.
Returns:
Whether the menu can automatically move focus to its key event target when it is set to visible.
|
code » | |||
|
getAllowHighlightDisabled()
⇒
No description.
Returns:
Whether the menu will highlight disabled menu items or skip to the next active item.
|
code » | |||
|
getCssClass()
⇒
Returns the CSS class applied to menu elements, also used as the prefix for
derived styles, if any. Subclasses should override this method as needed.
Considered protected.
Returns:
The CSS class applied to menu elements.
|
code » | |||
|
getItemAt(n)
⇒
Returns a reference to the menu item at a given index.
Arguments:
Returns:
Reference to the menu item.
|
code » | |||
|
getItemCount()
⇒
Returns the number of items in the menu (including separators).
Returns:
The number of items in the menu.
|
code » | |||
|
getItems()
⇒
Returns the menu items contained in the menu.
Returns:
An array of menu items.
|
code » | |||
|
getPosition()
⇒
Gets the page offset of the menu, or null if the menu isn't visible
Returns:
Object holding the x-y coordinates of the menu or null if the menu is not visible.
|
code » | |||
|
handleEnterItem(e)
No description.
Arguments:
|
code » | |||
|
highlightNextPrefix(charStr)
⇒
Highlights the next item that begins with the specified string. If no
(other) item begins with the given string, the selection is unchanged.
|
code » | |||
|
removeItem(item)
Removes an item from the menu and disposes of it.
Arguments:
|
code » | |||
|
removeItemAt(n)
Removes a menu item at a given index in the menu and disposes of it.
Arguments:
|
code » | |||
|
setAllowAutoFocus(allow)
Sets whether the menu can automatically move focus to its key event target
when it is set to visible.
Arguments:
|
code » | |||
|
setAllowHighlightDisabled(allow)
Sets whether the menu will highlight disabled menu items or skip to the next
active item.
Arguments:
|
code » | |||
|
setPosition(x, opt_y)
Sets the position of the menu relative to the view port.
Arguments:
|
code » | |||
|
setVisible(show, opt_force)
No description.
Arguments:
|
code » |
|
addChild(child, opt_render)
Adds the specified control as the last child of this container. See
goog.ui.Container#addChildAt for detailed semantics.
Arguments:
|
code » | ||||
|
addChildAt(control, index, opt_render)
Adds the control as a child of this container at the given 0-based index.
Overrides goog.ui.Component#addChildAt by also updating the
container's highlight index. Since goog.ui.Component#addChild uses
#addChildAt internally, we only need to override this method.
Arguments:
|
code » | ||||
|
canDecorate(element)
⇒
Returns true if the given element can be decorated by this container.
Overrides goog.ui.Component#canDecorate.
|
code » | ||||
|
canHighlightItem(item)
⇒
Returns whether the given item can be highlighted.
Arguments:
Returns:
Whether the item can be highlighted.
|
code » | ||||
|
createDom()
No description.
|
code » | ||||
|
decorateInternal(element)
Decorates the given element with this container. Overrides {@link
goog.ui.Component#decorateInternal}. Considered protected.
Arguments:
|
code » | ||||
|
disposeInternal()
No description.
|
code » | ||||
|
enableFocusHandling_(enable)
Sets up listening for events applicable to focusable containers.
Arguments:
|
code » | ||||
|
enterDocument()
No description.
|
code » | ||||
|
exitDocument()
No description.
|
code » | ||||
|
getContentElement()
⇒
Returns the DOM element into which child components are to be rendered,
or null if the container itself hasn't been rendered yet. Overrides
goog.ui.Component#getContentElement by delegating to the renderer.
Returns:
Element to contain child elements (null if none).
|
code » | ||||
|
getHighlighted()
⇒
Returns the currently highlighted item (if any).
Returns:
Highlighted item (null if none).
|
code » | ||||
|
getHighlightedIndex()
⇒
Returns the index of the currently highlighted item (-1 if none).
Returns:
Index of the currently highlighted item.
|
code » | ||||
|
getKeyEventTarget()
⇒
Returns the DOM element on which the container is listening for keyboard
events (null if none).
Returns:
Element on which the container is listening for key events.
|
code » | ||||
|
getKeyHandler()
⇒
Returns the keyboard event handler for this container, lazily created the
first time this method is called. The keyboard event handler listens for
keyboard events on the container's key event target, as determined by its
renderer.
Returns:
Keyboard event handler for this container.
|
code » | ||||
|
getOrientation()
⇒
?goog.ui.Container.Orientation
Returns the container's orientation.
Returns:
?goog.ui.Container.Orientation
Container orientation.
|
code » | ||||
|
getOwnerControl(node)
⇒
Returns the child control that owns the given DOM node, or null if no such
control is found.
Arguments:
Returns:
Control hosted in the container to which the node belongs (if found).
|
code » | ||||
|
getRenderer()
⇒
Returns the renderer used by this container to render itself or to decorate
an existing element.
Returns:
Renderer used by the container.
|
code » | ||||
|
handleBlur(e)
Handles blur events raised when the container's key event target loses
keyboard focus. The default implementation clears the highlight index.
Arguments:
|
code » | ||||
|
handleChildMouseEvents(e)
Handles mouse events originating from nodes belonging to the controls hosted
in the container. Locates the child control based on the DOM node that
dispatched the event, and forwards the event to the control for handling.
Arguments:
|
code » | ||||
|
handleCloseItem(e)
Handles CLOSE events dispatched by items in the container when they are
closed.
Arguments:
|
code » | ||||
|
handleDocumentMouseUp(e)
Handles mouseup events over the document. The default implementation
clears the "mouse button pressed" flag.
Arguments:
|
code » | ||||
|
handleEnterItem(e)
⇒
Handles ENTER events raised by child controls when they are navigated to.
Arguments:
Returns:
Whether to prevent handleMouseOver from handling the event.
|
code » | ||||
|
handleFocus(e)
Handles focus events raised when the container's key event target receives
keyboard focus.
Arguments:
|
code » | ||||
|
handleHighlightItem(e)
Handles HIGHLIGHT events dispatched by items in the container when
they are highlighted.
Arguments:
|
code » | ||||
|
handleKeyEvent(e)
⇒
Attempts to handle a keyboard event, if the control is enabled, by calling
handleKeyEventInternal. Considered protected; should only be used
within this package and by subclasses.
Arguments:
Returns:
Whether the key event was handled.
|
code » | ||||
|
handleKeyEventInternal(e)
⇒
Attempts to handle a keyboard event; returns true if the event was handled,
false otherwise. If the container is enabled, and a child is highlighted,
calls the child control's
handleKeyEvent method to give the control
a chance to handle the event first.
Arguments:
Returns:
Whether the event was handled by the container (or one of its children).
|
code » | ||||
|
handleMouseDown(e)
Handles mousedown events over the container. The default implementation
sets the "mouse button pressed" flag and, if the container is focusable,
grabs keyboard focus.
Arguments:
|
code » | ||||
|
handleOpenItem(e)
Handles OPEN events dispatched by items in the container when they are
opened.
Arguments:
|
code » | ||||
|
handleUnHighlightItem(e)
Handles UNHIGHLIGHT events dispatched by items in the container when
they are unhighlighted.
Arguments:
|
code » | ||||
|
highlightFirst()
No description.
|
code » | ||||
|
highlightHelper(fn, startIndex)
⇒
Helper function that manages the details of moving the highlight among
child controls in response to keyboard events.
|
code » | ||||
|
highlightLast()
No description.
|
code » | ||||
|
highlightNext()
No description.
|
code » | ||||
|
highlightPrevious()
No description.
|
code » | ||||
|
isEnabled()
⇒
Returns true if the container is enabled, false otherwise.
Returns:
Whether the container is enabled.
|
code » | ||||
|
isFocusable()
⇒
Returns true if the container is focusable, false otherwise. The default
is true. Focusable containers always have a tab index and allocate a key
handler to handle keyboard events while focused.
Returns:
Whether the component is focusable.
|
code » | ||||
|
isFocusableChildrenAllowed()
⇒
Returns true if the container allows children to be focusable, false
otherwise. Only effective if the container is not focusable.
Returns:
Whether children should be focusable.
|
code » | ||||
|
isMouseButtonPressed()
⇒
Returns true if the mouse button is pressed, false otherwise.
Returns:
Whether the mouse button is pressed.
|
code » | ||||
|
isVisible()
⇒
Returns true if the container's visibility is set to visible, false if
it is set to hidden. A container that is set to hidden is guaranteed
to be hidden from the user, but the reverse isn't necessarily true.
A container may be set to visible but can otherwise be obscured by another
element, rendered off-screen, or hidden using direct CSS manipulation.
Returns:
Whether the container is set to be visible.
|
code » | ||||
|
registerChildId_(child)
Creates a DOM ID for the child control and registers it to an internal
hash table to be able to find it fast by id.
Arguments:
|
code » | ||||
|
removeChild(control, opt_unrender)
⇒
Removes a child control. Overrides goog.ui.Component#removeChild by
updating the highlight index. Since goog.ui.Component#removeChildAt
uses #removeChild internally, we only need to override this method.
Arguments:
Returns:
The removed control, if any.
|
code » | ||||
|
setEnabled(enable)
Enables/disables the container based on the
enable argument.
Dispatches an ENABLED or DISABLED event prior to changing
the container's state, which may be caught and canceled to prevent the
container from changing state. Also enables/disables child controls.
Arguments:
|
code » | ||||
|
setFocusable(focusable)
Sets whether the container is focusable. The default is true. Focusable
containers always have a tab index and allocate a key handler to handle
keyboard events while focused.
Arguments:
|
code » | ||||
|
setFocusableChildrenAllowed(focusable)
Sets whether the container allows children to be focusable, false
otherwise. Only effective if the container is not focusable.
Arguments:
|
code » | ||||
|
setHighlighted(item)
Highlights the given item if it exists and is a child of the container;
otherwise un-highlights the currently highlighted item.
Arguments:
|
code » | ||||
|
setHighlightedIndex(index)
Highlights the item at the given 0-based index (if any). If another item
was previously highlighted, it is un-highlighted.
Arguments:
|
code » | ||||
|
setHighlightedIndexFromKeyEvent(index)
Helper method that sets the highlighted index to the given index in response
to a keyboard event. The base class implementation simply calls the
#setHighlightedIndex method, but subclasses can override this
behavior as needed.
Arguments:
|
code » | ||||
|
setKeyEventTarget(element)
Attaches an element on which to listen for key events.
Arguments:
|
code » | ||||
|
setMouseButtonPressed(pressed)
Sets or clears the "mouse button pressed" flag.
Arguments:
|
code » | ||||
|
setOrientation(orientation)
Sets the container's orientation.
Arguments:
|
code » | ||||
|
setRenderer(renderer)
Registers the given renderer with the container. Changing renderers after
the container has already been rendered or decorated is an error.
Arguments:
|
code » | ||||
|
setVisible(visible, opt_force)
⇒
Shows or hides the container. Does nothing if the container already has
the requested visibility. Otherwise, dispatches a SHOW or HIDE event as
appropriate, giving listeners a chance to prevent the visibility change.
|
code » |
|
addChild(child, opt_render)
Adds the specified component as the last child of this component. See
goog.ui.Component#addChildAt for detailed semantics.
Arguments:
|
code » | ||||
|
addChildAt(child, index, opt_render)
Adds the specified component as a child of this component at the given
0-based index.
Both
addChild and addChildAt assume the following contract
between parent and child components:
parent.addChild(child) will throw an error if the
child component is already in the document, but the parent isn't.
Clients of this API may call addChild and addChildAt with
opt_render set to true. If opt_render is true, calling these
methods will automatically render the child component's element into the
parent component's element. However, parent.addChild(child, true)
will throw an error if:
Arguments:
|
code » | ||||
|
canDecorate(element)
⇒
Determines if a given element can be decorated by this type of component.
This method should be overridden by inheriting objects.
|
code » | ||||
|
createDom()
No description.
|
code » | ||||
|
decorate(element)
Decorates the element for the UI component.
Arguments:
|
code » | ||||
|
decorateInternal(element)
Actually decorates the element. Should be overridden by inheriting objects.
This method can assume there are checks to ensure the component has not
already been rendered have occurred and that enter document will be called
afterwards. This method is considered protected.
Arguments:
|
code » | ||||
|
disposeInternal()
Disposes of the component. Calls
exitDocument , which is expected to
remove event handlers and clean up the component. Propagates the call to
the component's children, if any. Removes the component's DOM from the
document unless it was decorated.
|
code » | ||||
|
enterDocument()
No description.
|
code » | ||||
|
exitDocument()
No description.
|
code » | ||||
|
forEachChild(f, opt_obj)
Calls the given function on each of this component's children in order. If
opt_obj is provided, it will be used as the 'this' object in the
function when called. The function should take two arguments: the child
component and its 0-based index. The return value is ignored.
Arguments:
|
code » | ||||
|
getChild(id)
⇒
Returns the child with the given ID, or null if no such child exists.
Arguments:
Returns:
The child with the given ID; null if none.
|
code » | ||||
|
getChildAt(index)
⇒
Returns the child at the given index, or null if the index is out of bounds.
Arguments:
Returns:
The child at the given index; null if none.
|
code » | ||||
|
getChildCount()
⇒
Returns the number of children of this component.
Returns:
The number of children.
|
code » | ||||
|
Returns an array containing the IDs of the children of this component, or an
empty array if the component has no children.
|
code » | ||||
|
getContentElement()
⇒
Returns the DOM element into which child components are to be rendered,
or null if the component itself hasn't been rendered yet. This default
implementation returns the component's root element. Subclasses with
complex DOM structures must override this method.
Returns:
Element to contain child elements (null if none).
|
code » | ||||
|
getDomHelper()
⇒
Returns the dom helper that is being used on this component.
Returns:
The dom helper used on this component.
|
code » | ||||
|
getElement()
⇒
Gets the component's element.
Returns:
The element for the component.
|
code » | ||||
|
getElementByFragment(idFragment)
⇒
Helper function for returning an element in the document with a unique id
generated using makeId().
|
code » | ||||
|
getFragmentFromId(id)
⇒
Helper function for returning the fragment portion of an id generated using
makeId().
|
code » | ||||
|
getHandler()
⇒
Returns the event handler for this component, lazily created the first time
this method is called.
Returns:
Event handler for this component.
|
code » | ||||
|
getId()
⇒
Gets the unique ID for the instance of this component. If the instance
doesn't already have an ID, generates one on the fly.
Returns:
Unique component ID.
|
code » | ||||
|
getModel()
⇒
*
Returns the model associated with the UI component.
Returns:
*
The model.
|
code » | ||||
|
getParent()
⇒
Returns the component's parent, if any.
Returns:
The parent component.
|
code » | ||||
|
hasChildren()
⇒
Returns true if the component has children.
Returns:
True if the component has children.
|
code » | ||||
|
indexOfChild(child)
⇒
Returns the 0-based index of the given child component, or -1 if no such
child is found.
Arguments:
Returns:
0-based index of the child component; -1 if not found.
|
code » | ||||
|
isInDocument()
⇒
Determines whether the component has been added to the document.
Returns:
TRUE if rendered. Otherwise, FALSE.
|
code » | ||||
|
isRightToLeft()
⇒
Returns true if the component is rendered right-to-left, false otherwise.
The first time this function is invoked, the right-to-left rendering property
is set if it has not been already.
Returns:
Whether the control is rendered right-to-left.
|
code » | ||||
|
makeId(idFragment)
⇒
Helper function for subclasses that gets a unique id for a given fragment,
this can be used by components to
generate unique string ids for DOM elements
|
code » | ||||
|
removeChild(child, opt_unrender)
⇒
Removes the given child from this component, and returns it. Throws an error
if the argument is invalid or if the specified child isn't found in the
parent component. The argument can either be a string (interpreted as the
ID of the child component to remove) or the child component itself.
If
opt_unrender is true, calls goog.ui.component#exitDocument
on the removed child, and subsequently detaches the child's DOM from the
document. Otherwise it is the caller's responsibility to clean up the child
component's DOM.
Arguments:
Returns:
The removed component, if any.
|
code » | ||||
|
removeChildAt(index, opt_unrender)
⇒
Removes the child at the given index from this component, and returns it.
Throws an error if the argument is out of bounds, or if the specified child
isn't found in the parent. See goog.ui.Component#removeChild for
detailed semantics.
Arguments:
Returns:
The removed component, if any.
|
code » | ||||
|
removeChildren(opt_unrender)
Removes every child component attached to this one.
Arguments:
|
code » | ||||
|
render(opt_parentElement)
Renders the component. If a parent element is supplied, it should already be
in the document and then the component's element will be appended to it. If
there is no optional parent element and the element doesn't have a parentNode
then it will be appended to the document body.
Throws an Error if the component is already rendered.
Arguments:
|
code » | ||||
|
renderBefore(siblingElement)
Renders the component before another element. The other element should be in
the document already.
Throws an Error if the component is already rendered.
Arguments:
|
code » | ||||
|
render_(opt_parentElement, opt_beforeElement)
Renders the component. If a parent element is supplied, it should already be
in the document and then the component's element will be appended to it. If
there is no optional parent element and the element doesn't have a parentNode
then it will be appended to the document body.
Throws an Error if the component is already rendered.
Arguments:
|
code » | ||||
|
setElementInternal(element)
Sets the component's root element to the given element. Considered
protected and final.
Arguments:
|
code » | ||||
|
setId(id)
Assigns an ID to this component instance. It is the caller's responsibility
to guarantee that the ID is unique. If the component is a child of a parent
component, then the parent component's child index is updated to reflect the
new ID; this may throw an error if the parent already has a child with an ID
that conflicts with the new ID.
Arguments:
|
code » | ||||
|
setModel(obj)
Sets the model associated with the UI component.
Arguments:
|
code » | ||||
|
setParent(parent)
Sets the parent of this component to use for event bubbling. Throws an error
if the component already has a parent or if an attempt is made to add a
component to itself as a child. Callers must use
removeChild
or removeChildAt to remove components from their containers before
calling this method.
Arguments:
|
code » | ||||
|
setParentEventTarget(parent)
Overrides goog.events.EventTarget#setParentEventTarget to throw an
error if the parent component is set, and the argument is not the parent.
Arguments:
|
code » | ||||
|
setRightToLeft(rightToLeft)
Set is right-to-left. This function should be used if the component needs
to know the rendering direction during dom creation (i.e. before
#enterDocument is called and is right-to-left is set).
Arguments:
|
code » | ||||
|
wasDecorated()
⇒
No description.
Returns:
Whether the component was decorated.
|
code » |
|
addEventListener(type, handler, opt_capture, opt_handlerScope)
Adds an event listener to the event target. The same handler can only be
added once per the type. Even if you add the same handler multiple times
using the same type then it will only be called once when the event is
dispatched.
Supported for legacy but use goog.events.listen(src, type, handler) instead.
Arguments:
|
code » | |||||
|
dispatchEvent(e)
⇒
Dispatches an event (or event like object) and calls all listeners
listening for events of this type. The type of the event is decided by the
type property on the event object.
If any of the listeners returns false OR calls preventDefault then this
function will return false. If one of the capture listeners calls
stopPropagation, then the bubble listeners won't fire.
Arguments:
Returns:
If anyone called preventDefault on the event object (or if any of the handlers returns false this will also return false.
|
code » | |||||
|
disposeInternal()
Unattach listeners from this object. Classes that extend EventTarget may
need to override this method in order to remove references to DOM Elements
and additional listeners, it should be something like this:
MyClass.prototype.disposeInternal = function() { MyClass.superClass_.disposeInternal.call(this); // Dispose logic for MyClass }; |
code » | |||||
|
getParentEventTarget()
⇒
Returns the parent of this event target to use for bubbling.
Returns:
The parent EventTarget or null if there is no parent.
|
code » | |||||
|
removeEventListener(type, handler, opt_capture, opt_handlerScope)
Removes an event listener from the event target. The handler must be the
same object as the one added. If the handler has not been added then
nothing is done.
Arguments:
|
code » | |||||
|
setParentEventTarget(parent)
Sets the parent of this event target to use for bubbling.
Arguments:
|
code » |
|
dispose()
No description.
|
code » | |
|
disposeInternal()
Deletes or nulls out any references to COM objects, DOM nodes, or other
disposable objects. Classes that extend
goog.Disposable should
override this method. For example:
mypackage.MyClass = function() { goog.Disposable.call(this); // Constructor logic specific to MyClass. ... }; goog.inherits(mypackage.MyClass, goog.Disposable); mypackage.MyClass.prototype.disposeInternal = function() { mypackage.MyClass.superClass_.disposeInternal.call(this); // Dispose logic specific to MyClass. ... }; |
code » | |
|
getDisposed()
⇒
No description.
Returns:
Whether the object has been disposed of.
|
code » | |
|
isDisposed()
⇒
No description.
Returns:
Whether the object has been disposed of.
|
code » |
|
allowMultiple_
:
Whether multiple items can be entered comma separated.
|
Code » | |
|
filterFromIndex_
:
Index of first item that should be affected by the filter. Menu items with
a lower index will not be affected by the filter.
|
Code » | |
|
label_
:
Label displayed in the filter input when no text has been entered.
|
Code » | |
|
maxLength_
:
Maximum number of characters for filter input.
|
Code » |
|
allowFocusableChildren_
:
Whether focus of child componenets should be allowed. Only effective if
focusable_ is set to false.
|
Code » | |
|
childElementIdMap_
:
Map of DOM IDs to child controls. Each key is the DOM ID of a child
control's root element; each value is a reference to the child control
itself. Used for looking up the child control corresponding to a DOM
node in O(1) time.
|
Code » | |
|
enabled_
:
Whether the container is enabled and reacting to keyboard and mouse events.
Defaults to true.
|
Code » | |
|
focusable_
:
Whether the container supports keyboard focus. Defaults to true. Focusable
containers have a
tabIndex and can be navigated to via the keyboard.
|
Code » | |
|
highlightedIndex_
:
The 0-based index of the currently highlighted control in the container
(-1 if none).
|
Code » | |
|
keyHandler_
:
Keyboard event handler.
|
Code » | |
|
mouseButtonPressed_
:
Whether the mouse button is held down. Defaults to false. This flag is set
when the user mouses down over the container, and remains set until they
release the mouse button.
|
Code » | |
|
openItem_
:
The currently open (expanded) control in the container (null if none).
|
Code » | |
|
renderer_
:
Renderer for the container. Defaults to goog.ui.ContainerRenderer.
|
Code » | |
|
visible_
:
Whether the container is set to be visible. Defaults to true.
|
Code » |
|
childIndex_
:
Map of child component IDs to child components. Used for constant-time
random access to child components by ID. Lazily initialized on first use.
Must be kept in sync with
children_ . This property is strictly
private and must not be accessed directly outside of this class!
We use a plain Object, not a goog.structs.Map, for simplicity.
This means components can't have children with IDs such as 'constructor' or
'valueOf', but this shouldn't really be an issue in practice, and if it is,
we can always fix it later without changing the API.
|
Code » | |
|
children_
:
Array of child components. Lazily initialized on first use. Must be kept in
sync with
childIndex_ . This property is strictly private and must
not be accessed directly outside of this class!
|
Code » | |
|
dom_
:
DomHelper used to interact with the document, allowing components to be
created in a different window.
|
Code » | |
|
element_
:
The DOM element for the component.
|
Code » | |
|
idGenerator_
:
Generator for unique IDs.
|
Code » | |
|
id_
:
Unique ID of the component, lazily initialized in {@link
goog.ui.Component#getId} if needed. This property is strictly private and
must not be accessed directly outside of this class!
|
Code » | |
|
inDocument_
:
Whether the component is in the document.
|
Code » | |
|
parent_
:
Parent component to which events will be propagated. This property is
strictly private and must not be accessed directly outside of this class!
|
Code » | |
|
rightToLeft_
:
Whether the component is rendered right-to-left. Right-to-left is set
lazily when #isRightToLeft is called the first time, unless it has
been set by calling #setRightToLeft explicitly.
|
Code » | |
|
wasDecorated_
:
Flag used to keep track of whether a component decorated an already existing
element or whether it created the DOM itself. If an element was decorated
dispose will remove the node from the document, it is left up to the app.
|
Code » |


Icons are Missing or Broken
When using Genki Study Resources offline, some browsers (namely Firefox >_>) are paranoid and will not let you access local files, such as fonts. This in turn causes font-based icons to appear broken.
Thankfully this can easily be fixed by simply installing the font on your computer. If you already downloaded Genki Study Resources, the font has been downloaded as well. Follow the instructions below to install this font on your computer.
Installing FontAwesome Locally
To install FontAwesome (the font used for icons) open the genki-study-resources-master folder and navigate to resources > fonts. The font file you want to install on your computer is fontawesome-webfont.ttf. If you can't find it, simply click here to download it.
Once you have the font file, you just need to install it on your computer. If you don't know how to install a font, follow the links below depending on your operating system. They'll teach you how to install a font.
Important: After installing the font you may need to restart your browser and clear its cache. After that you should see all those awesome icons!
Icons are Still Broken
If you're still having trouble with the icons not displaying properly, please open a new issue on GitHub, so that we can assist you.


The New Zealand Deerstalkers' Association Inc, promotes hunting as a lifetime outdoor sport through the Hunter National Training Scheme (HUNTS). This training programme is conducted at branch level under the guidance of a national coordinator and in partnership with Mountain Safety Council. and the New Zealand Shooting Federation.
The programme syllabus covers the knowledge and skills to operate safely as a hunter in the New Zealand outdoors and teaches the ethics of fair chase and the principles of managing a sustainable game resource. Besides ecology and ethics, the course includes training in equipment, clothing, navigation, firearms, hunting techniques, photography, first aid and bush craft.
The course has proved popular with young adults and new members of the Association and NZDA is committed to continuing to deliver a quality product. Increasingly, specialist instructors have been brought in to deliver specialty items in the curriculum. The programme manual has been extensively revised and NZDA plans to develop, in partnership with other national organisations, a qualification based on unit standards and recognized by the New Zealand Qualifications Authority.
NZDA branches have huts, lodges, rifle ranges and hold local and national competitions in photography, literature, target shooting and trophy hunting. All this adds value to a membership in the organisation that acts as the advocate for game hunting in New Zealand.
THE PROGRAM
Our instructors have a proven level of competence through a national training and assessment package, and will coordinate the delivery of the HUNTS course with the support our national organisations who will pass on their experience in hunting and their knowledge to would-be hunters.
The classroom nights will be at Reikiorangi Hall, bushcraft at Otaki Forks, range day at the club range near Otaki, and the final hunt in Wanganui.
Mon 18 Oct 7pm at the club room: Introduction
Thu 21 Aug 7pm at the club room: Trip planning, equipment, and food
Thu 28 Aug 7pm at the club room: Navigation theory
Sat 30 Aug 8am at the club range: Range day
Thu 4 Sep 7pm a the club room: Firearm safety
Sat 13 Sep - Sun 14 Sep Otaki Forks: River crossing, applied navigation
Sat 20 Sep - Sun 21 Sep Hunting!
Thu 25 Sep 7pm Course roundup and small goods night
$170 per person, plus a Deerstalkers membership
Numbers are limited to 12 participants. Contact the Club Secretary for details, or speak to one of our committee members at a meeting.
If you cannot make it to the HUNTS course, the next best thing is the manual used in the course.
Topics include:
This is an excellent read for new and experienced hunters and can be ordered from the Mountain Safety Council.


Colorful Releases the CVN X570M Gaming Pro – A mATX Motherboard For AMD Ryzen CPUs
by Evan FederowiczColorful Technology Company, a well-known PC component manufacturer they make everything from graphics cards to high-performance storage, announced its latest addition of high-performance motherboards, the CVN X570M Gaming Pro V14.
The CVN X570M Gaming Pro V14 mATX Motherboards offers the same quality and features as a full ATX Design
This X570 motherboard is Ryzen 3000 ready while still allowing for backward compatibility with Ryzen 2000 and Ryzen 1000 series processors, although only Ryzen 3000 series processor will get the added benefit of PCIe 4.0, which offers extra bandwidth to the PCIe slots making graphics cards, or other PCIe cards run more efficiently.
Hardware specifications:
The I/O ports to this motherboard is a 7 USB ports, of an assorted type being USB 3.0, USB 3.1 and USB 2.0, an RJ45 ethernet jack, and a PS2 port. This motherboard does also comes with a single USB Type-C port on the back along although no USB Type-C port to have a USB Type-C port on the front of the case. This motherboard does offer an onboard 8-channel audio chipset, which offers 8.1 HD audio which is complimented by Nichicon audio capacitors.
The CVN or Carrier Vessel Nuclear is a series of products are focused on the quality of products, this motherboard is based on the ENERGY CORE design which gives this motherboard an amazing design of silver accents with a bit of red around the chipset fan. The two M.2 heatsinks have a silver finish which makes M.2 heat spreaders coincide with the contrasting color scheme.
The Colorful X570M Gaming Pro V14 is a great motherboard for mATX builders. (Image Credits: Videocardz)
The PCIe slots are steel reinforced which gives this motherboard a refined look, which helps with the contrasting color scheme of steel silver and the black PCB. The PCIe express slot is not steel-reinforced instead being just a plain black color.
The RAM slots support dual-channel memory, and with a Ryzen 2000 series processors support 1333MHz to 2933MHz DDR4 RAM, a Ryzen 3000 series processor support 4000MHz DDR4 RAM. The RAM slots are just a plain black color to further accent the contrasting color scheme. The CVN X570M Gaming Pro V14 supports 5V ARGB lighting which is supported by the iGame Dynamik Light software, which is Colorful's own RGB software.


{% include custom/header.html %} {% include sidebars/sections/twitter.html %} {% include sidebars/sections/github.html %} {% include sidebars/sections/pinboard.html %}


Progress bars are a bit limited when you want to display several steps on it (usually the bar starts at 0 and finishes at 100, so current value is in percents).
The aim of this plugin is to easily build fully customizable progress bar, that can handle more than one single step.
For now, the plugin has only dependencies with jQuery, so you can include it like following with plugin's js & css files.
HTML

<link href="path/to/plugin/jquery.StepProgressBar.css" rel="stylesheet">

JAVASCRIPT
$(document).ready(function() {
$('#element').stepProgressBar({
currentValue: 50,
steps: [
{value: 0},
{value: 100}
]
});
});
The plugin is under MIT License


#include <pvr_helper.h>
Public Attributes | |
| unsigned int | dwHeaderSize |
| unsigned int | dwHeight |
| unsigned int | dwWidth |
| unsigned int | dwMipMapCount |
| unsigned int | dwpfFlags |
| unsigned int | dwTextureDataSize |
| unsigned int | dwBitCount |
| unsigned int | dwRBitMask |
| unsigned int | dwGBitMask |
| unsigned int | dwBBitMask |
| unsigned int | dwAlphaBitMask |
| unsigned int | dwPVR |
| unsigned int | dwNumSurfs |
Definition at line 9 of file pvr_helper.h.
| unsigned int PVR_Texture_Header::dwHeaderSize |
size of the structure
Definition at line 11 of file pvr_helper.h.
| unsigned int PVR_Texture_Header::dwHeight |
height of surface to be created
Definition at line 12 of file pvr_helper.h.
| unsigned int PVR_Texture_Header::dwWidth |
width of input surface
Definition at line 13 of file pvr_helper.h.
| unsigned int PVR_Texture_Header::dwMipMapCount |
number of mip-map levels requested
Definition at line 14 of file pvr_helper.h.
| unsigned int PVR_Texture_Header::dwpfFlags |
pixel format flags
Definition at line 15 of file pvr_helper.h.
| unsigned int PVR_Texture_Header::dwTextureDataSize |
Total size in bytes
Definition at line 16 of file pvr_helper.h.
| unsigned int PVR_Texture_Header::dwBitCount |
number of bits per pixel
Definition at line 17 of file pvr_helper.h.
| unsigned int PVR_Texture_Header::dwRBitMask |
mask for red bit
Definition at line 18 of file pvr_helper.h.
| unsigned int PVR_Texture_Header::dwGBitMask |
mask for green bits
Definition at line 19 of file pvr_helper.h.
| unsigned int PVR_Texture_Header::dwBBitMask |
mask for blue bits
Definition at line 20 of file pvr_helper.h.
| unsigned int PVR_Texture_Header::dwAlphaBitMask |
mask for alpha channel
Definition at line 21 of file pvr_helper.h.
| unsigned int PVR_Texture_Header::dwPVR |
magic number identifying pvr file
Definition at line 22 of file pvr_helper.h.
| unsigned int PVR_Texture_Header::dwNumSurfs |
the number of surfaces present in the pvr
Definition at line 23 of file pvr_helper.h.


Performs reversible-jump Markov chain Monte Carlo (Green, 1995) <doi:10.2307/2337340>, specifically the restriction introduced by Barker & Link (2013) <doi:10.1080/00031305.2013.791644>. By utilising a 'universal parameter' space, RJMCMC is treated as a Gibbs sampling problem. Previously-calculated posterior distributions are used to quickly estimate posterior model probabilities. Jacobian matrices are found using automatic differentiation.
| Version: | 0.4.3 |
| Depends: | madness, R (≥ 3.2.0) |
| Imports: | utils, coda, mvtnorm |
| Suggests: | knitr, FSAdata |
| Published: | 2018-10-04 |
| Author: | Nick Gelling [aut, cre], Matthew R. Schofield [aut], Richard J. Barker [aut] |
| Maintainer: | Nick Gelling <nick_gelling at hotmail.com> |
| License: | GPL-3 |
| NeedsCompilation: | no |
| Materials: | README |
| CRAN checks: | rjmcmc results |
| Reference manual: | rjmcmc.pdf |
| Vignettes: |
R Package rjmcmc: The Calculation of Posterior Model Probabilities from MCMC Output |
| Package source: | rjmcmc_0.4.3.tar.gz |
| Windows binaries: | r-devel: rjmcmc_0.4.3.zip, r-release: rjmcmc_0.4.3.zip, r-oldrel: rjmcmc_0.4.3.zip |
| OS X binaries: | r-release: rjmcmc_0.4.3.tgz, r-oldrel: rjmcmc_0.4.3.tgz |
| Old sources: | rjmcmc archive |
Please use the canonical form https://CRAN.R-project.org/package=rjmcmc to link to this page.


The Summer Of Snowden
And why you should care
James Moulang, Anvil Palamattam, Matt Flint, Wesley Noble Hewitt, Jack Wearden & John Morley
5 June 2013
6 June 2013
8 June 2013
9 June 2013
24 June 2013
Collecting Data from "Industry Partners"
Collecting Data from Tech Companies
Google & Yahoo Tapping
Tapping into the two of the largest tech companies
Microsoft
Giving the keys to Uncle Sam..
Skype
2 billion minutes are spent talking to each other every day on Skype. Are those monitored?
Apple & Facebook
What about the company that has the biggest loyal fanbase and the social network that has over 1.5 billion active users?
GCHQ Intercept Transatlantic Subsea Fibre Optic Cables
WHAT IS IT?
Mass monitoring and collection of phone calls and internet traffic
Performed under the 'Tempora' program
(British equivalent of the US's PRISM program)
how does it work?
- Actively monitoring and collecting data for the last 18 months.
- Interception probes attached to fibreoptic cables.
- The program is constantly expanding.
Data collected
Records include:
- Phone calls
- Email messages
- Facebook entries
- Internet history
- To name a few...
Legality
- Deemed legal!
- An old clause from RIPA (Regulation of Investigatory Powers Act, 2000) allows tapping of targets if they have a warrant
"Mass, indiscriminate surveillance of this kind goes against an individual's fundamental human right to privacy."
LOVEINT - spying on love interests
What is it?
Comes from a play on acronyms like SIGINT (for the sort of signals intelligence that's handled by the NSA) and HUMINT (for the human intelligence that's carried out by agencies like the CIA).
LOVEINT is the cases of workers using the NSA's intelligence data to spy on individuals they know.
cases
A military member queried six email addresses of a former girlfriend.
One worker regularly tapped the agency's phone-data collection program to screen people she met at cocktail parties.
Of the 12 cases confirmed only 5 were disciplined.
Consequences
Several of the violations were only identified after spies with guilty consciences came clean.
Suggests a lack of safeguards around the massive amount of data that they have collected.
Risks, abuses & why it's bad
So why is it bad?
- Use of backdoors poses a major security risk
- Can be used to find reasonable doubt against "Problem Individuals"
- Provides the power to easily perform industral espionage
- Caused tensions between the US and other countries
Reactions in the Political Arena
2 New Bills
- FISA Amendments act
- USA Freedom Act
D-Notice
7 June 2013
Guido Fawkes Blog
William Hague, 9 June 2013:
"If you are a law-abiding citizen of this country going about your business and your personal life you have nothing to fear"
Whitehall & Downing Street order HDD Destruction
"On Saturday 20 July, in a deserted basement of the Guardian's King's Cross offices, a senior editor and a Guardian computer expert used angle grinders and other tools to pulverise the hard drives and memory chips on which the encrypted files had been stored"
Detention of David Miranda
Sunday 18 August, 2013
Picture: Ricardo Moraes/Reuters
"Grilling" of Spymasters
Thursday, 7 November 2013
Picture: ReutersTV
In the meantime...
Image: american.edu
"The math is good, but math has no agency.
Code has agency, and the code has been
subverted."
Bruce Schneier's Blog
Lavabit
Image: rt.com
"If you knew what I know about email, you might not use it."
Ladar Levison, Lavabit founder.
Dark Mail Alliance
Ladar Levison, Jon Callas and Mike Janke.
Image: thehackernews.com
One to look out for
Image: technoarena.in
"OpenPGP signatures and encryption are part of
Mailpile's core design, not an afterthought or plugin."
mailpile.is
On cloud mine!
Self hosted cloud
- Files
- Contacts
- Calendar
- Bookmarks
- And more...
Stay informed, become informer!
And if all else fails...
Any questions?


Class: Arel::TreeManager
Do not use. This class is for internal use only.
| Relationships & Source Files | |
| Namespace Children | |
|
Modules:
| |
| Extension / Inclusion / Inheritance Descendants | |
|
Subclasses:
|
|
| Super Chains via Extension / Inclusion / Inheritance | |
|
Instance Chain:
self,
FactoryMethods
|
|
| Inherits: | Object |
| Defined in: | activerecord/lib/arel/tree_manager.rb |
Instance Attribute Summary
- #ast readonly
Instance Method Summary
FactoryMethods
- Included
| #coalesce, #create_and, #create_false, #create_join, #create_on, #create_string_join, #create_table_alias, #create_true, #grouping, | |
| #lower | Create a LOWER() function. |
Instance Attribute Details
#ast (readonly)
[ GitHub ]# File 'activerecord/lib/arel/tree_manager.rb', line 41
attr_reader :ast
Instance Method Details
#initialize_copy(other)
[ GitHub ]# File 'activerecord/lib/arel/tree_manager.rb', line 55
def initialize_copy(other) super @ast = @ast.clone end
#to_dot
[ GitHub ]# File 'activerecord/lib/arel/tree_manager.rb', line 43
def to_dot collector = Arel::Collectors::PlainString.new collector = Visitors::Dot.new.accept @ast, collector collector.value end


{% extends PATH+"/inc/layout_citizen.html" %} {% block case_content %}
| Payee | Bank | Sort code | Account number | Status | Date last paid | ||
|---|---|---|---|---|---|---|---|
| Freds Cabs | Nat West Bank | 11-22-33 | 23456789 |<EMAIL_ADDRESS>| live | 06 March 2018 | edit |
| Green Cars | Santander | 12-34-56 | 12345678 |<EMAIL_ADDRESS>| live | 10 December 2017 | edit |
| Toms Taxi | Yorkshire Bank | 12-34-56 | 12345678 |<EMAIL_ADDRESS>| live | 31 October 2017 | edit |
| A2B Cars | Halifax Bank | 00-11-99 | 19283746 |<EMAIL_ADDRESS>| dormant | 15 July 2017 | edit |
| Quickline | HSB | 99-88-34 | 12345678 |<EMAIL_ADDRESS>| dormant | 6 April 2017 | edit |
| Freds Taxis | Nat West Bank | 11-22-33 | 23456789 |<EMAIL_ADDRESS>| dormant | 06 March 2017 | edit |
| The Taxi Company | Santander | 11-22-33 | 23455432 |<EMAIL_ADDRESS>| dormant | 01 March 2017 | edit |
| Quickline | Halifax Bank | 11-11-11 | 23456789 |<EMAIL_ADDRESS>| dormant | 24 January 2017 | edit |


Panthers star Christian McCaffrey is the youngest player ever to earn the top rating in ‘Madden’
by Kevin Webb, Business Insider US- Carolina Panthers running back Christian McCaffrey is the youngest player to earn a 99 overall rating in “Madden” at 23 years old.
- McCaffrey is leading the NFL in rushing yards, touchdowns, and yards from scrimmage in his third season, and he’s the first player in league history to have 1,000 yards rushing and 500 yards receiving through 10 games.
- “Madden NFL 20” updates the ratings for each NFL player every week during the season, and only four players have a 99 overall rating.
- Visit Business Insider’s homepage for more stories.
Carolina Panthers running back Christian McCaffrey has earned a 99 overall player rating in “Madden NFL 20,” making him the youngest player ever to join the game’s exclusive “99 Club.”
McCaffrey is leading the NFL in rushing yards, touchdowns, and yards from scrimmage in his third season, and he’s become the Panthers’ primary offensive threat with quarterback Cam Newton sidelined by an ankle injury. In a video shared the Panther’s Twitter page, McCaffrey said he grew up playing “Madden” and creating versions of himself rated 99 overall.
Only six running backs have achieved an overall rating in Madden ever, placing the 23-year-old McCaffrey in impressive company. The others are Barry Sanders, Marshall Faulk, LaDainian Tomlinson, Chris Johnson, and Adrian Peterson. Four of those five ran for more than 2,000 yards in a single season, and three of them are already in the NFL Hall of Fame.
“Madden” rates each NFL player’s performance in dozens of categories and updates the game’s player ratings each week. Only four players were rated 99 overall at the start of the season – Rams defensive tackle Aaron Donald, Texans wide receiver DeAndre Hopkins, Seahawks linebacker Bobby Wagner, and Bears defender Khalil Mack.
Now in week 12, Wagner and Mack have dipped to 98 overall, while McCaffrey and Chiefs quarterback Patrick Mahomes have been elevated to 99 overall. Climbing up the “Madden” rating charts can be a difficult journey: Ravens quarterback Lamar Jackson has emerged as an MVP candidate this season, but his rating has only moved from 76 overall up to 87.
Despite McCaffrey impressive performance, the Panthers are still 5-5 and face a difficult road to the playoffs. But for now, Carolina fans have yet another reason to celebrate their young superstar.


Israel Palestinians 20 Nov 2019, 05:56 by Tsafrir Abayov (AP Photo/Tsafrir Abayov, File)Tsafrir Abayov As featured on


Home
Welcome
Take Virtual Tour
The Company
Where We Operate
Canada
Australia
Germany
Russia
South Africa
Our Partners
Microsoft
Apple Inc
Mastercard
Some Partners usually have extremely long annoying names
Our Vision
Background
History
Much More
Our Services
Website Design
Application Development
Search Engine Optimization
3D Motion Graphics
Corporate Branding
Latest
Portfolio
Multi Level
Use Email
Newsletter
Use the following steps to send us a letter through post office - Standard Mail may arrive some day in 2020
Step 1 - Conceptualize
Step 2 - Get A Paper
Step 3 - Get A Pen
Step 4 - Start Writing
Step 5 - Visualize
Visualize Words
Visualize Letters
Visualize Characters
Continue Trail 1
Continue Trail 2
Continue Trail 3
Finally We Land
Well Be Back
How was the Journey?
Continue Trail 4
Continue Trail 5
Finish Visualization
Set The Tone
Walk to our offices
Fill this form


Django forms
- This is a form-wide error.
It's valid!
- This field is required.
It's invalid!
It's valid!
It's valid!
- This field is required.
It's invalid!
It's valid!
- This field is required.
It's invalid!
Users
- Name/label Small
- Regular-sized label
-
Name/label
-
Name/label
- Name/label
-
Slat grid
- Info bg
- Warning bg
Add a user
- Name/label


This site is optimised for modern web browsers,
and does not fully support your version of Internet Explorer
Crispy Thai turkey salad
By
Ross Burden
From
Ready Steady Cook
Ingredients
For the curry paste
-
1
chilli
, de-seeded and finely chopped
-
½
leek
, finely chopped
-
3
garlic
cloves, chopped
-
1 bunch
coriander
root, chopped
-
zest
of 1 lime
-
1 tsp
cumin
-
1 tsp
fish sauce
(nam pla)
For the turkey
-
200g/7oz
turkey mince
-
2 tbsp
oil
-
1 tbsp
curry paste
(see above)
-
salt and freshly ground
black pepper
For the salad
-
½
mango
, sliced
-
½ red
chilli
, de-seeded and sliced
-
1
garlic
clove, sliced
-
1 baby gem
lettuce
, broken up
-
handful
fresh coriander
-
handful fresh
basil
-
handful fresh
mint
For the dressing
-
juice of 1
lime
-
1 tsp
sugar
-
1 tsp
soy sauce
-
2 tsp
sesame oil
Method
-
For the curry paste, use a mini food processor to blend together all of the paste ingredients.
-
For the turkey, heat the oil in a wok over a high heat and then add the turkey mince, cooking for about 5 minutes, until golden and becoming crisp.
-
Add one tablespoon of the curry paste and season to taste with salt and freshly ground black pepper. Stir well to coat and heat through. Set aside.
-
For the salad, mix together the ingredients in a bowl and divide between two plates.
-
For the dressing, mix together all of the ingredients.
-
Toss the dressing with the crispy turkey and serve on the salad.


Customers Feedback
Chris Fox. CEO at Mighty Schools.
Delivered on-time.
Rebecca Flex. CEO at Company.
Great service.
Chris Fox. CEO at Mighty Schools.
We were not happy since due to 1 day delay.
Rebecca Flex. CEO at Company.
Thank you. We got orders on-time.
Chris Fox. CEO at Mighty Schools.
Good delivery.
Rebecca Flex. CEO at Company.
More than we expected.


Work on E-Commerce and Commercial Website in multiple programming languages inclusive of Ruby of Rails, Django, Flask, Wordpress, Joomla and much others
Developed multiple enterprise application including Automation Scripts and Application on Reporting Automation
Strong Knowledge on Web and App Security in Web Development and Engineering. Developed Various Web Application according to Industry Adhere Framework
Overview – Performed Comprehensive Automate Scripting, Stakeholder Management, Problem Solution Management, Critical Incident Management, Security Operation Center (SOC) Monitoring for Various Security Tools e.g. SIEM, Project Management, Quality Assurance, System Testing, On Job Staff Training and etc. for MNC Clients.
Developed web based application framework for multiple insurances and banking industry for their internal operation. Was based at multiple client center, AMMETLIFE, Takaful IKHLAS to work on web development at client location
Developed web framework for client network ( Maxis Inc – a telecom based organization) in both front end interface (used, HTML, CSS, AngularJS) and back end integration using Java Programming Language (J2EE) integrated with database (LDAP) which integrated with various other business application schema in management studio
Manage IT Infrastructure Management for Multiple MNC Clients branches located internationally Asia Pacific and Europe Performed Daily Service Review on Service Status, Post Incident Response Analysis, Root Cause Analysis and etc. Supervise Multiple Engineering Teams and 1st Level Service IT Helpdesk Support
Oversee group of 1st level support service desk analyst at delivering IT Technical Resolution Support & Service Escalation for Global Corporate Client on 24/7 Bases. Closely work with incident management, 2nd level support, operation management, quality management, deliver training, KPI documentation, etc
Deliver IT & Accounting Technical Support for SME Business Clients based at Australia & New Zealand over phone calls and live stream. Acquire Business Development Opportunities Leads from Clients and Expand Project ROI by 25%.
▪ Coordinate Interbank Project Enhancement on Existing Banking Related Project with Project Directors from International Branch (e.g. Kenya, New York, etc.)
Working on ITT and OTT of Financial Instruction Cash Management Transaction with the Bank.
Developed various web and mobile application framework in multiple languages including – java, php, python html, css, js, and others. Passionate on software development technologies and took up some freelance and proborno work activities on both web and mobile software development in such as wordpress, magento, joomla and android mobile apps
If London is a watercolor, New York is an oil painting. -Peter Shaffer
“To know Paris is to know a great deal.” – Henry Miller. ..
living at Australia
Together we overcome obstacle


Kees Pieters, Matt Gumbley, Jérôme Verstrynge
We welcome all contributions, if you have formerly been involved in P2P or JXTA, or if you are completely new to its ideas. If you are fluent in our development languages, or if documentation/website design are your areas of expertise - we need you!
We do ask that you agree to the terms in our Contributor Agreement [PDF] before we can accept any pull requests from you.
To join the project, you will need an account on Java.net, and use it to join at https://java.net/projects/jxta
To contribute, you'll need an account on GitHub :)
Or, to just join the dev mailing list, send an email to<EMAIL_ADDRESS>with a subject of subscribe dev
We also have an announce mailing list - send email to<EMAIL_ADDRESS>with a subject of subscribe announce


Command Line Utility¶
The command line interface allows instructors to grade notebooks locally by launching Docker containers on the instructor’s machine that grade notebooks and return a CSV of grades and (optionally) PDF versions of student submissions for manually graded questions.
Prerequisites¶
Before using the command line utility, you should have
- written tests for the assignment
- downloaded submissions into a directory
- written a metadata file if not using a Gradescope or Canvas export
Using the CLI¶
The CLI, encapsulated in the otter
command, runs the local grading process and defines the options that instructors can set when grading. A comprehensive list of flags is provided below.
| Flag | Default Value | Description |
|---|---|---|
-h , --help |
Show help message and exit | |
-p , --path |
./ |
Path to directory of submissions |
-t , --tests-path |
./tests |
Path to directory of tests |
-o , --output-path |
./ |
Path at which to write output (CSV and directory of PDFs) |
-g , --gradescope |
Indicates a Gradescope export format for submissions | |
-c , --canvas |
Indicates a Canvas export format for submissions | |
-j , --json |
Path to JSON metadata file | |
-y , --yaml |
Path to YAML metadata file | |
-s , --scripts |
Indicates that Python scripts are being executed (not IPython notebooks) | |
--pdf |
Generate unfiltered PDFs for manual grading | |
--tag-filter |
Generate PDFs filtered by cell tags for manual grading | |
--html-filter |
Generate PDFs filtered by HTML comments for manual grading | |
-f , --files |
Path to any support files needed for execution (e.g. data files) | |
-v , --verbose |
Write verbose output to console | |
-r , --requirements |
Path to requirements.txt file | |
--containers |
4 | Number of parallel containers to launch; submissions will be divided evenly among them |
--image |
ucbdsinfra/otter-grader | Docker image on which to grade submissions |
--no-kill |
Prevents containers from being killed after execution for debugging |
Basic Usage¶
The simplest usage of the otter
command is when we have a directory structure as below (and we have cd
ed into grading
in the command line) and we don’t require PDFs or additional requirements.
| grading
| - meta.yml
| - nb0.ipynb
| - nb1.ipynb
| - nb2.ipynb
...
| tests
| - q1.py
| - q2.py
| - q3.py
...
In the case above, our otter command would be, very simply,
otter -y meta.yml
Because the submissions are on the current working directory (grading
), our tests are at ./tests
, and we don’t mind output to ./
, we can use the defualt values of the -p
, -t
, and -o
flags, leaving the only necessary flag the metadata flag. Since we have a YAML metadata file, we specify -y
and pass the path to the metadata file, ./meta.yml
.
After grader, our directory will look like this:
| grading
| - final_grades.csv
| - meta.yml
| - nb0.ipynb
| - nb1.ipynb
| - nb2.ipynb
...
| tests
| - q1.py
| - q2.py
| - q3.py
...
and the grades for each submission will be in final_grades.csv
.
If we wanted to generate PDFs for manual grading, we would specify one of the three PDF flags:
otter -y meta.yml --pdf
and at the end of grading we would have
| grading
| - final_grades.csv
| - meta.yml
| - nb0.ipynb
| - nb1.ipynb
| - nb2.ipynb
...
| manual_submissions
| - nb0.pdf
| - nb1.pdf
| - nb2.pdf
...
| tests
| - q1.py
| - q2.py
| - q3.py
...
Metadata Flags¶
The four metadata flags, -g
, -c
, -j
, and -y
, correspond to different export/metadata file formats. Also note that the latter two require you to specify a path to the metadata file. You must specify a metadata flag every time you run otter
, and you may not specify more than one. For more information about metadata and export formats, see this page.
Requirements¶
The ucbdsinfra/otter-grader
Docker image comes preinstalled with the following Python packages and their dependencies:
- datascience
- jupyter_client
- ipykernel
- matplotlib
- pandas
- ipywidgets
- scipy
- tornado
- nb2pdf
- otter-grader
If you require any packages not listed above, or among the dependencies of any packages above, you should create a requirements.txt file containing only those packages and pass the path to this file to the -r
flag.
For example, continuining the example about with the package SymPy, I would create a requirements.txt
| grading
| - meta.yml
| - nb0.ipynb
| - nb1.ipynb
| - nb2.ipynb
...
| - requirements.txt
| tests
| - q1.py
| - q2.py
| - q3.py
...
that lists only SymPy
$ cat requirements.txt
sympy
Now my otter
call, using HTML comment filtered PDF generation this time, would become
otter -y meta.yml --html-filter -r requirements.txt
Grading Python Scripts¶
If I wanted to grade Python scripts instead of IPython notebooks, my call to otter
would only add the -s
flag. Consider the directory structure below:
| grading
| - meta.yml
| - sub0.py
| - sub1.py
| - sub2.py
...
| - requirements.txt
| tests
| - q1.py
| - q2.py
| - q3.py
...
My call to grade these submissions would be
otter -sy meta.yml -r requirements.txt
Note the lack of a PDF flag, as it doesn’t make sense to convert Python files to PDFs. PDF flags only work when grading IPython Notebooks.
Support Files¶
Some notebooks require support files to run (e.g. data files). If your notebooks require any such files, there are two ways to get them into the container so that they are available to notebooks:
- specifying paths to the files with the
-f
flag - putting them into the notebook path
Suppose that my notebooks in grading
required data.csv
in my ../data
directory:
| data
| - data.csv
| grading
| - meta.yml
| - nb0.ipynb
| - nb1.ipynb
| - nb2.ipynb
...
| - requirements.txt
| tests
| - q1.py
| - q2.py
| - q3.py
...
I could pass this data into the container using the otter
call
otter -y meta.yml -r requirements.txt -f ../data/data.csv
Or I could move (or copy) data.csv
into grading
:
$ mv ../data/data.csv ./
| data
| grading
| - data.csv
| - meta.yml
| - nb0.ipynb
| - nb1.ipynb
| - nb2.ipynb
...
| - requirements.txt
| tests
| - q1.py
| - q2.py
| - q3.py
...
and then just run otter
as normal:
otter -y meta.yml -r requirements.txt
All non-notebook files in the notebooks path are copied into all of the containers, so data.csv
will be made available to all notebooks.


<EMAIL_ADDRESS>I am a graduate of Aberystwyth University in Wales.
I am very enthusiastic about Computing and the different aspects of it including Software Engineering, Web Programming, Mobile App Development, Computer Vision and Machine Learning Algorithms.
I studied a Level 3 BTEC in Software Development course at Leeds City College - Technology Campus, and decided to proceed with studying a Computing course at Aberystwyth University.
I play & watch football and Tennis. I support Arsenal FC.
Outside of sport, I love my music. I play musical instruments including guitars, keyboard and drums.


Resources
Now it is going to mention the resources made by others and used to develop this software, it shall be considered that this
resources are important to configure the software but they are not the finality on it.
- AntiWord: It is a software developed by Adri van Os (http://www.winfield.demon.nl/) capable of transform Microsoft Word files
into plain text. The use of this software let the user has the possibility of use Anticopia software to analyze Word files.
- JEditorPane images: Java functions don't let to include in a JEditorPane images with a relative contain in a html.
Rob Kenworthy from JavaWord.com wrote an article (http://www.javaworld.com/javatips/jw-javatip109.html) that describe the problem and
arrange the possibility of download several Java classes developed by him and let fix that problem. The used Java classes have
been MyHTMLEditorKit.java and MyImageView.java. Considering that it is a complete and fixing develop inside any Java software,
the author hasn't wanted to modify, just use the resource develop by Rob Kenworthy and be thankful because of his software.
- Images: All the images which appear in the software have been got from the Web page http://www.iconfinder.net, it uses for
its icons Creative Commons, GPL and LGPL licences.
Thanks to the people that have contributed with these resources, the developed of this software has been centred in the scope of
it, this resources have done to the software an extra function and extra visual that the users of the AntiCopia software will thanks.


Filters:
| Your Favorites | ||
|---|---|---|
| 2% Milk | 17mg |
1
|
| Cottage Cheese | 24mg |
1
|
| Ricotta Cheese | 14mg |
1
|
| Search Results | ||
|---|---|---|
| 1% Milk | 12mg |
1
|
| Chobani Yogurt | 22mg |
1
|
| Yoplait Yogurt | 10mg |
1
|
| Dannon Yogurt | 25mg |
1
|
| Oikos Yogurt | 8mg |
1
|


| (A) | ---- no text ---- | |
| 345 | (C) | ¶ As sone as þey tolden þis tale . in trewthe as þey sholde |
| 346 | (D) | Anone told þei this tale in truþe as þei shold |
| 347 | (E) | & þis tale toolde . riȝt as þey were bode . |
| (Ex) | ---- no text ---- | |
| 355 | (L) | Tit tolden here tale & wondere towe made |
| 340 | (P) | Tyte talde þair tale & wondir thoght many |
| 340 | (U) | Alstite tolde thei this tale / in trutħ os thei shulde |
| (V) | ---- no text ---- |


| I l@ve RuBoard |
In this section we show how to execute SQL queries and fetch data using ODBC, DAO, and ADO. First, you need a database. The examples for this chapter include an Access database called pydbdemos.mdb . You could as easily use any database you can access, of course modifying the SQL statements as needed. The sample database consists of a list of clients and invoices, with the structure shown in Figure 13.2.
If you wish to use the sample database, you need to configure an ODBC data source as follows:
Click on Start Settings Control Panel 32-bit ODBC User (or system) DSN Add.
Select Microsoft Access Driver from the list of drivers.
Enter the name PYDBDEMOS in the box for Data Source Name.
Click the Select button and locate the file pydbdemos.mdb.
Click OK. The new data source should now be visible in the list.
Click OK to close the ODBC Data Source Administrator. Some versions of Windows contain a bug that causes an error message at this point. Ignore any messages; your data source is registered correctly.
Since Access isn't a server, we have worked with Sybase SQL Anywhere for some of the advanced examples. This is an excellent commercial database engine costing little more than Access and part of a range of products ranging from embedded database engines to enterprise servers. We've kept the Sybase examples to a minimum to illustrate the principles, and you certainly don't need a client/server system to follow this chapter. If you are working from home and want to experiment with the techniques used in large-scale database development, you'll find that most commercial database vendors are generous with extended evaluation copies and cut-down developer editions; their business model is to charge for connections to servers, and it's in their interest to encourage developers to try them.
PythonWin includes an ODBC module that is mature and stable, but no longer being developed and only Level 1.0-compliant. However, it has the advantage of being small, light, and present in every PythonWin distribution. It depends on the DBI module that defines certain data types (such as dates) and must be imported first: more on this later. It consists of two extension files in the win32 subdirectory, odbc.pyd and dbi.pyd . Here's how we fetch some data:
>>> import dbi #database independence utilities >>> import odbc #the ODBC module itself >>> from pprint import pprint #pretty-print function >>> myconn = odbc.odbc('PYDBDEMOS') >>> mycursor = myconn.cursor() >>> mycursor.execute('SELECT ClientID, CompanyName, Address1 FROM Clients') >>> mydata = mycursor.fetchall() >>> mycursor.close() #close cursor when done >>> myconn.close() #close database when done >>> pprint(mydata) [('MEGAWAD', 'MegaWad Investments', '1 St. Fredericks-Le-Grand'), ('NOSHCO', 'NoshCo Supermarkets', '17 Merton Road'), ('GRQ', 'GRQ Recruitment', None)] >>>
The fetchall() method converts the entire result set to a list of tuples of Python variables in one call.
The connection object is constructed with an ODBC connection string. It can be as simple as the data source name or can include a username and password; a real-world connection string might looks like this:
DSN=MYDATABASE;UID=MYUSER;PWD=MYPASSWORD
If you attempt to connect to a secure database without a password, the database driver pops up a login dialog. Access has a default user ID, Admin, and an empty password unless you enable security.
The cursor object manages a query. Once the query has been executed, you can use it to get information about the underlying fields. In the previous example you closed the cursor, but if it was still open, you could do this:
>>> pprint(mycursor.description) [('clientid', 'STRING', 10, 10, 0, 0, 1), ('companyname', 'STRING', 50, 50, 0, 0, 1), ('address1', 'STRING', 50, 50, 0, 0, 1)] >>>
The seven elements are: name, type_code, display_size, internal_size, precision, scale, and null_ok. Not all databases (or ODBC drivers, or Python interfaces) provide this information, but all the ones we have looked at manage the field name correctly.
Cursors also control how the information is retrieved. Some queries return large sets of data, and it is inefficient to always send all of them across a network to a client. We used the fetchall() method to ask for every row of data. There are also fetchone() and fetchmany() methods, which retrieve either one row or a block of rows, moving forward though the result set; they both return None when they reach the end. Cursors have a property arraysize you can set to determine the number of rows retrieved by a call to fetchmany().
Cursors can also execute UPDATE and INSERT statements or SQL Data Definition Language statements, such as CREATE TABLE . The call to execute() returns the number of rows affected:
>>> mycursor = myconn.cursor() >>> mycursor.execute('UPDATE Invoices SET Hours=42 \ WHERE InvoiceID=199904001') 1 >>>
However, at this point we reach a major limitation with the PythonWin ODBC module: it doesn't support prepared statements (at least not on any of the database we tested against). If you don't know what this means, rest assured, all will be revealed at considerable length in the following sections.
For the most part, ordinary Python variables are exactly what one needs to hold database values; they can hold integers, floating-point numbers, or strings (including strings of large binary data). The previous console session included the statement import dbi at the beginning. This statement must be executed prior to import odbc. This module defines a date type to use when working with databases, as well as the standard data types used by the ODBC API. Let's try a query that returns some dates and play with them. Assume the connection is still open:
>>> mycursor = myconn.cursor() >>> mycursor.execute('SELECT ClientID, InvoiceDate, Consultant, \ Hours FROM Invoices') >>> mydata = mycursor.fetchall() >>> pprint(mydata) [('MEGAWAD', <DbiDate object at 10f0dc0>, 'Joe Hacker', 40L), ('MEGAWAD', <DbiDate object at 10f0c40>, 'Arthur Suit', 24L), ('MEGAWAD', <DbiDate object at 10f1ed0>, 'Joe Hacker', 57L), ('NOSHCO', <DbiDate object at 10f1e00>, 'Tim Trainee', 18L)] >>> dateobj = mydata[0][1] # grab the date from the first row >>> dateobj <DbiDate object at 10f0dc0> >>> int(dateobj) 924044400 >>> str(dateobj) 'Wed Apr 14 00:00:00 1999' >>> print dateobj Wed Apr 14 00:00:00 1999 >>>
Dates are returned as DbiDate objects. These can be treated as integers or floating point numbers, in which case you get the number of seconds since January 1, 1970 (the Python and Unix time system), or as strings, in which case you get a printable representation.
When modifying or inserting rows in a database, the syntax and format options may vary from vendor to vendor. However, there is also a standard ODBC syntax for embedding dates in SQL strings that should always work. That syntax uses the format {d 'yyyy-mm-dd'}. With Microsoft databases you can also use either a string enclosed with hashes, or a Microsoft date serial number,[3] which is based on the number of days since 1900:
[3] This is the system used in COM dates as seen in Chapter 9.
>>> mycursor.execute('UPDATE Invoices SET InvoiceDate={d '1999-04-15' } WHERE InvoiceID=199904001') # preferred 1 >>> mycursor.execute('UPDATE Invoices SET InvoiceDate=36265 WHERE InvoiceID=199904001') 1 >>> mycursor.execute('UPDATE Invoices SET InvoiceDate=#15-Apr-99# WHERE InvoiceID=199904001') 1 >>>
The ODBC module distributed with PythonWin is a minimal implementation, and conforms to Version 1.0 of the Python Database API. It's stable and works well, but is unlikely to be developed further. Then again, neither is ODBC![4]
[4] Microsoft is committed to extending ODBC as needed to comply with developments such as SQL3, without breaking existing code.
If you work extensively with databases, check out Marc-André Lemburg's mxODBC extension package, available from http://starship.python.net/crew/lemburg/. One of its many features is an enhanced set of date and time types to save you from worrying about Microsoft and Unix date systems. These are available as a separate package, mxDateTime, which can be used in nondatabase applications. mxODBC also runs on Unix. mxODBC has some licensing restrictions; check the web site for the latest details.
mxDateTime and mxODBC are both shipped as packages that should be unzipped somewhere on the Python path.[5] The latter creates a directory and package named—you guessed it—ODBC. There is a naming collision with the old ODBC module, which lives in ...Python\win32\odbc.pyd ; we suggest renaming this to something else, such as win32odbc.pyd, so that you can still access the old module if you want to (note, however, that you need to rename the module back to the original odbc.pyd before it can be used again). It contains a number of subpackages aimed at other platforms; the functionality we want is in the module ODBC.Windows . Let's give it a try:
[5] There are plans to merge the two into one package in the near future. At the time of this writing, the current versions are 1.1.1 for mxODBC and 1.3.0 for mxDateTime.
>>> import ODBC.Windows >>> conn = ODBC.Windows.Connect('PYDBDEMOS') >>> cursor = conn.cursor() >>> cursor.execute('SELECT InvoiceID, ClientID, InvoiceDate FROM Invoices') >>> from pprint import pprint >>> pprint(cursor.description) (('InvoiceID', 4, None, None, 10, 0, 1), ('ClientID', 12, None, None, 10, 0, 1), ('InvoiceDate', 11, None, None, 19, 0, 1)) >>> data = cursor.fetchall() >>> pprint(data) [(199904001, 'MEGAWAD', 1999-04-15 00:00:00.00), (199904002, 'MEGAWAD', 1999-04-14 00:00:00.00), (199904003, 'MEGAWAD', 1999-04-21 00:00:00.00), (199904004, 'NOSHCO', 1999-04-22 00:00:00.00)]
As can be seen, the interface is almost identical. A recent change in the Python Database API has been to use Connect() as the constructor for connection objects rather than ODBC(), but mxODBC supports both forms, as well as the lower case connect().
mxODBC offers access to a wide range of options and SQL constants that can control the behavior of a connection. The most important of these determines whether the connection commits every statement as it's executed or accumulates them in a transaction. The default behavior is to begin a transaction, so that changes to the database are permanent only when a user calls cursor.commit(). This can be modified two ways. First of all, when connecting, one can supply an argument as follows:
>>> myconn = ODBC.Windows.Connect('PYDBDEMOS',clear_auto_commit=1) >>>
Second, one can set this and a wide range of other options through the setconnectoption(option, value) and getconnectoption(option) methods. The SQL object provides access to the full set of 636 ODBC constants that (among other things) define the options and possible values. Thus, you can achieve the same with:
>>> myconn.setconnectoption(SQL.AUTOCOMMIT, SQL.AUTOCOMMIT_ON) >>> myconn.getconnectoption(SQL.AUTOCOMMIT) 1 >>>
This feature allows access to most of the key capabilities of ODBC drivers.
Now we'll take a quick look at the date and time functionality. The mxDateTime package was developed after much discussion on the Python DB-SIG to provide a platform-independent way to move date and time data between databases and applications. Its internal epoch is the year dot, giving it a far greater range than COM dates. The first thing to note is that the date objects in the previous session were smart enough to represent themselves in a readable manner! We'll grab a date out of the row above and play with it:
>>> aDateTime = data[0][2] >>> type(aDateTime) <type 'DateTime'> >>> int(aDateTime) 924130800 >>> str(aDateTime) '1999-04-15 00:00:00.00' >>>
mxDateTime also provides a large array of constants, methods, and submodules to perform date and calendar calculations, parse dates, and even work out holidays. The following snippet should give you a feel:
>>> import DateTime >>> DateTime.DateTimeFromCOMDate(0) # the Microsoft system 1899-12-30 00:00:00.00 >>> aDateTime.COMDate() # convert to Microsoft COM/Excel dates 36265.0 >>> >>> DateTime.now() - aDateTime # RelativeDateTime object <DateTimeDelta object for '16:23:40:16.18' at 1106530> >>> aDateTime + DateTime.RelativeDateTime(months=+3) 1999-07-15 00:00:00.00 >>> # first of next month... >>> aDateTime + DateTime.RelativeDateTime(months=+1,day=1) 1999-05-01 00:00:00.00 >>> DateTime.now() 1999-05-01 23:42:20.15 >>> DateTime.Feasts.EasterSunday(2001) 2001-04-15 00:00:00.00 >>> DateTime.Parser.DateFromString('Friday 19th October 1987') 1987-10-19 00:00:00.00 >>>
A DateTimeDelta is defined for the difference between two points in time, and there are a full set of mathematical operations defined. Submodules include date parsers, holidays, and routines for ARPA and ISO dates. A large number of business applications need to handle dates and times intelligently, and these functions make it extremely easy and quick.
One of the key advantages of mxODBC is that it properly supports prepared statements. While these will be familiar to database programmers who work in C, they may not be to people used to standard Visual Basic or Delphi database development tools, so we'll explain the background.
There are two stages to the execution of an SQL statement. First, the database parses the SQL, works out a plan for executing the query, and compiles it into an executable routine. Second, the database executes the statement and returns the result set. For complex queries joining several tables, the parsing is not a trivial step, and may involve some analysis of the size of tables and the best order in which to filter records. It also consumes a large amount of memory compared to the subsequent execution.
If you wish to perform the same kind of query repeatedly (for example, inserting 1,000 rows in a table), the statement could, in theory, be parsed only once, leading to substantial performance gains. To support this, it's necessary to separate the SQL statement structure from the actual parameters to go into the database.
If you are working with ODBC in C, you execute one call to get a handle to the SQL statement, then others to actually call it repeatedly with differing data. In Python it is much simpler: just parameterize the statement, using a question mark as a placeholder:
>>> stmt = "UPDATE Invoices SET Hours = ? WHERE InvoiceID = ?" >>> mycursor.execute(stmt, (45, 199904001)) 1 >>>
mxODBC and any other DBAPI-compliant interface do the right thing to pass the arguments to the database, whatever their type. Don't confuse this with Python's modulo operator for substituting into strings.
At this point you've executed only a single statement. However, the cursor object is now caching a handle to the prepared statement; so a subsequent call of the form cursor.execute(stmt, newdata) will be much faster on any client/server database. Later in the chapter, you'll discover how much faster, when we benchmark a range of data access methods.
If you have a large block of data to insert or update, there's a method named executemany() ,[6] which takes a block or rows and saves the need to write a Python loop to insert each one. The following snippet shows the most efficient way to do a bulk insertion or update. The SQL statement is parsed only once:
[6] executemany() is the new standard, but many interface modules (including mxODBC and Gadfly) allow you to pass a list of tuples to execute() as well.
>>> mycursor.executemany(stmt, ... [ #begin a list of values ... (45, 199904001), ... (53, 199904002), ... (52, 199904003) ... ] ) 1 >>>
Note that the block of data supplied is a list of tuples, the same format returned from fetchall() or from 2D COM arrays. Other languages let you work with one field at a time; Python lets you manipulate whole blocks of data in a single line!
The importance of prepared statements is hard to overstate. First of all, on single queries on a database that is being used lightly, there can be an increase of up to 50% in query execution. Second, if a system is designed to use only prepared statements, it consumes far less server memory, enabling it to support many more users and perform better under heavy loads. Third, it saves you a lot of work; there's no need to build the full SQL string yourself, leaving you free to concentrate purely on manipulating blocks of Python variables.
One key feature offered by client/server databases (but not Microsoft Access) is the stored procedure . This is a named, precompiled procedure in the database that may be called from outside: conceptually, a function you can call, complete with arguments. As well as offering the same performance benefits as prepared statements, these allow the database to encapsulate business logic. For example, rather than letting developers directly execute SQL on a group of tables relating to invoices, database administrators can provide an interface allowing the users to add, edit (only where appropriate), and query interfaces. This is standard practice in many companies, and ad hoc queries by users are sometimes banned because of concerns over database integrity or performance.
Access doesn't offer this feature, so we'll switch to a demonstration version of Sybase Adaptive Server Anywhere. The example database provided includes tables of customers and products, and a stored procedure interface to them. The procedure sp_product_info accepts a product ID as argument and returns information on that product gathered from several tables.
The DBAPI recommends that cursors can optionally offer a method named callproc( procname, [parameters]). It's optional because many databases, such as mySQL and Access, don't offer stored procedures. At the time of writing this was not yet implemented in mxODBC. Nevertheless, they can be called using standard SQL without trouble, as follows:
>>> mycursor.execute('sp_product_info(500)') >>> mycursor.fetchall() [(500, 'Visor', 'Cloth Visor', 'One size fits all', 'White', 36, 7.0)] >>> mycursor.execute('CALL sp_product_info(500)') >>> mycursor.fetchall() [(500, 'Visor', 'Cloth Visor', 'One size fits all', 'White', 36, 7.0)] >>> mycursor.execute('EXEC sp_product_info(500)') >>> mycursor.fetchall() [(500, 'Visor', 'Cloth Visor', 'One size fits all', 'White', 36, 7.0)]
There is a third Python module for working with ODBC that operates on different lines. Sam Rushing (http://www.nightmare.com) specializes in low-level work with Python and Windows and has produced a package named calldll that allows Python programs to dynamically load and call any function in a DLL. We discuss how this works in Chapter 22. It has allowed Sam to produce an ODBC module that wraps and exposes almost every function in Microsoft's ODBC.DLL. To install this, you need to download the two files calldll.zip and dynwin.zip from his site. The latter contains a number of modules relating to ODBC. Naturally, one of these is called odbc.py, so you need to watch for name collisions. If you've been using the previous two modules, rename them out of the way before starting.
As with the other modules, calldll provides a safe, easy-to-use high-level interface for querying databases, but it bears no resemblance to the DBAPI. Here's the high-level usage:
>>> import odbc >>> env = odbc.environment() >>> conn = env.connection() >>> conn.connect('accessdemo') >>> import pprint >>> pp = pprint.pprint >>> results = conn.query('SELECT * FROM Invoices') >>> pp(results[0]) #field information [('InvoiceID', 4, 10, 0, 1), ('ClientID', 12, 10, 0, 1), ('InvoiceDate', 11, 19, 0, 1), ('Consultant', 12, 50, 0, 1), ('PeriodEnding', 11, 19, 0, 1), ('Hours', 8, 15, 0, 1), ('HourlyRate', 2, 19, 4, 1), ('Expenses', 2, 19, 4, 1), ('ExpenseDetails', 12, 50, 0, 1), ('TaxRate', 8, 15, 0, 1), ('Comments', 12, 50, 0, 1), ('DatePaid', 11, 19, 0, 1)] >>> pp(results[1]) #first data row ['199904001', 'MEGAWAD', '1999-12-31 00:00:00', 'Joe Hacker', '1999-04-18 00:00:00', '43.0', '50.0000', '0.0000', None, '0.175', None, None] >>>
The high-level interface includes classes to represent the environment, connections, and statements. Perhaps of more interest is what happens when you drop down a level. Sam has encapsulated the idea of an ODBC function call in a general way. Let's take a look at his own source code for the connect() method:
def connect (self, dsn, uid='', auth=''): self.dsn = cstring (dsn) self.uid = cstring (uid) self.auth = cstring (auth) retval = odbc.SQLConnect ( self, # connection handle self.dsn, self.dsn.strlen(), # data source name self.uid, self.uid.strlen(), # user identifier self.auth, self.auth.strlen(), # authentication (password) ) if retval in (SQL_SUCCESS, SQL_SUCCESS_WITH_INFO): self.connected = 1 else: raise error, 'SQLConnect failed: %d' % retval
If you're an experienced ODBC programmer working from C or C++, you'll recognize the call to SQLConnect and the constant values such as SQL_SUCCESS. The ODBC module in DynWin exposes the entire ODBC API to the programmer, offering the same possibilities as with programming in C.
One word of warning: while the high-level interface is reliable and quite friendly, the technologies underneath DynWin and calldll are less forgiving than most Python extensions. If you drop down to the lowest levels and call ODBC functions with the wrong arguments, it's possible to corrupt the stack and crash your program, the same as in C.
We expect this module to be of interest to experienced C and C++ programmers who know the ODBC API and wish to work with it at a low level. If this doesn't describe you, stick with the other ODBC modules; the performance is the same, but the interface operates at a much higher level of convenience.
The Data Access Object hierarchy is installed on your system if you have Microsoft Office, Access, or Visual Basic, or if you have ever installed a VB application that works with MDB files. It doesn't need an ODBC data source configured. We recommend running MakePy over the latest version of the Microsoft DAO Library on your system, as seen in Figure 13.3.
The hierarchy starts with a database engine (class DBEngine) and allows you to open multiple Database objects. Once a database is open you can create Recordset objects that are the broad equivalent of a cursor in the Python Database API. You can navigate through a Recordset and edit its fields. A Field is an object too, with a Name, a Value, and many more properties.
Let's start by connecting to the same database as before. This time you don't need the ODBC data source, but can go straight for the file:
>>> import win32com.client >>> daoEngine = win32com.client.Dispatch('DAO.DBEngine') >>> daoDB = daoEngine.OpenDatabase('C:\\MYDIR\\pydbdemos.mdb') >>> daoRS = daoDB.OpenRecordset('SELECT ClientID, InvoiceDate, \ Consultant, Hours FROM Invoices') >>> daoRS.MoveLast() # need to do this to get an accurate size >>> daoRS.RecordCount 4 >>>
Opening the database and getting the result set is no harder than with the Python API and ODBC. However, instead of calling fetchall() to create a Python list of tuples, you have a Recordset object through which you must iterate. Before, you stepped to the end and got a record count. Now let's look at some data:
>>> daoRS.MoveLast() >>> daoRS.Fields('ClientID').Value # reference fields by name 'NOSHCO' >>> daoRS.Fields(3).Value # or by position 18.0 >>> for i in range(daoRS.Fields.Count): ... daoField = daoRS.Fields[i] ... print '%s = %s' % (daoField.Name, daoField.Value) ... ClientID = NOSHCO InvoiceDate = <time object at 1191860> Consultant = Tim Trainee Hours = 18.0 >>>
The normal mode of operations is to work a field at a time, asking for the exact values you want. However, there's a method called Recordset.GetRows( [rows_to_fetch]) that can grab data in bulk. It returns the next few rows from the current position:
>>> daoRS.MoveFirst() >>> data = daoRS.GetRows(4) >>> pprint(data) ((L'MEGAWAD', L'MEGAWAD', L'MEGAWAD', L'NOSHCO'), (<time object at 11921f0>, <time object at 11921d0>, <time object at 11921b0>, <time object at 1192190>), (L'Joe Hacker', L'Arthur Suit', L'Joe Hacker', L'Tim Trainee'), (42.0, 24.0, 57.0, 18.0))
There are two things to notice. First, GetRows() returns columns, not rows. The matrix is transposed compared to the Python representation. Second, this is a COM server, so you get back Unicode strings and the date objects defined by the Python COM framework. As a reminder, let's take another look at the third date type:
>>> aDate = data[1][0] # remember how these dates work? >>> type(aDate) <type 'time'> >>> int(aDate) # can coerce to a Python date... 924130800 >>> aDate.Format() # ...and knows how to display itself '04/15/99 00:00:00' >>>
It's possible to update and insert records using DAO, but the normal technique is to use the Edit() and AddNew() methods of a RecordSet as follows:
>>> daoRS2 = daoDB.OpenRecordset('SELECT * FROM Clients') >>> daoRS2.AddNew() >>> daoRS2.Fields('ClientID').Value = 'WOMBLES' >>> daoRS2.Fields('CompanyName').Value = 'Wimbledon Garbage Disposal Ltd.' >>> daoRS2.Fields('ContactName').Value = 'Uncle Bulgaria' >>> daoRS2.Update() # save the record >>> daoRS2.Close()
To modify an existing record, use Edit() rather than AddNew() at the beginning.
This highlights what is arguably a benefit of the DAO model: the database does type checking on individual fields as you assign them. If you try to put a string in a date field, you get an error on the relevant line of code, whereas debugging long UPDATE or INSERT statements can take a little longer. However, for large volumes of insertions, working with an ODBC module's executemany() method is simpler since there is no need to loop over the fields in Python and DAO.
ADO looks almost identical to DAO at this level of detail; Microsoft simplified the object model considerably but kept the essentials the same. The big differences are that (a) data providers other than ODBC are permitted, and (b) all the Access specifics, including direct access to tables and relationships, have been dropped. The data provider can be specified either in a connection string or in a Provider property of the Connection object, before the connection is opened. Microsoft has data providers for the following applications at present:
ODBC
Microsoft Index Server
Active Directory Services
Jet engine (via DAO)
So, despite all the hype, you're still going to use either ODBC or DAO under the hood somewhere. We'll use our ODBC alias again:
>>> import win32com.client >>> adoConn = win32com.client.Dispatch('ADODB.Connection') >>> adoConn.Open('PYDBDEMOS') # use our ODBC alias again >>> (adoRS, success) = adoConn.Execute('SELECT * FROM Clients') >>> adoRS.MoveFirst() >>> adoRS.Fields("CompanyName").Value 'MegaWad Investments' >>>
Adding, editing, and using GetRows() is identical to DAO. We won't go into the advanced capabilities of ADO here; numerous references are available.
You should use ADO if you know it's installed on client machines, because it's the COM API of the future. However, at the time of writing, you can count on DAO being present on all machines with a copy of Office, and ADO is not yet so widespread. If you stick to basic SQL statements, porting code between the two should be easy.
| I l@ve RuBoard |


CSS Sanity
Cool CSS minifier written in bash!
How does it works?
First, CSS Sanity will use the given file name to determine where to lookup for file to minify. Then, it'll use cat to merge files matching *.css pattern in the given file name.
After that CSS Sanity will use some tr, perl and sed commands to remove all the useless characters and save the final minified file in the location you specified!
That's simple as this!
Usage
Online version:
bash <(curl -s https://csssanity.github.io/csssanity.sh) static/styles/file.min.css
Local version:
wget https://csssanity.github.io/csssanity.sh
./csssanity.sh static/styles/file.min.css


This page enables you to test your Clickwrap agreement without configuring a webserver.
Tip! you can save the login page's url for later use by your colleagues: Copy to clipboard


--- layout: post title: Coverage of Check Point Acquisition of Nokia's Security Appliance Business date: 2008-12-23 16:23:00.000000000 -08:00 type: post published: true status: publish categories: [] tags: - Check Point - nokia meta: _publicize_pending: '1' author: login: phoneboy email<EMAIL_ADDRESS>display_name: Dameon Welch first_name: '' last_name: '' ---
As I write this, I am still a Nokia employee. Yesterday's announcement did not change that, at least until the deal closes sometime in the next three months. Meanwhile, here are a few of the more interesting pieces that appeared online regarding the announcement.


Make elegant and responsive Websites for you and your business.
Extract and Analyse data for your business to perform better.
Edit your photos to make it look awesome.
Hi there! I'm Rahul, an aspiring developer on the lookout for great oppurtunities. Learning something everyday!
My Resume


A flower, sometimes known as a bloom or blossom, is the reproductive structure found in flowering plants
(plants of the division Magnoliophyta, also called angiosperms).
The biological function of a flower is to facilitate reproduction,
usually by providing a mechanism for the union of sperm with eggs.
Flowers may facilitate outcrossing (fusion of sperm and eggs from different individuals in a population)
resulting from cross pollination or allow selfing (fusion of sperm and egg from the same flower)
when self pollination occurs.


- By Emma Anderson
Data is increasingly important to society and W3C has a mature suite of Web standards with plans for further work on making it easier for average developers to work with graph data and knowledge graphs.
DLinked Data is about the use of URIs as names for things, the ability to dereference these URIs to get further information and to include links to other data. There are ever increasing sources of Linked Open Data on the Web, as well as data services that are restricted to the suppliers and consumers of those services..
- By Emma Anderson
Data is increasingly important to society and W3C has a mature suite of Web standards with plans for further work on making it easier for average developers to work with graph data and knowledge graphs.
Linked Data is about the use of URIs as names for things, the ability to dereference these URIs to get further information and to include links to other data. There are ever increasing sources of Linked Open Data on the Web, as well as data services that are restricted to the suppliers and consumers of those services.
12Total published books
5Happy readers
15.000Happy readers
Let’s see what we have covered in the book
A Code of Ethics and Professional Conduct is useful to define accepted and acceptable behaviors and to promote high standards of professional practice. It also provides a benchmark for self evaluation and acts as a vehicle for better identity of the organization.
Books are the best friends
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Quis ipsum suspendisse ultrices gravida. Risus commodo viverra maecenas accumsan lacus vel facilisis.
Read MoreBooks are the best friends
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Quis ipsum suspendisse ultrices gravida. Risus commodo viverra maecenas accumsan lacus vel facilisis.
Read MoreBooks are the best friends
Lorem ipsum dolor sit amet, consectetur adipiscing elit sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Quis ipsum suspendisse ultrices gravida. Risus commodo viverra maecenas accumsan lacus vel facilisis.
Read MoreCalligraphy Expert
Lorem ipsum dolor, sit amet consectetur adipisicing elit. Labore tempora error doloribus, sed accusantium debitis quo id voluptatibus, iure beatae nisi quam eum inventore similique veniam provident ad, pariatur eos? Lorem ipsum dolor sit amet consectetur, adipisicing elit.
Calligraphy Expert
Lorem ipsum dolor, sit amet consectetur adipisicing elit. Labore tempora error doloribus, sed accusantium debitis quo id voluptatibus, iure beatae nisi quam eum inventore similique veniam provident ad, pariatur eos? Lorem ipsum dolor sit amet consectetur, adipisicing elit.
Calligraphy Expert
Lorem ipsum dolor, sit amet consectetur adipisicing elit. Labore tempora error doloribus, sed accusantium debitis quo id voluptatibus, iure beatae nisi quam eum inventore similique veniam provident ad, pariatur eos? Lorem ipsum dolor sit amet consectetur, adipisicing elit.
- By Emma Anderson
November 21, 2018
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Quis ipsum suspen disse ultrices gravida. Risus commodo viverra maecenas accumsan lacus vel facilisis.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Quis ipsum suspen disse ultrices gravida. Risus commodo viverra maecenas accumsan lacus vel facilisis.
Some of the latest posts from my personal blog
Lorem ipsum dolor sit amet, consectetur adipiscing elit sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Quis ipsum suspendisse ultrices gravida. Risus commodo viverra maecenas accumsan lacus vel facilisis.
Lorem ipsum dolor sit amet, consectetur adipiscing elit sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Quis ipsum suspendisse ultrices gravida. Risus commodo viverra maecenas accumsan lacus vel facilisis.
Lorem ipsum dolor sit amet, consectetur adipiscing elit sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Quis ipsum suspendisse ultrices gravida. Risus commodo viverra maecenas accumsan lacus vel facilisis.
Lorem ipsum dolor sit amet consectetur adipisicing eli