|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Event
public class Event
NOTE: The Event
class is obsolete and is
available only for backwards compatilibility. It has been replaced
by the AWTEvent
class and its subclasses.
Event
is a platform-independent class that
encapsulates events from the platform's Graphical User
Interface in the Java 1.0 event model. In Java 1.1
and later versions, the Event
class is maintained
only for backwards compatibilty. The information in this
class description is provided to assist programmers in
converting Java 1.0 programs to the new event model.
In the Java 1.0 event model, an event contains an
id
field
that indicates what type of event it is and which other
Event
variables are relevant for the event.
For keyboard events, key
contains a value indicating which key was activated, and
modifiers
contains the
modifiers for that event. For the KEY_PRESS and KEY_RELEASE
event ids, the value of key
is the unicode
character code for the key. For KEY_ACTION and
KEY_ACTION_RELEASE, the value of key
is
one of the defined action-key identifiers in the
Event
class (PGUP
,
PGDN
, F1
, F2
, etc).
| Field Summary | |
|---|---|
static int |
ACTION_EVENT
This event indicates that the user wants some action to occur. |
static int |
ALT_MASK
This flag indicates that the Alt key was down when the event occurred. |
Object |
arg
An arbitrary argument of the event. |
static int |
BACK_SPACE
The BackSpace key. |
static int |
CAPS_LOCK
The Caps Lock key, a non-ASCII action key. |
int |
clickCount
For MOUSE_DOWN events, this field indicates the
number of consecutive clicks. |
static int |
CTRL_MASK
This flag indicates that the Control key was down when the event occurred. |
static int |
DELETE
The Delete key. |
static int |
DOWN
The Down Arrow key, a non-ASCII action key. |
static int |
END
The End key, a non-ASCII action key. |
static int |
ENTER
The Enter key. |
static int |
ESCAPE
The Escape key. |
Event |
evt
The next event. |
static int |
F1
The F1 function key, a non-ASCII action key. |
static int |
F10
The F10 function key, a non-ASCII action key. |
static int |
F11
The F11 function key, a non-ASCII action key. |
static int |
F12
The F12 function key, a non-ASCII action key. |
static int |
F2
The F2 function key, a non-ASCII action key. |
static int |
F3
The F3 function key, a non-ASCII action key. |
static int |
F4
The F4 function key, a non-ASCII action key. |
static int |
F5
The F5 function key, a non-ASCII action key. |
static int |
F6
The F6 function key, a non-ASCII action key. |
static int |
F7
The F7 function key, a non-ASCII action key. |
static int |
F8
The F8 function key, a non-ASCII action key. |
static int |
F9
The F9 function key, a non-ASCII action key. |
static int |
GOT_FOCUS
A component gained the focus. |
static int |
HOME
The Home key, a non-ASCII action key. |
int |
id
Indicates which type of event the event is, and which other Event variables are relevant for the event. |
static int |
INSERT
The Insert key, a non-ASCII action key. |
int |
key
The key code of the key that was pressed in a keyboard event. |
static int |
KEY_ACTION
The user has pressed a non-ASCII action key. |
static int |
KEY_ACTION_RELEASE
The user has released a non-ASCII action key. |
static int |
KEY_PRESS
The user has pressed a normal key. |
static int |
KEY_RELEASE
The user has released a normal key. |
static int |
LEFT
The Left Arrow key, a non-ASCII action key. |
static int |
LIST_DESELECT
An item in a list has been deselected. |
static int |
LIST_SELECT
An item in a list has been selected. |
static int |
LOAD_FILE
A file loading event. |
static int |
LOST_FOCUS
A component lost the focus. |
static int |
META_MASK
This flag indicates that the Meta key was down when the event occurred. |
int |
modifiers
The state of the modifier keys. |
static int |
MOUSE_DOWN
The user has pressed the mouse button. |
static int |
MOUSE_DRAG
The user has moved the mouse with a button pressed. |
static int |
MOUSE_ENTER
The mouse has entered a component. |
static int |
MOUSE_EXIT
The mouse has exited a component. |
static int |
MOUSE_MOVE
The mouse has moved with no button pressed. |
static int |
MOUSE_UP
The user has released the mouse button. |
static int |
NUM_LOCK
The Num Lock key, a non-ASCII action key. |
static int |
PAUSE
The Pause key, a non-ASCII action key. |
static int |
PGDN
The Page Down key, a non-ASCII action key. |
static int |
PGUP
The Page Up key, a non-ASCII action key. |
static int |
PRINT_SCREEN
The Print Screen key, a non-ASCII action key. |
static int |
RIGHT
The Right Arrow key, a non-ASCII action key. |
static int |
SAVE_FILE
A file saving event. |
static int |
SCROLL_ABSOLUTE
The user has moved the bubble (thumb) in a scroll bar, moving to an "absolute" position, rather than to an offset from the last postion. |
static int |
SCROLL_BEGIN
The scroll begin event. |
static int |
SCROLL_END
The scroll end event. |
static int |
SCROLL_LINE_DOWN
The user has activated the line down area of a scroll bar. |
static int |
SCROLL_LINE_UP
The user has activated the line up area of a scroll bar. |
static int |
SCROLL_LOCK
The Scroll Lock key, a non-ASCII action key. |
static int |
SCROLL_PAGE_DOWN
The user has activated the page down area of a scroll bar. |
static int |
SCROLL_PAGE_UP
The user has activated the page up area of a scroll bar. |
static int |
SHIFT_MASK
This flag indicates that the Shift key was down when the event occurred. |
static int |
TAB
The Tab key. |
Object |
target
The target component. |
static int |
UP
The Up Arrow key, a non-ASCII action key. |
long |
when
The time stamp. |
static int |
WINDOW_DEICONIFY
The user has asked the window manager to de-iconify the window. |
static int |
WINDOW_DESTROY
The user has asked the window manager to kill the window. |
static int |
WINDOW_EXPOSE
The user has asked the window manager to expose the window. |
static int |
WINDOW_ICONIFY
The user has asked the window manager to iconify the window. |
static int |
WINDOW_MOVED
The user has asked the window manager to move the window. |
int |
x
The x coordinate of the event. |
int |
y
The y coordinate of the event. |
| Constructor Summary | |
|---|---|
Event(Object target,
int id,
Object arg)
NOTE: The Event class is obsolete and is
available only for backwards compatilibility. |
|
Event(Object target,
long when,
int id,
int x,
int y,
int key,
int modifiers)
NOTE: The Event class is obsolete and is
available only for backwards compatilibility. |
|
Event(Object target,
long when,
int id,
int x,
int y,
int key,
int modifiers,
Object arg)
NOTE: The Event class is obsolete and is
available only for backwards compatilibility. |
| Method Summary | |
|---|---|
boolean |
controlDown()
NOTE: The Event class is obsolete and is
available only for backwards compatilibility. |
boolean |
metaDown()
NOTE: The Event class is obsolete and is
available only for backwards compatilibility. |
protected String |
paramString()
NOTE: The Event class is obsolete and is
available only for backwards compatilibility. |
boolean |
shiftDown()
NOTE: The Event class is obsolete and is
available only for backwards compatilibility. |
String |
toString()
NOTE: The Event class is obsolete and is
available only for backwards compatilibility. |
void |
translate(int dx,
int dy)
NOTE: The Event class is obsolete and is
available only for backwards compatilibility. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int SHIFT_MASK
public static final int CTRL_MASK
public static final int META_MASK
public static final int ALT_MASK
public static final int HOME
public static final int END
public static final int PGUP
public static final int PGDN
public static final int UP
public static final int DOWN
public static final int LEFT
public static final int RIGHT
public static final int F1
public static final int F2
public static final int F3
public static final int F4
public static final int F5
public static final int F6
public static final int F7
public static final int F8
public static final int F9
public static final int F10
public static final int F11
public static final int F12
public static final int PRINT_SCREEN
public static final int SCROLL_LOCK
public static final int CAPS_LOCK
public static final int NUM_LOCK
public static final int PAUSE
public static final int INSERT
public static final int ENTER
public static final int BACK_SPACE
public static final int TAB
public static final int ESCAPE
public static final int DELETE
public static final int WINDOW_DESTROY
public static final int WINDOW_EXPOSE
public static final int WINDOW_ICONIFY
public static final int WINDOW_DEICONIFY
public static final int WINDOW_MOVED
public static final int KEY_PRESS
public static final int KEY_RELEASE
public static final int KEY_ACTION
key
field contains a value that indicates
that the event occurred on one of the action keys, which
comprise the 12 function keys, the arrow (cursor) keys,
Page Up, Page Down, Home, End, Print Screen, Scroll Lock,
Caps Lock, Num Lock, Pause, and Insert.
public static final int KEY_ACTION_RELEASE
key
field contains a value that indicates
that the event occurred on one of the action keys, which
comprise the 12 function keys, the arrow (cursor) keys,
Page Up, Page Down, Home, End, Print Screen, Scroll Lock,
Caps Lock, Num Lock, Pause, and Insert.
public static final int MOUSE_DOWN
ALT_MASK
flag indicates that the middle button has been pressed.
The META_MASK
flag indicates that the
right button has been pressed.
ALT_MASK
,
META_MASK
,
Constant Field Valuespublic static final int MOUSE_UP
ALT_MASK
flag indicates that the middle button has been released.
The META_MASK
flag indicates that the
right button has been released.
ALT_MASK
,
META_MASK
,
Constant Field Valuespublic static final int MOUSE_MOVE
public static final int MOUSE_ENTER
public static final int MOUSE_EXIT
public static final int MOUSE_DRAG
ALT_MASK
flag indicates that the middle
button is being pressed. The META_MASK
flag indicates
that the right button is being pressed.
ALT_MASK
,
META_MASK
,
Constant Field Valuespublic static final int SCROLL_LINE_UP
public static final int SCROLL_LINE_DOWN
public static final int SCROLL_PAGE_UP
public static final int SCROLL_PAGE_DOWN
public static final int SCROLL_ABSOLUTE
public static final int SCROLL_BEGIN
public static final int SCROLL_END
public static final int LIST_SELECT
public static final int LIST_DESELECT
public static final int ACTION_EVENT
public static final int LOAD_FILE
public static final int SAVE_FILE
public static final int GOT_FOCUS
public static final int LOST_FOCUS
public Object target
EventObject.getSource()
public long when
InputEvent.getWhen()
public int id
Event
variables are relevant for the event.
This has been replaced by AWTEvent.getID()
AWTEvent.getID()
public int x
MouseEvent.getX()
public int y
MouseEvent.getY()
public int key
KeyEvent.getKeyCode()
public int modifiers
InputEvent.getModifiers()
public int clickCount
MOUSE_DOWN
events, this field indicates the
number of consecutive clicks. For other events, its value is
0
.
This field has been replaced by MouseEvent.getClickCount().
MouseEvent.getClickCount().
public Object arg
arg
has been replaced by event specific property.
public Event evt
EventQueue
| Constructor Detail |
|---|
public Event(Object target, long when, int id, int x, int y, int key, int modifiers, Object arg)
Event
class is obsolete and is
available only for backwards compatilibility. It has been replaced
by the AWTEvent
class and its subclasses.
Creates an instance of Event
with the specified target
component, time stamp, event type, x and y
coordinates, keyboard key, state of the modifier keys, and
argument.
target
- the target component.when
- the time stamp.id
- the event type.x
- the x coordinate.y
- the y coordinate.key
- the key pressed in a keyboard event.modifiers
- the state of the modifier keys.arg
- the specified argument.public Event(Object target, long when, int id, int x, int y, int key, int modifiers)
Event
class is obsolete and is
available only for backwards compatilibility. It has been replaced
by the AWTEvent
class and its subclasses.
Creates an instance of Event
, with the specified target
component, time stamp, event type, x and y
coordinates, keyboard key, state of the modifier keys, and an
argument set to null
.
target
- the target component.when
- the time stamp.id
- the event type.x
- the x coordinate.y
- the y coordinate.key
- the key pressed in a keyboard event.modifiers
- the state of the modifier keys.public Event(Object target, int id, Object arg)
Event
class is obsolete and is
available only for backwards compatilibility. It has been replaced
by the AWTEvent
class and its subclasses.
Creates an instance of Event
with the specified
target component, event type, and argument.
target
- the target component.id
- the event type.arg
- the specified argument.| Method Detail |
|---|
public void translate(int dx, int dy)
Event
class is obsolete and is
available only for backwards compatilibility. It has been replaced
by the AWTEvent
class and its subclasses.
Translates this event so that its x and y coordinates are increased by dx and dy, respectively.
This method translates an event relative to the given component. This involves, at a minimum, translating the coordinates into the local coordinate system of the given component. It may also involve translating a region in the case of an expose event.
dx
- the distance to translate the x coordinate.dy
- the distance to translate the y coordinate.public boolean shiftDown()
Event
class is obsolete and is
available only for backwards compatilibility. It has been replaced
by the AWTEvent
class and its subclasses.
Checks if the Shift key is down.
true
if the key is down;
false
otherwise.modifiers
,
controlDown()
,
metaDown()
public boolean controlDown()
Event
class is obsolete and is
available only for backwards compatilibility. It has been replaced
by the AWTEvent
class and its subclasses.
Checks if the Control key is down.
true
if the key is down;
false
otherwise.modifiers
,
shiftDown()
,
metaDown()
public boolean metaDown()
Event
class is obsolete and is
available only for backwards compatilibility. It has been replaced
by the AWTEvent
class and its subclasses.
Checks if the Meta key is down.
true
if the key is down;
false
otherwise.modifiers
,
shiftDown()
,
controlDown()
protected String paramString()
Event
class is obsolete and is
available only for backwards compatilibility. It has been replaced
by the AWTEvent
class and its subclasses.
Returns a string representing the state of this Event
.
This method is intended to be used only for debugging purposes, and the
content and format of the returned string may vary between
implementations. The returned string may be empty but may not be
null
.
public String toString()
Event
class is obsolete and is
available only for backwards compatilibility. It has been replaced
by the AWTEvent
class and its subclasses.
Returns a representation of this event's values as a string.
toString
in class Object
paramString()
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2004, 2010 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.


