FoxORM ORM - API Documentation
Multi-Databases Registry
Bases instanciation
The Bases class is a map registry for multiple databases.
You can make a new one with regular "new" keyword or use the singleton defined
in Facade API class B.
use FoxORM\Bases;
$bases = new Bases();
use FoxORM\F;
$bases = F::getBases();
Bases options
The Bases object can be configured to set the default config of the databases.
Each database, and even each table, can be configured independently
and overload the default config.
If you keep the default config for primary key you can make a database which
will be compatible with RedBeanPHP strict convention.
//The followings showed parameters are the defaults
$bases->setModelClassPrefix('EntityModel\\');
$bases->setModelClassDefault('stdClass');
$bases->setPrimaryKeyDefault('id');
$bases->setUniqTextKeyDefault('uniq');
//append an other prefix for entity class lookup
$bases->appendModelClassPrefix($modelClassPrefix);
//prepend an other prefix for entity class lookup
$bases->prependModelClassPrefix($modelClassPrefix);
//enable output of queries
$bases->debug(true);
Bases definitions
The Bases object can be used like an array with magic acessor. The "0" index
is the main database and default one used by Facade API.
For relational databases, you can define your dsn like a regular dsn or
with assiocative keys.
The frozen parameter tell FoxORM to not modify this database structure anymore
to feet the request. It's to enable when you won't modify the schema and
you want optimizations on production server.
Set databases:
$bases[0] = [
'type'=>'mysql',
'host'=>'localhost',
'port'=>'3306',
'name'=>'my_db_name',
'primaryKey'=>'id',
'uniqTextKey'=>'name',
'tablePrefix'=>'mydb_',
//'frozen'=>true,
];
$bases['my_sqlite_base'] = [
'dsn'=>'sqlite:'.REDCAT_CWD.'.data/db.sqlite',
];
$bases['my_sqlite_base2'] = [
'type'=>'sqlite',
'file'=>REDCAT_CWD.'.data/db2.sqlite',
];
$bases['my_mariadb_base'] = [
'mysql:dbname=test', //dsn
'root', //user
'root', //password
];
$bases['my_postgres_base'] = [
'dsn'=>'pgsql:dbname=test;host=<IP_ADDRESS>;port=5432',
'user'=>'postgres',
'password'=>'postgres',
];
When you access databases offset, the Bases object return you
the configured DataSource Object instead of config array.
Access databases:
$base = $bases[0];
$table = $base->getAll('SELECT * FROM test_table');
Database Methods
The Database is an extended class of DataSource which the name correspond to the type of database. The basic persistence workflow, called CRUD, can be accessed from diffrent API levels: Static Facade, Database Object, Table Object.
create
You can pass arguments to "create" in various way but if you pass it
a data set which have allready a primary key defined and if that primary key
allready exists in database table, the create will process an update instead
an insert.
$user = new stdClass; //or any other class
$user->name = 'Jo';
$base->create('user',$user);
$user = new stdClass; //or any other class
$user->_type = 'user';
$user->name = 'Jo';
$base->create($user);
$base->create('user',[
'name'=>'Jo',
]);
$base->create([
'_type'=>'user',
'name'=>'Jo',
]);
/*
if you don't pass explicitly the type and
if the "_type" meta attribute is not defined
the type will be deducted using the class name and
the "modelClassPrefix" (by default " EntityModel\ "),
if it cannot be deduct an Exception will be throwed.
*/
$user = new \EntityModel\User;
$user->name = 'Jo';
$base->create($user);
read
If you pass a string instead of an integer as second argument to "read",
tha base will not try to lookup data by primary key but by "uniqTextKey".
The default "uniqTextKey" is "uniq" but it can be configured on
table like in the example.
$user = $base->read('user',1);
$base['user']->setUniqTextKey('email');
$user = $base->read('user','jo@surikat.pro');
update
Like with create, you can pass arguments to "update" in various way
but if you pass it a data set which don't have a primary key or a "uniqTextKey"
defined the update will process an insert instead of update.
$user = new stdClass; //or any other class
$user->id = 1;
$user->name = 'Jo';
$user->mtime = time();
$base->update('user',$user);
$user = new stdClass; //or any other class
$user->_type = 'user';
$user->id = 1;
$user->name = 'Jo';
$user->mtime = time();
$base->update($user);
$base->update('user',[
'id'=>1,
'name'=>'Jo',
'mtime'=>time(),
]);
$base->update([
'_type'=>'user',
'id'=>1,
'name'=>'Jo',
'mtime'=>time(),
]);
/*
if you don't pass explicitly the type and
if the "_type" meta attribute is not defined
the type will be deducted using the class name and
the "modelClassPrefix" (by default " EntityModel\ "),
if it cannot be deduct an Exception will be thrown.
*/
$user = new \EntityModel\User;
$user->name = 'Jo';
$base->update($user);
delete
You can pass arguments to "delete" in various way.
$base->delete('user',1);
$base->delete([
'_type'=>'user',
'id'=>1
]);
$base['user']->setUniqTextKey('email');
$base->delete('user','jo@surikat.pro');
/*
if you don't pass explicitly the type and
if the "_type" meta attribute is not defined
the type will be deducted using the class name and
the "modelClassPrefix" (by default " EntityModel\ "),
if it cannot be deduct an Exception will be thrown.
*/
$user = new \EntityModel\User;
$user->id = 1;
$user->name = 'Jo';
$base->delete($user);
one2manyDelete
Will delete all row of a table owned by another row and with a keeping
optional parameter.
$keeping = [1,2,3]; //history id
$base->one2manyDelete($user,'history',$keeping);
many2manyDelete
Will delete all row of a table owned by another row and with a keeping
optional parameter.
$keeping = [1,2,3]; //history id
// many to many relation table between user and history,
// by default null, according to alphabetical order
// it will implicit the join table will be history_user
$via = null;
$base->one2manyDelete($user,'history',$via,$keeping);
entityFactory
The entityFactory method will create an object corresponding to type name
looking for a class corresponding to type name in "modelClassPrefix",
and if this class is not found it will use the "entityClassDefault"
(by default "stdClass"). The entity factory will add the "_type" meta
property to the instancied object.
$user = $base->entityFactory('user');
setEntityFactory
You can overload the entityFactory method using setEntityFactory.
$base->setEntityFactory(function($type)use($base){
$c = $base->findModelClass($type);
$row = new $c;
$row->callSomething();
return $row;
});
put
The put method will determine automatically if a "create" or an "update" is needed, you can use it exactly like theses two methods.
snippet
Some database offers a support for snippet extracting around
searched terms from full text search, like sqlite or postgresql. But
for those lacking this feature, here is a common snippet extractor.
$base->snippet($text,$searchedTerms,$tokens=15,$start='',$end='',$sep=' ... ');
Relational Database Methods
getAll
The getAll method allow you to fetch all rows from a query.
$rows = $base->getAll('SELECT * FROM user WHERE status = ? LIMIT 10', [ $status ]);
foreach($rows as $row){
echo $row->email."\n";
}
getRow
The getRow method allow you to fetch a specific row from a query.
$row = $base->getRow('SELECT * FROM user WHERE id = ?', [ 1 ]);
$email = $row->email;
getCol
The getCol method allow you to fetch a specific column from a query.
$col = $base->getCol('SELECT email FROM user WHERE status = ?', [ $status ]);
foreach($col as $email){
}
getCell
The getCell method allow you to fetch a specific cell from a query.
$email = $base->getCell('SELECT id FROM user WHERE email = ?', [ $email ]);
execute
The execute method allow you execute a query.
$base->execute('INSERT INTO user(name, email) VALUES( ?, ? )', [ $name, $email ] );
$affectedRows = $base->execute('UPDATE user SET email = ? WHERE id = ?', [ $email, $id ] );
fetch
The fetch method allow you direct access to a cursor from a query,
so you get each row in a loop and don't overflow your php memory usage while
traversing a whole table for example.
while($row = $base->fetch('SELECT * FROM user WHERE id != 1', [ $id ])){
}
begin
The begin method open a transaction.
FoxORM support nested transactions, using "SAVEPOINT",
with no extra code needed.
Be carefull with transaction when the database is not "frozen",
because the queries which altering the schema will do implicit commit
in some databases like MySQL or Oracle. There is some workaround, with
a secondary PDO object, that make rollback possible but not
for the structuring queries.
$base->begin();
commit
The commit method validate and end a transaction.
$base->commit();
rollback
The rollback method cancel and end a transaction.
$base->rollback();
getDatabaseType
getDatabaseType return the dsn prefix:
mysql for MySQL or MariaDB, pgsl for PostgreSQL, sqlite for SQLite
or cubrid for CUBRID.
$base->getDatabaseType();
getDatabaseVersion
getDatabaseVersion return the numeric decimal version of the database.
$base->getDatabaseVersion();
getPDO
getPDO return the native PDO object used by DataSource.
$pdo = $base->getPDO();
isConnected
isConnected return true if connected, null if not allready connected,
and false is connection has fail.
$base->isConnected();
debug
The debug method enable queries output, and optionaly, results and
query explain output.
$base->debug($enable=true,$loggingResult=true,$loggingExplain=true)
nestBinding
The nestBinding method, used automatically in internal query writer, is a helper
allowing you to use nested array of parameters and even, contrary to native PDO,
mix named placeholders and mark placeholders.
$bindings = [
':colour'=>['red','green'],
15
];
$sql = 'SELECT name, colour, calories FROM fruit WHERE colour IN :colour AND weight < ?';
list($sql,$bindings) = FoxORM\DataSource\SQL::nestBinding($sql,$bindings);
And the output will be flattened like this:
$sql = 'SELECT name, colour, calories FROM fruit WHERE colour IN (?,?) AND weight < ?';
$bindings = ['red','green',15];
findOne
The findOne method allow you to retrieve one object from database query
using sql snippet.
$base->findOne('user','name = ?',['Jo']);
find
The findOne method allow you to retrieve an array of objects from database query
using sql snippet.
$base->find('user','mtime < ?',[ time()-3600 ]);
findAll
The findAll method allow you to retrieve an array of objects from database query
using sql snippet.
There is no implicit WHERE, so, use it if you don't want to add any conditions
but you want to order or limit.
$base->findAll('user','ORDER BY name DESC LIMIT 10');
findRow
The findRow method allow you to retrieve one result as an associative array
from database query using sql snippet. There is no implicit WHERE.
$base->findRow('user','WHERE name = ?',['Jo']);
findRows
The findRow method allow you to retrieve an array of results, as associatives arrays,
from database query using sql snippet. There is no implicit WHERE.
$base->findRows('user','WHERE mtime < ? ORDER BY name DESC LIMIT 10',[ time()-3600 ]);
bindRead
The bindRead method allow you to wrap SELECT columns in functions.
$base->bindRead('location','point','asText');
$location = $base->read('location',1);
You can also add nested function using mark ?
in substitution of column name.
$base->bindRead('location','point','SUBSTR(asText(?),5)');
$location = $base->read('location',1);
And even alias them.
$base->bindRead('location','point','asText(?) as point_text');
$location = $base->read('location',1);
bindWrite
The bindRead method allow you to wrap INSERT and UPDATE
columns in functions.
$location->point = 'POINT(14 6)';
$base->bindWrite('location','point','GeomFromText');
$base->create('location',$location);
You can also add nested function using mark ?
in substitution of column name.
$location->point = '(14 6)';
$base->bindWrite('location','point',"GeomFromText(CONCAT('POINT',?))");
$base->create('location',$location);
unbindRead
The unbindRead method unset bindRead functions from stack.
If you pass it one argument it will unset all bindRead functions
for the specified type.
If you pass it two argument it will unset all bindRead functions
for the specified type and column.
If you pass it three argument it will unset all bindRead functions
for the specified type and column and which is the same function as passed
in third argument.
$base->unbindRead('location');
$base->unbindRead('location','point');
$base->unbindRead('location','point','asText');
unbindWrite
The unbindWrite method unset bindWrite functions from stack.
If you pass it one argument it will unset all bindWrite functions
for the specified type.
If you pass it two argument it will unset all bindWrite functions
for the specified type and column.
If you pass it three argument it will unset all bindWrite functions
for the specified type and column and which is the same function as passed
in third argument.
$base->unbindWrite('location');
$base->unbindWrite('location','point');
$base->unbindWrite('location','point','GeomFromText');
setSQLFiltersRead
Reset all bindRead functions and define a map manually.
$base->setSQLFiltersRead([
'location'=>[
'point'=>'asText',
]
]);
setSQLFiltersWrite
Reset all bindWrite functions and define a map manually.
$base->setSQLFiltersWrite([
'location'=>[
'point'=>'GeomFromText',
]
]);
getSQLFiltersRead
Return the bindRead functions map.
$bindReadMap = $base->getSQLFiltersRead();
getSQLFiltersWrite
Return the bindWrite functions map.
$bindWriteMap = $base->getSQLFiltersWrite();
getReadSnippetCol
Return sql snippet related to column select from bindRead map.
Sql snippet is for use query.
$columnSqlSnippet = $base->getReadSnippetCol('location','point');
$base->getAll("SELECT $type.*, $columnSqlSnippet FROM $type");
check
Will throw an InvalidArgumentException Exception if you pass to it an invalid
table or column name (alphanumeric, hyphen -, underscore _). To protect
dynamic table or column name in manual query building from SQL injection.
$base->check($struct);
esc
Check table or column name is valid and
add quote specific to current database type.
$columnOrTableWithQuotes = $base->esc($esc);
escTable
Check table name is valid,
add prefix if there is a prefix table associated to the current database,
and then add quote specific to current database type.
$tableWithPrefixAndQuotes = $base->escTable($type);
prefixTable
Check table name is valid and
add prefix if there is a prefix table associated to the current database.
$tableWithPrefix = $base->prefixTable($type);
unprefixTable
Remove the prefix if there is a prefix table associated to the current database
and if it's present in parameter.
$tableWithoutPrefix = $base->unprefixTable($tableWithPrefix);
unEsc
Trim quote specific to current database type from parameter.
$tableOrColumnWithoutQuotes = $base->unEsc($esc);
getQuoteCharacter
Return quote specific to current database type.
$quoteCharacter = $base->getQuoteCharacter();
getTablePrefix
Return prefix table associated to the current database.
$tablePrefix = $base->getTablePrefix();
tableExists
Check if a table exists. Second parameter, set to true by default,
is for automatically add prefix to table.
if($base->tableExists($type)){
}
if($base->tableExists($tableWithPrefix,false)){
}
getTables
Get the table names list.
$tables = $base->getTables();
columnExists
Check if a column exists in a table. Table name is automatically prefixed.
if($base->columnExists($type,$column)){
}
getColumns
Get the columns names list for a table. Table name is automatically prefixed.
$columns = $base->getColumns($type);
addColumn
Add a colum to table manually. Table name is automatically prefixed.
$base->addColumn($type,$column,$field);
changeColumn
Change a table's colum manually. Table name is automatically prefixed.
$base->changeColumn($type,$column,$field);
createTable
Create a table manually. Table name is automatically prefixed.
$base->createTable($type,$pk='id');
drops
Drop a list of table of the database. Table names are automatically prefixed.
You can pass it a list of scalar names or arrays.
$base->drops('table1','table2');
$base->drops(['table1','table2']);
drop
Drop a specific table of the database. Table name is automatically prefixed.
$base->drop('mytable');
dropAll
Drop all table of the database.
$base->dropAll();
many2one
Getting the one (parent).
Get a type of related by column object from another object. For instance, retrieve
the row from user table corresponding to user_id (if primaryKey of user is id)
from table project where project id = 1.
$project = $base->read('project',1);
$user = $base->many2one($project,'user');
one2many
Getting the many (owns).
Get a type of related by column objects from an object. For instance, retrieve
the rows from project table where user_id (if primaryKey of user is id) = 1.
$user = $base->read('user',1);
$projectList = $base->one2many($user,'project');
many2many
Getting the many (shared).
Get a type of related objects from an object via a junction table.
If you don't specify a junction table, the convention is to order names
of tables alphabetically and join them with an underscore "_". For instance
with user and project, the implicit junction table will be "project_user".
$user = $base->read('user',1);
$projectList = $base->many2many($user,'project');
$project = $base->read('project',1);
$userList = $base->many2many($project,'user');
$project = $base->read('project',1);
$authorList = $base->many2many($project,'user','author');
many2manyLink
Getting the many (shared).
Get a type of related objects from an object via a junction table.
Difference with many2many is that you can specify the foreign key target.
$project = $base->read('project',1);
$authorList = $base->many2manyLink($project,'user','author','creator_id');
addFK
Manually add foreign key to a table.
$base->addFK($type,$targetType,$column,$targetColumn,$cascade);
$base->addFK('project','user','user_id','id',true);
getKeyMapForType
Get the foreign key map of a table.
$fkMap = $base->getKeyMapForType('project');
$fkMap will contain an associative array like this one
[
'from_user_id_to_table_user_col_id'=>[ //conventional label
'name' => 'project_user_id_fkey', //index name
'table' => 'user',
'from' => 'user_id',
'to' => 'id',
'on_update' => 'CASCADE',
'on_delete' => 'CASCADE'
],
]
addUniqueConstraint
Manually add unique constraint to one or multiple column of a table.
If you use multiple columns it's not the same as using multiple time
a single column, multiple column on a unique constraint mean that it's
the combination of these columns which should be unique.
$base->addUniqueConstraint('user','email');
$base->addUniqueConstraint('user',['name','lastname']);
addIndex
Manually add a named index to a column of a table.
$base->addIndex($type,$name,$column);
$base->addIndex('user','email_index','email');
clear
Remove all entries from a table without altering it's structure.
$base->clear('user');
drop
Remove a whole table from the database and, of course, all it's entries.
$base->drop('user');
dropAll
Remove all tables from the database.
$base->dropAll();
F Static Facade API
getBases()
Return the database container, the "Bases" object.
$bases = F::getBases();
$base = $bases[0]; //get the default main db
setup
Set the default main database (key 0) dsn, user, password and config.
F::setup($dsn = null, $user = null, $password = null, $config = []);
F::setup('mysql:dbname=myproject;host=localhost', 'root', 'root', [
'tablePrefix'=>'myproject_',
'frozen'=>false
]);
addDatabase
Add a database to the bases registry. If no database has been selected
(or added) it will be selected automatically.
F::addDatabase($key,$dsn,$user=null,$password=null,$config=[]);
F::addDatabase('myproject','mysql:dbname=myproject;host=localhost', 'root', 'root', [
'tablePrefix'=>'myproject_',
'frozen'=>false
]);
selectDatabase
Select (and add before if more than one argument are specified) a database
from bases registry. For select the default main database, setted via F::setup,
use the key "0". Return the database object.
F::selectDatabase($key);
$base = F::selectDatabase(0);
$base = F::selectDatabase(0,'myproject','mysql:dbname=myproject;host=localhost', 'root', 'root', [
'tablePrefix'=>'myproject_',
'frozen'=>false
]);
exists
Alias of readId method. It will check if an interger id (primaryKey) or "uniqTextKey"
exist in a table.
F::exists('user',1);
F::exists('user','jo@surikat.pro');
dispense
Alias of entityFactory method. It will create an entity model object
if class found or default entity class (stdClass by default).
$user = F::dispense('user');
getDatabase
Return the current database (DataSource object) used (selected)
by static facade api.
$base = F::getDatabase();
getTable
Return the DataTable object corresponding to a table from the current
selected database.
$table = F::getTable($type);
$users = F::getTable('user');
on
Attach a callback to a table event. If callback is string, it will be interpreted
as a method of the entity object.
If no callback is specified it will take the event name as a method to call
on entity object.
You can also use a zIndex like and a prepend option.
F::on($type,$event,$call);
F::on('user','afterCreate',function($entity,$db){
echo "User '{$entity->name}' created !";
});
F::on('user','afterCreate',function($entity,$db){
echo "First (prepended) callback after user '{$entity->name}' created !";
},0,true);
off
Detach a callback from a table event. If no callback specified it will remove all
callbacks attached to the table event.
You can use the zIndex like as last parameter.
F::off($type,$event,$call);
$userCreated = function($entity,$db){
echo "First Callback after user '{$entity->name}' created !";
};
F::off('user','afterCreate',$userCreated,1);
F::off('user','afterCreate',$userCreated);
F::off('user','afterCreate',null,1);
F::off('user','afterCreate');
loadMany2one
Load the "_one_" object property from another table to an object.
F::loadMany2one($obj,$type);
$project = F::read('project',1);
F::loadMany2one($project,'user');
$user = $project->_one_user;
loadOne2many
Load the "_many_" array of objects property from another table to an object.
F::loadOne2many($obj,$type);
$user = F::read('user',1);
F::loadOne2many($user,'project');
$projects = $user->_many_project;
loadMany2many
Load the "_many2many_" array of objects property from another table to an object.
A third parameter can specified for the junction table.
If you don't specify a junction table, the convention is to order names
of tables alphabetically and join them with an underscore "_". For instance
with user and project, the implicit junction table will be "project_user".
F::loadMany2many($obj,$type,$via=null);
$user = F::read('user',1);
F::loadMany2many($user,'project');
$projects = $user->_many2many_project;
$project = F::read('project',1);
F::loadMany2many($project,'user');
$users = $user->_many2many_user;
$user = F::read('user',1);
F::loadMany2many($user,'project','author');
$projects = $user->_many2many_project;
$project = F::read('project',1);
F::loadMany2many($project,'user','author');
$users = $user->_many2many_user;
relayed to the Bases object
All these followings methods are relayed to the Bases object.
F::setModelClassPrefix($modelClassPrefix='EntityModel\\');
F::appendModelClassPrefix($modelClassPrefix);
F::prependModelClassPrefix($modelClassPrefix);
F::setModelClassDefault($entityClassDefault='stdClass');
F::setPrimaryKeyDefault($primaryKeyDefault='id');
F::setUniqTextKeyDefault($uniqTextKeyDefault='uniq');
debug
Enable debug mode for the current database.
F::debug();
magic __callStatic
All methods that was not cited before in "F Static Facade API"
are relayed automatically to the current database object,
so you can use all methods explained before in
"Database Methods" and
"Relational Database Methods"
via the facade API.
//eg:
F::create('user',['name'=>'Jo']);
//is equivalent to
$base->create('user',['name'=>'Jo']);
Table
getPrimaryKey
Get the primary key column name of the table (default "id").
$primaryKey = $table->getPrimaryKey();
getUniqTextKey
Get the "uniqTextKey" column name of the table (default "uniq").
"uniqTextKey" is used as a secondary main index to identify table's rows by
a string.
$uniqTextKey = $table->getUniqTextKey();
getDataSource
Get the database (DataSource class) parent object of the table.
$base = $table->getDataSource();
setUniqTextKey
Set the "uniqTextKey" column name of the table (default "uniq").
"uniqTextKey" is used as a secondary main index to identify table's rows by
a string.
$table->setUniqTextKey($uniqTextKey='uniq');
$users->setUniqTextKey('email');
magic offset
The greatest API feature behind FoxORM is that you can manipulate rows and
tables like arrays. That approach was inspired by the cool,
but not allready mature Maphper.
Array access interface to create, read, readId, update and delete methods.
$table[] = $row; // $table->create($id,$row);
$row = $table[1]; // $table->read($id);
$exists = isset($table[1]); // $table->readId($id);
$table[1] = $row; // $table->update($id,$row);
unset($table[1]); // $table->delete($id);
$user = $users[1];
$user =<EMAIL_ADDRESS>// offset methods
$table->offsetExists($id);
$table->offsetGet($id);
$table->offsetSet($id,$obj);
$table->offsetUnset($id);
magic iterator
With the magic iterator you can make a loop on the table and traverse the whole
table or a filtered table, if object was configured.
For instance with the relational database implementation,
a cursor will be used, so, traversing a whole big table
will not overflow your php memory usage. The key will correspond to
primaryKey id.
foreach($table as $id=>$row){
}
// iterator methods
$table->rewind(); // reset($table);
$table->current(); // current($table);
$table->key(); // key($table);
$table->valid();
$table->next(); // next($table);
magic count
If you call count function on a table, it will trigger the "count" method.
For instance, in relational table it will count all rows of a table
or the expected results if table object was configured.
If you used the setCounter method to define a count callback it will use
the specified callback.
$count = count($table);
//count method
$count = $table->count();
paginate
The paginate method will create a "Pagination" helper object configured with
parameters and count() from table, then it will resolve it to check
the pagination is correct, adapt it's properties and finally it
will return it to you.
$pagination = $table->paginate($page,$limit=2,$href='',$prefix='?page=',$maxCols=6);
//pagination properties
$pagination->start;
$pagination->end;
$pagination->max;
$pagination->count;
$pagination->limit;
$pagination->offset;
$pagination->page;
$pagination->maxCols;
$pagination->href;
$pagination->prefix;
$pagination->pagesTotal;
setCache
Disable or enable row caching mechanism. Row caching keep rows when loaded
via read/offsetGet or on cursor iteration. Cache is enabled by default, disable
it with setCache before iterate on big set of data to avoid php memory overflow.
$table->setCache(false);
resetCache
Clean cached rows.
$table->resetCache();
readId
Check if an integer id exists or return an integer id
from "uniqTextKey" if it exists.
$table->readId($id);
readRow
Return a row as array from id or "uniqTextKey".
$table->readRow($id);
putRow
Create or update a row, depends if primary key or "uniqTextKey" is specified,
as object property or second parameter,
and if allready exists in table or not.
$table->putRow($obj,$id=null);
deleteRow
Delete a row from integer primary key or "uniqTextKey".
$table->deleteRow($id);
update
Updating storage of a modified row by it's primary key or "uniqTextKey".
$table->update($id);
getClone
Get a clone of table object, usefull when you want to filter a table and building
dynamic sql query around an iterator, counter and other featured object that is
DataTable.
$tableFilter = $table->getClone();
//chainable equivalent of
$tableFilter = clone $table;
loadOne
Load the "_one_" object property from another table to an object.
$table->loadOne($obj);
$project = $projects[1];
$users->loadOne($project);
$user = $project->_one_user;
loadMany
Load the "_many_" array of objects property from another table to an object.
$table->loadMany($obj);
$user = $users[1];
$projects->loadMany($user);
$userProjects = $user->_many_project;
loadMany2many
Load the "_many2many_" array of objects property from another table to an object.
A third parameter can be specified for the junction table.
If you don't specify a junction table, the convention is to order names
of tables alphabetically and join them with an underscore "_". For instance
with user and project, the implicit junction table will be "project_user".
$table->loadMany2many($obj,$via=null);
$user = $users[1];
$projects->loadMany2many($user);
$userProjects = $user->_many2many_project;
$project = $project[1];
$users->loadMany2many($project);
$projectUsers = $user->_many2many_user;
$user = $users[1];
$projects->loadMany2many($user,'author');
$authorProjects = $user->_many2many_project;
$project = $projects[1];
$users->loadMany2many($project,'author');
$projectAuthors = $user->_many2many_user;
one
Get the "_one_" object from another table.
$table->one($obj);
$user = $users->one($project);
many
Get the "_many_" array of objects from another table.
$table->many($obj);
many2many
Load the "_many2many_" array of objects from another table.
A third parameter can be specified for the junction table.
If you don't specify a junction table, the convention is to order names
of tables alphabetically and join them with an underscore "_". For instance
with user and project, the implicit junction table will be "project_user".
$table->many2many($obj,$via=null);
$user = $users[1];
$userProjects = $projects->many2many($user);
$project = $project[1];
$projectUsers = $users->many2many($project);
$user = $users[1];
$authorProjects = $projects->many2many($user,'author');
$project = $projects[1];
$projectAuthors = $users->many2many($project,'author');
on
Attach a callback to a table event. If callback is string, it will be interpreted
as a method of the entity object.
If no callback is specified it will take the event name as a method to call
on entity object.
You can also use a zIndex like and a prepend option.
$table->on($event,$call);
$users->on('afterCreate',function($entity,$db){
echo "User '{$entity->name}' created !";
});
$users->on('afterCreate',function($entity,$db){
echo "First (prepended) callback after user '{$entity->name}' created !";
},0,true);
off
Detach a callback from a table event. If no callback specified it will remove all
callbacks attached to the table event.
You can use the zIndex like as last parameter.
$table->off($event,$call);
$userCreated = function($entity,$db){
echo "First Callback after user '{$entity->name}' created !";
};
$users->off('afterCreate',$userCreated,1);
$users->off('afterCreate',$userCreated);
$users->off('afterCreate',null,1);
$users->off('afterCreate');
trigger
Trigger as indicated by its name, trigger an event on a table and targetting
a row. The third parameter enable recursivity. The fourth parameter allow you
to configure recursivity order, if is null it will recurse from called to attached
row entities, if is true it will recurse from enclosers to nested row entities and
if is false it will recurse from nested row entities to enclosers.
$table->trigger($event, $row, $recursive=false, $flow=null);
$table->trigger('openRecursive', $row, true, true);
$table->trigger('closeRecursive', $row, true, false);
$table->trigger('beforeCreate', $row, true);
$table->trigger('afterCreate', $row, true);
$table->trigger('mySingleRowEvent', $row);
setCounter
Set a counter callback to use instead of default or implemented one in a DataTable
specification. The counter callback will be invoked on call to count method
or function.
$table->setCounter($call);
$table = clone $aTable;
//for mysql fulltext
$table->setCounter(function()use($table,$cols,$tableName,$text){
return $table->dataSource->getCell('SELECT COUNT(IF(MATCH ('.$cols.') AGAINST (?), 1, NULL)) FROM '.$tableName,[$text]);
});
$countFulltextSearchResults = count($table);
$countFulltextSearchResults = $table->count();
Relational Table
exists
Check if a table exists.
$table->exists();
fetch
The fetch method allow you direct access to a cursor from a table,
so you get each row in a loop and don't overflow your php memory usage while
traversing a whole table for example.
while($row = $table->fetch()){
}
getRow
Usefull to retrieve one row as an associative array if the configured table query
is targetting a single row.
$row = $table->getRow();
getAll
Retrieve all row as an array of associative array from the whole table
or configured table query.
$rows = $table->getAll();
magic iterator
With the magic iterator you can make a loop on the table and traverse the whole
table or a filtered table, if object was configured.
A cursor will be used, so, traversing a whole big table
will not overflow your php memory usage. The key will correspond to
primaryKey id.
foreach($table as $id=>$row){
}
// iterator methods
$table->rewind(); // reset($table);
$table->current(); // current($table);
$table->key(); // key($table);
$table->valid();
$table->next(); // next($table);
magic count
If you call count function on a table, it will trigger the "count" method.
It will count all rows of a table
or the expected results if table object was configured.
If you used the setCounter method to define a count callback it will use
the specified callback else it will use countSimple method.
$count = count($table);
//count method
$count = $table->count();
countSimple
The countSimple method use the configured query of the table removing
it's "order by" clauses and selected columns and select instead a "COUNT(*)"
on the remaining query.
$count = $table->countSimple();
countNested
The countNested method, like the countSimple, use the configured query
of the table removing it's "order by" clauses and selected columns and
select instead just the primary key on the remaining query.
The difference is that it will execute the query into as a subquery and then
count the result. So the count process will be slower than in countSimple
direct query but more relevant in some complex faceted search use cases.
$count = $table->countNested();
countAll
The countAll method will return the total count of rows in a table independently
from the configured query.
$table->countAll();
createSelect
Get a "SqlComposer\Select" query object configured with the
table name as main table, and, corresponding to the parent database of table,
the quote character and table prefix.
$select = $table->createSelect();
Table Sql Composer API
The following methods are callable on table to configure the "SqlComposer\Select"
attached to it. You can use them with "SqlComposer\Select" object apart the table
object to build dynamic SQL queries directly.
The following methods change the query but nothing is executed before you access
table via getAll, fetch or loop on iterator.
getQuery
Get the query as string.
$sql = $table->getQuery();
getParams
Get the binded parameters.
$params = $table->getParams();
selectMany2many
Add a column select from a table related to current table via a the
conventional junction table between two tables.
The primary key of the target table is automatically selected.
$table->selectMany2many($select,$colAlias=null);
$articles->selectMany2many('tag.name');
$articles->selectMany2many('tag.name','tag_name');
selectMany
Add a column select from a table related to current table via foreign key
of target table.
The primary key of the target table is automatically selected.
$table->selectMany($select,$colAlias=null);
$users->selectMany('project.title');
selectOne
Add a column select from a table related to current table via foreign key
of the current table.
The primary key of the target table is automatically selected.
$table->selectOne($select,$colAlias=null);
$projects->selectMany('user.email');
$projects->selectMany('user.name');
selectRelational
Select relations via multidimensional queries. Here is a convention:
- < one ( parent row )
- > many ( own rows )
- <> many2many ( many to many / shared rows )
You can access data through an infinity of tables via their junctions.
Whites spaces have no signification, they will be removed but you can use
them to aerate the code.
The relational select will build multidimensional sub arrays by exploding
the result of sql aggregate functions (specific to each database).
$table->selectRelational($select,$colAlias=null);
$project->selectRelational(' < user.email ');
//equivalent of $projects->selectOne('user.email');
$users->selectRelational(' > project.title');
//equivalent of $users->selectMany('project.title');
$articles->selectRelational(' <> tag.name ');
//equivalent of $articles->selectMany2many('tag.name');
//get tag names used in others articles from the user related to each article
$articles->selectRelational('
hasSelectRelational
Check if the configured query has at least one relational select using aggregation
and configured before with one of the following methods:
selectRelational, selectOne, selectMany, selectMany2many.
if($table->hasSelectRelational()){
}
tableJoin
Add a simple join on a table adding join table in first parameter, on junction
in second parameter and binding parameters optionaly in third parameter.
$table->tableJoin($table, $join, array $params = null);
$projects->tableJoin('JOIN user', 'ON user.id = project.user_id');
joinAdd
Add a join parameter.
$table->joinAdd($join,array $params = null);
$projects->joinAdd('JOIN user ON user.id = project.user_id');
join
Add a join parameter with implicit regular JOIN.
$table->join($join, array $params = null);
$projects->join('user ON user.id = project.user_id');
joinLeft
Add a join left parameter.
$table->joinLeft($join, array $params = null);
$projects->joinLeft('user ON user.id = project.user_id');
joinRight
Add a join right parameter.
$table->joinRight($join, array $params = null);
$projects->joinRight('user ON user.id = project.user_id');
joinOn
Add a "join on" snippet which will be related to ordered previous join.
$table->joinOn($join, array $params = null);
$projects->joinLeft('user ON user.id');
$projects->joinOn('user.id = project.user_id');
from
Add a table or a sub-query to "FROM" clause.
$table->from($table, array $params = null);
unTableJoin
$table->unTableJoin($table=null,$join=null,$params=null);
unJoin
$table->unJoin($join=null,$params=null);
unFrom
$table->unFrom($table=null,$params=null);
setParam
$table->setParam($k,$v);
getParam
$table->getParam($k);
unWhere
$table->unWhere($where=null,$params=null);
unWith
$table->unWith($with=null,$params=null);
unWhereIn
$table->unWhereIn($where,$params=null);
unWhereOp
$table->unWhereOp($column, $op, array $params=null);
unOpenWhereAnd
$table->unOpenWhereAnd();
unOpenWhereOr
$table->unOpenWhereOr();
unOpenWhereNotAnd
$table->unOpenWhereNotAnd();
unOpenWhereNotOr
$table->unOpenWhereNotOr();
unCloseWhere
$table->unCloseWhere();
where
$table->where($where, array $params = null);
whereIn
$table->whereIn($where, array $params);
whereOp
$table->whereOp($column, $op, array $params=null);
openWhereAnd
$table->openWhereAnd();
openWhereOr
$table->openWhereOr();
openWhereNotAnd
$table->openWhereNotAnd();
openWhereNotOr
$table->openWhereNotOr();
closeWhere
$table->closeWhere();
with
$table->with($with, array $params = null);
select
$table->select($select, array $params = null);
distinct
$table->distinct($distinct = true);
groupBy
$table->groupBy($group_by, array $params = null);
withRollup
$table->withRollup($with_rollup = true);
orderBy
$table->orderBy($order_by, array $params = null);
sort
$table->sort($desc=false);
limit
$table->limit($limit);
offset
$table->offset($offset);
having
$table->having($having, array $params = null);
havingIn
$table->havingIn($having, array $params);
havingOp
$table->havingOp($column, $op, array $params=null);
openHavingAnd
$table->openHavingAnd();
openHavingOr
$table->openHavingOr();
openHavingNotAnd
$table->openHavingNotAnd();
openHavingNotOr
$table->openHavingNotOr();
closeHaving
$table->closeHaving();
unSelect
$table->unSelect($select=null, array $params = null);
unDistinct
$table->unDistinct();
unGroupBy
$table->unGroupBy($group_by=null, array $params = null);
unWithRollup
$table->unWithRollup();
unOrderBy
$table->unOrderBy($order_by=null, array $params = null);
unSort
$table->unSort();
unLimit
$table->unLimit();
unOffset
$table->unOffset();
unHaving
$table->unHaving($having=null, array $params = null);
unHavingIn
$table->unHavingIn($having, array $params);
unHavingOp
$table->unHavingOp($column, $op, array $params=null);
unOpenHavingAnd
$table->unOpenHavingAnd();
unOpenHavingOr
$table->unOpenHavingOr();
unOpenHavingNotAnd
$table->unOpenHavingNotAnd();
unOpenHavingNotOr
$table->unOpenHavingNotOr();
unCloseHaving
$table->unCloseHaving();
hasColumn
$table->hasColumn();
getColumn
$table->getColumn();
hasTable
$table->hasTable();
getTable
$table->getTable();
hasJoin
$table->hasJoin();
getJoin
$table->getJoin();
hasFrom
$table->hasFrom();
getFrom
$table->getFrom();
hasWhere
$table->hasWhere();
hasWith
$table->hasWith();
getWhere
$table->getWhere();
getWith
$table->getWith();
hasSelect
$table->hasSelect();
getSelect
$table->getSelect();
hasDistinct
$table->hasDistinct();
hasGroupBy
$table->hasGroupBy();
getGroupBy
$table->getGroupBy();
hasWithRollup
$table->hasWithRollup();
hasHaving
$table->hasHaving();
getHaving
$table->getHaving();
hasOrderBy
$table->hasOrderBy();
getOrderBy
$table->getOrderBy();
hasSort
$table->hasSort();
getSort
$table->getSort();
hasLimit
$table->hasLimit();
getLimit
$table->getLimit();
hasOffset
$table->hasOffset();
getOffset
$table->getOffset();
Entity Model
The object representing a row of table is called entity. The set of the classes
to instanciate for make theses objects is called entity model.
EntityModel is a basic class that you can extends to build
evenemential entities. You can also implements the FoxORM Observer interface
if you don't want to extends EntityModel.
The corresponding class to a table will be used when
factory, create, read, update or delete a row object.
Folowing is not evenemential because is not an instance of Observer,
even if you add the events methods they will not be triggered:
namespace EntityModel;
class User{
}
You have to add all the events methods.
namespace EntityModel;
class User implements FoxORM\Observer{
function beforeRecursive(){}
function beforePut(){}
function beforeCreate(){}
function beforeRead(){}
function beforeUpdate(){}
function beforeDelete(){}
function afterPut(){}
function afterCreate(){}
function afterRead(){}
function afterUpdate(){}
function afterDelete(){}
function afterRecursive(){}
}
The events methods are allready implemented but
you can overload the ones which interest you.
namespace EntityModel;
class User extends \FoxORM\EntityModel{
function afterCreate(){}
function afterRead(){}
function afterUpdate(){}
function afterDelete(){}
}
Observer Workflow
The observer workflow is a complete evenemential system on which you can rely to control your entities model. The set of events are:
- beforeRecursive
- beforePut
- beforeCreate
- beforeRead
- beforeUpdate
- beforeDelete
- afterPut
- afterCreate
- afterRead
- afterUpdate
- afterDelete
- afterRecursive
See Entity Model for methods implementation.
beforeRecursive
This event is triggered recursively from the top encloser entity to the nested ones when a put (create or update) is performed and before all other events. You can use it to validate the set of all the entities you are about to store.
beforePut
This event is triggered recursively in the order the entities will be stored when a put (insert or update) is performed. This event is trigerred after beforeRecursive and before beforeCreate or beforeUpdate event.
beforeCreate
This event is triggered recursively in the order the entities will be stored when a create (insert) is performed. This event is trigerred after beforePut event and before the storage execution.
beforeRead
This event is triggered after an entitie object is factorised and before performing the read query to the database.
beforeUpdate
This event is triggered recursively in the order the entities will be stored when an update is performed. This event is trigerred after beforePut event and before the storage execution.
beforeDelete
This event is triggered when an delete is performed. This event is trigerred before the storage execution.
afterPut
This event is triggered recursively in the order the entities was stored when a put (insert or update) is performed. This event is trigerred after the storage execution and after afterCreate or afterUpdate event.
afterCreate
This event is triggered recursively in the order the entities was stored when a create (insert) is performed. This event is trigerred after the storage execution and before afterRecursive event.
afterRead
This event is triggered after an entity object has been loaded with the data from performed database read query.
afterUpdate
This event is triggered recursively in the order the entities was stored when an update is performed. This event is trigerred after the storage execution and before afterRecursive event.
afterDelete
This event is triggered when an delete is performed. This event is trigerred after the storage execution.
afterRecursive
This event is triggered recursively from the nested entities to the top encloser one when a put (create or update) is performed and after all other events.
Relations
You can access or make relations in many ways, here is somes examples:
Using facade way to read it directly:
foreach(F::many2one($project,'user') as $user){
debug($user);
}
F::loadMany2one($project,'user');
debug($project);
foreach(F::one2many($user,'project') as $project){
debug($project);
}
Storing with explicit "_many_" meta prefix which do a one to many relation.
The _x_ suffix specify that is an exclusive link.
When it's an exclusive relation the list are considered to be dependent
on their parent row. If it's removed, they will be deleted as well.
$user = F::create('user',[
'name'=>'test',
'_many_note_x_'=>[
[
'description'=>'Testing relational CRUD'
],
],
]);
Storing implicit relations: if there is no prefix to key of not
scalar value, there are implicits rules.
An array of objects mean many, and an object mean one.
F::create('user',[
'name'=>'test',
'project_x_'=>[
(object)[
'name'=>'myproject'
],
(object)[
'name'=>'myproject2'
],
],
]);
F::create('project',[
'name'=>'myproject',
'user_x_'=>(object)[
'name'=>'test'
],
]);
You can even build directly some many to many rows related by an implicit
conventional junction table.
$user = F::create('user',[
'name'=>'test',
'_many2many_project_x_'=>[
[
'name'=>'myproject'
],
[
'name'=>'myproject2'
],
],
]);
Load the related rows before updating one if you don't want to remove
all of them when storing.
$user = F::read('user',1);
$user->_many2many_project_x_ = F::many2many($user,'project')->getAll();
$user->_many2many_project_x_[21]['description'] = 'updated '.time();
$user = F::update($user);
Use alias relations with key different from "_type" meta property.
$user = F::create('user',[
'name'=>'test',
'_many_note_x_'=>[
[
'_type'=>'info',
'description'=>'Making CRUD alias'
],
],
]);
$user = F::create('info',[
'name'=>'Making CRUD alias',
'_one_author_x_'=>[
'_type'=>'user',
'name'=>'test',
],
]);
Data Source Plugin
To create a DataSource plugin for support an other database you have to
create tow class with a name uppercased on first character which
correspond to the name of database type. One of theses two class
have to extends DataSource or DataSource\SQL if it's an SQL database
and placed in DataSource sub namespace. The second have to extends DataTable
or DataTable\SQL if it's SQL database and placed in DataTable sub namespace.
Let's take an example, for database type called mybase:
in DataSource/Mybase.php
namespace RedCat\FoxORM\DataSource;
class Mybase extends \FoxORM\DataSource{
}
in DataTable/Mybase.php
namespace RedCat\FoxORM\DataTable;
class Mybase extends \FoxORM\DataTable{
}
and use it:
$bases[0] = [
'type'=>'mybase',
'host'=>'localhost',
'port'=>'3306',
'name'=>'my_db_name',
];
Implements the abstract required methods and see how other classes works
by taking a look on their respectives codes to understand how to design your
database layers.


Please rejoin the network now!
Your Galileo is rebooting and attempting to join your wifi network. This will take approximately 1 minute.
This page will redirect you when everything is ready.
If you have trouble connecting, you may need to install Bonjour Network Services on this computer.


Centaur Warrunner
Tips
You can mask the animation of Hoof Stomp by casting it in the middle of using a Force Staff. Since the
cast time takes roughly as long as the Force travel time, you'll arrive at your destination and stomp
immediately without showing the Hoof Stomp animation.
- Double Edge costs no mana, so use it as your primary pushing spell late game.
- If you have a Hood of Defiance, don't forget to use the active Spell Shield liberally to absorb Double Edge
self damage.
- Return damages towers. Be a man and draw aggro from the tower to speed up the pushing process. If you
want to force aggro, right click any enemy hero anywhere on the map while you're in tower range, or just
be the closest target attacking the tower.
- Pay attention to when you can use Stampede from across the map. If your boy Shadow Fiend is getting
ganked, don't be shy about turning on your lawnmower with R. Similarly, if SF is ganking Luna, but just
can't keep up, use your ultimate.
- Many players will leave their Tranquil Boots on the ground when farming so that they can pick them up
after getting some last hits and not have to wait for the damage cooldown to start healing.
- After you get Blade Mail, try to find ways to hurt yourself during its duration. KotL about to bust out
an Illuminate? Gimme. Chaos Meteor rolling around? I love meatballs. Bloodseeker Rupture you for some
reason? Yeeeeehaw.
Counters
- Hoof Stomp has a pretty small radius. If you see a Centaur is trying to run side by side with you to
ensure that he'll land it, don't keep moving straight, juke left or right.


Toggle navigation
CorpViewer
Some top Companies according to the forbes list
Filter:
Logo
Name
Link
Reveneue
{{corp.name}}
{{corp.url}}
{{corp.sales | currency}}


Ex-MLA faults move to hike laddu price
‘Attempts being made to discourage devotees from visiting Tirumala’
by Staff ReporterFormer Tirupati MLA and TDP leader M. Sugunamma on Monday faulted the move of the YSR Congress Party government to hike the price of laddu prasadam and accommodation tariff at Tirumala, the abode of Lord Venkateswara.
In a statement at Tirupati, the former MLA felt that the YSRCP government deliberately wanted to bring down the number of devotees coming to Tirumala by resorting to the hikes through forced decisions in the TTD trust board.
Sugunamma alleged that Chief Minister Y.S. Jagan Mohan Reddy, who took the blessings of the Hindu spiritual leaders during the elections, had, after coming to power, adopted an anti-Hindu stance to hurt the sentiments of Hindu devotees. She also alleged that some vested interests were ruling the roost in the TTD affairs.
Some YSRCP Ministers and those who had switched loyalty to the party were undermining the Hindu religious values with their inappropriate behaviour even while on Ayyappa deeksha, she alleged.


The hadoop-azure-datalake module provides support for integration with the Azure Data Lake Store. This support comes via the JAR file azure-datalake-store.jar.
Partial or no support for the following operations :
Azure Data Lake Storage access path syntax is:
adl://<Account Name>.azuredatalakestore.net/
For details on using the store, see Get started with Azure Data Lake Store using the Azure Portal
Usage of Azure Data Lake Storage requires an OAuth2 bearer token to be present as part of the HTTPS header as per the OAuth2 specification. A valid OAuth2 bearer token must be obtained from the Azure Active Directory service for those valid users who have access to Azure Data Lake Storage Account.
Azure Active Directory (Azure AD) is Microsoft’s multi-tenant cloud based directory and identity management service. See What is ActiveDirectory.
Following sections describes theOAuth2 configuration in core-site.xml.
Credentials can be configured using either a refresh token (associated with a user), or a client credential (analogous to a service principal).
Add the following properties to the cluster’s core-site.xml
<property> <name>fs.adl.oauth2.access.token.provider.type</name> <value>RefreshToken</value> </property>
Applications must set the Client id and OAuth2 refresh token from the Azure Active Directory service associated with the client id. See Active Directory Library For Java.
Do not share client id and refresh token, it must be kept secret.
<property> <name>fs.adl.oauth2.client.id</name> <value></value> </property> <property> <name>fs.adl.oauth2.refresh.token</name> <value></value> </property>
Add the following properties to your core-site.xml
<property> <name>fs.adl.oauth2.access.token.provider.type</name> <value>ClientCredential</value> </property> <property> <name>fs.adl.oauth2.refresh.url</name> <value>TOKEN ENDPOINT FROM STEP 7 ABOVE</value> </property> <property> <name>fs.adl.oauth2.client.id</name> <value>CLIENT ID FROM STEP 7 ABOVE</value> </property> <property> <name>fs.adl.oauth2.credential</name> <value>PASSWORD FROM STEP 7 ABOVE</value> </property>
Azure VMs can be provisioned with “service identities” that are managed by the Identity extension within the VM. The advantage of doing this is that the credentials are managed by the extension, and do not have to be put into core-site.xml.
To use MSI, modify the VM deployment template to use the identity extension. Note the port number you specified in the template: this is the port number for the REST endpoint of the token service exposed to localhost by the identity extension in the VM. The default recommended port number is 50342 - if the recommended port number is used, then the msi.port setting below can be omitted in the configuration.
Add the following properties to your core-site.xml
<property> <name>fs.adl.oauth2.access.token.provider.type</name> <value>Msi</value> </property> <property> <name>fs.adl.oauth2.msi.port</name> <value>PORT NUMBER FROM ABOVE (if different from the default of 50342)</value> </property>
Note: This auth method is suitable for running interactive tools, but will not work for jobs submitted to a cluster.
To use user-based login, Azure ActiveDirectory provides login flow using device code.
To use device code flow, user must first create a Native app registration in the Azure portal, and provide the client ID for the app as a config. Here are the steps:
Add the following properties to your core-site.xml
<property> <name>fs.adl.oauth2.devicecode.clientappid</name> <value>APP ID FROM STEP 5 ABOVE</value> </property>
It is usually not desirable to add DeviceCode as the default token provider type. But it can be used when using a local command:
hadoop fs -Dfs.adl.oauth2.access.token.provider.type=DeviceCode -ls ...
Running this will print a URL and device code that can be used to login from any browser (even on a different machine, outside of the ssh session). Once the login is done, the command continues.
In many Hadoop clusters, the core-site.xml file is world-readable. To protect these credentials, it is recommended that you use the credential provider framework to securely store them and access them.
All ADLS credential properties can be protected by credential providers. For additional reading on the credential provider API, see Credential Provider API.
hadoop credential create fs.adl.oauth2.client.id -value 123 -provider localjceks://file/home/foo/adls.jceks hadoop credential create fs.adl.oauth2.refresh.token -value 123 -provider localjceks://file/home/foo/adls.jceks
<property> <name>fs.adl.oauth2.access.token.provider.type</name> <value>RefreshToken</value> </property> <property> <name>hadoop.security.credential.provider.path</name> <value>localjceks://file/home/foo/adls.jceks</value> <description>Path to interrogate for protected credentials.</description> </property>
hadoop distcp [-D fs.adl.oauth2.access.token.provider.type=RefreshToken -D hadoop.security.credential.provider.path=localjceks://file/home/user/adls.jceks] hdfs://<NameNode Hostname>:9001/user/foo/srcDir adl://<Account Name>.azuredatalakestore.net/tgtDir/
NOTE: You may optionally add the provider path property to the distcp command line instead of added job specific configuration to a generic core-site.xml. The square brackets above illustrate this capability.`
After credentials are configured in core-site.xml, any Hadoop component may reference files in that Azure Data Lake Storage account by using URLs of the following format:
adl://<Account Name>.azuredatalakestore.net/<path>
The schemes adl identifies a URL on a Hadoop-compatible file system backed by Azure Data Lake Storage. adl utilizes encrypted HTTPS access for all interaction with the Azure Data Lake Storage API.
For example, the following FileSystem Shell commands demonstrate access to a storage account named youraccount.
hadoop fs -mkdir adl://yourcontainer.azuredatalakestore.net/testDir hadoop fs -put testFile adl://yourcontainer.azuredatalakestore.net/testDir/testFile hadoop fs -cat adl://yourcontainer.azuredatalakestore.net/testDir/testFile test file content
The hadoop-azure-datalake module provides support for configuring how User/Group information is represented during getFileStatus(), listStatus(), and getAclStatus() calls..
Add the following properties to core-site.xml
<property> <name>adl.feature.ownerandgroup.enableupn</name> <value>true</value> <description> When true : User and Group in FileStatus/AclStatus response is represented as user friendly name as per Azure AD profile. When false (default) : User and Group in FileStatus/AclStatus response is represented by the unique identifier from Azure AD profile (Object ID as GUID). For performance optimization, Recommended default value. </description> </property>
The hadoop-azure module includes a full suite of unit tests. Most of the tests will run without additional configuration by running mvn test. This includes tests against mocked storage, which is an in-memory emulation of Azure Data Lake Storage.
A selection of tests can run against the Azure Data Lake Storage. To run these tests, please create src/test/resources/auth-keys.xml with Adl account information mentioned in the above sections and the following properties.
<property> <name>fs.adl.test.contract.enable</name> <value>true</value> </property> <property> <name>test.fs.adl.name</name> <value>adl://yourcontainer.azuredatalakestore.net</value> </property>


It's used for multiplayer.
Start playing games by run command dotnet run in Casino/Casino folder.
Documentation find on own repo. Repository
Issue Download sourceIt's used for multiplayer.
Start playing games by run command dotnet run in Casino/Casino folder.
Documentation find on own repo. Repository
Issue Download source


{{ content }}
{% assign author = site.authors | where: 'name', page.author | first %}
{{ author.name }}'s profile image
{{ author.name }}
{{ page.date | date: '%Y-%m-%d %H:%M' }}
Read more posts by this author


UN Climate Change Conference - Poznań
11-Dec-08 — original report
Chair Machado noted that a number of contact groups had met to discuss the assembly document, which deals with a shared vision, mitigation, adaptation, and delivering on technology and financing.
He indicated that there had been 164 submissions in total for the assembly text, amounting to more than 1000 pages of input.
He said this demonstrates the active interest and engagement of parties, and that this updated text will provide a strong basis for work in 2009 (FCCC/AWGLCA/2008/16/Rev.1).
The SBSTA adopted conclusions (FCCC/SBSTA/2008/L.18).
Parties adopted the SBSTA conclusions (FCCC/SBSTA/2008/L.20).
SBSTA Chair Plume informed the plenary that consideration of this item would continue at SBSTA 30.
Parties adopted conclusions (FCCC/SBSTA/2008/L.15). METHODOLOGICAL ISSUES (PROTOCOL): HCFC-22/HFC-23: Co-Chair Spooner reported that parties had been unable to agree.
The item will be taken up again at SBSTA 30.
Co-Chair Wollansky reported that parties had considered two bracketed options, but that differences remained on forwarding bracketed text to the COP/MOP or to a later SBSTA session.
Parties adopted short draft conclusions (FCCC/SBSTA/2008/L.21) and this matter will be taken up in SBSTA 30.
The EU, SAUDI ARABIA, AUSTRALIA, NORWAY and JAPAN expressed regret that agreement had not been reached.
JAMAICA noted that CCS technology is not ready for use in an offset mechanism such as the CDM.
BRAZIL highlighted concerns relating to long-term permanence and host-country liabilities.
SBSTA adopted conclusions on IPCC AR4 (FCCC/SBSTA/2008/L.17).
The SBSTA took this matter up in plenary following a joint SBI/SBSTA contact group session on Protocol Articles 2.3 and 3.14 held earlier in the day.
In the contact group, parties had been unable to agree on forwarding substantive draft conclusions to SBI and SBSTA.
Instead, they accepted a short text acknowledging the importance of addressing matters related to Protocol Articles 2.3 and 3.14, and agreeing to continue discussions in a joint contact group at SB 30.
During the closing plenary, Co-Chair Tilley reported that more time was needed to address these issues.
Parties adopted the brief conclusions (FCCC/SBSTA/2008/L.24).
The SBSTA adopted conclusions on activities implemented jointly (AIJ) and on cooperation with the Secretariat of the Vienna Convention and Montreal Protocol (FCCC/SBSTA/2008/L.19 and Add.1).
TRADE UNIONS urged increased financial support for adaptation.
YOUTH said REDD must not be used as a mechanism by which Annex I countries avoid their domestic emission reduction obligations.
The Secretariat outlined cost implications of SBSTA outcomes, noting that most would be covered through core resources or the Trust Fund for Supplementary Activities.
He noted that a request for a technical paper on REDD would require voluntary contributions amounting to US$100,000.
The SBSTA then adopted its report of the session (FCCC/SBSTA/2008/L.14), and Chair Plume closed the meeting at 6:15 pm.
Parties adopted conclusions developed during informal consultations convened by AWG-LCA Vice-Chair Cutajar ( FCCC/AWGLCA/2008/L.10 ).
The SBI re-elected Nataliya Stranadko (Ukraine) as Vice-Chair, and elected Kadio Ahossane (Côte d Ivoire) as Rapporteur.
The SBI adopted conclusions on the CGE and on financial and technical support (FCCC/SBI/2008/L.23 and L.24).
Several parties expressed regret at the lack of agreement on this issue, while others noted some progress.
Chair Asadi said the issue would be on SBI 30 s agenda.
Delegates adopted conclusions (FCCC/SBI/2008/L.22).
The SBI adopted conclusions on capacity building under the Convention and the Protocol (FCCC/SBI/2008/L.25 and L.26).
The SBI adopted conclusions on reporting and review of information submitted by Annex I parties to the Convention that are also parties to the Protocol (FCCC/SBI/2008/L.19).
SBI agreed to continue consideration of this item at its next session.
Chair Asadi presented draft omnibus texts covering a range of financial and institutional matters, including audited financial statements for 2006-2007, budget performance for 2008-2009, status of contributions, and authorization to prepare the budget for 2010-2011.
The SBI adopted conclusions (FCCC/SBI/2008/L.17) and draft decisions for the COP and COP/MOP (FCCC/SBI/2008/L.17/Add.1/Rev.1 and Add.2/Rev.1), with a minor oral amendment to a footnote by JAPAN.
Parties were briefed on the two contact groups that had considered different elements of this topic the SBI group and the joint SBI/SBSTA group.
The SBI adopted draft conclusions relating to the EGTT, GEF strategic programme, and the terms of reference for the review of implementation of Convention Articles 4.1(c) and 4.5 (FCCC/SBI/2008/L.28 and Add.1).
-¯Co-Chair Djemouai reported on a joint SBI/SBSTA contact group on this issue, noting agreement that-¯the joint group was the appropriate context to continue discussions at SB 30.
Parties adopted draft conclusions (FCCC/SBI/2008/L.27).
The AWG-LCA adopted conclusions ( FCCC/AWGLCA/2008/L.11 ).
Parties adopted conclusions (FCCC/SBI/2008/L.18).
Co-Chair Oberthür reported agreement on SBI draft conclusions, as well as on-¯a draft COP/MOP decision, which was forwarded to the contact group on the second review of the Protocol under Article 9.
Parties adopted conclusions (FCCC/SBI/2008/L.20 and Add.1).
Parties adopted conclusions on the annual compilation and accounting report for Annex B parties under the Kyoto Protocol (FCCC/SBI/2008/L.16).
The Philippines, for the G-77/CHINA, expressed disappointment at the lack of a substantive outcome.
The SBI adopted brief conclusions (SBI/FCCC/2008/L.29).
Chair Asadi noted lack of agreement on draft text and said bracketed text (SBI/FCCC/2008/L.30) would be forwarded to the COP Chair for his consideration.
The G-77/CHINA expressed disappointment, stating that the Group has spent 15 years trying to make the GEF as an operating entity more responsive to the concerns of developing countries.
The SBI adopted conclusions, including an annex with further guidance on operation of the Fund (FCCC/SBI/2008/L.21 and Add.1).
The Secretariat noted minor budgetary and administrative implications of the SBI outcomes.
The SBI then adopted its report on the session (FCCC/SBI/2008/L.15).
Reflecting on the session, Chair Asadi said the formal outcome left much to be desired, due in part to lack of time.
However, he also noted some positive outcomes, including a modest but encouraging start to the joint contact group on Protocol Articles 2.3 and 3.14.
He urged a collective endeavor to find common solutions to our common problems, and closed the meeting at 9:02 pm.
Following informal consultations and a contact group earlier on Wednesday, the AWG-KP adopted its conclusions (FCCC/KP/AWG/2008/L.18).
Following a contact group earlier in the day, Co-Chair Kerr reported on the progress of the group, noting that work on this agenda item will continue at a 2009 workshop, as described in the conclusions.
She added that the group will henceforth refer to itself as the potential consequences group.
The AWG-KP adopted the conclusions (FCCC/KP/AWG/2008/L.17).
Vice-Chair Konate reported on consultations on the AWG-KP s work programme for 2009, and AWG-KP Chair Dovland highlighted the work programme s importance for reaching agreement on further commitments in Copenhagen.
He characterized the consultations as somewhat challenging, also noting the lack of time.
The AWG-KP adopted conclusions (FCCC/KP/AWG/2008/L.19).
The INTERNATIONAL COUNCIL FOR SUSTAINABLE ENERGY called for, inter alia quantifiable mid and long-term emission reduction targets for industrialized countries; actions by developing countries to reduce emissions below business-as-usual scenarios; and incentive structures for technology transfer.
INDIGENOUS PEOPLES expressed concern over REDD and proposed an expert group on indigenous peoples and climate change.
TRADE UNIONS called for a green new deal and programmes for workers who may be affected by restructuring to a low-carbon future.
CLIMATE ACTION NETWORK EUROPE called for accelerated progress on developed country targets, stating that these targets should be at least 40%.
Delegates adopted the AWG-KP s report of the resumed sixth session (FCCC/KP/AWG/2008/L.16).
Chair Dovland said the AWG-KP had completed a very ambitious agenda in a very short period of time.
Reflecting on his term as AWG-KP Chair, he said progress had been made during the past 12 months but that the AWG-KP is behind schedule.
He urged focusing on new QELROs for Annex I parties.
Several parties thanked Chair Dovland for his leadership.
While thanking Chair Dovland, CHINA expressed deep disappointment at slow progress regarding Annex I parties further commitments.
Chair Dovland thanked the parties, his Vice-Chair and the Secretariat, expressing hope that a robust basis had been laid for the AWG-KP s work in 2009.
He declared AWG-KP 6 closed at 10:05 pm.
Delegates emerged from the final plenary of the subsidiary bodies on Wednesday evening with seemingly mixed feelings.
Most appeared to feel that the AWGs and SBs had achieved at least the minimum that was needed.
We got what we came here for, although many might have wanted more, said one delegate.
There were some small wins here but no big breakthroughs.
Still, few expected any, said another.
Some were pleasantly surprised that the AWG-KP had finished its work at a reasonable hour, especially since some sections of the work programme had apparently not been agreed when the text was brought to plenary.
There was a range of views on the work programme in particular, depending on which delegation was speaking.
Meanwhile, in some of the remaining COP/MOP negotiations, the Article 9 review group was reporting slow progress at 11:00 pm Wednesday night.
However, delegates leaving the Adaptation Fund talks at a similar hour were reporting some forward momentum, with the legal status of the Board as the only major outstanding issue.
Chair Machado thanked delegates and all involved in the AWG-LCA s work, and parties adopted the report of the session ( FCCC/AWGLCA/2008/L.9 ).
Many parties thanked Chair Machado and Vice-Chair Cutajar for their guidance, and expressed hope for constructive talks in 2009.
Chair Machado declared AWG-LCA 4 closed at 4:55 pm.
SBSTA agreed to elect A.H.M.
Mustain Billah (Bangladesh) as Vice-Chair and Purushottam Ghimire (Nepal) as Rapporteur.
Delegates adopted conclusions (FCCC/SBSTA/2008/L.22).
Delegates adopted conclusions (FCCC/SBSTA/2008/L.16).
Contact group Co-Chair Rosland reported on intense negotiations and some difficult moments over the past week, including a marathon session on Tuesday.
However, he noted that the group had now completed its work.
PAPUA NEW GUINEA suggested that the SBSTA had undershot what could have been achieved and that the AWG-LCA had moved too slowly to address the necessary policy issues.
The SBSTA adopted the conclusions (FCCC/SBSTA/2008/L.23).


LED Stimulus¶
This test will just turn on some of the pyboard’s onboard LEDs, nothing is actually asserted.
The concept of creating a bench TestCase
class is introduced.
Bench Setup¶
The only requirement for this test is a pyboard connected via USB.
The setup of the bench is absracted to a BenchTest
class.
class BenchTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.pyb_a = upytester.project.get_device('pyb_a')
@classmethod
def tearDownClass(cls):
cls.pyb_a.close()
The setUpClass()
and
tearDownClass()
methods
are used to configure the pyboard for all tests in any inheriting class.
Test Case¶
The LEDTest
class inherits from BenchTest
, giving each test
contextual access to the configured pyboard as self.pyb_a
.
class LEDTest(BenchTest):
def test_blink(self):
"""
Turn red LED on for 500ms (non-blocking)
"""
self.pyb_a.blink_led(duration=500)
time.sleep(0.5) # just wait so tests don't run at the same time
def test_led_set(self):
"""
Turn green LED on for 500ms (blocking)
"""
self.pyb_a.set_led(led=2, intensity=0xff) # on
time.sleep(0.5)
self.pyb_a.set_led(led=2, intensity=0x00) # off
Each test simply turns on a LED for 500ms. No evalution is performed, so both tests pass as long as no exceptions are raised due to communication problems.


I'm Rabindra Sahoo, Java Enterprise & middleware developer at CGI and I am a tech-savvy person and like to keep myself updated with new softwares and technologies. I follow stackoverflow, Github, javaworld, javaranch and lot other technical websites.

View my Blog
My CV


Have you ever wondered what would happen in a fight with an Avenger? You'd lose, obviously. But WHO would kick your ass?? Take this quick quiz to find out!
Please rate each statement on a scale of 1 to 5, with 1 meaning "strongly disagree" and 5 meaning "strongly agree".
Okay i def said rate it on a scale of 1-5. COME ON
roses are red, violets are blue, fill in all the questions, or no results for you


Receive a discount percentage on your projects with us
Following us
on our social networksThe union between cutting-edge technology and design
In Oh! Future we have a multidisciplinary team expert in optimizing the tools to make your business shine. We can develop a website tailored for your company with the latest technologies and made with the latest trends in designs.
From the model to the digital code
With us you will know what you are buying, all the projects are designed in digital and immersive samples to simulate the final experience.
Save your time, we only need a few days to start working on your project, once understood and defined all the key points.
The projects are accompanied by a Project Manager responsible for not missing anything technical, and delivery times are met.
Guaranteed security, we take care of performing maintenance for 6 months in our web development plans.
We have 3 premium plans designed for you
Starter
$0Receive free advice to develop your website, our design laboratory is willing to develop your web model totally free.
BeginsPlayer
$699Get your website fully responsive, with tip designs, parallax, forms and everything you need to make your online identity the best on the market.
oferta BeginsWinner
$899.99Receive the extended plan with all the tools to enhance your image and your positioning, our team guarantees the scope of the project by providing support in digital marketing throughout the development.
limitado Begins


Student Seeking Instruction
Teacher Seeking Students


{% extends "base.html" %} {% block title %}
Medieval catalogues > UNIVERSITY AND COLLEGE LIBRARIES OF CAMBRIDGE > Corpus Christi College > Inventory, c. 1376
{% endif %}78 identified entries found.
All data was derived from the List of Identifications by Professor Richard Sharpe.
{% if not printing %}
A key to codes used in the List is available (opens in new tab).{% endif %}


--- layout: post esbma_id: unknown title: Microsoft is becoming cool again date: 2015-04-30 12:00:00 keywords: dotnet ---
.NET is going open source? And cross-platform? On Github?!?
The news out of Redmond often seems like a mis-timed April fools joke.
But it's real. This is happening. Microsoft is apparently willing to do "whatever it takes" to get developers to love them again.
A lot of folks are giving credit to CEO Satya Nadella. And there could be some truth to that. Maaaaaaybe.
Another popular view: Two of the most visible people in this story are:
Scott Hanselman (whose last name I cannot type without double-checking the spelling.)
and Scott Gu (whose last name is Guenther. Or something like that. I can never remember anything after the first two letters.)
I understand why people think maybe these two guys caused this revolution. They both seem to do a decent job I suppose.
But the truth is that New Microsoft started when Microsoft hired Martin Woodward.
Martin's current position is Executive Director of the .NET Foundation. Prior to that, he worked as a Program Manager on various developer tools.
Nobody knows who Martin is. Either of the Scotts have 2 orders of magnitude more Twitter followers.
But I think if you look closely at Martin's five+ year career at Microsoft, you will see a pattern. Every time a piece of Old Microsoft got destroyed in favor of New Microsoft, Martin was nearby.
Don't believe me? Ask anybody in DevDiv how TFS ended up getting support for Git.
It's all about Martin.
Certainly not.
You see, Martin joined Microsoft in late 2009 as part of their acquisition of Teamprise.
And Teamprise was a division of SourceGear.
I hired Martin Woodward (single-handedly, with no help or input from anybody else) in 2005. Four years later, when Microsoft acquired our Teamprise division (which I made happen, all by myself), Martin became a Microsoft employee.
Bottom line: Are you excited about all of the fantastic news coming out of Build 2015 this week? That stuff would never have happened if it were not for ME.
So, now that you know that I am the one behind all the terrific things Microsoft is doing, I'm sure you want to express your appreciation. But that won't be necessary. While I understand the sentiment, in lieu of expensive gifts and extravagant favors, I am asking my adoring fans to do two things:
First, try not to forget all the little people at Microsoft who are directly involved in the implementation of change. People like Martin, or the Scotts, or Satya. Even though these folks are making a relatively minor contribution compared to my own, I would like them to be supported in their efforts. Be positive. Don't second-guess their motives. Lay aside any prejudices you might have from Old Microsoft. Believe.
Second, get involved. Interact with New Microsoft as part of the community. Go to Github and grab the code. Report an issue. Send a pull request.
Enjoy this! It's a GREAT time to be a developer.


HAMBURGER
A hamburger is a sandwich consisting of one or more cooked patties of ground meat, usually beef, placed inside a sliced bread roll or bun. The patty may be pan fried, grilled, smoked or flame broiled. Hamburgers are often served with cheese, lettuce, tomato, onion,etc. A hamburger topped with cheese is called a cheeseburger.


API
Contentjet's API is self-documenting by exposing Swagger UI at the path /swagger/
on your install of contentjet-api e.g. https://api.yourdomain.com/swagger/. This allows you to interactively browse the various endpoints provided by the API.
Alternatively, advanced users may wish to access the raw JSON Open API 3 specification at the path /spec
e.g. https://api.yourdomain.com/spec.
Authentication
Most endpoints exposed via the API require authentication. Contentjet adheres to the OAuth 2.0 Authorization Framework and provides two ways of authenticating.
Resource Owner Password Credentials Grant
The Resource Owner Password Credentials Grant flow is used when authenticating with the backend as a User. This is useful if you need to write data to the API. Note this is the flow contentjet-ui uses when you enter your email and password into the login form!
Request:
curl -H "Content-Type: application/json" \
-d '{"username":"johnsmith@example.com","password":"mypassword","grant_type":"password"}' \
https://api.yourdomain.com/authenticate
Response:
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjEsImlhdCI6MTUxOTc4OTcwNiwiZXhwIjoxNTE5NzkyNzA2fQ.yYbuJ7m4u_PxyeIDw0TbAHko-cdyh0iVkUtd6hRJDAA",
"token_type": "bearer",
"expires_in": 300,
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjEsImlhdCI6MTUxOTc4OTcwNiwiZXhwIjoxNTE5NzkyNzA2fQ.yYbuJ7m4u_PxyeIDw0TbAHko-cdyh0iVkUtd6hRJDAA"
}
The authentication response contains access_token
which is a JWT identifying the authenticated user. The access token is used by adding it as the Authorization
header when making requests to secure endpoints e.g.
curl -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjEsImlhdCI6MTUxOTc4OTcwNiwiZXhwIjoxNTE5NzkyNzA2fQ.yYbuJ7m4u_PxyeIDw0TbAHko-cdyh0iVkUtd6hRJDAA" \
https://api.yourdomain.com/user/me
Refreshing the access token
For security reasons access tokens have a short lifespan and expire after only a few minutes. In order to stay authenticated with the API an access tokens must be refreshed before it expires by submitting the refresh_token
to the /user/token-refresh
endpoint.
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjEsImlhdCI6MTUxOTc4OTcwNiwiZXhwIjoxNTE5NzkyNzA2fQ.yYbuJ7m4u_PxyeIDw0TbAHko-cdyh0iVkUtd6hRJDAA" \
-d '{"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjEsImlhdCI6MTUxOTc4OTcwNiwiZXhwIjoxNTE5NzkyNzA2fQ.yYbuJ7m4u_PxyeIDw0TbAHko-cdyh0iVkUtd6hRJDAA","grant_type":"refresh_token"}' \
https://api.yourdomain.com/token-refresh
You may have noticed the access_token
and refresh_token
are identical. While this is true, it's recommended you keep an explicit reference to the refresh_token
separate from the access_token
and only send the refresh_token
value to the token refresh endpoint.
Client Credentials Grant
The Client Credentials Grant flow is used when authenticating with the backend as a Client. This form of authentication grants read-only access to the entire project the Client was created under.
To use this flow you must have first created a Client in your project. This can be done via the UI by going to Project Settings then API. Note only users with admin rights to the project will be able to create Clients.
Once you have created a Client you can use the clientId and clientSecret to authenticate. Be sure to change <your-project-id>
in the URL to the id of your project.
Request:
curl -H "Content-Type: application/json" \
-d '{"client_id":"39a469c6a2ea471392af28b9b0610c5f","client_secret":"d46b7cce50c2498ba93bd7d44e4d4432","grant_type":"client_credentials"}' \
https://api.yourdomain.com/project/<your-project-id>/client/authenticate
Response:
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbGllbnRJZCI6MSwiYXVkIjoiZDQ2YjdjY2U1MGMyNDk4YmE5M2JkN2Q0NGU0ZDQ0MzIiLCJpYXQiOjE1Mjg3MTcxMjAsImV4cCI6MTUyODcyMDcyMH0.FI3v0fsglCYImPR2O_qT38rRGN24zq9vvKNwoD3lIE4",
"token_type": "bearer",
"expires_in": 3600
}
The authentication response contains access_token
which is a JWT identifying the authenticated Client. The access token is used by adding it as the Authorization
header when making requests to secure endpoints e.g.
curl -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjEsImlhdCI6MTUxOTc4OTcwNiwiZXhwIjoxNTE5NzkyNzA2fQ.yYbuJ7m4u_PxyeIDw0TbAHko-cdyh0iVkUtd6hRJDAA" \
https://api.yourdomain.com/project/<your-project-id>/entry-type/
Refreshing the access token
Unlike the Resource Owner Password Credentials Grant flow, this flow does not support refreshing the token.


|
cds
2.3.1
|
SkipListSet
traits
More...
#include <cds/intrusive/details/skip_list_base.h>
Public Types | |
| typedef base_hook | hook |
| Hook used. More... | |
| typedef opt::none | compare |
| Key comparison functor. More... | |
| typedef opt::none | less |
| specifies binary predicate used for key compare. More... | |
| typedef opt::v::empty_disposer | disposer |
| Disposer. More... | |
| typedef atomicity::empty_item_counter | item_counter |
| Item counter. More... | |
| typedef opt::v::relaxed_ordering | memory_model |
| C++ memory ordering model. More... | |
| typedef turbo32 | random_level_generator |
| Random level generator. More... | |
| typedef CDS_DEFAULT_ALLOCATOR | allocator |
| Allocator. More... | |
| typedef cds::backoff::Default | back_off |
| back-off strategy More... | |
| typedef empty_stat | stat |
| Internal statistics. More... | |
| typedef opt::v::rcu_throw_deadlock | rcu_check_deadlock |
| RCU deadlock checking policy (only for RCU-based SkipListSet) More... | |
SkipListSet
traits
Allocator.
Although the skip-list is an intrusive container, an allocator should be provided to maintain variable randomly-calculated height of the node since the node can contain up to 32 next pointers. The allocator specified is used to allocate an array of next pointers for nodes which height is more than 1.
back-off strategy
If the option is not specified, the cds::backoff::Default
is used.
Key comparison functor.
No default functor is provided. If the option is not specified, the less
is used.
| typedef opt::v::empty_disposer cds::intrusive::skip_list::traits::disposer |
Disposer.
The functor used for dispose removed items. Default is opt::v::empty_disposer
.
Hook used.
Possible values are: skip_list::base_hook
, skip_list::member_hook
, skip_list::traits_hook
.
Item counter.
The type for item counting feature. By default, item counting is disabled (atomicity::empty_item_counter
), atomicity::item_counter
or atomicity::cache_friendly_item_counter
enables it.
specifies binary predicate used for key compare.
Default is std::less<T>
.
C++ memory ordering model.
List of available memory ordering see opt::memory_model
Random level generator.
The random level generator is an important part of skip-list algorithm. The node height in the skip-list have a probabilistic distribution where half of the nodes that have level i
pointers also have level i+1
pointers (i = 0..30). So, the height of a node is in range [0..31].
See skip_list::random_level_generator
option setter.
RCU deadlock checking policy (only for RCU-based SkipListSet)
List of available options see opt::rcu_check_deadlock
Internal statistics.
By default, internal statistics is disabled (skip_list::empty_stat
). Use skip_list::stat
to enable it.


The form is just an example of AngularJS Data-Binding and validation. Please use these to reach me. I am looking forward to hearing from you. . .
John Hoover
email<EMAIL_ADDRESS>phone:<PHONE_NUMBER>
Dear Mr. Hoover,
My name is {{ contactName || 'Your Name' }} with {{ contactCompany || 'Your Company' }} and I would love for you to find my information in my message below.
{{ contactMessage || 'Your Message Here' }}
Here is my contact information...{{ contactEmail || 'Your Email' }} and {{ contactPhone || 'Your Phone' }} Thanks!


12 static_assert( FLT_RADIX == 2 ,
"floating point types must use radix 2" );
25 #define MIN_TIME_BITS (0x7FFFFF)
27 static_assert( (
unsigned long)( (time_t)(
MIN_TIME_BITS) ) == (
unsigned long)(
MIN_TIME_BITS) ,
"time_t must hold at least 23 bits of precision" );
40 static_assert( DBL_MANT_DIG >= 17 ,
"double must hold at least 17 bits of precision" );
Imports common library modules, defines UserAlert exception, manages global variables,...
#define MIN_TIME_BITS
Definition: StaticAssert.h:25


Coder, lover of Linux, and drone enthusiast. Recent CS graduate that is an innovative thinker and creative problem solver. I have excellent communication and writing skills. Always exploring new technology for mobile and web development. Excellent team collaboration and leadership skills. Quick learner.
Currently working on 3 projects: "Pixie's Place" is a web application for lost and found pets. It will use Mongo, Node.js/Express, and pure JS, HTML/PUG, CSS for the front. It will utilize a REST API and use Google Maps API as well. "Digee" will be a robo-advisor web application that will utilize AI to help customers find good advice and planning for investments, home-loans, life insurance, etc. "Digee" will be built using MERN stack. This is the idea of a friend whom is a financial advisor for Morgan Stanley. "Sneaks" will be an Android application in which customers will be able to buy, sell, and trade high end sneakers without paying a consignment fee. Also, I'm currently learning Angular, React, React Native, and Redux.
Member of a team that made a buy and sell site in which students can sell or buy several items. Used CakePHP framework, Bootstrap, and MySQL
Collaborated with a team to create 2 player timed Tetris game in which one plays against another player. Player 1 goes first while Player 2 send messages via chat using socket.io. Stack used: Postgres, Node.js/Express, pure JS, HTML/PUG, CSS for front end. Must use valid email to play
Collaborated with team members to create a hotel reservation system that manages vacancy and reservation info. Implemented a user friendly GUI. Used MVC and Strategy design pattern in JAVA.
Made an Event Logger that is similar to a calendar app on smart phones. This program was a basic JAVA terminal program that enforced the use of programming fundamentals such as OOP and design patterns. User can view calendar in month view and see highlighted dates that have 1 or more events scheduled. Furthermore, user can add or remove events from the calendar.
Seems to me like you’re looking for a high-achieving, goals-oriented, friendly team player. Well you are in luck because I’m that person. I believe in “we”. Egos, the wrong attitude, unfriendliness, those are all things that stagnate the creative process. Therefore, I’m a firm believer in positive team-work. As software engineers we need our creativity to be at a max potential and that requires a positive team culture. I’m quite confident that I have a firm grasp on many of the required qualifications and requirements for this job, and if I don’t, I can confidently pick them up in no time. You see, the way I view a new technology or framework is as an untamed beast. Sort of like a beautiful fire breathing dragon, like those seen on the show Game of Thrones. I will relentlessly pursue and harness the potential of that framework or new technology and make it spit fire at my command. In other words, anything I seek to learn about I intend to master. I believe in chasing perfection because in the process I will catch excellence. Look, I may not have gone to an MIT, Stanford, or Berkeley but I’m quite confident I’m just as good as those students. I have some attributes that can’t be taught and that is grit, passion, and a hunger for success. Now that I have boldly told you why you should give me a shot at an interview, it is time for you to boldly give me a chance. You have nothing to lose and everything to gain. I will always give my 110%, always, no doubt about that. Thank you for your time.
Whenever I'm not coding, I enjoy long distance running, flying drones and drawing. I like to watch and play basketball, also a big football fan. Love to tinker around with my Rapberry Pi. Shows that I watch when I have time are Game of Thrones, Stranger Things, and Silicon Valley. One of my favorite things to do is think about how technology can help better the world and lives of people.
I'm a big supporter of the community and interested in groups or companies that help better the lives of those less fortunate. If you work for or are a part of any of those type of groups and need some technological assistance such as building a website or application, please let me know. I would love to see if I can help.


“Experienced and knowledgeable professional with extensive practice in technology engineering and computer science looking to obtain a position that allows for the application of design skills, customer service and support abilities and critical thinking to produce software that meets all goals and objectives outlined by the customer.”
Name - Jaskirat Singh
D.O.B- 19-05-2001
Sex- Male
Nationality- Indian
Religion - Sikhism
Qualification- BSc. (H) Computer Science
Programming Skills : C++, Java, SQL & Python
Web Development Skills : HTML, CSS, Javascript & Bootstrap
Communication Skills : English, Hindi & Punjabi
General Skills : Quick Learning, Adaptability, Problem Solving, Team-work & Leadership


Up-to-date data on support for type and typographic features on the web. Search or choose from the features below to get started.
test


1 Introduction
The objective of this guide is to serve as a:
- Reference guide for the new R Analyst;
- best-practice guidelines for Hakai staff to make reproducible analyses, and use literate programming methods in R-Studio; and
- a guide to enhance collaborative capacities for ecological analyses within and between Hakai research programs and generally the science community using Git and GitHub.
The beginning of this guide may seem difficult, but in making this guide I’ve kept long-term goals in mind and in a sense I have front-loaded the R learning experience with important concepts that will serve you in the near future and the long-run.
1.1 Acknowledgements
Much of this document simply refers you to material that others have worked very hard to make. I simply point to these resources in an order that makes sense and seems systematic to me. Many thanks to the following people for making this possible:
- Dr. Jenny Bryan, UBC Professor in the Masters of Data Science Program. Twitter, GitHUB.
- Dr. Roger Peng, Professor of Biostatistics at Johns Hopkins University. Website, GitHUB.
- Dr. Hadley Wickham, Chief Scientists at R-Studio. Website, Twitter, GitHUB.
Oh and thanks to Tupac and Biggie for inspiring me to write this guide.


 Initializes, notably, a self.m_camera attribute, which is a pointer to a concrete implementation
of the abstract base class Camera
Args:
i_lowerColor: HSV values of the lower threshold used to identify the puck
i_upperColor: HSV values of the Upper threshold used to identify the puck
i_radius: Radius of the puck in pixels
i_camera: pointer to a concrete implementation of the abstract base class Camera
i_broadcaster : pointer to a concrete implementation of the abstract base class Broadcaster
Reimplemented in PuckDetectorConfiguration.PuckDetectorConfiguration.
◆ __del__()
| def PuckDetectorCore.PuckDetectorCore.__del__ |
( |
|
self | ) |
|
PuckDetectorCore class's destructor. Releases the windows created by cv2
◆ displayCirclesOnFrame()
| def PuckDetectorCore.PuckDetectorCore.displayCirclesOnFrame |
( |
|
self, |
|
|
|
i_frame, |
|
|
|
i_xPosOfCenter, |
|
|
|
i_yPosOfCenter, |
|
|
|
i_radius |
|
) |
| |
Draws circle on the frame
Args:
i_frame: The frame to draw circles on
i_xPosOfCenter: X coordinate of the center of the circle to draw
i_yPosOfCenter: Y coordinate of the center of the circle to draw
i_radius: Radius of the circle to draw in pixels
◆ displayCirclesPositionOnFrame()
| def PuckDetectorCore.PuckDetectorCore.displayCirclesPositionOnFrame |
( |
|
self, |
|
|
|
i_frame, |
|
|
|
i_xPosOfCenter, |
|
|
|
i_yPosOfCenter |
|
) |
| |
Writes the position of the circle on the frame
Args:
i_frame: The frame to write the position of the circle on
i_xPosOfCenter: X coordinate of the center of the circle of which we want to display the coordinates
i_yPosOfCenter: Y coordinate of the center of the circle of which we want to display the coordinates
◆ findCircles()
| def PuckDetectorCore.PuckDetectorCore.findCircles |
( |
|
self, |
|
|
|
i_frame |
|
) |
| |
Finds the circles in the provided frame
Args:
i_frame: The frame in which we need to find the circles
Returns:
The circles that were found
◆ findPuckInAllCircles()
| def PuckDetectorCore.PuckDetectorCore.findPuckInAllCircles |
( |
|
self, |
|
|
|
i_circles |
|
) |
| |
Finds the puck in a group of circles
Args:
i_circles: The group of circles
Returns:
The circle that corresponds to the puck
◆ ProcessFrames()
| def PuckDetectorCore.PuckDetectorCore.ProcessFrames |
( |
|
self, |
|
|
|
i_frame |
|
) |
| |
Process the frame so that it is in a format that is appropriate for the cv2.HoughCircles() function.
Args:
i_frame: The frame that need to be processed
Returns:
The processed frame
◆ userWantsToQuit()
| def PuckDetectorCore.PuckDetectorCore.userWantsToQuit |
( |
|
self | ) |
|
Sets self.m_userWantsToQuit to True. Used by outside users to stop some methods that
are executed while self.m_userWantsToQuit is False
The documentation for this class was generated from the following file:
- D:/école/Université/UDES/Session 4/PROJET/HockusPockus/Vision/src/PuckDetectorCore.py