SQL Bricks was created to help eliminate DRY violations in SQL-heavy applications. SQL statements can be easily stored, cloned, modified and passed around to other parts of an application and they can generate both parameterized and non-parameterized SQL.
In addition, SQL Bricks contains a few conveniences to aid in re-use and to make SQL generation a little less of a chore: automatic quoting of columns that collide with keywords (order, desc, etc) & columns that contain capital letters, automatic alias expansion, user-supplied join criteria functions.
SQL Bricks differs from similar libraries in that it does not require a schema and it is designed to be transparent, matching SQL so faithfully that developers with knowledge of SQL will pick up the API extremely quickly.
The core SQL Bricks library supports the four CRUD statements (SELECT, INSERT, UPDATE, DELETE) and all of their clauses as defined by SQL-92 (additional clauses supported by Postgres, MySQL, and SQLite are in the dialect-specific extension libraries, sql-bricks-postgres, mysql-bricks and sql-bricks-sqlite, respectively). Adding support for other SQL statements (CREATE, ALTER TABLE, etc) would clutter the library without providing much real benefit.
The source is on GitHub and over 200 tests are available for your perusal.
mysql-bricks adds mysql-dialect extensions, like INSERT ... ON DUPLICATE KEY UPDATE ..., INSERT IGNORE ..., LIMIT (SELECT / UPDATE / DELETE), OFFSET, ORDER BY (UPDATE / DELETE)
sql-bricks-sqlite adds sqlite-dialect extensions, like LIMIT ... OFFSET and OR REPLACE
sql-bricks-postgres adds postgres-dialect extensions, like LIMIT ... OFFSET and RETURNING
pg-bricks adds postgres connections, transactions, query execution and data accessors on top of SQLBricks.
In node, SQL Bricks can be accessed with require('sql-bricks'). In the browser, it can be accessed with the SqlBricks global. SQL Bricks has no production dependencies; its only dev dependency is Mocha.js. Throughout this documentation, it is assumed that SQL Bricks is set to a local sql variable and that top-level functions are also set to local variables (for example: var sql = SqlBricks, select = sql.select, or = sql.or, $in = sql.in;).
The API is designed to mirror SQL faithfully, with SQL keywords represented by chainable camelCase method and non-keywords passed as string arguments. To make the API easier to use, objects can also be passed in wherever there are key/value pairs.
select().from('person') .where(or({last_name: 'Rubble'}, $in('first_name', ['Fred', 'Wilma', 'Pebbles']))); // SELECT * FROM person // WHERE last_name = 'Rubble' OR first_name IN ('Fred', 'Wilma', 'Pebbles')
sqlsql(str[, values])
The SQL Bricks namespace (saved to the local variable sql in these docs) can be called as a function to insert SQL into SQL Bricks somewhere that a value is expected (the right-hand side of WHERE criteria, or insert()/update() values):
select('*').from('person').where({'billing_addr_id': sql('mailing_addr_id')}) // SELECT * FROM person WHERE billing_addr_id = mailing_addr_id
Multiple values can be passed in as separate arguments or as an array (this example uses the postgres jsonb contains operator, @>):
select().where(sql('field @> $ and field @> $', { key: 'value' }, { key: 'value2' })).toParams() // {"text": "SELECT * WHERE field @> $1 and field @> $2", "values": [{"key": "value"}, {"key": "value2"}]}
Note that numbered params can be used in the literal SQL string and these refer to the position in the current `sql()` call, not the position in the statement as a whole:
select().where({name: 'Fred'}).and(sql('f1 @> $2 and f2 @> $1', [{key: 'value' }, {key: 'value2'}])).toParams() // {"text": "SELECT * WHERE name = $1 AND f1 @> $3 and f2 @> $2", "values": ["Fred", {"key": "value"}, {"key": "value2"}]}
valsql.val(value)
Wraps a value (user-supplied string, number, boolean, etc) so that it can be passed into SQL Bricks anywhere that a column is expected (the left-hand side of WHERE criteria and many other SQL Bricks APIs):
select().from('person').where(sql.val('Fred'), sql('first_name')); // SELECT * FROM person WHERE 'Fred' = first_name
Statement is an abstract base class for all statements (SELECT, INSERT, UPDATE, DELETE) and should never be instantiated directly. It is exposed because it can be used with the instanceof operator to easily determine whether something is a SQL Bricks statement: my_var instanceof Statement.
clonestmt.clone()
Clones a statement so that subsequent modifications do not affect the original statement.
var active_persons = select('*').from('person').where({'active': true}); // SELECT * FROM person WHERE active = TRUE var local_persons = active_persons.clone().where({'local': true}); // SELECT * FROM person WHERE active = TRUE AND local = TRUE
toStringstmt.toString()
Returns the non-parameterized SQL for the statement. This is called implicitly by Javascript when using a Statement anywhere that a string is expected (string concatenation, Array.join(), etc).
While toString() is easy to use, it is not recommended in most cases because:
toParamsstmt.toParams(options)
Returns an object with two properties: a parameterized text string and a values array. The values are populated with anything on the right-hand side of a WHERE criteria, as well as any values passed into an insert() or update() (they can be passed explicitly with val() or opted out of with sql()):
update('person', {'first_name': 'Fred'}).where({'last_name': 'Flintstone'}).toParams(); // {"text": "UPDATE person SET first_name = $1 WHERE last_name = $2", "values": ["Fred", "Flintstone"]}
A placeholder option of '?%d' can be passed to generate placeholders compatible with node-sqlite3 (%d is replaced with the parameter #):
update('person', {'first_name': 'Fred'}).where({'last_name': 'Flintstone'}).toParams({placeholder: '?%d'}); // {"text": "UPDATE person SET first_name = ?1 WHERE last_name = ?2", "values": ["Fred", "Flintstone"]}
Or node-mysql:
update('person', {'first_name': 'Fred'}).where({'last_name': 'Flintstone'}).toParams({placeholder: '?'}); // {"text": "UPDATE person SET first_name = ? WHERE last_name = ?", "values": ["Fred", "Flintstone"]}
constructorselect(columns)
sql.select() returns a new select statement, seeded with a set of columns. It can be used with or without the new keyword. Columns can be passed in here (or appended later via sel.select() or sel.distinct()) via multiple arguments or a comma-delimited string or an array.
If no columns are specified, toString() will default to SELECT *.
selectsel.select(columns)
Appends additional columns to an existing query. Columns can be passed as multiple arguments, a comma-delimited string or an array.
distinctsel.distinct(columns)
Makes the query a SELECT DISTINCT query. For convenience, any columns passed will be appended to the query (they can be passed in the same ways as to select()).
intosel.into(tbl)
Alias: intoTable
Makes the query a SELECT ... INTO query (which creates a new table with the results of the query).
intoTempsel.intoTemp(tbl)
Alias: intoTempTable
Does the same as .into(), but with the addition of the TEMP keyword, making it a temporary table.
fromsel.from(tbls)
Table names can be passed in as multiple string arguments, a comma-delimited string or an array.
join, leftJoin, rightJoin, fullJoin, crossJoin
sel.join(tbl[, onCriteria])
Aliases: innerJoin, leftOuterJoin, rightOuterJoin, fullOuterJoin
Adds the specified join to the query. tbl can include an alias after a space or after the 'AS' keyword ('my_table my_alias'). onCriteria is optional if a joinCriteria function has been supplied.
Note: crossJoin will ignore any onCriteria argument, if supplied.
select().from('person').join('address', {'person.addr_id': 'address.id'}); // SELECT * FROM person INNER JOIN address ON person.addr_id = address.id
onsel.on(onCriteria)
Note: onCriteria can also be passed as the second argument to join.
select('*').from('person').innerJoin('address').on('person.addr_id', 'address.id'); // SELECT * FROM person INNER JOIN address ON person.addr_id = address.id select('*').from('person').join('address').on({'person.addr_id': 'address.id'}); // SELECT * FROM person INNER JOIN address ON person.addr_id = address.id
usingsel.using(columnList)
Joins using USING instead of ON. columnList can be passed in as one or more string arguments, a comma-delimited string, or an array.
select('*').from('person').innerJoin('address').using('address_id'); // SELECT * FROM person INNER JOIN address USING (address_id) select('*').from('person').join('address').using('address_id', 'country_id'); // SELECT * FROM person INNER JOIN address USING (address_id, country_id) select('*').from('person').join('address').using('address_id, country_id'); // SELECT * FROM person INNER JOIN address USING (address_id, country_id) select('*').from('person').join('address').using(['address_id', 'country_id']); // SELECT * FROM person INNER JOIN address USING (address_id, country_id)
Note: columnList can also be passed as the second argument to join - in which case it must be specified as an array of one or more string values.
select('*').from('person').join('address', ['address_id', 'country_id']); // SELECT * FROM person INNER JOIN address USING (address_id, country_id)
naturalJoin, naturalLeftJoin, naturalRightJoin, naturalFullJoin
sel.naturalJoin(tbl)
Aliases: naturalInnerJoin, naturalLeftOuterJoin, naturalRightOuterJoin, naturalFullOuterJoin
Adds the specified natural join to the query. tbl can include an alias after a space or after the 'AS' keyword ('my_table my_alias').
select().from('person').naturalJoin('address'); // SELECT * FROM person NATURAL INNER JOIN address
whereAlias: and
sel.where(column, value)
sel.where(criteria)
sel.where(whereExpr)
sel.where(sql)
Sets or extends the WHERE clause. If there already is a WHERE clause, the new criteria will be added to a top-level AND group.
select('*').from('person').where('first_name', 'Fred'); // SELECT * FROM person WHERE first_name = 'Fred' select('*').from('person').where('last_name', 'Flintstone').and('first_name', 'Fred'); // SELECT * FROM person WHERE last_name = 'Flintstone' AND first_name = 'Fred'
Multiple key/value pairs in a criteria object are ANDed together:
select('*').from('person').where({'last_name': 'Flintstone', 'first_name': 'Fred'}); // SELECT * FROM person WHERE last_name = 'Flintstone' AND first_name = 'Fred'
For nested groupings and for relational operators beyond =, a whereExpr can be passed in:
select('*').from('person').where(or(like('last_name', 'Flint%'), {'first_name': 'Fred'})); // SELECT * FROM person WHERE last_name LIKE 'Flint%' OR first_name = 'Fred'
If necessary, literal SQL can be passed in via sql(str[, values...]):
var last_name = 'Flintstone'; select('*').from('person').where(sql('LTRIM(last_name) = $', last_name)); // SELECT * FROM person WHERE LTRIM(last_name) = 'Flintstone'
groupBysel.groupBy(columns)
Alias: group
Sets or extends the GROUP BY columns. Can take multiple arguments, a single comma-delimited string or an array.
having
sel.having(column, value)
sel.having(criteria)
sel.having(whereExpr)
Sets or extends the HAVING criteria. Like where(), it takes a column / value pair, a criteria object or a whereExpr:
select('city', 'max(temp_lo)').from('weather') .groupBy('city').having(lt('max(temp_lo)', 40)) // SELECT city, max(temp_lo) FROM weather // GROUP BY city HAVING max(temp_lo) < 40
(union, intersect, minus, except)[All]sel.union([stmt, ...])
Creates a compound statement by fusing together two or more queries, returns the last statement. If no stmt is passed, a new select() will be created and returned:
select().from('person').where({'last_name': 'Flintstone'}).union() .select().from('person').where({'last_name': 'Rubble'}); // SELECT * FROM person WHERE last_name = 'Flintstone' UNION // SELECT * FROM person WHERE last_name = 'Rubble'
orderBysel.orderBy(columns)
Alias: order
Sets or extends the list of columns in the ORDER BY clause. Columns can be passed as multiple arguments, a single comma-delimited string or an array.
forUpdate, noWaitsel.forUpdate([tbl, ...]) / sel.noWait()
Add the FOR UPDATE clause to lock all selected records from all tables in the select (or just the tables specified), along with an optional NOWAIT at the end:
select('addr_id').from('person').forUpdate().of('addr_id').noWait(); // SELECT addr_id FROM person FOR UPDATE OF addr_id NOWAIT
constructorAlias: insertInto
insert(tbl[, values])
insert(tbl[, columns])
sql.insert() returns a new INSERT statement. It can be used with or without the new operator.
insert('person', {'first_name': 'Fred', 'last_name': 'Flintstone'}); // INSERT INTO person (first_name, last_name) VALUES ('Fred', 'Flintstone')
It can take a values object or a columns list. Passing a set of columns (as multiple arguments, a comma-delimited string or an array) will put the statement into split keys/values mode, where a matching array of values is expected in values():
insertInto('person', 'first_name', 'last_name').values('Fred', 'Flintstone'); // INSERT INTO person (first_name, last_name) VALUES ('Fred', 'Flintstone')
valuesins.values(values)
values can be an object of key/value pairs or a set of values matching a set of keys passed into insert():
insertInto('person', 'first_name', 'last_name').values('Fred', 'Flintstone'); // INSERT INTO person (first_name, last_name) VALUES ('Fred', 'Flintstone') insertInto('person').values({'first_name': 'Fred', 'last_name': 'Flintstone'}); // INSERT INTO person (first_name, last_name) VALUES ('Fred', 'Flintstone')
values can also be an array of objects or an array of arrays matching a set of keys passed into insert():
insertInto('person', 'first_name', 'last_name').values([['Fred', 'Flintstone'], ['Wilma', 'Flintstone']]); // INSERT INTO person (first_name, last_name) VALUES ('Fred', 'Flintstone'), ('Wilma', 'Flintstone') insertInto('person').values([{'first_name': 'Fred', 'last_name': 'Flintstone'}, {'first_name': 'Wilma', 'last_name': 'Flintstone'}]); // INSERT INTO person (first_name, last_name) VALUES ('Fred', 'Flintstone'), ('Wilma', 'Flintstone')
Note: values can also be passed as the second argument to insert().
selectins.select(columns)
Returns a new SELECT statement that is connected to the INSERT statement, allowing chaining of select methods. When toString() / toParams() is called, it will render them both statements together as an INSERT INTO ... SELECT statement.
Note that if you want to call a method on the insert object, you have to save a reference to it before calling select(), since select() returns a reference to a child Select statement instead of the parent Insert statement.
constructorupdate(tbl[, values])
sql.update() returns a new UPDATE statement. It can be used with or without the new operator.
update('person', {'first_name': 'Fred', 'last_name': 'Flintstone'}); // UPDATE person SET first_name = 'Fred', last_name = 'Flintstone'
setAlias: values
upd.set(column, value)
upd.set(values)
Sets or extends the values of the UPDATE statement with a column, value pair or a values object.
update('person').set('first_name', 'Fred').set('last_name', 'Flintstone'); // UPDATE person SET first_name = 'Fred', last_name = 'Flintstone' update('person').set({'first_name': 'Fred', 'last_name': 'Flintstone'}); // UPDATE person SET first_name = 'Fred', last_name = 'Flintstone'
Note: values can also be passed as the second argument to update().
whereAlias: and
upd.where(column, value)
upd.where(criteria)
upd.where(whereExpr)
Sets or extends the WHERE clause. See select.where() for more details.
constructordelete(tbl)
Alias: deleteFrom
sql.delete() returns a new DELETE statement. It can be used with or without the new operator.
fromdel.from(tbl)
Convenience method to make the delete API match the select API more closely.
usingdel.using(tbl[, ...])
Sets or extends the list of tables in the USING clause. This is DELETE's equivalent of SELECT's multi-table FROM clause.
whereAlias: and
del.where(column, value)
del.where(criteria)
del.where(whereExpr)
Sets or extends the WHERE clause. See select.where() for more details.
Object{ ... }
When a non-expression object is passed somewhere a whereExpression is expected, each key/value pair will be ANDed together:
select().from('person').where({'first_name': 'Fred', 'last_name': 'Flintstone'}); // SELECT * FROM person WHERE first_name = 'Fred' AND last_name = 'Flintstone'
andand(whereExpr[, ...])
Joins the passed expressions with AND
oror(whereExpr[, ...])
 These table aliases can then be used by themselves in from(), join(), etc and SQL Bricks will automatically expand them to include the table name as well as the alias:
sql.aliasExpansions({'psn': 'person', 'addr': 'address', 'zip': 'zipcode', 'usr': 'user'}); select().from('psn').join('addr', {'psn.addr_id': 'addr.id'}); // SELECT * FROM person psn INNER JOIN address addr ON psn.addr_id = addr.id
joinCriteriasql.joinCriteria(func)
Sets a user-supplied function to automatically generate the .on() criteria for joins whenever it is not supplied explicitly:
var alias_expansions = {'psn': 'person', 'addr': 'address', 'zip': 'zipcode', 'usr': 'user'}; var table_to_alias = invert(alias_expansions); sql.joinCriteria(function(left_tbl, left_alias, right_tbl, right_alias) { var criteria = {}; criteria[left_alias + '.' + table_to_alias[right_tbl] + '_id'] = right_alias + '.id'; return criteria; }); select().from('person').join('address'); // SELECT * FROM person INNER JOIN address ON person.addr_id = address.id
The left_tbl passed to the join criteria generator function will always be the most recently used table -- either the most recently joined table or, if there is none, the main table in the statement. If you want to perform a "chain" of joins, where each table joins from the previous one, you can call .join() multiple times, but if you want to join from one table directly to a number of related tables, you can call .join() once and pass the table names in as separate arguments:
select().from('psn').join('addr').join('zip'); // SELECT * FROM person psn // INNER JOIN address addr ON psn.addr_id = addr.id // INNER JOIN zipcode zip ON addr.zip_id = zip.id select().from('psn').join('addr', 'usr'); // SELECT * FROM person psn // INNER JOIN address addr ON psn.addr_id = addr.id // INNER JOIN "user" usr ON psn.usr_id = usr.id
If multiple tables are passed to .join(), the last one is the most recently used one and it will be used as the basis for the next .join():
select().from('psn').join('usr', 'addr').join('zip'); // SELECT * FROM person psn // INNER JOIN "user" usr ON psn.usr_id = usr.id // INNER JOIN address addr ON psn.addr_id = addr.id // INNER JOIN zipcode zip ON addr.zip_id = zip.id
Note that this scheme doesn't support complex JOIN table layouts: if you do something like .join('psn', 'addr').join('zip') above, it is impossible to also join something to the 'psn' table. This could be achieved by adding a way to explicitly specify the table you're joining from: .join('psn', 'addr').join('zip').join('psn->employer'), but this hasn't been implemented.
There are 95 SQL functions defined in SQL-92, including AVG(), COUNT(), MIN(), MAX(), SUM(), COALESCE(), CASE(), LTRIM(), RTRIM(), UPPER() and LOWER(), among others. These can be easily used in SQL Bricks anywhere that a sql string is expected, such as in a SELECT list:
select('COUNT(*)').from('person').where({'access_level': 3}); // SELECT COUNT(*) FROM person WHERE access_level = 3
SQL functions can also be used anywhere a value is expected (in the values for an INSERT or UPDATE or in the right-hand side of a WHERE expression) via wrapping a string in the sql() function:
select().from('person').where({'level_text': sql("CASE WHEN level=1 THEN 'one' WHEN level=2 THEN 'two' ELSE 'other' END")}); // SELECT * FROM person WHERE level_text = // CASE WHEN level=1 THEN 'one' WHEN level=2 THEN 'two' ELSE 'other' END
Note that column names inside SQL functions that collide with SQL keywords will not be automatically escaped -- you have to do it manually, like this:
select('COUNT("order")').from('person'); // SELECT COUNT("order") FROM person
The AS keyword is treated like SQL functions. It can be included in column strings and Sql-Bricks will parse it and handle it properly:
select('person.name AS personname').from('person'); // SELECT person.name AS personname FROM person
This doesn't break automatic column quoting of column names that are reserved words or are capitalized:
select('person.order AS person_order').from('person'); // SELECT person."order" AS person_order FROM person
That said, if you do anything fancier (SQL functions, etc) then you will need to quote any column names that need quoting manually -- SQL-Bricks only provides the auto-quoting convenience for the most common cases.
Before sending a pull request, please verify that all the existing tests pass and add new tests for the changes you are making. The tests can be run in node with npm test (provided npm install has been run to install the dependencies) or they can be run in the browser with browser-tests.html. All of the examples in the documentation are run as tests, in addition to the tests in tests.js.
Note that pull requests for additional SQL dialects or extensions beyond ANSI SQL-92 will probably not be merged. If you would like support for a different dialect, you are welcome to maintain a dialect-specific fork or a library that extends sql-bricks.
Also, pull requests for additional SQL statements beyond the four CRUD statements (SELECT, UPDATE, INSERT, DELETE) will probably not be merged. Other SQL statements do not benefit as much from re-use and composition; the goal being to keep SQL Bricks small, sharp and low-maintenance.
Thanks to Suor for taking over maintenance of the postgres-dialect extension library: sql-bricks-postgres. Thanks to tamarzil for creating and maintaining the mysql-dialect extension library: mysql-bricks
Huge thanks to Brian C for his hard work supporting and maintaining node-sql and node-postgres and especially for his patience with me and my pull requests.
Also, thanks to jashkenas for Underscore.js and its documentation, which served as a model and template for these docs.
SQL Bricks is MIT licensed.


twoBirds API Documentation
twoBirds Example Structure ( incl. requirement loading, use dev tools to inspect DOM and loading sequence )


|
gevent
1.0.0
cross-platform event driven framework (made in cpp)
|
event base with auto reconnection support More...
#include <EventBaseAR.h>
Public Member Functions | |
| GEventBaseWithAutoReconnect (int reconn_min=GEV_RECONNECT_TIMEOUT, int reconn_max=GEV_RECONNECT_TIMEOUT_MAX, int max_retry=GEV_RECONNECT_TRY_MAX) | |
| constructor to init reconnect parameters More... | |
| GEventHandler * | connector () |
| get underline connection handler More... | |
| bool | do_connect (unsigned short port, char const *host="<IP_ADDRESS>", void *arg=nullptr) |
| issue the active connection More... | |
| virtual bool | filter_handler (GEventHandler *h) |
| Public Member Functions inherited from GEventBase | |
| virtual int | mpfd () const |
| virtual bool | post_timer (GEV_PER_TIMER_DATA *gptd) |
| virtual GEventHandler * | create_handler ()=0 |
| return handler for new connection More... | |
| bool | init (int thr_num=-8, int blksize=GEV_MAX_BUF_SIZE) |
| initialize event base More... | |
| bool | listen (unsigned short port, unsigned short backup=10) |
| setup local listener for accept new connection More... | |
| GEventHandler * | connect (unsigned short port, char const *host="<IP_ADDRESS>", GEventHandler *exist_handler=NULL) |
| setup connection to remote server More... | |
| void * | timeout (int due_msec, int period_msec, void *arg, GEventHandler *exist_handler) |
| setup timer for once or periodic More... | |
| bool | cancel_timer (void *tid) |
| cancel timer More... | |
| void | fini () |
| finish the whole thing | |
| void | run () |
| main entry for event loop More... | |
| void | exit (int extra_notify=0) |
| exit event loop More... | |
| void | cleanup () |
| close all the handle and clean event handler | |
| void | disconnect () |
| break all the connections in this event base | |
| int | broadcast (std::string const &msg) |
| notify all the client by sending msg on connections More... | |
| int | foreach (std::function< int(GEventHandler *h, void *arg)> func, void *arg) |
| traverse the handlers and call func for each handler More... | |
Protected Member Functions | |
| virtual void | on_error (GEventHandler *h) |
| virtual bool | on_timeout (GEV_PER_TIMER_DATA *gptd) |
| virtual void | on_connect_break () |
| called when detecting connection breaks More... | |
| virtual bool | on_connected (GEventHandler *app) |
| called when connection established More... | |
| virtual void | on_retry_max (void *arg) |
| called when reconnect retry reach the limit More... | |
| void | do_reconnect (void *arg) |
| doing the dirty work for reconnect More... | |
| Protected Member Functions inherited from GEventBase | |
| virtual bool | on_accept (GEV_PER_HANDLE_DATA *gphd) |
| called when accepting a new connection More... | |
| virtual bool | on_read (GEventHandler *h, GEV_PER_IO_DATA *gpid) |
| called when receiving data on a connection More... | |
Protected Attributes | |
| std::string | m_host |
| unsigned short | m_port |
| GEventHandler * | m_app |
| GEventHandler * | m_htimer |
| void * | m_timer |
| int | m_reconn_min |
| int | m_reconn_max |
| int | m_reconn_curr |
| int | m_retry_max |
| int | m_retry_curr |
| Protected Attributes inherited from GEventBase | |
| volatile bool | m_running = false |
| int | m_thrnum = 0 |
| int | m_blksize = GEV_MAX_BUF_SIZE |
| std::thread_group | m_grp |
| SOCKET | m_listener = INVALID_SOCKET |
| std::recursive_mutex | m_mutex |
| std::mutex | m_tlock |
| std::map< GEV_PER_TIMER_DATA *, GEventHandler * > | m_tmap |
| int | m_mp = -1 |
| int | m_pp [2] |
| std::mutex | m_lock |
| pthread_t | m_leader = -1 |
| std::map< conn_key_t, GEventHandler * > | m_map |
event base with auto reconnection support
| GEventBaseWithAutoReconnect::GEventBaseWithAutoReconnect | ( | int | reconn_min = GEV_RECONNECT_TIMEOUT , |
| int | reconn_max = GEV_RECONNECT_TIMEOUT_MAX , |
||
| int | max_retry = GEV_RECONNECT_TRY_MAX |
||
| ) |
constructor to init reconnect parameters
| reconn_min | minimum time interval to do reconnect |
| reconn_max | maximum time interval to do reconnect |
| max_retry | max retry times, -1 for infinite |
| GEventHandler * GEventBaseWithAutoReconnect::connector | ( | ) |
get underline connection handler
| bool GEventBaseWithAutoReconnect::do_connect | ( | unsigned short | port, |
| char const * | host = "<IP_ADDRESS>" , |
||
| void * | arg = nullptr |
||
| ) |
issue the active connection
| port | server port |
| host | server host |
| arg | user special data |
| true | - connection ok |
| false | - failed |
|
protected |
doing the dirty work for reconnect
| arg | user special data passed in do_connect |
|
virtual |
Reimplemented from GEventBase.
|
protectedvirtual |
called when detecting connection breaks
start the reconnect action at this point
|
protectedvirtual |
called when connection established
| app | handler binding to new connection |
| true | - process ok |
| false | - falied |
do initialize work at this point
|
protectedvirtual |
Reimplemented from GEventBase.
|
protectedvirtual |
called when reconnect retry reach the limit
| arg | user special data passed in do_connect |
|
protectedvirtual |
Reimplemented from GEventBase.
|
protected |
handler for initiative inside connection
|
protected |
host to connect to
|
protected |
timer handler for reconnect
|
protected |
port to connect to
|
protected |
current time interval for reconnect, start from m_reconn_min, grows max to m_reconn_max
|
protected |
maximum time interval for reconnect
|
protected |
minimum time interval for reconnect
|
protected |
current retry times
|
protected |
retry max times for reconnect, -1 unlimited
|
protected |
timer for reconnect


Splitter
Inner splitter / left pane
Resizable and collapsible.
Inner splitter / center pane
Resizable only.
Inner splitter / right pane
Resizable and collapsible.
Outer splitter / middle pane
Resizable only.
Outer splitter / bottom pane
Non-resizable and non-collapsible.


The key motivation factors in the workplace have shifted along generations, from job security to promotions and career evolution. But more recently, even high paychecks and bonuses don’t seem to matter that much for the new generation.
Managing millennials: a new challenge
Indeed, for this new generation, work cannot just be a trivial, down-to-earth activity to make a living. Millennials tend to treat work as an experience, competing with other activities and hobbies. It has to be exciting, fulfilling, rewarding. What’s the point of waking up if it’s just to earn a salary?
As a result, historical incentives don’t work anymore: bonus, promotion, and profit-sharing are unable to motivate employees on their own. Indeed, millennials don’t share their elders’ unbreakable loyalty to their company and can switch easily to a more attractive one – or just leave their job to travel around the world.
In the same time, attracting and retaining the best talents is of strategic importance for companies. As the environment becomes increasingly competitive, key resources are companies’ most valuable asset. And the process of recruiting and training new employees on a specific job can be very costly. So, here are the 4 main drivers to attract, motivate and retain millennial workers.
Drivers that work for the millennial worker
Some say that millennials are not interested in working, are lazy and disobedient. That’s wrong, studies prove that they are, as much as their elders, committed to their work. But they are also sensitive to different incentives. And if companies want to attract and retain the best talents, managers need to adapt to these changes and better understand their drivers:
Empowerment and ownership
It’s not that millennial workers don’t accept hierarchy – on the contrary, they strive for a mentor that would make them learn and grow. But they do want to feel empowered, to own their project and be responsible, for better or for worse. Feeling like the simple executant of a task that was decided outside of them drive millennials crazy – you can be sure that they’ll quickly lose their motivation, hence their productivity.
How is your company organized? Are all decisions taken by the top managers of each branch or do you leave some responsibility to project owners?
Flexibility
What’s the worst for a millennial at work? To feel like in a prison at work. In order to be motivated and efficient, they want to feel free to organize their day as they wish. They may have a look at Facebook to take a break during their work day, and then answer an email from work at night, from their couch.
Millennials also value work-life balance: they want their company to be understanding and flexible about office hours. Arriving later for the late-sleepers or leaving earlier for those who need or want to shouldn’t be a problem. Likewise, millennials really appreciate the freedom to work remotely, at least once in a while.
Is your company more focused on effort or results? Have you implemented a remote-work policy?
A bigger goal
Work shouldn’t be “just” about making a living, it has to be meaningful. Millennials want to adhere to their company’s values and goal. They want to earn a good living while doing work that matters. According to a Deloitte study, millennials feel accountable for many issues worldwide. Opportunities to be involved with “good causes” at the local level provide millennials with a greater feeling of influence – even better if enabled by their employers.
Have you defined company values that go beyond economic profit? Do you take on pro bono missions, actively participate in associations or encourage your employees to do so?
Opportunities to learn and grow
The digital generation is keen on learning and acquiring new competencies. The knowledge acquired during university is no longer sufficient and quickly irrelevant. Wikipedia, MOOCs, online diplomas, videos, serious games… everything works to help the millennials grow.
Managers and human resources would better get up to speed. Having a comprehensive learning and development program makes a difference when it’s time to choose the company to work for – and to stick with.
Have you updated your learning and development programs to better fit the company’s needs? Do you take into account employees’ wishes? How much of your payroll do you spend on learning and development?
New forms of work in the digital economy
In our digital world, not only the motivation drivers have changed, the work itself is evolving. More and more people choose to work remotely, or even go freelance. And the impact on managers is enormous.
Indeed, freelance workers already make up 35% of the US workforce and 24% in Europe – and the numbers keep growing. Who knows where this trend can drive us? Imagine a world where workers are no longer employed by a single company, but provide services for different companies according to the business needs and their competencies. Of course this situation would require some evolutions in terms of freelance security and rights.
In this futuristic world, managers are conductors of a multi-located team of workers. They have to get everyone aligned with the company’s strategic objectives and working towards the same goal, despite their time engagement on the project (a few hours, a few days per week, …). Managers will have to leverage new technologies and communication tools in order to share the company culture and foster a sense of belonging to the company. Understanding individual aspirations and feelings will be crucial to the overall performance of the team.
Managers, be prepared: your job is about to change drastically.
Special thanks to our hipster friends, Tristan Laffontas and Nicolas Noullet, for their feedback on this article.


Last Name
First Name
Address
City
State
Zip/Postal Code
Country
Albania
Bulgaria
Croatia
Denmark
England
Phone(country code, area code, number)
(+
)
E-mail
Birth date
Gender
Male
Female
Starting date
Spring 2015
Summer 2015
Comments/Questions
Submit
Reset


| Class | Description |
|---|---|
| BootServerInformation |
Contains the information for one subset of the BootServers suboption - the
list of servers of a particular type.
|
| DhcpOption |
Represents the data contained in a DHCP option.
|
| DhcpPacketImpl |
Stores all of the data fields of a DHCP packet as specified by https://www.ietf.org/rfc/rfc2131.txt.
|
| DhcpRequestPacketImpl |
An object that represents a DHCP Ack packet.
|
| DiscoverPeerHandler |
Receives a DHCP discover message and sends and offer as reply
|
| PxeMenuPromptSuboption |
Represents the Pxe menu prompt suboption in DHCP option 43.
|
| RequestPeerHandler | |
| VendorOptions |
Represents DHCP option 43, a.k.a.
|
| Enum | Description |
|---|---|
| DhcpOpField |
Contains the Op Code field for the 2 different types of Dhcp Messages: Boot
request (1) and Boot reply (2).
|
| DhcpOptionTag |
Represents different possible values of DHCP option tage.
|
| Exception | Description |
|---|---|
| DhcpOptionDataIncorrectException |
Exception to be thrown when the data in a DHCP option is not the correct
value
|
| DhcpPacketToByteConversionException |
Exception when converting a DHCP packet to bytes.
|
| DhcpTagNotFoundException |
Exception thrown thrown when a DHCP option with a certain tag is not found
|
| PxeDhcpException |
Exception thrown when there is an error PXE booting using the DHCP protocol
|


Welcome to my website. I enjoy taking photos. I aspire to be an artist. I love my dogs.Get a sneakpeak to my life ...
My Dogs
Sheeba is 4 years old.
Max is 2 years old.
My Art Lab
I used to love art ever since I was a baby when I would paint with fingertips. As I grew up, I mastered different skills that helped me become a better artist. Each of the designs is a 3 step process in my lab.
- Imagination
- Photography
- Art
please visit my Gallery


Hello! Welcome to Yak Runner. Yak Runner is a game created by James DiGrazia for IGME-330 (Spring 2018). You can view the GitHub Repository for this project here.


The game took you
0
moves in
0
seconds to finish.
Want to go again?


My iPhone X arrived today.
The ‘automatic’ setup from nearby device thing failed repeatedly, so I proceeded manually. No biggie. Then I couldn’t perform a restore from back up because the X wasn’t on 11.1 yet. Not unusual. So I set the phone up as a new device in order to be able to update iOS so I could then try a restore from backup.
I’ve been here before.
But then I can’t open the Settings app.
Nor any app.
I try 3D pressing, and the menus come up but don’t work. I try VoiceOver - but still no apps will launch. I try Siri - but there’s no Siri from the side button. The ‘lock’ screen is black. I can’t get Control Center to show.
Gotta reboot, right? Well, that doesn’t work, either. I double-check the web for how to power down an iPhone X. Yep, I’m doing it right, but it is not working.
I call Apple Support (getting the IMEI off the box since I can’t get into Settings). Only a short wait. They are a little stymied because initially they keep wanting me to check Settings. Ha.
Then they suggest a technique that was new to me: Volume Up 1x, then Volume Down 1x, then hold (only) the power button for 20+ seconds.
It didn’t work the first time, either. But it did the second time! \o/


We often use ‘centralisation’ and ‘decentralisation’ as black and white. One or the other. The reality
is it’s a range. Neither is ideal in an
extreme form. This exhibit encourages you to explore that by clicking on the two buttons above. At what
point would you say the visuals are ‘centralised’? Or ‘decentralised’? Can you identify the line between the
two? How easy is it move from one
extreme to another?
We centralise to make our life more predictable and cooperative. We are able to come together as
nations,
brand Multi-national corporations, and exchange ideas across the world. We also become more structured,
unified and less flexible. Fewer people make the more important decisions, and decisions are made slower
So we decentralise to make our life more varied and flexible. We adapt to our environment. We become
more locally aware. More people make the important decisions and they are made faster. We develop unique
cultures and also become less predictable, and more chaotic.
it’s alright if everything went off screen for too long. We can't always predict what will happen, so
@vishwanath95


Hierarch Kekropus:
Since we were created by the Giants, not the gods, we stand outside the natural order of things as established by the gods.
Although individually our powers do not compare to those of the gods, we can nevertheless harm them -- just as a poisoned needle can
slay the mightiest beast. But is that the totality of our purpose? Were we simply manufactured as living weapons?
(Stares silently into space.)
Wait.


Assessment Questions Answered You Scored Congratulations! You Passed View your newly acquired Certificate A score of at least is required to pass this course.


Try out our Premium Member services: Virtual Legal Assistant, Query Alert Service and an ad-free experience. Free for one month and pay only if you like it.
SCA/1739/2012 1/ 1 ORDER IN THE HIGH COURT OF GUJARAT AT AHMEDABAD SPECIAL CIVIL APPLICATION No. 1739 of 2012 ========================================================= INDIANA CHEMPORT & 1 - Petitioner(s) Versus GOVERNMENT OF GUJARAT THRO SECRETARY & 2 - Respondent(s) ========================================================= Appearance : NANAVATI ASSOCIATES for Petitioner(s) : 1 - 2. MS SHRUTI PATHAK, LD.ASST.GOVERNMENT PLEADER for Respondent(s) : 1, MR RITURAJ M MEENA for Respondent(s) : 2, ========================================================= CORAM : HONOURABLE THE CHIEF JUSTICE MR.BHASKAR BHATTACHARYA and HONOURABLE MR.JUSTICE J.B.PARDIWALA Date : 11/09/2012 ORAL ORDER
(Per : HONOURABLE THE CHIEF JUSTICE MR.BHASKAR BHATTACHARYA) In this Special Civil Application the petitioner has challenged an order of closure passed by the Gujarat Pollution Control Board under Section 33(A) of the Water (Prevention and Control of Pollution) Act, 1974.
In view of the decision of the Supreme Court dated August 09, 2012 passed in Writ Petition (C) No.50 of 1998 with I.A. Nos.62-63 of 2011 in Civil Appeal Nos.3187-3188 of 1988, this matter should be transferred to the Green Tribunal as indicated in paragraphs 38 and 39 of the said order.
The office is directed to take appropriate steps for transfer.
(Bhaskar Bhattacharya, Chief Justice) (J.B.
Pardiwala, J.) Aakar


|
inlinestatic |
============================================================================
CSL_CPINTC_clearSysInterrupt
Description
This API clear the system interrupt in the interrupt controller.
Arguments
hnd This is the handle to the CPINTC instance. sysIntr System Interrupt which is to be cleared.
Return Value None
Pre Condition
CSL_CPINTC_open() must be called.
Post Condition
The specific system interrupt has been serviced and is cleared.
Writes
CPINTC_STATUS_CLR_INDEX_REG_STATUS_CLR_INDEX
Example
CSL_CPINTCSystemInterrupt sysIntr; CSL_CPINTC_HANDLE hnd; ... hnd = CSL_CPINTC_open (0); // Opens CPINTC Instance 0 ... CSL_CPINTC_clearSysInterrupt (hnd, sysIntr); ...
|
inlinestatic |
============================================================================
CSL_CPINTC_disableAllHostInterrupt
Description
This API disables all the Host Interrupts in the system.
Arguments
hnd This is the handle to the CPINTC instance.
Return Value None
Pre Condition
CSL_CPINTC_open() must be called.
Post Condition
All host interrupts are disabled in the system.
Writes
CPINTC_GLOBAL_ENABLE_HINT_REG_ENABLE_HINT_ANY=0
Example
CSL_CPINTC_HANDLE hnd; ... hnd = CSL_CPINTC_open (0); // Opens CPINTC Instance 0 ... CSL_CPINTC_disableAllHostInterrupt (hnd); ...
|
inlinestatic |
============================================================================
CSL_CPINTCdisableHostInterrupt
Description
This API disables the host interrupt in the interrupt controller.
Arguments
hnd This is the handle to the CPINTC instance. sysIntr Host Interrupt which is to be disabled.
Return Value None
Pre Condition
CSL_CPINTC_open() must be called.
Post Condition
The specific Host Interrupt is enabled in the controller and can now generate host interrupts.
Writes
CPINTC_HINT_ENABLE_CLR_INDEX_REG_HINT_ENABLE_CLR_INDEX
Example
CSL_CPINTCHostInterrupt hostIntr; CSL_CPINTC_HANDLE hnd; ... hnd = CSL_CPINTC_open (0); // Opens CPINTC Instance 0 ... CSL_CPINTCdisableHostInterrupt (hnd, hostIntr); ...
|
inlinestatic |
============================================================================
CSL_CPINTC_disableSysInterrupt
Description
This API disables the system interrupt in the interrupt controller.
Arguments
hnd This is the handle to the CPINTC instance. sysIntr System Interrupt which is to be disabled.
Return Value None
Pre Condition
CSL_CPINTC_open() must be called.
Post Condition
The specific System Interrupt is disabled in the controller and cannot generate host interrupts.
Writes
CPINTC_ENABLE_CLR_INDEX_REG_ENABLE_CLR_INDEX
Example
CSL_CPINTCSystemInterrupt sysIntr; CSL_CPINTC_HANDLE hnd; ... hnd = CSL_CPINTC_open (0); // Opens CPINTC Instance 0 ... CSL_CPINTC_disableSysInterrupt (hnd, sysIntr); ...
|
inlinestatic |
============================================================================
CSL_CPINTC_enableAllHostInterrupt
Description
This API enables all the Host Interrupts in the system.
Arguments
hnd This is the handle to the CPINTC instance.
Return Value None
Pre Condition
CSL_CPINTC_open() must be called.
Post Condition
All host interrupts are enabled in the system. Individual Host interrupts are still enabled/disabled from their individual registers
Writes
CPINTC_GLOBAL_ENABLE_HINT_REG_ENABLE_HINT_ANY=1
Example
CSL_CPINTC_HANDLE hnd; ... hnd = CSL_CPINTC_open (0); // Opens CPINTC Instance 0 ... CSL_CPINTC_enableAllHostInterrupt (hnd); ...
|
inlinestatic |
============================================================================
CSL_CPINTC_enableHostInterrupt
Description
This API enables the host interrupt in the interrupt controller.
Arguments
hnd This is the handle to the CPINTC instance. sysIntr Host Interrupt which is to be enabled.
Return Value None
Pre Condition
CSL_CPINTC_open() must be called.
Post Condition
The specific Host Interrupt is enabled in the controller and can now generate host interrupts.
Writes
CPINTC_HINT_ENABLE_SET_INDEX_REG_HINT_ENABLE_SET_INDEX
Example
CSL_CPINTCHostInterrupt hostIntr; CSL_CPINTC_HANDLE hnd; ... hnd = CSL_CPINTC_open (0); // Opens CPINTC Instance 0 ... CSL_CPINTC_enableHostInterrupt (hnd, hostIntr); ...
|
inlinestatic |
============================================================================
CSL_CPINTC_enableSysInterrupt
Description
This API enables the system interrupt in the interrupt controller.
Arguments
hnd This is the handle to the CPINTC instance. sysIntr System Interrupt which is to be enabled.
Return Value None
Pre Condition
CSL_CPINTC_open() must be called.
Post Condition
The specific System Interrupt is enabled in the controller and can now generate host interrupts.
Writes
CPINTC_ENABLE_SET_INDEX_REG_ENABLE_SET_INDEX
Example
CSL_CPINTCSystemInterrupt sysIntr; CSL_CPINTC_HANDLE hnd; ... hnd = CSL_CPINTC_open (0); // Opens CPINTC Instance 0 ... CSL_CPINTC_enableSysInterrupt (hnd, sysIntr); ...
|
inlinestatic |
============================================================================
CSL_CPINTC_getNestingLevel
Description
This API gets the current nesting level which is configured in the interrupt controller.
Arguments
hnd This is the handle to the CPINTC instance.
Return Value CSL_CPINTCNestingLevel - Current Nesting Level.
Pre Condition
CSL_CPINTC_open() must be called.
Post Condition
None
Reads
CPINTC_GLB_NEST_LEVEL_REG_GLB_NEST_LEVEL
Example
CSL_CPINTC_HANDLE hnd; CSL_CPINTCNestingLevel nestLevel; ... hnd = CSL_CPINTC_open (0); // Opens CPINTC Instance 0 ... nestLevel = CSL_CPINTC_getNestingLevel();
|
inlinestatic |
============================================================================
CSL_CPINTC_getNestingMode
Description
This API gets the current nesting mode which is configured in the interrupt controller.
Arguments
hnd This is the handle to the CPINTC instance.
Return Value CSL_CPINTCNestingMode - Current Nesting Mode.
Pre Condition
CSL_CPINTC_open() must be called.
Post Condition
None
Reads
CPINTC_CONTROL_REG_NEST_MODE
Example
CSL_CPINTC_HANDLE hnd; CSL_CPINTCNestingMode nestMode; ... hnd = CSL_CPINTC_open (0); // Opens CPINTC Instance 0 ... nestMode = CSL_CPINTC_getNestingMode();
|
inlinestatic |
============================================================================
CSL_CPINTC_getPendingHostInterrupt
Description
This API gets the current highest priority pending interrupt for a given host. This API should only be called after checking if there are pending interrupts using the 'CSL_CPINTCisHostInterruptPending'.
Arguments
hnd This is the handle to the CPINTC instance. hostIntr This is the specific host interrupt output.
Return Value CSL_CPINTCSystemInterrupt - Highest Priority System Interrupt.
Pre Condition
CSL_CPINTC_open() must be called.
Post Condition
None
Reads
CPINTC_PRI_HINT_REG0_PRI_HINT_0..CPINTC_PRI_HINT_REG255_PRI_HINT_255
Example
CSL_CPINTCSystemInterrupt intr; Bool pendingStatus; CSL_CPINTC_HANDLE hnd; CSL_CPINTCHostInterrupt host; ... hnd = CSL_CPINTC_open (0); // Opens CPINTC Instance 0 ... pendingStatus = CSL_CPINTC_isHostInterruptPending(hnd, host); if (pendingStatus == TRUE) { intr = CSL_CPINTC_getPendingHostInterrupt(hnd, host); } ...
|
inlinestatic |
============================================================================
CSL_CPINTC_getPendingInterrupt
Description
This API gets the current highest priority pending interrupt. This API should only be called after checking if there are pending interrupts using the 'CSL_CPINTCisInterruptPending'.
Arguments
hnd This is the handle to the CPINTC instance.
Return Value CSL_CPINTCHostInterrupt - Highest Priority System Interrupt.
Pre Condition
CSL_CPINTC_open() must be called.
Post Condition
None
Reads
CPINTC_GLB_PRI_INTR_REG_GLB_PRI_INTR
Example
CSL_CPINTCHostInterrupt intr; Bool pendingStatus; CSL_CPINTC_HANDLE hnd; ... hnd = CSL_CPINTC_open (0); // Opens CPINTC Instance 0 ... pendingStatus = CSL_CPINTC_isInterruptPending(hnd); if (pendingStatus == TRUE) { intr = CSL_CPINTC_getPendingInterrupt(hnd); } ...
|
inlinestatic |
============================================================================
CSL_CPINTC_getRawInterruptStatus
Description
The function is used to get the contents of the RAW Interrupt status register.
Arguments
hnd This is the handle to the CPINTC instance. index RAW Status Index register which is to be read rawStatus RAW Status which indicates which interrupts are pending.
Return Value
None
Pre Condition
CSL_CPINTC_open() must be called.
Post Condition
None
Reads
CPINTC_RAW_STATUS_REG
Example
CSL_CPINTC_HANDLE hnd; Uint32 rawStatus; ... hnd = CSL_CPINTC_open (0); // Opens CPINTC Instance 0 ... // Check if there are any interrupts between 0-31 pending. CSL_CPINTC_getRawInterruptStatus(hnd, 0, &rawStatus); if (rawStatus != 0) { // An Interrupt from 0-31 is pending. } ...
|
inlinestatic |
============================================================================
CSL_CPINTC_isHostInterruptPending
Description
This API is used to check if there are any pending interrupts active for a particular host.
Arguments
hnd This is the handle to the CPINTC instance. hostIntr This is the specific host interrupt output.
Return Value TRUE - Interrupts are pending. FALSE - No interrupts are pending.
Pre Condition
CSL_CPINTC_open() must be called.
Post Condition
None
Reads
CPINTC_PRI_HINT_REG0_NONE_HINT_0..CPINTC_PRI_HINT_REG255_NONE_HINT_255
Example
Bool pendingStatus; CSL_CPINTC_HANDLE hnd; CSL_CPINTCHostInterrupt host; ... hnd = CSL_CPINTC_open (0); // Opens CPINTC Instance 0 ... pendingStatus = CSL_CPINTC_isHostInterruptPending(hnd, host); ...
|
inlinestatic |
============================================================================
CSL_CPINTC_isInterruptPending
Description
This API is used to check if there are any pending interrupts active in the system or not.
Arguments
hnd This is the handle to the CPINTC instance.
Return Value TRUE - Interrupts are pending. FALSE - No interrupts are pending.
Pre Condition
CSL_CPINTC_open() must be called.
Post Condition
None
Reads
CPINTC_GLB_PRI_INTR_REG_GLB_NONE
Example
Bool pendingStatus; CSL_CPINTC_HANDLE hnd; ... hnd = CSL_CPINTC_open (0); // Opens CPINTC Instance 0 ... pendingStatus = CSL_CPINTCisInterruptPending(hnd); ...
|
inlinestatic |
============================================================================
CSL_CPINTC_mapChannelToHostInterrupt
Description
This API is used to map the channel to the host interrupt.
Arguments
hnd This is the handle to the CPINTC instance. channel Channel Number to be mapped sysIntr Host Interrupt to which the channel is mapped to.
Return Value None
Pre Condition
CSL_CPINTC_open() must be called.
Post Condition
None
Writes
CPINTC_HINT_MAP_REG0_HINT_MAP_0..CPINTC_HINT_MAP_REG49_HINT_MAP_196
Example
CSL_CPINTCHostInterrupt hostIntr; CSL_CPINTCChannel channel; CSL_CPINTC_HANDLE hnd; ... hnd = CSL_CPINTC_open (0); // Opens CPINTC Instance 0 ... CSL_CPINTC_mapChannelToHostInterrupt(hnd, channel, hostIntr); ...
|
inlinestatic |
============================================================================
CSL_CPINTC_mapSystemIntrToChannel
Description
This API is used to map a system interrupt to a specific channel.
Arguments
hnd This is the handle to the CPINTC instance. sysIntr System Interrupt which is to be mapped channel Channel Number to which the interrupt is to be mapped.
Return Value None
Pre Condition
CSL_CPINTC_open() must be called.
Post Condition
None
Writes
CPINTC_CH_MAP_REG0_CH_MAP_0..CPINTC_CH_MAP_REG49_CH_MAP_196
Example
CSL_CPINTCSystemInterrupt sysIntr; CSL_CPINTCChannel channel; CSL_CPINTC_HANDLE hnd; ... hnd = CSL_CPINTC_open (0); // Opens CPINTC Instance 0 ... CSL_CPINTC_mapSystemIntrToChannel(hnd, sysIntr, channel); ...
|
inlinestatic |
============================================================================
CSL_CPINTC_setNestingLevel
Description
This API overrides the Interrupt Controller global nesting level that is set by automatic nesting mode
Arguments
hnd This is the handle to the CPINTC instance. nestLevel Nesting Level to be configured
Return Value None
Pre Condition
CSL_CPINTC_open() must be called.
Post Condition
The interrupt controller is configured to use the specified nesting level.
Writes
CPINTC_GLB_NEST_LEVEL_REG_GLB_NEST_LEVEL
Example
CSL_CPINTCNestingLevel nestLevel; CSL_CPINTC_HANDLE hnd; ... hnd = CSL_CPINTC_open (0); // Opens CPINTC Instance 0 ... CSL_CPINTC_setNestingLevel (hnd, nestLevel); ...
|
inlinestatic |
============================================================================
CSL_CPINTC_setNestingMode
Description
This API configures the Interrupt Controller nesting mode.
Arguments
hnd This is the handle to the CPINTC instance. nestMode Nesting Mode to be configured
Return Value None
Pre Condition
CSL_CPINTC_open() must be called.
Post Condition
The interrupt controller is configured to use the specified nesting mode.
Writes
CPINTC_CONTROL_REG_NEST_MODE
Example
CSL_CPINTCNestingMode nestMode; CSL_CPINTC_HANDLE hnd; ... hnd = CSL_CPINTC_open (0); // Opens CPINTC Instance 0 ... CSL_CPINTC_setNestingMode (hnd, nestMode); ...


Make sure you're using a browser which supports WebUSB (at the time of writing, only Chrome and new Edge) and plug your phone into this computer.
Paste in the desired boot URL below and click the button, once you give permission to access your phone the Pebble app will be installed and set up for Rebble


jquery-addthis
List of Tool Examples
AddThis
Documentation
Test Results
AddThis jQuery Plugin Example Site
Tool Example 9
image sharing tool with new images on page
Images via
The Cat Api
Share buttons will only appear on images that are at least 200px by 200px. The images used below are random. Some may not be big enough to have share buttons.
Add Another Image


$page->title($inst_name." Events Calendar: Search Results") ->navbar_image('title-calendar') ->breadcrumbs("Search Results"); $page->content_begin(); ?>
There were no results returned.
"); } else if ($num_events == 1) { echo("" . htmlspecialchars($num_events) . " match found:
"); } else if ($num_events < 50) { echo("" . htmlspecialchars($num_events) . " matches were found:
"); } else { echo("You may need to refine your search. The first 50 matches found:
"); } ?>


I am a first year computer science and engineering student at the University of California, Los Angeles.
Classes that I have taken so far are: Computer Science 1 (Seminar), Computer Science 31 (Introduction to Computer Science), Math 32A (Multivariable Calculus), and EPSS3 (Astrobiology).
Classes that I am currently taking are: Computer Science 32 (Introduction to Computer Science), Math 32B (Multivariable Calculus), Physics 1A (Mechanics), and Hist 13B (American History).
Aside from classes that I am taking at college, I am working on multiple projects on the side from freeCodeCamp.
I have experience with Java, HTML, CSS, Bootstrap, jQuery, and I am currently learning C++ and Javascript.


Materia
Enter your email address you've registered with you. We'll send you reset link to that address.
Email Id
Reset


WITNESS LIST Intergovernmental Relations Committee May 19, 2003 - 8:30A HB 249 FOR: James, Dwain Executive Director (American Collectors Association of Texas), Austin, TX Registering, but not testifying: For: Rodriguez, Jennifer Attorney (County and District Clerks Association of Texas), Austin, TX HB 722 Registering, but not testifying: For: Garza, Comm. Angel County Commissioner Zapata Co. (Zapata County), San Ygnacio, TX Garza, Norberto Comm. Pct. of Zapata County (Zapata County), Zapata, TX Uribe, Hector Attorney/Consultant (Zapata County Commissioners Court), Austin, TX HB 1108 Registering, but not testifying: For: Carlton, John Attorney (Texas State Assoc. of Fire and Emergency Districts), Austin, TX Medez, Mark Assistant County Administrator (Tarrant County Commissioners Court), Fort Worth, TX HB 1675 FOR: Blackwood, Susan Executive Director (San Antonio Sports Foundation), San Antonio, TX HB 1773 Registering, but not testifying: For: Agamalian, Brandon Manager of Government Relations (City of Fort Worth), Fort Worth, TX Mintz, David Dir. of Govet. Affairs (Texas Apartment Association), Austin, TX HB 2043 Registering, but not testifying: For: Marshall, John Chief Appraiser (Tarrant Appraisal Dist.), Fort Worth, TX Robinson, Jim Chief Appraiser, Harris CAD (Legislative Committee, Texas Assn. of Appraisal Dists.), Houston, TX HB 2147 Registering, but not testifying: For: Marshall, John Cheif Appraiser (Tarrant Appraisal) Robinson, Jim Chief Appraiser, Harris CAD (Legislative Committee, Texas Assn. of Appraisal Dists.), Houston, TX HB 2159 ON: Sinclair, David Game Warden (Texas Parks and Wildlife), Austin, TX HB 2386 Registering, but not testifying: For: Agamalian, Brandon Manager of Govt. Relations (City of Fort Worth), Fort Worth, TX HB 2466 FOR: Akins, Thomas City Attorney (The City of Denison), Denison, TX McGraw, Alan Attorney (Self), Round Rock, TX Registering, but not testifying: For: Brown, Gary Real Estate Developer (Self), Austin, TX Against: Agamalian, Brandon Manager of Govt. Relations (City of Fort Worth), Fort Worth, TX HB 2924 FOR: Agamalian, Brandon Manager of Govt. Relations (City of Fort Worth), Fort Worth, TX HB 3232 Registering, but not testifying: For: Agamalian, Brandon Manager of Govt. Relations (City of Fort Worth), Fort Worth, TX Mintz, David Director of Govt. Affairs (Texas Apartment Association), Austin, TX


This topic describes the various region shortcuts you can use to configure Geode regions.
LOCAL
Description
A region configured with the LOCAL region shortcut is scoped only to its JVM and is not visible to other peer members. The region does not distribute data and operations to other caches.
Default Attributes
Region Attributes
| scope: | local |
| data-policy: | NORMAL |
gfsh Command Example
gfsh>create region --name=myLOCALregion --type=LOCAL
gfsh>describe region --name=myLOCALregion
..........................................................
Name : myLOCALregion
Data Policy : normal
Hosting Members : server1
server2
Non-Default Attributes Shared By Hosting Members
Type | Name | Value
------ | ----------- | ------
Region | data-policy | NORMAL
| size | 0
XML Definition of LOCAL
<region name="myLOCALregion">
<region-attributes scope="local"/>
</region>
LOCAL_HEAP_LRU
Description
A region configured with the LOCAL_HEAP_LRU region shortcut is scoped to its JVM and is not visible to other peer members. The region does not distribute data and operations to other caches. The region destroys the least recently used entries when it detects that the JVM is running low on memory.
Default Attributes
Region Attributes
| scope: | local |
| data-policy: | NORMAL |
Eviction Attributes
| eviction-algorithm: | lru-heap-percentage |
| eviction-action: | local-destroy |
gfsh Command Example
gfsh>create region --name=myLHLregion --type=LOCAL_HEAP_LRU
gfsh>describe region --name=myLHLregion
...........................................................
Name : myLHLregion
Data Policy : normal
Hosting Members : server1
server2
Non-Default Attributes Shared By Hosting Members
Type | Name | Value
-------- | ------------------ | -------------------
Region | data-policy | NORMAL
| size | 0
Eviction | eviction-algorithm | lru-heap-percentage
| eviction-action | local-destroy
XML Definition of LOCAL_HEAP_LRU
<region name="myLHLregion">
<region-attributes
scope="local">
<eviction-attributes>
<lru-heap-percentage
action="local-destroy">
<class-name>
org.apache.geode.internal.size.SizeClassOnceObjectSizer
</class-name>
</lru-heap-percentage>
</eviction-attributes>
</region-attributes>
</region>
LOCAL_OVERFLOW
Description
A region configured with the LOCAL_OVERFLOW region shortcut is scoped only to its JVM and is not visible to other peer members. The region does not distribute data and operations to other caches. The region moves the values of entries to disk when it detects that the JVM is running low on memory.
Default Attributes
Region Attributes
| scope: | local |
| data-policy: | NORMAL |
Eviction Attributes
| eviction-algorithm: | lru-heap-percentage |
| eviction-action: | overflow-to-disk |
gfsh Command Example
gfsh>create region --name=myLOregion --type=LOCAL_OVERFLOW
gfsh>describe region --name=myLOregion
...........................................................
Name : myLOregion
Data Policy : normal
Hosting Members : server1
server2
Non-Default Attributes Shared By Hosting Members
Type | Name | Value
-------- | ------------------ | -------------------
Region | data-policy | NORMAL
| size | 0
Eviction | eviction-algorithm | lru-heap-percentage
| eviction-action | overflow-to-disk
XML Definition of LOCAL_OVERFLOW
<region name="myLOregion">
<region-attributes
scope="local">
<eviction-attributes>
<lru-heap-percentage
action="overflow-to-disk"/>
</eviction-attributes>
</region-attributes>
</region>
LOCAL_PERSISTENT
Description
A region configured with the LOCAL_PERSISTENT region shortcut is scoped to its JVM and is not visible to other peer members. The region does not distribute data and operations to other caches. The region writes its state to disk and can recover that state when the member restarts.
Default Attributes
Region Attributes
| scope: | local |
| data-policy: | PERSISTENT_REPLICATE |
gfsh Command Example
gfsh>create region --name=myLPregion --type=LOCAL_PERSISTENT
Member | Status
------- | -----------------------------------------
server2 | Region "/myLPregion" created on "server2"
server1 | Region "/myLPregion" created on "server1"
gfsh>describe region --name=myLPregion
..........................................................
Name : myLPregion
Data Policy : persistent replicate
Hosting Members : server1
server2
Non-Default Attributes Shared By Hosting Members
Type | Name | Value
------ | ---- | -----
Region | size | 0
XML Definition of LOCAL_PERSISTENT
<region name="myLPregion">
<region-attributes
scope="local"
data-policy="persistent-replicate"/>
</region>
LOCAL_PERSISTENT_OVERFLOW
Description
A region configured with the LOCAL_PERSISTENT_OVERFLOW region shortcut is scoped to its JVM and is not visible to other peer members. The region does not distribute data and operations to other caches. The region writes its state to disk and can recover that state when the member restarts. The region also removes the values of entries from memory when it detects that the JVM is running low on memory.
Default Attributes
Region Attributes
| scope: | local |
| data-policy: | PERSISTENT_REPLICATE |
Eviction Attributes
| eviction-algorithm: | lru-heap-percentage |
| eviction-action: | overflow-to-disk |
gfsh Command Example
gfsh>create region --name=myLPOregion --type=LOCAL_PERSISTENT_OVERFLOW
Member | Status
------- | ------------------------------------------
server1 | Region "/myLPOregion" created on "server1"
server2 | Region "/myLPOregion" created on "server2"
gfsh>describe region --name=myLPOregion
...........................................................
Name : myLPOregion
Data Policy : persistent replicate
Hosting Members : server1
server2
Non-Default Attributes Shared By Hosting Members
Type | Name | Value
-------- | ------------------ | -------------------
Region | size | 0
Eviction | eviction-algorithm | lru-heap-percentage
| eviction-action | overflow-to-disk
XML Definition of LOCAL_PERSISTENT_OVERFLOW
<region name="myLPOregion">
<region-attributes
scope="local"
data-policy="persistent-replicate">
<eviction-attributes>
<lru-heap-percentage
action="overflow-to-disk"/>
</eviction-attributes>
</region-attributes>
</region>
PARTITION
Description
A region configured with the PARTITION region shortcut is partitioned across each peer member that created the region.
Default Attributes
Region Attributes
| data-policy: | PARTITION |
gfsh Command Example
gfsh>create region --name=myPregion --type=PARTITION
Member | Status
------- | ----------------------------------------
server1 | Region "/myPregion" created on "server1"
server2 | Region "/myPregion" created on "server2"
gfsh>describe region --name=myPregion
..........................................................
Name : myPregion
Data Policy : partition
Hosting Members : server1
server2
Non-Default Attributes Shared By Hosting Members
Type | Name | Value
------ | ---- | -----
Region | size | 0
XML Definition of PARTITION
<region name="myPregion">
<region-attributes
data-policy="partition"/>
</region>
PARTITION_HEAP_LRU
Description
A region configured with PARTITION_HEAP_LRU is partitioned across each peer member that created the region. The region destroys entries when it detects that the JVM is running low on memory.
Default Attributes
Region Attributes
| data-policy: | PARTITION |
Eviction Attributes
| eviction-algorithm: | lru-heap-percentage |
| eviction-action: | local-destroy |
gfsh Command Example
gfsh>create region --name=myPHLregion --type=PARTITION_HEAP_LRU
Member | Status
------- | ------------------------------------------
server1 | Region "/myPHLregion" created on "server1"
server2 | Region "/myPHLregion" created on "server2"
gfsh>describe region --name=myPHLregion
...........................................................
Name : myPHLregion
Data Policy : partition
Hosting Members : server1
server2
Non-Default Attributes Shared By Hosting Members
Type | Name | Value
-------- | ------------------ | -------------------
Region | size | 0
Eviction | eviction-algorithm | lru-heap-percentage
| eviction-action | local-destroy
XML Definition of PARTITION_HEAP_LRU
<region name="myPHLregion">
<region-attributes
data-policy="partition">
<eviction-attributes>
<lru-heap-percentage
action="local-destroy">
<class-name>org.apache.geode.internal.size.SizeClassOnceObjectSizer</class-name>
</lru-heap-percentage>
</eviction-attributes>
</region-attributes>
</region>
PARTITION_OVERFLOW
Description
A region configured with the PARTITION_OVERFLOW region shortcut has state that is partitioned across each peer member that creates the region. The region moves the values of entries to disk when it detects that the JVM is running low on memory.
Default Attributes
Region Attributes
| data-policy: | PARTITION |
Eviction Attributes
| eviction-algorithm: | lru-heap-percentage |
| eviction-action: | overflow-to-disk |
gfsh Command Example
gfsh>create region --name=myPOregion --type=PARTITION_OVERFLOW
Member | Status
------- | -----------------------------------------
server1 | Region "/myPOregion" created on "server1"
server2 | Region "/myPOregion" created on "server2"
gfsh>describe region --name=myPOregion
...........................................................
Name : myPOregion
Data Policy : partition
Hosting Members : server1
server2
Non-Default Attributes Shared By Hosting Members
Type | Name | Value
-------- | ------------------ | -------------------
Region | size | 0
Eviction | eviction-algorithm | lru-heap-percentage
| eviction-action | overflow-to-disk
XML Definition of PARTITION_OVERFLOW
<region name="myPOregion">
<region-attributes
data-policy="partition">
<eviction-attributes>
<lru-heap-percentage
action="overflow-to-disk"/>
</eviction-attributes>
</region-attributes>
</region>
PARTITION_PERSISTENT
Description
A region configured with the PARTITION_PERSISTENT region shortcut has state that is partitioned across each peer member that creates the region. The region writes its state to disk and can recover that state when the member restarts.
Default Attributes
Region Attributes
| data-policy: | PERSISTENT_PARTITION |
gfsh Command Example
gfsh>create region --name=myPPregion --type=PARTITION_PERSISTENT
Member | Status
------- | -----------------------------------------
server1 | Region "/myPPregion" created on "server1"
server2 | Region "/myPPregion" created on "server2"
gfsh>describe region --name=myPPregion
..........................................................
Name : myPPregion
Data Policy : persistent partition
Hosting Members : server1
server2
Non-Default Attributes Shared By Hosting Members
Type | Name | Value
------ | ---- | -----
Region | size | 0
XML Definition of PARTITION_PERSISTENT
<region name="myPPregion">
<region-attributes
data-policy="persistent-partition"/>
</region>
PARTITION_PERSISTENT_OVERFLOW
Description
A region configured with the PARTITION_PERSISTENT_OVERFLOW region shortcut has state that is partitioned across each peer member that creates the region. The region writes its state to disk and can recover that state when the member restarts. The region removes the values of entries from memory when it detects that the JVM is running low on memory.
Default Attributes
Region Attributes
| data-policy: | PERSISTENT_PARTITION |
Eviction Attributes
| eviction-algorithm: | lru-heap-percentage |
| eviction-action: | overflow-to-disk |
gfsh Command Example
gfsh>create region --name=myPPOregion --type=PARTITION_PERSISTENT_OVERFLOW
Member | Status
------- | ------------------------------------------
server2 | Region "/myPPOregion" created on "server2"
server1 | Region "/myPPOregion" created on "server1"
gfsh>describe region --name=myPPOregion
...........................................................
Name : myPPOregion
Data Policy : persistent partition
Hosting Members : server1
server2
Non-Default Attributes Shared By Hosting Members
Type | Name | Value
-------- | ------------------ | -------------------
Region | size | 0
Eviction | eviction-algorithm | lru-heap-percentage
| eviction-action | overflow-to-disk
XML Definition of PARTITION_PERSISTENT_OVERFLOW
<region name="myPPOregion">
<region-attributes
data-policy="persistent-partition">
<eviction-attributes>
<lru-heap-percentage
action="overflow-to-disk"/>
</eviction-attributes>
</region-attributes>
</region>
PARTITION_PROXY
Description
A region configured with the PARTITION_PROXY region shortcut has no local state and forwards all operations to a peer region configured with the PARTITION shortcut or a peer region configured with the PARTITION_PERSISTENT shortcut.
Default Attributes
Region Attributes
| data-policy: | PARTITION |
Partition Attributes
| local-max-memory: | 0 |
gfsh Command Example
gfsh>create region --name=myPPXYregion --type=PARTITION_PROXY
Member | Status
------- | -------------------------------------------
server1 | Region "/myPPXYregion" created on "server1"
server2 | Region "/myPPXYregion" created on "server2"
gfsh>describe region --name=myPPXYregion
...........................................................
Name : myPPXYregion
Data Policy : partition
Accessor Members : server1
server2
Non-Default Attributes Shared By Accessor Members
Type | Name | Value
--------- | ---------------- | -----
Region | size | 0
Partition | local-max-memory | 0
XML Definition of PARTITION_PROXY
<region name="myPPXYregion">
<region-attributes
data-policy="partition">
<partition-attributes
local-max-memory="0"/>
</region-attributes>
</region>
PARTITION_PROXY_REDUNDANT
Description
A region configured with the PARTITION_PROXY_REDUNDANT region shortcut has no local state and forwards all operations to a peer region configured with the PARTITION_REDUNDANT shortcut or a peer region configured with the PARTITION_REDUNDANT_PERSISTENT shortcut.
Default Attributes
Region Attributes
| data-policy: | PARTITION |
Partition Attributes
| redundant-copies: | 1 |
| local-max-memory | 0 |
gfsh Command Example
gfsh>create region --name=myPPRregion --type=PARTITION_PROXY_REDUNDANT
Member | Status
------- | ------------------------------------------
server1 | Region "/myPPRregion" created on "server1"
server2 | Region "/myPPRregion" created on "server2"
gfsh>describe region --name=myPPRregion
...........................................................
Name : myPPRregion
Data Policy : partition
Accessor Members : server1
server2
Non-Default Attributes Shared By Accessor Members
Type | Name | Value
--------- | ---------------- | -----
Region | size | 0
Partition | redundant-copies | 1
| local-max-memory | 0
XML Definition of PARTITION_PROXY_REDUNDANT
<region name="myPPRregion">
<region-attributes
data-policy="partition">
<partition-attributes
redundant-copies="1"
local-max-memory="0"/>
</region-attributes>
</region>
PARTITION_REDUNDANT
Description
A region configured with the PARTITION_REDUNDANT region shortcut has state that is partitioned across each peer member that creates the region. The region maintains an extra copy of the data in memory.
Default Attributes
Region Attributes
| data-policy: | PARTITION |
Partition Attributes
| redundant-copies: | 1 |
gfsh Command Example
gfsh>create region --name=myPRregion --type=PARTITION_REDUNDANT
Member | Status
------- | -----------------------------------------
server1 | Region "/myPRregion" created on "server1"
server2 | Region "/myPRregion" created on "server2"
gfsh>describe region --name=myPRregion
..........................................................
Name : myPRregion
Data Policy : partition
Hosting Members : server1
server2
Non-Default Attributes Shared By Hosting Members
Type | Name | Value
--------- | ---------------- | -----
Region | size | 0
Partition | redundant-copies | 1
XML Definition of PARTITION_REDUNDANT
<region name="myPRregion">
<region-attributes
data-policy="partition">
<partition-attributes
redundant-copies="1"/>
</region-attributes>
</region>
PARTITION_REDUNDANT_HEAP_LRU
Description
A region configured with the PARTITION_REDUNDANT_HEAP_LRU region shortcut has state that is partitioned across each peer member that creates the region. The region keeps an extra copy of the data in memory. The region destroys entries when it detects that the JVM is running low on memory.
Default Attributes
Region Attributes
| data-policy: | PARTITION |
Eviction Attributes
| eviction-algorithm: | lru-heap-percentage |
| eviction-action: | local-destroy |
Partition Attributes
| redundant-copies: | 1 |
gfsh Command Example
gfsh>create region --name=myPRHLregion --type=PARTITION_REDUNDANT_HEAP_LRU
Member | Status
------- | -------------------------------------------
server1 | Region "/myPRHLregion" created on "server1"
server2 | Region "/myPRHLregion" created on "server2"
gfsh>describe region --name=myPRHLregion
...........................................................
Name : myPRHLregion
Data Policy : partition
Hosting Members : server1
server2
Non-Default Attributes Shared By Hosting Members
Type | Name | Value
--------- | ------------------ | -------------------
Region | size | 0
Eviction | eviction-algorithm | lru-heap-percentage
| eviction-action | local-destroy
Partition | redundant-copies | 1
XML Definition of PARTITION_REDUNDANT_HEAP_LRU
<region name="myPRHLregion">
<region-attributes
data-policy="partition">
<partition-attributes redundant-copies="1"/>
<eviction-attributes>
<lru-heap-percentage action="local-destroy">
<class-name>
org.apache.geode.internal.size.SizeClassOnceObjectSizer
</class-name>
</lru-heap-percentage>
</eviction-attributes>
</region-attributes>
</region>
PARTITION_REDUNDANT_OVERFLOW
Description
A region configured with the PARTITION_REDUNDANT_OVERFLOW region shortcut has state that is partitioned across each peer member that creates the region. The region keeps an extra copy of the data in memory. The region moves the values of entries to disk when it detects that the JVM is running low on memory.
Default Attributes
Region Attributes
| data-policy: | PARTITION |
Eviction Attributes
| eviction-algorithm: | lru-heap-percentage |
| eviction-action: | overflow-to-disk |
Partition Attributes
| redundant-copies: | 1 |
gfsh Command Example
gfsh>create region --name=myPROregion --type=PARTITION_REDUNDANT_OVERFLOW
Member | Status
------- | ------------------------------------------
server2 | Region "/myPROregion" created on "server2"
server1 | Region "/myPROregion" created on "server1"
gfsh>describe region --name=myPROregion
...........................................................
Name : myPROregion
Data Policy : partition
Hosting Members : server1
server2
Non-Default Attributes Shared By Hosting Members
Type | Name | Value
--------- | ------------------ | -------------------
Region | size | 0
Eviction | eviction-algorithm | lru-heap-percentage
| eviction-action | overflow-to-disk
Partition | redundant-copies | 1
XML Definition of PARTITION_REDUNDANT_OVERFLOW
<region name="myPROregion">
<region-attributes
data-policy="partition">
<partition-attributes
redundant-copies="1"/>
<eviction-attributes>
<lru-heap-percentage
action="overflow-to-disk"/>
</eviction-attributes>
</region-attributes>
</region>
PARTITION_REDUNDANT_PERSISTENT
Description
A region configured with the PARTITION_REDUNDANT_PERSISTENT region shortcut has state that is partitioned across each peer member that creates the region. The region writes its state to disk and recovers its state from disk when the region is created. The region maintains an extra copy of the data in memory.
Default Attributes
Region Attributes
| data-policy: | PERSISTENT_PARTITION |
Partition Attributes
| redundant-copies: | 1 |
gfsh Command Example
gfsh>create region --name=myPRPregion --type=PARTITION_REDUNDANT_PERSISTENT
Member | Status
------- | ------------------------------------------
server2 | Region "/myPRPregion" created on "server2"
server1 | Region "/myPRPregion" created on "server1"
gfsh>describe region --name=myPRPregion
..........................................................
Name : myPRPregion
Data Policy : persistent partition
Hosting Members : server1
server2
Non-Default Attributes Shared By Hosting Members
Type | Name | Value
--------- | ---------------- | -----
Region | size | 0
Partition | redundant-copies | 1
XML Definition of PARTITION_REDUNDANT_PERSISTENT
<region name="myPRPregion">
<region-attributes
data-policy="persistent-partition">
<partition-attributes
redundant-copies="1"/>
</region-attributes>
</region>
PARTITION_REDUNDANT_PERSISTENT_OVERFLOW
Description
A region configured with the PARTITION_REDUNDANT_PERSISTENT_OVERFLOW region shortcut has state that is partitioned across each peer member that creates the region. The region writes its state to disk and recovers its state from disk when the region is created. The region maintains an extra copy of the data in memory. The region removes the values of entries from memory when it detects that the JVM is running out of memory.
Default Attributes
Region Attributes
| data-policy: | PERSISTENT_PARTITION |
Eviction Attributes
| eviction-algorithm: | lru-heap-percentage |
| eviction-action: | overflow-to-disk |
Partition Attributes
| redundant-copies: | 1 |
gfsh Command Example
create region --name=myPRPOregion --type=PARTITION_REDUNDANT_PERSISTENT_OVERFLOW
describe region --name=myPRPOregion
...........................................................
Name : myPRPOregion
Data Policy : persistent partition
Hosting Members : server1
server2
Non-Default Attributes Shared By Hosting Members
Type | Name | Value
--------- | ------------------ | -------------------
Region | size | 0
Eviction | eviction-algorithm | lru-heap-percentage
| eviction-action | overflow-to-disk
Partition | redundant-copies | 1
XML Definition of PARTITION_REDUNDANT_PERSISTENT_OVERFLOW
<region name="myPRPOregion">
<region-attributes
data-policy="persistent-partition">
<partition-attributes
redundant-copies="1"/>
<eviction-attributes>
<lru-heap-percentage
action="overflow-to-disk"/>
</eviction-attributes>
</region-attributes>
</region>
REPLICATE
Description
A region configured with the REPLICATE region shortcut has local state that is kept in sync with all other peer regions configured with a REPLICATE data policy.
Default Attributes
Region Attributes
| scope: | distributed-ack |
| data-policy: | REPLICATE |
gfsh Command Example
gfsh>create region --name=myRregion --type=REPLICATE
REPLICATE REPLICATE_PERSISTENT REPLICATE_OVERFLOW
REPLICATE_PERSISTENT_OVERFLOW REPLICATE_HEAP_LRU REPLICATE_PROXY
gfsh>create region --name=myRregion --type=REPLICATE
Member | Status
------- | ----------------------------------------
server1 | Region "/myRregion" created on "server1"
server2 | Region "/myRregion" created on "server2"
XML Definition of REPLICATE
<region name="myRregion">
<region-attributes
scope="distributed-ack"
data-policy="replicate"/>
</region>
REPLICATE_HEAP_LRU
Description
A region configured with the REPLICATE_HEAP_LRU region shortcut has local state that is kept in sync with all other peer regions configured with a REPLICATE data policy. The region destroys entries when it detects that the JVM is running low on memory.
Note:
Normally, you cannot have a local-destroy
eviction policy on replicated regions. However, the REPLICATE_HEAP_LRU region is not the same as other replicated regions. This region is preloaded and remains in synch by registering interest in the keys of its peer’s replicated regions.
Default Attributes
Region Attributes
| scope: | distributed-ack |
| data-policy: | PRELOADED |
Eviction Attributes
| eviction-algorithm: | lru-heap-percentage |
| eviction-action: | local-destroy
Note:
Normally, you cannot have a |
| interest-policy: | all |
gfsh Command Example
gfsh>create region --name=myRHLregion --type=REPLICATE_HEAP_LRU
Member | Status
------- | -------------------------------------------
server1 | Region "/myRHLregion2" created on "server1"
server2 | Region "/myRHLregion2" created on "server2"
gfsh>describe region --name=myRHLregion
...........................................................
Name : myRHLregion
Data Policy : preloaded
Hosting Members : server1
server2
Non-Default Attributes Shared By Hosting Members
Type | Name | Value
-------- | ------------------ | -------------------
Region | size | 0
Eviction | eviction-algorithm | lru-heap-percentage
| eviction-action | local-destroy
XML Definition of REPLICATE_HEAP_LRU
<region name="myRHLregion">
<region-attributes
scope="distributed-ack"
data-policy="preloaded">
<subscription-attributes
interest-policy="all"/>
<eviction-attributes>
<lru-heap-percentage
action="local-destroy">
<class-name>org.apache.geode.internal.size.SizeClassOnceObjectSizer</class-name>
</lru-heap-percentage>
</eviction-attributes>
</region-attributes>
</region>
REPLICATE_OVERFLOW
Description
A region configured with the REPLICATE_OVERFLOW region shortcut has local state that is kept in sync with all other peer regions configured with a REPLICATE data policy.
Default Attributes
Region Attributes
| scope: | distributed-ack |
| data-policy: | REPLICATE |
Eviction Attributes
| eviction-algorithm: | lru-heap-percentage |
| eviction-action: | overflow-to-disk |
gfsh Command Example
gfsh>create region --name=myROregion --type=REPLICATE_OVERFLOW
Member | Status
------- | -----------------------------------------
server2 | Region "/myROregion" created on "server2"
server1 | Region "/myROregion" created on "server1"
gfsh>describe region --name=myROregion
...........................................................
Name : myROregion
Data Policy : replicate
Hosting Members : server1
server2
Non-Default Attributes Shared By Hosting Members
Type | Name | Value
-------- | ------------------ | -------------------
Region | size | 0
Eviction | eviction-algorithm | lru-heap-percentage
| eviction-action | overflow-to-disk
XML Definition of REPLICATE_OVERFLOW
<region name="myROregion">
<region-attributes
scope="distributed-ack"
data-policy="replicate">
<eviction-attributes>
<lru-heap-percentage
action="overflow-to-disk"/>
</eviction-attributes>
</region-attributes>
</region>
REPLICATE_PERSISTENT
Description
A region configured with the REPLICATE_PERSISTENT region shortcut has local state that is kept in sync with all other peer regions that are configured with a REPLICATE data policy. The region writes its state to disk and recovers that state when the member restarts.
Default Attributes
Region Attributes
| scope: | distributed-ack |
| data-policy: | PERSISTENT_REPLICATE |
gfsh Command Example
gfsh>create region --name=myRPregion --type=REPLICATE_PERSISTENT
Member | Status
------- | -----------------------------------------
server2 | Region "/myRPregion" created on "server2"
server1 | Region "/myRPregion" created on "server1"
gfsh>describe region --name=myRPregion
..........................................................
Name : myRPregion
Data Policy : persistent replicate
Hosting Members : server1
server2
Non-Default Attributes Shared By Hosting Members
Type | Name | Value
------ | ---- | -----
Region | size | 0
XML Definition of REPLICATE_PERSISTENT
<region name="myRPregion">
<region-attributes
scope="distributed-ack"
data-policy="empty"/>
</region>
REPLICATE_PERSISTENT_OVERFLOW
Description
A region configured with the REPLICATE_PERSISTENT_OVERFLOW region shortcut has local state that is kept in sync with all other peer regions configured with a REPLICATE data policy. The region writes its state to disk and recovers that state when the member restarts. The region removes the values of entries from memory when it detects that the JVM is running low on memory.
Default Attributes
Region Attributes
| scope: | distributed-ack |
| data-policy: | PERSISTENT_REPLICATE |
Eviction Attributes
| eviction-algorithm: | lru-heap-percentage |
| eviction-action: | overflow-to-disk |
gfsh Command Example
gfsh>create region --name=myRPOregion --type=REPLICATE_PERSISTENT
REPLICATE_PERSISTENT REPLICATE_PERSISTENT_OVERFLOW
gfsh>create region --name=myRPOregion --type=REPLICATE_PERSISTENT_OVERFLOW
Member | Status
------- | ------------------------------------------
server1 | Region "/myRPOregion" created on "server1"
server2 | Region "/myRPOregion" created on "server2"
gfsh>describe region --name=myRPOregion
...........................................................
Name : myRPOregion
Data Policy : persistent replicate
Hosting Members : server1
server2
Non-Default Attributes Shared By Hosting Members
Type | Name | Value
-------- | ------------------ | -------------------
Region | size | 0
Eviction | eviction-algorithm | lru-heap-percentage
| eviction-action | overflow-to-disk
XML Definition of REPLICATE_PERSISTENT_OVERFLOW
<region name="myRPOregion">
<region-attributes
scope="distributed-ack"
data-policy="persistent-replicate">
<eviction-attributes>
<lru-heap-percentage
action="overflow-to-disk"/>
</eviction-attributes>
</region-attributes>
</region>
REPLICATE_PROXY
Description
A region configured with the REPLICATE_PROXY region shortcut has no local state and forwards all operations to a peer region configured with the REPLICATE or REPLICATE_PERSISTENT region shortcut.
Default Attributes
Region Attributes
| scope: | distributed-ack |
| data-policy: | EMPTY |
gfsh Command Example
gfsh>create region --name=myRPXYregion --type=REPLICATE_PROXY
Member | Status
------- | -------------------------------------------
server1 | Region "/myRPXYregion" created on "server1"
server2 | Region "/myRPXYregion" created on "server2"
gfsh>describe region --name=myRPXYregion
...........................................................
Name : myRPXYregion
Data Policy : empty
Accessor Members : server1
server2
Non-Default Attributes Shared By Accessor Members
Type | Name | Value
------ | ---- | -----
Region | size | 0
XML Definition of REPLICATE_PROXY
<region name="myRPXYregion">
<region-attributes
scope="distributed-ack"
data-policy="empty"/>
</region>


Invalid file type. The signed URL is good for only one file type. Example being a zip file.
The senders did not setup the bucket correctly. If you are getting a forbidden error this could be why. Tell the account owner to setup CORS.
The link expired. Ask the sender to setup another.


Most creative endeavors are considered “projects” – an individual or collaborative enterprise that is carefully planned to achieve a particular aim (Oxford Dictionaries. Retrieved 6 Sep 2017). To be honest, I’ve never had to look up the word ‘project’ till I had to justify my use of it in this case, and noticing it now, it’s interesting that they use the words “carefully planned” in the definition. How do you “carefully plan” a project – where do you start?
We software engineers have a ton of principles, guidelines, and frameworks to give some structure to what is otherwise a very messy task. I found this out in my second year as a computer science major when I took the introductory module to software engineering. This is the Software Development Life Cycle (SDLC) that we were taught in this module, the waterfall model:
In the analysis stage, our task is to figure out the requirements of the project. In the module, we were to build a task manager software, like a to-do list or planner. The pictures below show how we listed requirements for the project.
I remember leaving the module thinking that software designers had an incredibly difficult job indeed. Our project for this semester was easy, straightforward, simple. Task managing software are a dime a dozen in the market. For people creating more elaborate or novel software, I couldn’t imagine how anyone could know everything from the get-go, how they would know what to look out for, what to plan for.
In short, I believed that to develop software well, one would have to have everything planned out from the start.
Enter my next project:
At the end of that year, I joined an ongoing photography project called The Photo Thing. Because this project had been through several exhibitions already, I felt that the project was rather stable – the steps we had to take were obvious, and we just had to execute each step to see the project to completion. The steps are shown below. Notice that the theme written here is really vague. The poster pictured next shows the theme we eventually decided upon.
Not only did the theme change, but where we once said “no mixing categories”, we now also allowed people to tag their submissions as both “practical and important”.
How did the project change so much given my initial impression that the project’s goals were pretty much fixed and predefined? Here is a page of my personal notes from the discussions that we had over the project’s re-conception.
The next iteration was to be funded by the SG50 Celebratory Fund, which funds projects which “raise awareness of Singaporean identity” and “engage the community”. Because the platform we would be given was larger, the audience for the project changed. Where once it used to be small, dedicated groups of people (NUS students, regular art gallery-goers, USP), now we had to cater to the much larger, more general audience, people in Singapore.
We thought about the goals of an “average” person in Singapore (rectangle, bottom right). We failed, naturally, but we realized that in doing so we were thinking about practicality and importance, and the difference between those things. So we decided to provide these two categories, hoping to engage conversation about what practicality and importance meant to Singaporeans.
Because The Photo Thing had to change because of its audience, I came to question what I knew about software engineering as well:
How can software development be so straightforward, if software is something used by people? Users provide complaints or feedback to the software, changing the way it works, or the way it needs to be implemented. Requirements change. What do we do?
The Waterfall SDLC is not the only one out there! Later, I learnt to work within the Agile methodology (pictured left). By repeating the cycle in short bursts, the method allows developers to continuously and incrementally improve their product.
This way, requirements can be adapted and changed based on feedback gathered through development and from users.
However - it is not a panacea! It may seem now, as it did to me upon finishing a project where we utilized it, that the Agile methodology is The Solution for all software designers. But, if I had used it for the task manager, it would have been unnecessary work. The Waterfall model worked fine; why revisit the requirements? The task remains for me (or the software designer) to assess the type of project and the situation in which the project is being developed to decide on what kind of process might be the best fit.
In writing this post, I realized that the only points of reference I had regarding the design decisions of The Photo Thing were (1) the notebook scrap shown earlier and (2) my (waning) memory. On the other hand, I had plenty of documentation to work with for the software engineering projects. It made me wonder: If The Photo Thing were to continue under a different team, how many of those design decisions would be overlooked and forgotten?
The blog-post detailing “The Method” was a good example of institutional memory that was documented and available for reference. For creative endeavours, blogs are a good way to document the progress and updates to your project. For example, in the blog of the game World of Goo, the thought process in the midst of development is communicated. And since our blog fell out of use – perhaps “meta-documentation” specifying roles and responsibilities throughout iterations would help.


Firmware Stuff
Flashing the Firmware¶
To flash the firmware, you must first have the GrovePi library/repository installed so for this you must follow the Getting Started guide.
Once the library is installed on the Raspberry Pi, run the following commands to have the firmware flashed onto the GrovePi:
cd ~/Dexter/GrovePi/Firmware
bash firmware_update.sh
This updates you to the latest version of the firmware which is the 1.4.0
.
NOTE TO OTHER LIBRARIES
Because the 1.3.0
firmware was recently released, lots of other libraries written in other languages other than Python are yet to be updated, so
they need to run on an older version of the firmware, specifically the 1.2.7
.
The 1.2.7
version can be found in ~/Dexter/GrovePi/Firmware/Archive
as grove_pi_v1_2_7.cpp.hex
. If you need to run on this older version, follow these steps to burn the firmware:
mv ~/Dexter/GrovePi/Firmware/grove_pi_firmware.hex ~/Dexter/GrovePi/Firmware/grove_pi_v1_3_0.hex.bak cp ~/Dexter/GrovePi/Firmware/Archive/grove_pi_v1_2_7.cpp.hex ~/Dexter/GrovePi/Firmware/grove_pi_firmware.hex bash firmware_update.sh
Running Tests¶
To run the entire suite of tests for the GrovePi follow these bash instructions:
cd ~/Dexter/GrovePi/Troubleshooting
sudo bash all_tests.sh
At the end of this process you'll get a log.txt
file on your Desktop at ~/Desktop/log.txt
.
Also, to see with which version of the firmware the library installed on the Raspberry Pi works with you can go to ~/Dexter/GrovePi
directory and run:
python grovepi.py
This should output a version number (of the GrovePi's firmware). Older versions of the firmware (<=v1.2.7
) won't get displayed when calling python grovepi.py
.
pi@raspberrypi:~ $ python grovepi.py
library supports this fw versions: 1.4.0
To see which is the version of the current firmware loaded on the GrovePi you can either run the above test (... all_test.sh
) from the Troubleshooting/
directory or you can run these commands:
import grovepi print(grovepi.version())
There are also cases when the GrovePi doesn't respond to requests. In this situation, you would normally see an exception appearing in Python. More often than not, these can be the source of problems:
- A non-present firmware on the GrovePi.
- A mismatch of versions between the firmware and the library on the Raspberry Pi.
In both of these situations, re-flashing the firmware is all it's needed.
Building the Firmware¶
There may be cases where additional modification to the firmware is required to accommodate someone's particular requirements. In this case, building the firmware and then uploading it is crucial. During our production, we use PlatformIO along with Atom IDE.
Once you get them both installed on your machine, open Atom IDE and add as a project the /Firmware/Source/grovepi
directory. The added directory will have the following structure:
lib/
src/
.gitignore
.travis.yml
extra_script.py
platformio.ini
Next, click on the build button or use ALT-CTRL-B key combination to build the firmware with PlatformIO. Once that it's done, head over to /Firmware/Source/grovepi/.pioenvs/grovepi
directory and notice the firmware.hex
. That's the firmware that was just built. You can then burn that to your GrovePi.
Resetting the GrovePi¶
To reset the GrovePi from your Raspberry Pi, run the following command provided you have installed the GrovePi library on your image:
avrdude -c gpio -p m328p


fun predict(): PredictResult
Predicts the foreground on the input image.
Return PredictResult value of type int.


--- layout: archive title: Zulip Chat Archive permalink: /stream/113488-general/topic/killing.20easy.20nat.20goal.html ---
Faced with ∀ n, 2 * nat.succ (n) = nat.succ (2 * n + 1)
I find that simp or ring don't seem to be able to do it. Even intro n, simp [nat.succ_eq_add_one,mul_add,one_add_one_eq_two]
doesn't work. I can use simp and then ring!
intro n, suffices : 2 + 2 * n = 1 + (1 + 2 * n), simp [nat.succ_eq_add_one,mul_add,this], ring
meh
Isn't there a lemma saying it suffices to prove this in Z, and then ring does it?
Interesting! What would that lemma look like?
From a mathematician perspective, the lemma says the inclusion of N into Z is injective
Insert words like coercion or cast
and get the CS version
I don't have a computer with Lean where I am right now
Fortunately I think ring seems to work on nat, faced with ring operations like + or *
ah! So the injectivity of coe
plus the distributivity over +, * and succ would do it. That is really nice
One issue is that ring would rather see n + 1
than nat.succ n
to coerce into Z you'll need nat.cast_add
, nat.cast_mul
, nat.cast_one
I would assume that ↑(succ n) = ↑n + 1
would be a simp rule so succ
would disappear
Have you tried rfl? 2succ n := 2n + 2 := succ(2*n+1), maybe rw add_comm or mul_comm first?
There should be a tactic doing that for any equality in nat which would immediately follow from ring in int
without any preliminary rw
I'm sure Simon is already writing it
I sneezed so you wrote the above before I could get started
Have you tried rfl? 2succ n := 2n + 2 := succ(2*n+1), maybe rw add_comm or mul_comm first?
Aah! I tried refl before intro n and it failed, but after intro n it succeeds.
Thanks.
Chris, I'm doing the exercises here:
https://softwarefoundations.cis.upenn.edu/lf-current/Basics.html
I did a bit of scripting and then tried to find what fails and I found that this works:
example (n : ℕ) : 2 * nat.succ (n) = nat.succ (2 * n + 1) := begin ring, end
Why doesn't it work for you?
because I had "forall n" in front of it :-/
Maybe ring
should start with intros
Last updated: Apr 24 2020 at 19:02 UTC


MEC APP PACKAGES
Name
Version
Designer
Operational State
Onboarding State
test1
v0.1
Nextworks
ENABLED
ONBOARDED
test2
v0.1
Nextworks
ENABLED
ONBOARDED