Youth Official is world’s first organization who guides a person through his lifetime
Youth Official trying to resolve all the concern’s which a person comes through in his/her life. We are challenging the 21 st century “School of thoughts”. Every person has something unique in itself. We at Youth Official help you to find out your uniqueness.
We are aiming to get in touch with 100 million people till the end of 2020. Currently we have 50 thousand friends. We want to unite our country at a single platform. We are inviting you all to join us for a better future.
You got to find what you love and if not then don’t settle and keep looking for your passion.
Raise rest of your life to meet you.
Don’t be trapped in world’s dogma. Don’t be a rational person.  Follow your heart blindly, everything comes secondary


{% comment %}
DEVELOPER NOTES:
- DO NOT ADD THIS BLOCK OF JAVASCRIPT CODE IN ANY JS MINIFIER.
- This global variable is used to get the "django rest framework"
token and save it for globally for use in all JavaScript code. If
the user is not authenticated then the django code will not return
the token.
- This global variable is used to track the "Franchise" subdomain
that this user belongs to.
{% endcomment %}
{% include "shared_foundation/common_js.html" %}
{% include 'shared_api/shared_api_js.html' %}
{% include 'tenant_api/tenant_api_js.html' %}


SigmaGraph Scripting
1. Presentation
SigmaGraph integrates the Lua scripting language, which gives you the possibility to programmatically control the application and program you own algorithms. Lua was chosen to be embedded in SigmaGraph mainly because of its high speed and its relatively small size. To learn Lua, you can read the official documentation (http://www.lua.org/manual/) or tutorials.
To write and run script, open the Script Window by selecting ‘View/Script Window’ menu (or press F11 key). The script output will be redirected to the Output Window. The SigmaGraph editor supports syntax highlighting, line numbering, markers (bookmarks), code completion, etc. You can customize all the editor options (font, colors, line spacing, ...); Menu/Options.
With SigmaGraph scripting capabilities, you can either control the application throw three objects (‘classes’): Doc, Data and Plot or write and run you own general-purpose Lua programs.
With the Doc class, you can access document specific methods, like creating, saving, opening or closing document.
With the Data class, you can manipulate datasheet: adding, deleting columns or rows, setting cells values, masking/unmasking cells …
With the Plot class, you can control graph: adding or removing curves, changing axis style …
Note that all the Doc methods are accessible to Data and Plot classes (throw the inheritance mechanism).
Note also that all the SigmaConsole mathematical functions are accessible in the script with the same syntax (cf. §3.8).
In order to use SigmaGraph classes, the first step is to create a class instance:
When class instance created, you can use all the class methods.
Example: The following script will create a new datasheet named “SigmaGraph” and fill the first column A with values from 0 to 4.5 with 0.5 step and the second column B by a formula. The B versus A curve is then added to graph:
2. Reference
2.1 Mathematical functions
The math functions are mapped to global functions (e.g. : user can use cos or math.cos).
Below is a summary of the Lua math functions:
math.abs math.acos math.asin
math.atan math.atan2 math.ceil
math.cos math.cosh math.deg
math.exp math.floor math.fmod
math.frexp math.huge math.ldexp
math.log math.log10 math.max
math.min math.modf math.pi
math.pow math.rad math.random
math.randomseed math.sin math.sinh
math.sqrt math.tanh math.tan
And a summary of the SigmaScript global math functions:
abs acos asin
atan atan2 ceil
cos cosh deg
exp floor fmod
frexp huge ldexp
log log10 max
min modf pi
pow rad random
randomseed sin
sinh sqrt tanh
tan
NB: Lua gives the neperian logarithm the name log and the decimal logarithm is named log10, as in C language. Mathematical Console uses ln for neperian logarithm and log for decimal logarithm.
Special math functions are included (lmath namespace), extending the Lua math functions.
Summary of lmath functions and constants:
Functions:
lmath.exp2(x) 2^x
lmath.logb(x) exponent of x
lmath.cbrt(x) cubic root
lmath.hypot(x,y) sqrt(x²+y²)
lmath.erf(x) error function
lmath.erfc(x) complementary error function
lmath.lgamma(x) ln(gamma(x))
lmath.tgamma(x) gamma(x)
lmath.trunc(x) nearest integer
lmath.round(x) nearest integer, rounding
lmath.isinf(x) number is infinite ?
lmath.isnan(x) not a number ?
lmath.isnormal(x) number is normal ?
lmath.asinh(x)
lmath.acosh(x)
lmath.atanh(x)
lmath.gauss(x,b,c) G(x) = exp(-(x - b)² / 2c²)
lmath.lorentz(x,b,c) L(x) = ((1/pi)*c / ((x - b)² + c²))
Constants:
Universal constants in international units (SI)
lmath.q Electron charge (in C)
lmath.me Electron mass (kg)
lmath.kb Boltzmann constant (J/K)
lmath.h Planck constant (Js)
lmath.c Speed of Light in vacuum (m/s)
lmath.na Avogadro constant (1/mole)
2.2 Data analysis functions
The data namespace includes functions to calculate the descriptive parameters of a list of values, perform data fitting and sorting:
Minimum (data.min(t)), Maximum (data.max(t)), Sum (data.sum(t)), Mean (data.mean(t)), Median (data.median(t)), Variance (data.var(t)), Standard Deviation (data.dev(t)), Coefficient of Variation (data.coeff(t)), Root Mean Square (data.rms(t)), Skewness (data.skew(t)) and Kurtosis excess (data.kurt(t)).
Example:
With the data module, you can also perform data fitting by using the function fit:
pars,chi,iters,msg = data.fit(model, x, y, fpar, ipar, tol, iters)
where:
model is one of the builtin fitting models:
"Linear", Poly2", "Poly3", "Poly4",
"Gauss1", "Gauss2", "Gauss3", "Gauss4", "Gauss5",
"Lorentz1", "Lorentz2", "Lorentz3", "Lorentz4", "Lorentz5",
"Pearson", "Exp", "Exp2", "ExpDec", "ExpDec2",
"Hyperbola", "Log", "Power", "Logistic", "Wave".
x and y are the data to fit
fpar is the fitting parameters table with the initial values
ipar (optional) is a table with, for each parameter, value 1 if the parameter is varying or 0 if it is fixed
tol (optional) is the desired relative tolerance (10-6 by default)
iters (optional) is the maximum iterations (100 by default)
The function returns the obtained parameters pars, the chi value, the number of iterations iters and a message msg from the fitting engine.
Example:
You can also perform sort data by using the function sort:
ts = data.sort(t, asc)
where:
t is the data to sort.
asc = 1 if sort in ascending order or 0 in descending order
The function returns the sorted table ts.
Example:
2.3 SigmaGraph functions
The following table summarizes the Doc, Data and Plot methods:
Class |
Method |
Purpose |
Arguments |
Doc |
create() |
Create an instance of the Doc class |
— |
|
new(name) |
Create a new document |
In: the new document name
Out: return the document name |
|
find(name) |
Find an existing document |
In: the document name
Out: return the document name |
|
print() |
Print the current document |
— |
|
save() |
Save the current document |
— |
|
open() |
Open a document |
— |
|
update() |
Update the current document |
— |
|
close() |
Close the current document |
— |
|
|
Data |
create() |
Create an instance of the Data class (inherited from the Doc
class) |
— |
|
new(name) |
Create a new datasheet(inherited from the Doc class) |
In: the new datasheet name
Out: return the document name |
|
dim() |
Get the number of columns and rows |
Out: number of column and number of rows |
|
appendcol(dim,ctype) |
Append a column to the datasheet |
In: the column dimension and the column type (ctype = 1 for X-column and 2 for Y-column)
Out: return the column name |
|
insertcol(after, dim, ctype) |
Insert a column into the datasheet |
In: after, the name of the column to insert after; dim,
the new column dimension; ctype, column type (1 for X-column and 2 for Y-column)
Out: return the column name |
|
format(name, fmt) |
Set the column numeric format |
In: name, the name of the column; fmt, the
numeric format (C-style: "%.3f", "%.6e", "%e",
…) |
|
appendrow(count) |
Append rows to the datasheet |
In: count, the number of rows to append |
|
insertrow(iafter) |
Insert a row into the datasheet |
In: iafter, the index of the row to insert after |
|
deletecol(name) |
Delete column |
In: name, the name of the column to delete
|
|
deleterow(ii) |
Delete row |
In: ii, the index of the row to delete |
|
set(name, ii, val) |
Set cell value |
In: name, the name of the column; ii, the index
of the cell; val, the new cell value |
|
set(name, t) |
Set column values |
In: name, the name of the column; t, table containing the column values |
|
get(name, ii) |
Get cell value |
In: name, the name of the column; ii, the index
of the cell
Out: the cell value |
|
get(name) |
Get the column |
In: name, the name of the column; ii, the index
of the cell
Out: table containing the column values |
|
mask(name, ii) |
Mask cell |
In: name, the name of the column; ii, the index
of the cell to mask |
|
unmask(name, ii) |
Unmask cell |
In: name, the name of the column; ii, the index
of the cell to unmask |
|
sort(name, order) |
Sort column |
In: name, the name of the column to sort; order = 1 if ascending order and 0 otherwise |
|
|
Plot |
title(stitle) |
Set the graph title |
In: Graph title |
|
frame(backr,
backg, backb, plotr, plotg, plotb) |
Set the graph colors |
In: RGB window and graph colors components |
|
add(namex, namey, istyle, iaxis) |
Add curve to the graph |
In: namex, namey, name of the X and Y columns; istyle = 1 for line, 2 for scatter and 3 for both; iaxis = 1 for XY axis, 2
for XY2, 3 for X2Y and 4 for X2Y2 |
|
remove(name) |
Remove curve from the graph |
In: name, name of the X or Y column |
|
axis(iaxis,
iscale, iautoscale, fmin, fmax, ititle, stitle) |
Set the axis properties |
In: iaxis = 1 for X, 2 for Y, 3 for X2 and 4 for Y2; iscale = 1 for linear and 2 for log; iautoscale = 1 if AutoScale and 0
otherwise; fmin, fmax = axis min and max; ititle = 1 if title
visible and 0 otherwise; stitle = axis title |
|
label(iaxis,
ilabel) |
Activate the axis label |
In: iaxis = 1 for X, 2 for Y, 3 for X2 and 4 for Y2; ilabel = 1 to activate axis label and 0 otherwise. |
|
|
|
|
In addition to the SigmaGraph classes (Doc, Data and Plot), you can use the Physics table containing the fundamental constants and some useful functions:
-- Constants
Physics.k -- Boltzmann constant
Physics.q -- electron charge
Physics.h -- Planck constant
Physics.c -- speed of light in vacuum
Physics.e -- vacuum permittivity
Physics.n -- Avogadro constant
Physics.m -- electron mass
-- Functions
Physics.Current(V, T, ISC, RP, IS1, n1, IS2, n2, RS, I1, I2)
Calculate the current versus voltage of a photovoltaic cell by solving the two-diode model nonlinear equation:
with:
V: Applied voltage.
T: Temperature.
ISC: Short-circuit current.
RP: Parallel resistance.
RS: Series resistance.
IS1: Saturation current for diode 1.
n1: Ideality factor for diode 1.
IS2: Saturation current for diode 2.
n2: Ideality factor for diode 2.
This function is used in CurrentModel ( http://www.hamady.org ).
Physics.Capacitance(Freq, r, L, GLF, CHF, C1, Tau1, C2, Tau2)
Physics.Conductance(Freq, r, L, GLF, CHF, C1, Tau1, C2, Tau2)
Calculate the admittance (capacitance and conductance/w) of a PN or Schottky junction, with two trap levels:
with:
L: Equivalent series inductance.
r: Series resistance.
GLF is the low-frequency parallel conductance, CHF the high-frequency parallel capacitance, Ck the difference between the “low” (relatively to the transition frequency of the level) and “high” frequency capacitances for the level k, ant Tauk its time response.
NB: the function Physics.Conductance return the conductance divided by the angular frequency w (= 2*pi*f).
These functions are used in AdmittanceModel ( http://www.hamady.org/tools/admittance.html ).
3. Script Examples
All script examples are available in Help/Examples Menu.
Example 1: Plot function:
Example 2: Curve fitting:
Example 3: calculate and plot the current-voltage characteristic curve of a photovoltaic cell:
4. Favorites Manager
SigmaGraph allows you to organize very easily your scripts with the integrated favorites manager (select ‘Favorites’ menu or click the corresponding toolbar button). You can (i) group all your most used scripts and load them very quickly; (ii) automatically run multiple scripts and open one script at SigmaGraph startup (very useful feature for specialized library or frequently used/modified scripts). With the favorites manager, you can add, remove, move up or down, load, auto-run or auto-load script by clicking the corresponding button.
|


Game Recommender
Select up to three games that you like, then press submit.
Fortnite
World of Warcraft
Witcher 3
Call of Duty Black Ops 4
Minecraft
Stardew Valley
Submit
Refresh


Before Change
if __name__ == "__main__":
kwargs = {
"cmdclass": {"test": Test},
"name": "pymanopt",
"version": "0.1",
"description": ("Toolbox for manifold optimization with support for "
"automatic differentiation"),
"url": "https://pymanopt.github.io",
"author": "Jamie Townsend",
"author_email"<EMAIL_ADDRESS>"license": "BSD",
"packages": find_packages(),
}
setup(**kwargs)
After Change
from setuptools import setup, find_packages
setup(
name="pymanopt",
version="0.2.0",
description=("Toolbox for optimization on manifolds with support for "
"automatic differentiation"),
url="https://pymanopt.github.io",
author="Jamie Townsend, Niklas Koep and Sebastian Weichwald",
license="BSD",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Mathematics",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
],
keywords=("optimization,manifold optimization,automatic differentiation,"
"machine learning,numpy,scipy,theano,autograd,tensorflow"),
packages=find_packages(exclude=["tests"]),
install_requires=["numpy>=1.10", "scipy>=0.17"],
)


fopen
Syntax:
#include <cstdio>
FILE *fopen( const char *fname, const char *mode );
The fopen() function opens a file indicated by fname and
returns a stream associated with that file. If there is an error,
fopen() returns NULL. mode is used to
determine how the file will be treated (i.e. for input, output,
etc)
| Mode |
Meaning |
| "r" |
Open a text file for reading |
| "w" |
Create a text file for writing |
| "a" |
Append to a text file |
| "rb" |
Open a binary file for reading |
| "wb" |
Create a binary file for writing |
| "ab" |
Append to a binary file |
| "r+" |
Open a text file for read/write |
| "w+" |
Create a text file for read/write |
| "a+" |
Open a text file for read/write |
| "rb+" |
Open a binary file for read/write |
| "wb+" |
Create a binary file for
read/write |
| "ab+" |
Open a binary file for read/write |
An example:
int ch;
FILE *input = fopen( "stuff", "r" );
ch = getc( input );
Related topics:


Diffie-Hellman Worksheet
Step
Private!
Only YOU can see this
Public!
EVERYONE can see this
Working "mod n"
"mod n" means "the remainder after dividing by n". For example:
You can use this calculator to work out values mod n:
Another example?
The 12 hour clock works "mod 12". 14 hours after 11 o'clock is:
Private!
Normally only YOUR PARTNER can see this column
(We're showing it to you so you can see how it works.)
You should both have the same secret number! (Find the equations marked with a cross if you don't.)
Why?
A^b = (g^a)^b = g^(ab) = (g^b)^a = B^a.
Since A^b and B^a are equal normally they are also equal mod n
You should both have the same secret number! (Find the equations marked with a cross if you don't.)
Why?
B^a = (g^b)^a = g^(ab) = (g^a)^b= A^b.
Since A^b and B^a are equal normally they are also equal mod n
Anyone listening in can't work out the secret number!


channel.fbfbfb __
channel.c00204 __
octree __
channel.2e23cd __
binary __
channel.2b2b2b __
channel.668667 __


Sign Up
Name
Email
Phone #
Next
Username
Password
Re-Type Password
Pre
Next
Please Choose an avatar
Pre
Next
Summary
Name: {{name}}
Email: {{email}}
Phone #: {{phone}}
Username: {{username}}
Create Your Account


{% import 'macros/forms.html' as forms %} {% from "macros/change.html" import change with context %} {% extends "layouts/base.html" %} {% block content %}


Basics of OpenCV
-
What is OpenCV?
OpenCV(Open Source Computer Vision and Machine Learning Software)is an open source library which processes images and videos to identify objects, faces, detecting colours etc.It has wide applications in Computer Vision,Machine Learning and Image Processing. It also supports variety of programming languages like Python, C++, C. Basically it a library for processing images.
OpenCV in Artificial Intelligence
Computer Vision is a branch of Artificial Intelligence which trains the computer to extract information from digital data like images and videos, understand them and even communicate.
Why OpenCV?
Nowadays image processing and computer vision have gained importance in every field. As Opencv has over 2500 optimized algorithms which ease image processsing and even helps in building projects like tracking movements, recognizing faces, finding similar images etc.,it makes programming easier.Reading and displaying images is simplified and through OpenCV development of programs from simpler to complex is easier.
Application of OpenCV
-
Image enchancement.
-
Rotating,Cropping,Resizing(using more advanced features)
-
Background removal.
-
-
Images
Image is collection of pixels and it is a binary representation of visual information such as logos, drawing pictures, graphs etc.
-
Black and white image
The image which has only two colours i.e Black and white is called Binary image. For a basic black and white image there is only one bit representation where 0 represents black and 1 represents white.
-
Gray Scale Image
One can have images of more than two levels i.e instead of having only 0 and 1 bit levels each pixel can have range of values i.e 2^8,this will give us resolution of 256 levels where 0 will be black and 255 will be white. So basically we have 254 colours between black and white.
-
Coloured image
For coloured images each pixel can have levels of red,green,blue. Different levels of red, green and blue give different colours to the respective pixels giving out a fully coloured image.
-
Installation of OpenCV
Installation of OpenCV has two steps to be followed through Anaconda Prompt.
-
Open Anaconda Prompt
-
Execute the following commands:
pip install opencv-python pip install opencv-contrib-python
-
After installing the Opencv package on anaconda prompt, for further usage of OpenCV in image and video processing through python IDE, it is necessary to import OpenCV library and it's functions using import cv2 statement.
-
Basic functions in OpenCV
-
imread(): In order to read or store image in a variable imread() function is used.
A variable is initialized to read an image, using the function imread() in cv2 package we store the image.
syntax:
variable_name = cv2.imread(specify_the_path_in_which_image_should_be_read_with_extensions)
Example:
img1 = cv2.imread("extras/nature.jpeg")
-
imshow(): This function is used to display the image from the variable where the image is stored. Window name represents the name of the window on which the image is to be displayed.
syntax:
cv2.imshow(window_name,variable_name)
Example:
cv2.imshow("Output",img1)
-
videocapture(): This function is used to import a video.
- steps to import a video - Initialize a variable to store the imported video. - Using an infinite while loop and read() function, read the frames. - Use imshow() function to display the video.
Example:
cap=cv2.videocapture("specify_the_path_in_which_video_should_be_read_with_extensions") while true: success,img=cap.read() cv2.imshow("video",img) if cv2.waitKey(1)& 0xFF=ord('q'): break:
-
Displaying multiple images
It is possible to display multiple images in a single window. It can be displayed either horizontly or vertically. One has to import numpy library for displaying multiple images.
import numpy as np
steps to display multiple images
- store the multiple images in different variables using imread() function.
- concatenate image Horizontally
syntax:
variablename=np.concatenate((image1,image2),axis=1)
- concatenate image Vertically
syntax:
variable_name=np.concatenate((image1,image2),axis=0)
Here axis refers to mode of concatenation.
axis=1 refers to horizontal concatenation.
axis=0 refers to horizontal concatenation.
- Display the concatenated images using imshow() function.
-
Face and Eye detection with OpenCV
In this session,
- We will see what is Haar classifier.
- We will see programming on face and eye detection.
Haar Classifier
Face and Eye detection works on the algorithm called Haar Classifier which is proposed by Paul Viola and Michael Jones. In their paper, "Rapid Object Detection using Boosted Cascade of Simple Features" in 2001.
Haar Classifier is a machine learning based approach where a function is trained from a lot of positive and negative images i.e with face and without face.
Initially the algorithm needs lots of positive images(with face)and negative images(without face) to train the classifier(algorithm that sorts data in categories of information). Once all the features and details are extracted, they are stored in a file and if we get any new input image, check the feature from the file, apply it on the input image and if it passes all the stage then *the face is detected. So this can be done using *Haar Features.
So in short, Haar Classifier is a classifier which is used to detect the object for which it has been trained for from the source.
Program on Face and Eye detection
Before we add face and eye detection Haar Cascade files we need to import OpenCV library.
To install OpenCV library on anaconda prompt execute the following commands:
pip install opencv-python
pip install opencv-contrib-python
REQUIREMENTS
Code
|
import cv2 face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml') eye_cascade = cv2.CascadeClassifier('haarcascade_eye.xml') cap = cv2.VideoCapture(0) while 1:
cap.release() cv2.destroyAllWindows() |
Explanation
-
Import Opencv library using import cv2 statement
-
Load the required XML classifiers for face and eye detection.
face_cascade=cv2.CascadeClassifier('haarcascade_frontal_face_default.xml') eye_cascade=cv2.CascadeClassifier('haarcascade_eye_default.xml')
OR
-
Specify the path where XML classifiers are stored:
Example:
face_cascade=cv2.CascadeClassifier('F:/is setup/haarcascade_frontal_face_default.xml') eye_cascade=cv2.CascadeClassifier('F:/is setup/haarcascade_eye.xml
-
Now initialize cap variable and capture the frames from the camera
cap=cv2.VideoCapture(0)
-
Using while loop read each frame from the camera and then perform the following steps:
ret,img=cap.read()
-
Convert into gray scale frame.
gray=cv2.cvtcolor(img,cv2.COLOR_BGR2GRAY)
-
Detect faces of different sizes in the input image
faces=face_cascade_detectMultiScale(gray,1.3,5)
-
Now our work is to draw a rectangle around the face and eye image using for loop
for (x,y,w,h) in faces: cv2.rectangle(img(x,y),(x+w,y+h),(255,255,0),2) roi_gray=gray[y:y+h,x:x+w] roi_color=img[y:y+h,x:x+w] eyes=eye_cascade.detectMultiScale(roi_gray) for (ex,ey,ew,eh) in eyes: cv2.rectangle(roi_color,(ex,ey),(ex+ew,ey+eh),(0,127,255),2)
-
Display camera screen as output
cv2.imshow('img',img)
-
Last and the final step is to break the loop by pressing Esc button
k=cv2.waitKey(30) & 0xff if k=27; break:
So you have completed this topic. Congratulations
Hope you learnt something new
Happy Learning!! 📚


Pairing and Giving Feedback
Ongoing Learning process!!!Great Experience!!!
Date: 11/10/2014
Software innovation, like almost every other kind of innovation, requires the ability to collaborate and share ideas with other people, and to sit down and talk with customers and get their feedback and understand their needs. ~ Bill Gates
Pairing has been a really decent experience for me, both technically and culturally. On the technical side, I've possessed the capacity to see other individuals' manner of thinking and diverse approaches and methods. Pairing with more knowledgeable individuals has also allowed me to understand new ideas and cement different ideas that were still not 100% acquired.
Culturally, pairing has allowed me to feel exchange encounters with different mates and feel part of a community of individuals experiencing a common methodology.
I would say that in general pairing is fun, it is challenging to speak up your ideas when you're not completely beyond any doubt about them however as time passes by it gets easier. Having your pair to listen and provide for you feedback on your ideas is also something I value about pairing.
Feeling comfortable about giving include or proposing an alternate path is not always easy for me, this is something that has changed since the starting and I feel more comfortable now than then.
I would say that the most frustrating moment is the point at which you think you have an answer and the tests still fail.  Having the capacity to joke about it and keeping a decent comical inclination when failing at tackling a problem shows you a mental a bit of mercy and allows you to escape from that negative mentality.
Feedback related encounters have been great, a learning knowledge. Getting feedback is intriguing. Getting to know other individuals' viewpoint on a pairing session complements the feedback you get straightforwardly from them amid the session. Most of the time you improve worded variant of that original feedback that comments on some particular moments of the session and why those moments were important to that individual. This is really great because it helps you concentrate on your behavior in certain situations and not simply a general feeling of how great or bad you were amid that session.
I would say that in general the feedback I've gotten has been valuable, it has helped me to concentrate on my weakest focuses and has also made me feel more certain about certain things I wasn't certain I was doing admirably. For example, I know I have to be more certain about communicating my ideas, I also ought to improve in my utilization of pseudocode. I'm attempting to improve both of this abilities session by session and getting feedback reminds me to concentrate on them amid sessions.
Feedback is the breakfast of champions. ~Ken Blanchard


Teretana Pobednik
Cardio exercises are necessary for any efficient training program,
not just for burning calories, but for the
global wellbeing as well.
By its definition, cardio training can consist of any exercises -
running, cycling, swimming, treadmill running, stairs climbing, rope skipping -
which all mantain rapid heartbeat for some time period.

This program can be attended by anyone, from inactive businessmen which just want to improve their stature and ease their office job, to experienced men who need more adrenaline in their life, and who also want to take care of both their appearance and health.


FoolsGold is a Rust webserver that executes a Ruby Rack application on an embedded mruby interpreter.
The Rust webserver is Rocket, which is based on Hyper and Tokio. It is an incredibly fast, async webserver with statically typed route functions and typed, thread-safe shared state.
Rust exposes a RequestStats
class to the mruby interpreter
that grants the Ruby code access to UUID V4 generation for request IDs
and closes over a static AtomicI64
request counter that is
shared among all mruby interpreters, all requests, and all threads.
The Rack application is defined with a config.ru
which is
executed in the context of a Rack::Builder
.
The Rack response tuple is translated to a Rocket HTTP response. This setup is similar to a threaded Unicorn with the difference that the execution model is shared nothing.


I have been a fairly successful person so far in life. I have always based my actions around what are called the "Cardinal Virtues." These four virtues are as follows: prudence, justice, temperance and courage. Although they have a religious connotation in literature and history, I see them as being distinct from their origins.
The virtue of prudence is symbolized by a book, mirror, or scroll in most cases. This is the virtue of self reflection as well as knowledge. It is described as the mother of all virtues mainly because without prudence, all judgement would be clouded and knowledge of any kind would be misused. It is also synonymous with the concept of free will, because having the ability to make clear and distinct judgements is one of the greatest burdens of having free will in itself.
Justice ties in to prudence very closely. It is more about having the ability to see and give as you see fit and only taking what you need as opposed to what you always want. This is important to remember when dealing with people especially. If you take more than you give in a relationship with anyone, it becomes imbalanced and tensions rise as a consequence.
Being temperate is as important as being disciplined, namely because they are essentially the same thing. It is about being able to control excess and hold powerful control over your own inner workings. We all have impulses, some of them good and some of them bad, but having the ability to discern between the two while keeping a level head is an important part of making any decision. You want that nice Ferrari? Check your temperance in the moment and ask yourself if it is going to be worth the tradeoff.
Courage is the final cadrinal virtue, and arugably the most important. Without the drive and want to do anything, we would otherwise do nothing. All action springs from action itself. A very simple way to put it is that you have to actually swing the bat to hit the ball.  This can be arugued against by saying that doing nothing is akin to doing something, but within a similar context, the absolute of nothing is different than a conceptual human nothing. But, that is a philosophical topic for another time.
Long story short, I find that being corageous, prudent, just, and temperate helps me find my way in the world. I make the decision not to remain willfully ignorant and I am always looking for ways to improve. If I feel threatened by stereotypes, I honestly just ignore them. Anyone who interjects that I am greater or lesser because of an irrelevant disposition is automatically wrong. If they explain a basis for something, I am willing to listen, but of their basis is not founded on a life-affirming form of logic or modality of thought, I make the conscious decision not to take it seriously. I think it is as simple as that.


Priority bills
by Ver NovenoHouse Majority Leader and Leyte Rep. Martin Romualdez (left) with his counterpart Senate Majority Leader Migz Zubiri showed the copies of priority bills of the House and Senate during their short meeting at the Senate.
House Majority Leader and Leyte Rep. Martin Romualdez (left) with his counterpart Senate Majority Leader Migz Zubiri showed the copies of priority bills of the House and Senate during their short meeting at the Senate.


[§458-6.9] Dispensing optician identification tags. Each licensed dispensing optician may wear an identification tag for the purpose of identifying to the customer that the person is a licensed dispensing optician. [L 1997, c 301, §1]


N-Power October Stipend: Grumbles Continue In Scheme
by Ridwan YusufIt’s eight days to the end of November and beneficiaries of the Federal Government N-Power scheme are still awaiting payment of their October stipend.
Concise News understands that payment (N30, 000 monthly stipend) is yet to made for around 500,000 volunteers throughout the country. This we can affirm as at the time of publishing this report.
Furthermore, this online news medium observed that beneficiaries are frustrated with the current situation.
See reactions from beneficiaries on Friday:


My Name Is Homer And I'm Here To Say
My Poetry Spins Out A Certain Way
Lee Butterman
1200BCE Greek tax records jotted in wet clay??
1200BCE Greek tax records jotted in wet clay??
Palace → kiln 🔥 😱
climate refugees precipitate Late Bronze Age collapse
≈ no writing 1200BCE-700BCE
minimal writing in Ancient Greece
Sand?? 🏖
Wax 🐝 🚛
Clay 🚛 🏋
Stone ⛏ 🚛 🏋
Skins 🐑 🚛
Papyrus 🌾 ☂ ⌛ 🇪🇬 🤑
In 407 BCE,
two (2!) sheets of papyrus
for expense records (20g papyrus???)
cost 1⅓ drachma, 6g silver,
the daily salary of an architect.
PHOTOCOPY PAPER WORTH ITS WEIGHT IN GOLD???
Gold = $50/gram
2 A3 pages? = 1/4 m²
Photocopy paper weighs 80 g/m²
Architect salary of $1000/day?
reading/writing is Big Data
if paper = gold
meanwhile, Greeks stay in the hills 🐐🌄
Still, people sing country music
अक्षितम् श्रवस् ákṣitam śrávas
κλέος ἄφθιτον kléos áphthiton
𝙪𝙣𝙙𝙮𝙞𝙣𝙜 𝙛𝙖𝙢𝙚
Still, people from N India to Greece sing country music
अक्षितम् श्रवस् ákṣitam śrávas
κλέος ἄφθιτον kléos áphthiton
𝙪𝙣𝙙𝙮𝙞𝙣𝙜 𝙛𝙖𝙢𝙚
Still, the ῥαψῳδός sings country music
sewing songs
(like patchwork fabric)
in Dactylic Hexameter
ἦμος δ' ἠριγένεια φάνη ῥοδοδάκτυλος Ἠώς
êmos d' ērigéneia phánē rhododáktulos Ēṓs
When rosy-fingered Dawn appeared early-born
𐀺𐀜𐀦𐀰
οἶνοψ
wine-dark, literally wine-faced: "the wine-dark sea"
θῖν’ ἔφ’ ἁλὸς πολιῆς, ὁρόων ἐπὶ οἴνοπα πόντον
...on the shore of the grey salt sea, looking over the wine-dark ocean
τὸν δ᾽ ἀπαμειβόμενος προσέφη κρείων Ἀγαμέμνων
To him, then, in reply, spoke King Agamemnon
10 years of war in the Iliad
people do not write anything
except someone pressing a seal maybe
"Oral-formulaic poetry"
what if Mad Libs, but, serious business
Q: How do we have an authoritative Homer text???
Iliad is 24 books
Odyssey is 24 books
each 2hr to sing
📼 Bosnian folk singers in the 1930s changed their stories very substantially between retellings! Hard to piece together from different nights!
Skimming last night's poem???
You read as fast as you talk!
No one reads silently!
Silent reading is
Julius Caesar's
One Weird Trick That Is A
Military Tactical Advantage
vs reading aloud
quietly
for spies to hear
How do we have an authoritative Homer text???
Did Homer have an authoritative Homer text???
DID HANSEL & GRETEL
SEE RAPUNZEL EN ROUTE???
☑ this suits the mood tonight
☒ page 48 does Not say that
DID HANSEL & GRETEL
SEE RAPUNZEL EN ROUTE???
☑ we, together, make our story
☒ the book must be respected
My Name Is Homer And I'm Here To Say
My Poetry Spins Out A Certain Way
Lee Butterman
My Name Is Homer And I'm Here To Say
My Poetry Spins Out A Certain Way
Lee Butterman
😴


Exception: TapCoreRemoteMismatchError
- Inherits:
-
TapRemoteMismatchError
- Object
- RuntimeError
- TapRemoteMismatchError
- TapCoreRemoteMismatchError
- Defined in:
- exceptions.rb
Overview
Raised when the remote of homebrew/core does not match HOMEBREW_CORE_GIT_REMOTE.
Instance Attribute Summary
Attributes inherited from TapRemoteMismatchError
#actual_remote, #expected_remote, #name
Instance Method Summary collapse
Methods inherited from TapRemoteMismatchError
Constructor Details
This class inherits a constructor from TapRemoteMismatchError
Instance Method Details
#message ⇒ Object
345 346 347 348 349 350 351 |
# File 'exceptions.rb', line 345 def <<~EOS Tap #{name} remote does not match HOMEBREW_CORE_GIT_REMOTE. #{expected_remote} != #{actual_remote} Please set HOMEBREW_CORE_GIT_REMOTE="#{actual_remote}" and run `brew update` instead. EOS end |


Trunk.js
HOME
LINK TWO
LINK THREE
LINK FOUR
LINK FIVE
LINK SIX
LINK SEVEN
{{recarea.RecAreaName}}
Search
Where Am I?
View Scores


--- title: "[Understanding Analysis by Stephen Abbott] - [Chapter 1 The Real Numbers] - [1.1 Discussion: The Irrationality of 2]" published: true tags: RealAnalysis ---
Theorem 1.1.1. There is no rational number whose square is 2
Proof. A rational number is any number that can be expressed in the form \(p/q\), where \(p\) and \(q\) are integers. Thus, what the theorem asserts is that no matter how \(p\) and \(q\) are chosen, it is never the case that \((p/q)^2 = 2\). The line of attack is indirect, using a type of argument referred to as a proof by contradiction. The idea is to assume that there is a rational number whose square is \(2\) and then proceed along logical lines until we reach a conclusion that is unacceptable.
At this point, we will be forced to retrace our steps and reject the erroneous assumption that some rational number squared is equal to \(2\). In short, we will prove that the theorem is true by demonstrating that it cannot be false.
And so assume, for contradiction, that there exists integers \(p\) and \(q\) satisfying $$ (\frac{p}{q})^2 = 2 \tag{1}\label{1} $$
We may also assume that \(p\) and \(q\) have no common factor, because, if they had one, we could simply cancel it out and rewrite the fraction in lowest terms. Now, equation \(\eqref{1}\) implies $$ p^2 = 2q^2 \tag{2}\label{2} $$
From this, we can see that integer \(p^2\) is an even number (it is divisible by 2), and hence \(p\) must be even as well because the square of an odd number is odd. This allows us to write \(p = 2r\), where r is also an integer. If we substitute \(2r\) for \(p\) in equation \(\eqref{2}\), then a little algebra yields the relationship $$ 2r^2 = q^2 $$
But now the absurdity is at hand. This last equation implies that \(q^2\) is even, and hence \(q\) must also be even. Thus, we have shown that \(p\) and \(q\) are both even (i.e., divisible by 2) when they were original assumed to have no common factor. From this logical impasse, we can only conclude that equation \(eqref{1}\) cannot hold for any integer \(p\) and \(q\), and thus the theorem is proved.
The rational numbers are defined as $$ Q = \{ \text{all fractions \(\frac{p}{q}\) where \(p\) and \(q\) are integers with \(q\) \(\ne\) 0} \} $$
The properties of \(Q\) make up the definition of what is called a field. More formally stated, a field is any set where addition and multiplication are well-defined operations that are commutative, associative, and obey the familiar distributive property \(a(b + c) = ab + ac\). There must be an additive identity, and every element must have an additive inverse. Finally, there must be a multiplicative identity, and multiplicative inverses must exist for all nonzero elements of the field. Neither \(Z\) nor \(N\) is a field. The finite set \(\{\text{0, 1, 2, 3, 4}\}\) is a field when addition and multiplication are computed modulo \(5\).


{% load static %}
{% load i18n %}
{# if you want to reuse this template you need to provide the following data: #}
{# a tuple looking as follows: (number_of_version, version of the document, text_to_diff) #}
{% trans "Select versions you want to diff" %}
{% trans "Do you really want to revert to this version?" %}


--- layout: default title: About herounit: 1 ---
I am a Software Engineer by profession. I am a runner and have successfully finished 4 marathons. I like going on long bike rides. I like cooking and baking.
Previously, I worked as Software Engineer at AWS, Amazon and IBM. I graduated from Arizona State University with a Master's degree in Computer Science.
You can mail me at :
ravs[at]ravs[dot]me
You can find me on:
Twitter
LinkedIn
GitHub
Foursquare
Instagram
AboutMe


The Isle of Pines lies SE of Grande Terre and is rich with animal life, home to unusual creatures such as the Crested Gecko and the world's largest gecko. The water is transparent with wonderful snorkelling.
Ile des Pins © Dorothy & Steve Darden
Position 22° 36.5’S, 167° 26.4'E
The anchorage at Kuto Bay has excellent holding, good protection from south-easterly and easterly winds and offers easy access to a few basic facilities and provisions.
Kuto Peninsula :© Dorothy & Steve Darden
The nearby anchorage at Kanumera Bay, although smaller than Kuto, is even more picturesque, with fine snorkeling along its outer margins.
Neither bay offers good protection in a strong southwesterly. In these conditions it is best to seek shelter on the north and east sides of the island.
Facilities are concentrated around Kuto, where dinghies, as well as shallow-drafted boats, may come alongside the visitors dock. Good provisioning is available locally, as well as bank, telephones and fuel (by jerrycan).
Last updated September 2014.


Starts or resumes the clock.
This method causes the clock to start progressing at the rate given in the BeatsPerMinute property. It may only be called when the clock is not yet rnuning.
If this is the first time Start is called, the clock starts at time zero and progresses from there. If the clock was previously started, stopped, and not reset, then Start effectively "unpauses" the clock, picking up at the left-off time, and resuming scheduling of any as-yet-unsent messages.
This method creates a new thread which runs in the background and sends messages at the appropriate times. All Message.SendNow methods and CallbackMessages will be called in that thread.
The scheduler thread is joined (shut down) in Stop.
| Exception Type | Condition |
|---|---|
| InvalidOperationException | Clock is already running. |
Clock Class | Midi Namespace | Stop | Reset


Calculate how many guests your park can naturally attract before guest spawn rate is reduced to a quarter of the
normal rate. Works for normal scenarios and scenarios with Harder Guest Generation (HGG).
Park Settings
Current Soft Guest Cap{{softGuestCap}} guests
No attractions added yet - add an attraction using the dropdown above!


What are you working on?
Originality is completely overrated.
(plus <%= unlisted %> top secret <%= unlisted === 1 ? 'project' : 'projects' %>)
<% } %> <% } else if (unlisted > 0) { %>Only top secret projects for now (<%= unlisted %> total)
<% } else { %>Nobody is working on anything, apparently. Go figure.
<% } %>


I'm passionate about digital marketing, scientific communication, and brand development. My goal is to create content that's accurate and accessible, and to help stakeholders understand, reach, and resonate with their audience.
When I’m not working, I like learning languages, traveling to new places, and taking long runs.


def lambda_handler(event, context):
// TODO implement
print("Hello, this is Lambda")
return "Hello from Lambda"
assert lonlat1 == [-73.96, 40.79], "Should be located in Manhattan"
def lambda_handler(event, context):
return main()
if __name__ == "__main__":
exit(main())


We visualize networks!
- reinvent magnetic content
- mesh real-time interfaces
- matrix value-added technologies
- reintermediate e-business paradigms
- seize bricks-and-clicks content
- redefine killer niches
- iterate holistic e-services
- extend collaborative e-services
- benchmark ubiquitous networks


void sqlite_busy_timeout ( resource $dbhandle , int $milliseconds )
Object oriented style (method): void SQLiteDatabase::busyTimeout ( int $milliseconds )
Set the maximum time, in milliseconds, that SQLite will wait for a dbhandle to become ready for use.
No value is returned.


The best Google Pixel 4 Black Friday deals - £33/m w/30GB data on O2
Here are the best Black Friday contract deals for Google’s latest phone - the Pixel 4.
by Jason EnglandGoogle’s Pixel 4 is one of the most leaked smartphones in history, but at least the deals are a pleasant surprise!
Yes, you probably already knew about that 90Hz smooth display, the new dual-camera array on the back that’s capable of astrophotography, and that new bright orange finish. But I bet you didn’t know the prices were THIS low.
If you’re in the market for Google’s latest phone, sit down, pop the kettle on and take a look at these - the best Black Friday contract deals for the Pixel 4.
Buying SIM-free? Get yours from Carphone Warehouse for £669.
Google Pixel 4 Best Deals - £33/m w/30GB data on O2
Yes, the Google Pixel 4 is a lot cheaper than you may think... It’s easy to fall for the first deal that sounds good - but stings you with some premiums. Fear not, we’ve picked the cream of the crop, with our favourite coming from O2.
O2
Pay just £150 upfront and you’ve got a cracking deal here from O2. Unlimited minutes and texts, a chunky 45GB of data and all the Priority special offers you can get your hands on for under £40 a month.
- 30GB data
- Unlimited minutes
- Unlimited texts
- Free HP Chromebook
Total cost of ownership: £942
Get yours here for £33 a month with £150 upfront cost.
EE
With EE, you can get more than enough data for yourself in 30GB, along with all the free content consumption you could want - free Apple Music & MTV Play for 6 months along with BT Sport for 3.
- 75GB data
- Unlimited minutes
- Unlimited texts
Total cost of ownership: £984
Get yours here for £41 a month with zero upfront cost.
Vodafone
Unlimited everything. Literally - unlimited everything. That’s what makes Vodafone plan a spectacular option, alongside the VeryMe special offers.
- Unlimited data
- Unlimited minutes
- Unlimited texts
- Free HP Chromebook
Total cost of ownership: £1024
Get yours here for £36 a month with £160 upfront cost (use the Vodafone filter to find it).
Three
No data caps. No speed restrictions. Just unlimited data to stream to your heart's content! Plus, with Three, you've got one of the best global roaming packages out there.
- Unlimited data
- Unlimited minutes
- Unlimited texts
- Global roaming
- 'Go Binge' package
Total cost of ownership: £1225
Get yours here for £49 a month with £49 upfront cost.
Picking up a Pixel? You need a case.
Here are the best Pixel 4 cases - picked by the Stuff team.


1st August,2018.
Dear Mom,
I
love my new school! It is really huge and different from my previous school. My new friends are Alex, Steve, Jacob and Dan. I would like to share my school routine with you.
The school starts at nine o’clock. I have a Maths,an English,a Spanish and a Science class everyday. History, Geography and Art are every alternate days. Computer class is every afternoon after lunch. The rest of the afternoon, I spend in one hobby and one sports class.
For
hobbies, I had to make a choice from debates, reading and cooking. Since I love debates, I chose it. For sports the options were soccer, baseball and rugby. Mom, can you guess what I chose? Yes, you are right! I chose rugby. I will keep updating you more.
Your loving son,
Bob.
?
!
.
,


{% extends "grp_dom_documentation/base.html" %} {% load i18n admin_modify adminmedia grp_tags %} {% block stylesheets %} {{ block.super }} {% endblock %} {% block javascripts %} {{ block.super }} {{ media }} {% endblock %} {% block bodyclass %}grp-doc{% endblock %} {% block content-class %}{% endblock %} {% block breadcrumbs %} {% if not is_popup %}
{% endif %} {% endblock %} {% block object-tools %}Description
Within the {% block content %}
you may use one ore more different layouts. Each layout is held by a .grp-layout-container
.
In most cases it should be good enough to use one .grp-layout-container
within the {% block content %}
but one never knows so we made it possible to use different layouts at the same time.
There is a fluid layout, a grid layout and combinations of fluid and grid layouts.
Example
Layout Container 1
Layout Container 2
Source
In the previous example we use the .grp-layout-containers
with <sections />
but you might use them with other elements too.
{% block content %}

Layout Container 1

...

Layout Container 2

...

{% endblock content %}
Description
With a basic fluid layout the .grp-layout-container
contains a .grp-column
which carries your contents and stretches over the full width.
Example
Source
In the previous example we use the .grp-layout-container
with a

but you might use it with other elements too.
{% block content %}

Your contents go in here

{% endblock content %}
Description
With a basic grid layout the .grp-layout-container
contains different .grp-column.span-$n
which carry your contents.
Example
Source
{% block content %}

{% endblock content %}
Description
You can use a combination of fluid left column and a right column with a fixed width based on the grid.
To achieve that you have to add two classes to the .grp-layout-container
.grp-column-left-fluid
.grp-column-right-span-$n
where $n is the grid-based width your right column should haveFurther more your .grp-layout-container .grp-column-left-fluid .grp-column-right-span-$n
has to contain a left and a right column (that's necessary for calculating the layout)
.grp-column-left
.grp-column-right
Example
Source
In the previous example we use the .grp-layout-container
with a

but you might use it with other elements too.
{% block content %}

Your left column contents go in here

Your right column contents go in here

{% endblock content %}
Description
You can use a combination of fluid right column and a left column with a fixed width based on the grid.
To achieve that you have to add two classes to the .grp-layout-container
.grp-column-right-fluid
.grp-column-left-span-$n
where $n is the grid-based width your left column should haveFurther more your .grp-layout-container .grp-column-right-fluid .grp-column-left-span-$n
has to contain a left and a right column (that's necessary for calculating the layout)
.grp-column-left
.grp-column-right
Example
Source
In the previous example we use the .grp-layout-container
with a

but you might use it with other elements too.
{% block content %}

Your left column contents go in here

Your right column contents go in here

{% endblock content %}


docker logs container_name- Print logs and follow them:
docker logs -f container_name- Print last 5 lines:
docker logs container_name --tail 5- Print logs and append them with timestamps:
docker logs -t container_name- Print logs from a certain point in time of container execution (i.e. 23m, 10s, 2013-01-02T13:23:37):
docker logs container_name --until time


clear-day
clear-night
rain
snow
sleet
wind
fog
cloudy
partly-cloudy-day
partly-cloudy-night
new-moon
first-quarter
full-moon
last-quarter
waning crescent
waning gibbous
waxing gibbous
waxing crescent
grin stars
love it
meh
cry
frown
waning crescent


Programme
Tell me if the schedule changes
Toggle navigation
POW! Conference
Speakers
Programme
Venue
© 2016 POW! Conference


13
1 A wise son pays attention to the teaching his father gives him;
but a stubborn son refuses to listen to correction.
2 Good things come as the fruit of what one says,
but the desire of the deceitful is to consume more and more violence.
3 The person who is very careful about what he says preserves his life;
the one who talks too much ruins everything.
4 People who are lazy are hungry for everything, but they will not get anything.
People who work hard will get more than they desired.
5 Anyone who does right hates it when other tell lies,
but a wicked person brings disgrace on himself.
6 Anyone who does right always acts in ways that are respected,
but the one who does what Yahweh has forbidden ruins his own wicked life.
7 Some people have many possessions, but they have nothing of value;
but other people give all they have away, and yet have the best kind of riches.
8 A rich person may have to use his wealth to buy back his life from a criminal who holds him as a hostage,
but no poor person would have to think about that kind of danger.
9 The one who does what is right shines like a light that gives joy,
but wicked people are like a lamp that will be extinguished.
10 Pride works within a person and it results in conflict and arguments,
but those who listen to good advice find the wisdom they need.
11 People who think too much of themselves will spend all their money;
the one who makes his money by working with his hands, will find ways to make his money grow.
12 When hope for the future is postponed, it makes you sick—you feel you will never receive what you long for,
but if you receive what you desire, that will be like a tree that gives life.
13 Those who despise good advice bring the punishment for disobeying upon themselves;
the one who pays attention to the instruction will receive honor.
14 The lesson taught by the wise are like a fountain that gives life to all who drink from it,
and they inform you about all the deadly dangers around you.
15 Having a mind that understands right and wrong, brings you respect,
but the one who twists good gifts for bad purposes,
he never reaches his destination.
16 Those who have good sense always take action from what they know is true;
a foolish person proves his decisions are folly, and everyone sees it.
17 A wicked messenger will not deliver the message,
but bitter enemies are brought together
when the messages are delivered by a dependable messenger.
18 The one who does not learn from the lessons of discipline will be poor, and he will know shame,
but the one who takes the lessons of discipline and learns from them,
honor will find him.
19 When a longing comes true,
it is sweet delight to the one with desires;
and those who are foolish continue to turn toward evil again and again.
20 If you spend time with wise people,
by their lives they will show you how you can be wise, as well.
21 Sinners run away and disasters chase after them,
but those who do what is right find the good is their reward.
22 A good person sets apart money to give his grandchildren when he dies,
but a sinful person will store up his wealth, not knowing that it will be given to the one who does right.
23 A field owned by a poor person can produce much food,
but the poor are victims of injustice more than the rich,
and the crop is not planted.
24 A parent who does not train his child in how he should live,
does not show him any love,
but the one who is careful to train the child in how he should live, shows his great love.
25 Those who do what is right eat enough food to satisfy their hunger,
but the wicked complain that they are always hungry.


Lehm is a command-line file-generator that aims to get out of your way. Write templates and generate files from them without configuring a thing or writing any code.
It's build on Handlebars.js and has simple hooks with access to Inquirer.js, Shell.js, Fs-Extra and Lodash, which makes it very extendible.
Generate single files, a bunch of them or scaffold whole projects with installation and all.
Once you've installed Lehm with npm install lehm -g
you'll have access to the lehm
executable. It only has
three commands. If you need a refresher on them, just run it without
any command, which will be the same as lehm --help
.
lehm list
$ lehm list
Templates Path: ~/templates
js-component
js-component: component.js | template.html | style.css
Node.js Module - Scaffold for a Node.js Module
node-module: {{ moduleName }}/{{ moduleName }}.js | {{ moduleName }}/package.json
List all templates and their metas and files that are found in the configured templates path. Also see Template Metas.
lehm create [name]
$ lehm create ? Choose Template (Use arrow keys) ❯ js-component Node.js Module (node-module) - Scaffold for a Node.js Module $ lehm create node-module ? Name of your Node Module: Lehm ? ...
Start creating files from a template. If you do not pass the
[name]
, you will be presented with a list of all
templates to choose from.
lehm config
$ lehm config
? Templates Path /Users/mustardamus/Code/templates
? Handlebars Delimiters ({{ }}) <% %>
Saved.
Save the templates path and handlebars delimiters to
~/.lehmrc
. Also see
Configuration.
Lehm uses Handlebars.js to
parse and transform the templates. By default the delimiters are
{{ }}
, but you can change them if they clash with the
content of your templates. See how in the
Configuration or
Template Metas section.
Lets learn the Template Tags by creating our first template, lets
call it js-component
.
We create it in the default
Templates Directory, which is in the Home folder of the current
user, under the sub-directory ~/templates
. Again, you
can configure it if you want it to be
in another path.
Lets use the lehm list
command to check if the newly
created template was picked up.
~ $ mkdir -p templates/js-component ~ $ cd templates/js-component ~/templates/js-component $ touch component.js ~/templates/js-component $ touch template.html ~/templates/js-component $ touch style.css ~/templates/js-component $ lehm list Templates Path: ~/templates js-component js-component: component.js | style.css | template.html
Lehm slightly extends Handlebars Comments. Comments are indicated
by an !
inside the delimiters. In generated files,
the comments will be removed.
If the comment does not include a =
and/or
#
character, it will be a plain comment and not
parsed.
variableName = default value
You can assign a default value
to a
variableName
by using the =
character.
When you create the template with lehm create
you
will be offered a default value
, you either can hit
enter to use it or overwrite it with another string. Note that the
default value
is always a string, with no need for
' '
or " "
.
~/templates/js-component $ cat component.js {{! this is a plain comment }} {{! componentName # Name of your component }} {{! namespace = components }} {{! initialComment = A JS Component # First line comment }} ~/templates/js-component $ cd ~ $ mkdir test-comp && cd test-comp ~/test-comp $ lehm create js-component ? Name of your component: test-comp ? namespace (components): app ? First line comment (A JS Component): neat :)
variableName # useful description
You can assign a useful description
to
variableName
with the #
character.
When you create your template, the description will be shown in
the prompts instead of the variableName
.
variableName = default # description
A combination of both, default value
and
useful description
, assigned to the
variableName
. The description
must
always come last.
The component.js
template from above won't have any
content, because we only have declared some variables but actually
never used them. Lets try that.
Variables are sitting between the delimiters, by default they are
{{ }}
, but they can be set to custom delimeters
either using the lehm config
command or by having a
.lehmrc
somewhere. See the the
Configuration section for details.
Another way is to set per-template-delimiters with
Template Metas.
Variables don't need a declaration, just by using a variable will
declared it, but without a default value or description. So use
a good name for it to make it clear what the variable is about,
like the htmlContent
variable in the
template.html
example.
Lehm parses all files in the template for variables before prompting for the values. That means that you can and must re-use variables across files. If in one file a variable has been declared without a default value or description, and in another a default value is set, it will be assigned to the variable. However, once the default value or description has been assigned, it can not be overwritten by a third declaration.
~/templates/js-component $ cat component.js {{! this is a plain comment }} {{! componentName # Name of your component }} {{! namespace = components }} {{! initialComment = A JS Component # First line comment }} // {{ initialComment }} ~/templates/js-component $ cat template.html
 {{ htmlContent }}
 ~/templates/js-component $ cd ~ $ rm -rf test-comp && mkdir test-comp && cd test-comp ~/test-comp $ lehm create js-component ? Name of your component: test-comp ? namespace (components): app ? First line comment (A JS Component): neat :) ? htmlContent: Pretty kewl ~/test-comp $ cat component.js // neat :) ~/test-comp $ cat template.html
 Pretty kewl

#if
and #unless
Lehm will parse Handlebars' #if
and
#unless
block-statements and turn them into boolean
variables that can either be true
or
false
.
In the prompt you can choose the true
or
false
value from a list with your arrow keys.
If you use #if
in your template, the default value of
the variable will be true
. If you use
#unless
the default value will be false
.
You can use the else
statement to cover both,
true
and false
cases like shown in the
example file style.css
.
You can assign a description to a boolean variable with the
#
character in a comment like you do with simple
variables. Setting a default value would make no sense, just use
either #if
or #unless
, depending if you
want the default value to be true
or
false
.
Inside of the block-statements you can use variables normally, or
nest other #if
or #unless
block-statements.
~/templates/js-component $ cat style.css .{{ componentName }} { {{#if darkStyle }} background: black; color: white; {{else}} background: white; color: black; {{/if}} } ~/templates/js-component $ cd ~ $ rm -rf test-comp && mkdir test-comp && cd test-comp ~/test-comp $ lehm create js-component ? Name of your component: test-comp ? namespace (components): app ? First line comment (A JS Component): neat :) ? htmlContent: Pretty kewl ? darkStyle (Use arrow keys) ❯ true false ~/test-comp $ cat style.css .test-comp { background: black; color: white; }
File- and folder-names are parsed for template tags as well. So whenever you use the delimiters you declare a variable just like you would do in a file's content. This is very useful for creating named files and folders.
You even can set the default value and the description of the
variable. Just use the Handlebars comment !
in
combination with =
and/or #
in any
file's content of the template like you've seen before.
Note that if you have to use quotes in filenames you have to use
single qoutes '
instead of double quotes
"
. For example:
{{combine 'pluralize,upperCase' variableName}}.js
.
~/templates $ mkdir node-module && cd node-module ~/templates/node-module $ mkdir "{{ moduleName }}" ~/templates/node-module $ cd "{{ moduleName }}" ~/templates/node-module/{{ moduleName }} $ echo "{{! moduleName # Name of your Node Module }}\n// :O">"{{ moduleName }}.js" ~/templates/node-module/{{ moduleName }} $ ls {{ moduleName }}.js ~/templates/node-module/{{ moduleName }} $ cat "{{ moduleName }}.js" {{! moduleName # Name of your Node Module }} // :O ~/templates/node-module/{{ moduleName }} $ cd ~ lehm create node-module ? Name of your Node Module: clay ~ cat clay/clay.js // :O
Optionally you can have additional information for a template.
They are placed in a .js
file that must have the
same name as the template (ie the parent folder-name).
Let's extend our node-module
template by creating a
file named node-module.js
inside the template folder.
Note that this file will not be parsed as a template, thus not
created in the target folder by lehm create
.
~/templates/node-module $ cat node-module.js module.exports = { name: 'Node Module', description: 'A skeleton for a node module', delimiters: '<% %>', ingnore: ['node_modules'] } ~/templates/node-module $ lehm list js-component js-component: component.js | style.css | template.html Node Module - A skeleton for a node module node-module: {{ moduleName }}/{{ moduleName }}.js
name
This is a alias for the template-name given by the parent
folder-name. As you can see in the lehm list
output,
if the name
is set it will replace the folder-name.
You are also able to create from the template using both names,
the parent folder name, and if set, the name
meta.
lehm create node-module
and
lehm create "Node Module"
is the same thing.
description
A brief description of what your template will generate or any additional info.
If the description
is set, it will be shown in the
output of lehm list
or if you use
lehm create
without any template-name.
delimiters
If set, these delimiters will overwrite the default
({{ }}
) or the ones you have set in a
.lehmrc
somewhere.
This is useful if the template content will clash with your global delimiters. Also if you want to share your template with others, because they may have other global delimiters set.
ignore
This array contains any folder- or file-name you wish to exclude
from the generation process. Useful for things like
node_modules
or the README.md
of the
template.
It will match paths with the minimatch library, so you can use wildcards.
These entries will simply be skipped for parsing variables or listing files of a template.
With the before
and after
hook you can
handle work that template parsing alone would not get done.
These are functions that are stored in the same file as the
template-metas, a .js
file that has the same name
as the parent folder. node-module.js
in the example.
before
The before
hook is called before any file is
generated, but after the template-files have been parsed for
variables and the user has been prompted for values.
Most of the time you want to extend Handlebars with custom
helpers (utils.Handlebars.registerHelper
) that you
can use in your template-files. Another common task is to
manipulate the variables
that are passed into the
template.
The hook function is called with an Object
which has
the following fields (note that in the example to the right we are
using ES2015 destructuring
for better reading and less code):
srcPath
- The full path where the template-files are
located.
distPath
- The full path where files will be
generated.
variables
- An object with variable-names as keys,
and the user entered input as values. Modify a value in this
object, and it will be used in template-files.
utils
- An object with instances of the following
tools:
utils.Handlebars.registerHelper
to register custom helpers you can use in your template-files.
It has a extra function
utils.Handlebars.transform(str, data)
to
transform template strings with custom delimiters (see
example).
before done callback
The second parameter for the before
hook is a
callback you need to call when everything is
ready to proceed generating the files. Call this function without
any parameter to continue. Call it with a error message, a String,
to abort the generation process and show the message.
~/templates/node-module $ cat node-module.js module.exports = { delimiters: '<% %>', before ({ srcPath, distPath, variables, utils }, cb) { utils.Handlebars.registerHelper('loud', (val) => { return utils._.toUpper(val) + '!' }) utils.Inquirer.prompt([{ type: 'list', name: 'abort', message: 'Abort?', choices: ['No', 'Yes'] }]).then((answers) => { if (answers.abort === 'Yes') { cb('Aborted by user') } else { cb() } }) }, after ({ srcPath, distPath, variables, utils }) { utils.Shell.cd(distPath + '/' + variables.moduleName) utils.Shell.exec('npm init -y') utils.Shell.exec('npm install lodash --save') let str = utils.Handlebars.transform('<% loud "Lets rock" %>') console.log(utils.Chalk.blue(str)) } } ~/templates/node-module $ cd && rm -rf clay ~ $ lehm create node-module ? Name of your Node Module: clay ? Abort? No Wrote to ~/templates/clay/package.json<EMAIL_ADDRESS>~/templates/clay └──<EMAIL_ADDRESS>... LETS ROCK! ~ $ ls clay node_modules package.json clay.js
after
The after
hook is called after all the files have
been generated.
Here you can finish the generation process, like installing
dependencies or move files around or show any additional info
that is useful to the user. Most of the time you want to use the
utils
from the Object
that is passed in
as the first and only parameter.
It is called with the same Object
as the the
before
hook. However, there is no
done callback
to continue. As far as Lehm is
concerned, the process is done when all files are generated.
Lehm extends Handlebars with these basic helpers, so you can use them
in your template-files without the need for a before
hook. But remember, you can add new helpers by using the
utils.Handlebars.registerHelper
method in the
before
hook.
{{ lowerCase "LOWERCASE" }} = lowercase
{{ upperCase "uppercase" }} = UPPERCASE
{{ snakeCase "snake-case" }} = snake_case
{{ camelCase "camel_case" }} = camelCase
{{ kebabCase "kebabCase" }} = kebab-case
{{ capitalize "capitalize" }} = Capitalize
{{ pluralize "user" }} = users
{{ singularize "users" }} = user
{{ combine "singularize,capitalize" "users" }} = User
With this helper you can combine multiple helpers that take a single String as parameter. That means you can combine any helper from above and any custom helper you may have written.
If you write custom helpers you need to make sure that the variable is always the last parameter, just like in the combine helper above.
There are only two things you could configure with Lehm: the path where the templates are found, and which delimiters to use. Remember, you can overwrite the delimiters specifically for a template with the Template Metas.
Out of the box Lehm looks in the path ~/templates
for
templates, and {{ }}
are used as default delimiters.
You can permanently overwrite these defaults by creating a
.lehmrc
file in your users home folder. This is a JSON
formatted file with the following fields:
templatesPath
- Full path where the global templates can
be found.
handlebarsDelimiters
- A String to define the delimiters
used by Handlebars.js. The delimiters must have a space in between
them.
For convenience you can use the lehm config
command
to set these values. It will save them to ~/.lehmrc
.
Easy-peasy.
If you use the lehm
command, it will look for a
.lehmrc
in the current working directory before
checking the home directory or using the defaults.
That way you can have a project-specific configuration for Lehm.
Use a relative path in templatesPath
to store the
templates in the same directory as your project.
That's useful if you want to have global temlpates for scaffolding whole projects, but want to have components templates for a specific project stored in the same folder to keep it all together, and for other people to use.
~ $ lehm list Templates Path: /Users/mustardamus/templates js-component js-component: component.js | style.css | template.html node-module node-module: <% moduleName %>/<% moduleName %>.js ~ $ mkdir -p templates-alt/test ~ $ echo "<% itWorks %>">templates-alt/test/test.txt ~ $ lehm config ? Templates Path: ~/templates-alt ? Handlebars Delimiters: <% %> Saved. ~ $ cat .lehmrc { "templatesPath": "/Users/mustardamus/templates-alt", "handlebarsDelimiters": "<% %>" } ~ $ lehm list Templates Path: /Users/mustardamus/templates-alt test test: test.txt ~ $ mkdir -p project/tpl/local/ ~ $ cd project ~/project $ echo ":)">tpl/local/only.txt ~/project $ cat .lehmrc { "templatesPath": "./tpl", "handlebarsDelimiters": "<% %>" } ~/project $ lehm list Templates Path: ~/project/tpl local local: only.txt
If you have created a template for Lehm and you would like to share it with the world, please create either a pull request of this documentation, or simply create a issue with a link to your template. Thanks!
A modern JavaScript development environment with the Bulma HTML/CSS framework and the Vue 2 JavaScript framework on top. Also includes the Component/Container pattern and simple state management out of the box.
A modern Node.js server built on Hapi.js & Mongoose (along many other things) . It has dynamic bootstrapping which makes it quite easy to extend.
Coming soon...


This example shows how to use bootstrap and vgrd to create a vertically constrained float-column layout


 — A Florida man has been sentenced to eight years in prison after pleading guilty to a lesser charge in the hate-crime beating death of a Guatemalan man.
by Canadian PressWEST PALM BEACH, Fla. — A Florida man has been sentenced to eight years in prison after pleading guilty to a lesser charge in the hate-crime beating death of a Guatemalan man.
The Palm Beach Post reports that 22-year-old Jesse Harris pleaded guilty Friday to aggravated battery while committing evidence of prejudice. He had been facing a first-degree murder charge.
Authorities say Harris, his brother David Harris and Austin Taggart attacked 18-year-old Onesimo Marcelino Lopez-Ramos in April 2015. Prosecutors say the group was prowling Jupiter streets, specifically targeting someone of Guatemalan heritage.
Investigators say Lopez-Ramos died after his skull was cracked with an axe by David Harris.
David Harris was sentenced to life in prison last year after a jury convicted him of first-degree murder.
Taggart received 20 years last week after pleading guilty to second-degree murder and aggravated battery while committing evidence of prejudice.
___
Information from: The Palm Beach (Fla.) Post, http://www.pbpost.com
The Associated Press


| java.lang.Object | |
| ↳ | com.google.inject.multibindings.MapBinder<K, V> |
An API to bind multiple map entries separately, only to later inject them as a complete map. MapBinder is intended for use in your application's module:
public class SnacksModule extends AbstractModule {
protected void configure() {
MapBinder<String, Snack> mapbinder
= MapBinder.newMapBinder(binder(), String.class, Snack.class);
mapbinder.addBinding("twix").toInstance(new Twix());
mapbinder.addBinding("snickers").toProvider(SnickersProvider.class);
mapbinder.addBinding("skittles").to(Skittles.class);
}
}
With this binding, a Map<String, Snack>
can now be
injected:
class SnackMachine {
@Inject
public SnackMachine(Map<String, Snack> snacks) { ... }
}
In addition to binding Map<K, V>
, a mapbinder will also bind
Map<K, Provider<V>>
for lazy value provision:
class SnackMachine {
@Inject
public SnackMachine(Map<String, Provider<Snack>> snackProviders) { ... }
}
Contributing mapbindings from different modules is supported. For example,
it is okay to have both CandyModule
and ChipsModule
both
create their own MapBinder<String, Snack>
, and to each contribute
bindings to the snacks map. When that map is injected, it will contain
entries from both modules.
The map's iteration order is consistent with the binding order. This is convenient when multiple elements are contributed by the same module because that module can order its bindings appropriately. Avoid relying on the iteration order of elements contributed by different modules, since there is no equivalent mechanism to order modules.
The map is unmodifiable. Elements can only be added to the map by configuring the MapBinder. Elements can never be removed from the map.
Values are resolved at map injection time. If a value is bound to a provider, that provider's get method will be called each time the map is injected (unless the binding is also scoped, or a map of providers is injected).
Annotations are used to create different maps of the same key/value type. Each distinct annotation gets its own independent map.
Keys must be distinct. If the same key is bound more than
once, map injection will fail. However, use permitDuplicates()
in
order to allow duplicate keys; extra bindings to Map<K, Set<V>>
and
Map<K, Set<Provider<V>>
will be added.
Keys must be non-null. addBinding(null)
will
throw an unchecked exception.
Values must be non-null to use map injection. If any value is null, map injection will fail (although injecting a map of providers will not).
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Returns a binding builder used to add a new entry in the map.
| |||||||||||
Returns a new mapbinder that collects entries of
keyType /valueType in a
Map that is itself bound with no binding annotation. | |||||||||||
Returns a new mapbinder that collects entries of
keyType /valueType in a
Map that is itself bound with annotationType . | |||||||||||
Returns a new mapbinder that collects entries of
keyType /valueType in a
Map that is itself bound with annotation . | |||||||||||
Returns a new mapbinder that collects entries of
keyType /valueType in a
Map that is itself bound with no binding annotation. | |||||||||||
Returns a new mapbinder that collects entries of
keyType /valueType in a
Map that is itself bound with annotationType . | |||||||||||
Returns a new mapbinder that collects entries of
keyType /valueType in a
Map that is itself bound with annotation . | |||||||||||
Configures the
MapBinder to handle duplicate entries. |
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
From class
java.lang.Object
|
Returns a binding builder used to add a new entry in the map. Each key must be distinct (and non-null). Bound providers will be evaluated each time the map is injected.
It is an error to call this method without also calling one of the
to
methods on the returned binding builder.
Scoping elements independently is supported. Use the in
method
to specify a binding scope.
Returns a new mapbinder that collects entries of keyType
/valueType
in a
Map that is itself bound with no binding annotation.
Returns a new mapbinder that collects entries of keyType
/valueType
in a
Map that is itself bound with annotationType
.
Returns a new mapbinder that collects entries of keyType
/valueType
in a
Map that is itself bound with annotation
.
Returns a new mapbinder that collects entries of keyType
/valueType
in a
Map that is itself bound with no binding annotation.
Returns a new mapbinder that collects entries of keyType
/valueType
in a
Map that is itself bound with annotationType
.
Returns a new mapbinder that collects entries of keyType
/valueType
in a
Map that is itself bound with annotation
.
Configures the MapBinder
to handle duplicate entries.
When multiple equal keys are bound, the value that gets included in the map is arbitrary.
In addition to the Map<K, V>
and Map<K, Provider<V>>
maps that are normally bound, a Map<K, Set<V>>
and
Map<K, Set<Provider<V>>>
are also bound, which contain
all values bound to each key.
When multiple modules contribute elements to the map, this configuration option impacts all of them.


Created using Blender and GIMP as a test asset for the unreleased indie top-down exploration-driven shooter SpaceHawk.
Lessons were learned and applied from the work done on Viper Rally; a rough block-out was created first, with the high-poly created by retopologizing that, and a low-poly then created by retopologizing that.
The UDK materials supported dynamic paint colour and damage, able to show wear as the player took damage.
Please note that some assets in these images are from UDK.


Born into a Bengali Muslim Kazi familyhailing from Burdwan district in Bengal Presidency (now in West Bengal),[2] Nazrul Islam received religious education and as a young man worked as a muezzin at a local mosque
Born into a Bengali Muslim Kazi family hailing from Burdwan district in BengalPresidency (now in West Bengal),[2] Nazrul Islam received religious education and as a young man worked as a muezzin at a local mosque
| Name | Age | |
|---|---|---|
| Najmul Alam | Najmul@gmail. om | 30 |
| Karimul Alam |<EMAIL_ADDRESS>| 29 |
Born into a Bengali Muslim Kazi family hailing from Burdwan district in Benga Presidency (now in West Bengal),[2] Nazrul Islam received religious education and as a young man worked as a muezzin at a local mosque
The WWW is awesome
HTML Crash Course by Brad Traversy


| Opcode/Instruction | Op/En | 64/32-bit Mode | CPUID Feature Flag | Description |
| 66 0F 2B /r MOVNTPD m128, xmm | MR | V/V | SSE2 | Move packed double-precision floating-point values from xmm to m128 using nontemporal hint. |
| VEX.128.66.0F.WIG 2B /r VMOVNTPD m128, xmm1 | MR | V/V | AVX | Move packed double-precision values in xmm1 to m128 using non-temporal hint. |
| VEX.256.66.0F.WIG 2B /r VMOVNTPD m256, ymm1 | MR | V/V | AVX | Move packed double-precision values in ymm1 to m256 using non-temporal hint. |
| Op/En | Operand 1 | Operand 2 | Operand 3 | Operand 4 |
| MR | ModRM:r/m (w) | ModRM:reg (r) | NA | NA |
Moves the packed double-precision floating-point values in the source operand (second operand) to the destination operand (first operand) using a non-temporal hint to prevent caching of the data during the write to memory. The source operand is an XMM register or YMM register, which is assumed to contain packed double-precision, floatingpointing data. The destination operand is a 128-bit or 256-bit memory location. The memory operand must be aligned on a 16-byte (128-bit version) or 32-byte (VEX.256 encoded version) boundary otherwise a generalprotection exception (#GP) will be generated.
The non-temporal hint is implemented by using a write combining (WC) memory type protocol when writing the data to memory. Using this protocol, the processor does not write the data into the cache hierarchy, nor does it fetch the corresponding cache line from memory into the cache hierarchy. The memory type of the region being written to can override the non-temporal hint, if the memory address specified for the non-temporal store is in an uncacheable (UC) or write protected (WP) memory region. For more information on non-temporal stores, see “Caching of Temporal vs. Non-Temporal Data” in Chapter 10 in the Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 1.
Because the WC protocol uses a weakly-ordered memory consistency model, a fencing operation implemented with the SFENCE or MFENCE instruction should be used in conjunction with MOVNTPD instructions if multiple processors might use different memory types to read/write the destination memory locations.
In 64-bit mode, use of the REX.R prefix permits this instruction to access additional registers (XMM8-XMM15). Note: In VEX-128 encoded versions, VEX.vvvv is reserved and must be 1111b, VEX.L must be 0; otherwise instructions will #UD.
DEST ← SRC;
| MOVNTPD: | void _mm_stream_pd(double *p, __m128d a) |
| VMOVNTPD: | void _mm256_stream_pd (double * p, __m256d a); |
None.
| 1. | ModRM.MOD = 011B is not permitted |
See Exceptions Type 1.SSE2; additionally
| #UD | If VEX.vvvv != 1111B. |


Get specific sentiment lexicons in a tidy format, with one row per word,
in a form that can be joined with a one-word-per-row dataset.
The "bing"
option comes from the included sentiments
data frame, and others call the relevant function in the textdata
package.
get_sentiments(lexicon = c("afinn", "bing", "loughran"))
| lexicon | The sentiment lexicon to retrieve; either "afinn", "bing", or "loughran" |
|---|
A tbl_df with a word
column, and either a sentiment
column (if lexicon
is not "afinn") or a numeric score
column
(if lexicon
is "afinn").
library(dplyr)# NOT RUN { get_sentiments("afinn") # }get_sentiments("bing")#> # A tibble: 6,786 x 2 #> word sentiment #> <chr> <chr> #> 1 2-faces negative #> 2 abnormal negative #> 3 abolish negative #> 4 abominable negative #> 5 abominably negative #> 6 abominate negative #> 7 abomination negative #> 8 abort negative #> 9 aborted negative #> 10 aborts negative #> # … with 6,776 more rows


All over the world, one tradition that every society has in common is the naming of children However, in different societies, the naming systems are different For example, the Akan people in Ghana give names their children depending on the day of the week they were born.
Sounds fun. Right?
The sad fact is that you can barely remember the day you were born
Luckily, with our help, YOUR AKAN NAME IS JUST A CLICK AWAY
Let's see what you Akan Name would be 😇😇😇😇
© Copyright 2021 Kevson


Most popular typesetting, remaining are essentially was popularised in the 1960s with the release of uncover any web sites still in their infancy. Various
Most popular typesetting, remaining are essentially was popularised in the 1960s with the release of uncover any web sites still in their infancy. Various
Most popular typesetting, remaining are essentially was popularised in the 1960s with the release of uncover any web sites still in their infancy. Various
Most popular typesetting, remaining are essent ially was popularised in the 1960s with the elease of uncover many web sites still in their infancy. Various versions have evolved