Class of root element.
More...
#include <CParent.h>
|
| | CParent (const string &name, const map< string, string > attributes) |
| | Constructor of CParent class. More...
|
| |
|
virtual | ~CParent () |
| | CParent destructor.
|
| |
| void | addContent (const char content) |
| | Method to add Content to element. More...
|
| |
| void | addContent (const string &content) |
| | Overloaded addContent function. More...
|
| |
| bool | sameName (const string &name) const |
| | Name testing method. More...
|
| |
| void | addSub (CParent *) |
| | Child insert. More...
|
| |
| string & | getName () |
| | Name getter. More...
|
| |
| void | changeVisibility () |
| | Visibility switcher. More...
|
| |
| void | update (const string &name, map< string, string > attributes, const string &content) |
| | Update of element. More...
|
| |
| virtual CParent * | getParent () const |
| | Parent getter. More...
|
| |
| virtual void | addParent (CParent *) |
| | Parent setter. More...
|
| |
| virtual void | print (WINDOW *p, int indent) const |
| | Prints element to the ncurses window. More...
|
| |
| void | deleteNode () |
| | Node deletion. More...
|
| |
| virtual string | printOutElement () const |
| | Creating output for the ofstream. More...
|
| |
| virtual void | printOut (ostream &os) const |
| | Fills ofstream with whole xml file. More...
|
| |
| virtual void | printNode (WINDOW *p, int indent, map< int, CParent * > &elements) |
| | Prints all subelements. More...
|
| |
| virtual void | printFiltered (WINDOW *p, string element, vector< pair< string, string > > attributes, map< int, CParent * > &elements, int indent) |
| | Prints filtered elements. More...
|
| |
|
| void | printAttr (WINDOW *p, int curY, int curX, int indent) const |
| | Prints all attributes of element to given ncurses window. More...
|
| |
| void | printContent (WINDOW *p, int indent) const |
| | Prints content to ncurses window. More...
|
| |
| void | printEnd (WINDOW *p, int indent) const |
| | Prints closing tag of an element to ncurses window. More...
|
| |
| string | printOutEnd () const |
| | Creating output for ofstream. More...
|
| |
| string | printOutAttr () const |
| | Creating output for the ofstream. More...
|
| |
|
|
string | m_name |
| | name of an element
|
| |
|
map< string, string > | m_attribute |
| | map of all element attributes
|
| |
|
string | m_content |
| | element content
|
| |
|
vector< CParent * > | m_childs |
| | vector of all subelement
|
| |
|
bool | hidden |
| | parameter representing visibility of an element
|
| |
Class of root element.
This class represents root element.Other element classes are derivated from this class
| CParent::CParent |
( |
const string & |
name, |
|
|
const map< string, string > |
attributes |
|
) |
| |
Constructor of CParent class.
Creates element and defines a name and attributes of its instance
- Parameters
-
| Name | element name |
| Attributes | element attributes |
| void CParent::addContent |
( |
const char |
content | ) |
|
Method to add Content to element.
This method adds one char to element content
- Parameters
-
| Content | char to be added to element content |
| void CParent::addContent |
( |
const string & |
content | ) |
|
Overloaded addContent function.
Overloaded function, that adds string to element content
- Parameters
-
| Content | string to be added to element content |
| void CParent::addParent |
( |
CParent * |
| ) |
|
|
virtual |
Parent setter.
- Parameters
-
| Parent | element of an element |
Reimplemented in CSubSC, and CSub.
| void CParent::addSub |
( |
CParent * |
sub | ) |
|
Child insert.
Adds subelement (child) to an element
- Parameters
-
| void CParent::changeVisibility |
( |
| ) |
|
Visibility switcher.
Change visibility of the element. This method is used to hide or unhide element nodes
| void CParent::deleteNode |
( |
| ) |
|
Node deletion.
Delete element with all its subelements
| string & CParent::getName |
( |
| ) |
|
Name getter.
- Returns
- Element name
| CParent * CParent::getParent |
( |
| ) |
const |
|
virtual |
Parent getter.
- Returns
- Parent element
Reimplemented in CSubSC, and CSub.
| void CParent::print |
( |
WINDOW * |
p, |
|
|
int |
indent |
|
) |
| const |
|
virtual |
Prints element to the ncurses window.
This method prints element in specific format to ncurses window with given indent
- Parameters
-
| p | Ncurses window |
| indent | Indent of an element |
| void CParent::printAttr |
( |
WINDOW * |
p, |
|
|
int |
curY, |
|
|
int |
curX, |
|
|
int |
indent |
|
) |
| const |
|
protected |
Prints all attributes of element to given ncurses window.
This method is used as part of the print method
- Parameters
-
| p | Ncurses window |
| curY | Current y position in given window |
| curX | Current x position in given window |
| indent | Indent of an element |
| void CParent::printContent |
( |
WINDOW * |
p, |
|
|
int |
indent |
|
) |
| const |
|
protected |
Prints content to ncurses window.
This method is used as part of the print method
- Parameters
-
| p | Ncurses window |
| indent | indent of an element |
| void CParent::printEnd |
( |
WINDOW * |
p, |
|
|
int |
indent |
|
) |
| const |
|
protected |
Prints closing tag of an element to ncurses window.
This method is used as part of the print method
- Parameters
-
| p | Ncurses window |
| indent | Indent of an element |
| void CParent::printFiltered |
( |
WINDOW * |
p, |
|
|
string |
element, |
|
|
vector< pair< string, string > > |
attributes, |
|
|
map< int, CParent * > & |
elements, |
|
|
int |
indent |
|
) |
| |
|
virtual |
Prints filtered elements.
Prints only that nodes with given name and attributes
- Parameters
-
| p | Ncurses window |
| element | name of the searched element |
| attributes | attributes of the searched element |
| elements | map of elements, which stores every visible element with its row number (To interact with the user) |
| indent | indent of an element |
| void CParent::printNode |
( |
WINDOW * |
p, |
|
|
int |
indent, |
|
|
map< int, CParent * > & |
elements |
|
) |
| |
|
virtual |
Prints all subelements.
This method will print all subelements of an element. In case of this class, it will print whole xml document
- Parameters
-
| p | Ncurses window |
| indent | indent of an element |
| elements | map of elements, which stores every visible element with its row number (To interact with the user) |
Reimplemented in CSubSC.
| void CParent::printOut |
( |
ostream & |
os | ) |
const |
|
virtual |
Fills ofstream with whole xml file.
- Parameters
-
Reimplemented in CSubSC.
| string CParent::printOutAttr |
( |
| ) |
const |
|
protected |
Creating output for the ofstream.
This method is used as part of printOutElemen method
- Returns
- formated string, containing all element attributes
| string CParent::printOutElement |
( |
| ) |
const |
|
virtual |
Creating output for the ofstream.
- Returns
- Formated string, containing element with attributes and possible content
Reimplemented in CSubSC.
| string CParent::printOutEnd |
( |
| ) |
const |
|
protected |
Creating output for ofstream.
This method is used as part of printOutElement method
- Returns
- formated string, containing closing tag of an element
| bool CParent::sameName |
( |
const string & |
name | ) |
const |
Name testing method.
Tests if the element has same name as input string
- Parameters
-
| Name | string to be compared with element name |
- Returns
- Result of comparison
| void CParent::update |
( |
const string & |
name, |
|
|
map< string, string > |
attributes, |
|
|
const string & |
content |
|
) |
| |
Update of element.
Method to update parameters of the element
- Parameters
-
| name | Element name |
| attributes | Element attributes |
| content | Element content |
The documentation for this class was generated from the following files:


'A fight formed' - Leeds United star reveals his role in that Aston Villa incident
Latest Aston Villa news | AVFC drew 1-1 against Leeds in an action-packed clash in April
by Shane Ireland, https://www.facebook.com/ShaneIrelandJournalistLeeds United midfielder Pablo Hernandez has revealed the role he played in the bizarre goal Aston Villa scored at Elland Road.
In what was a vital Championship promotion clash in April, Villa went behind when Mateusz Klich scored despite Jonathan Kodjia being injured and awaiting treatment.
The goal sparked fury and Anwar El-Ghazi was shown a red card after a clash with Patrick Bamford – although if was later rescinded with the Leeds striker being handed a ban.
In response to his players’ unsportsmanlike behaviour Leeds head coach Marcelo Bielsa demanded they allow Villa to walk the ball into the net to equalise.
Albert Adomah ran from the halfway line and slotted home, despite the best efforts of Swedish defender Pontus Jansson to prevent him doing so.
Hernandez, it turns out, was the player who revealed Bielsa’s decision to the rest of his team-mates.
“There was a lot of tension,” he said in an interview with Marca. “At the moment we got the goal a fight formed. I had a yellow and I didn’t want to take a chance.
“At that time, Bielsa called me and transmitted to me, since we speak the same language, what he thought, what he felt we had to do at that time. I passed it to the teammates.
“Also the captain, who through the assistants was given that instruction from the bench.
“Bielsa is our leader, the coach, we support his decision and we decided to let them score a goal to tie. They are things that also define your personality, our mentality and that have a lot of repercussion. It was a moment in a game, that decision was made and we did the right thing.”
The game ended 1-1 and Villa went on to achieve promotion the following month by beating Derby County at Wembley, after Leeds had lost against the Rams over two legs in the play-off semi-final.


PwC’s global operations report 7% revenue growth in FY 2019
by Emmanuel Abara BensonGlobal professional services provider, PricewaterhouseCoopers (PwC) has reported a 7% growth in revenue for the full-year period that ended on June 3oth, 2019. The company specifically earned a total of $42.4 billion from its operations from across six regions namely: the Americas, Western Europe, Central & Eastern Europe, Middle East & Africa, Australasia & Pacific, and Asia.
Note that during the comparable period in 2018, the company’s global operations realised a total of $40.6 billion.
Majority of the revenue in FY 2019 was made from the Americas ($17.8 billion) and Western Europe ($14.1 billion). Meanwhile, Central and Eastern Europe generated the least amount of money for PwC at $940 million. African and Middle Eastern operations accounted for $1.6 billion out of the total revenue reported for the period under review. Note that PwC Nigeria falls right under here.
Further breakdown of the earnings report shows that the service that generated the most money for PwC in 2019 is “assurance”. Apparently, the company has three major services it provides – Assurance, Advisory, and Tax & Legal. These services fetched the following amounts of money:
- Assurance: $17.3 billion
- Advisory: $14.3 billion
- Tax & Tax: $10.6 billion
While commenting generally on the earnings report, PwC said that companies around the world have continued to demand the services it provides. This explains the reason for the 7% increase in revenue. There was no further breakdown highlighting profit for the period or the cost of operations.
[READ MORE: May & Baker’s margins improve despite revenue contraction]
“As our clients face increasing challenges and opportunities driven by technological advances, stakeholder expectations and other changes, they require us to work together across the broad range of our operations helping them to deal with issues such as cybersecurity, trust, regulation and strategic workforce planning. And as a result, our business is growing rapidly in these areas to meet increased client demand.”
You may download the report here.


{% extends "giving/donation_form.html" %} {% block extra_javascript %} {{block.super}} {% endblock %} {% block content %}
Would you rather make a one-time gift? {% if not campaign.description %} Use the donation form . {% else %} Use the donation form . {% endif %}
{% if form_proc.errors or or_form.errors or ct_form.errors %}There were errors with the data submitted, see below.
{% endif %}Fields marked with an asterisk are required.


|
VirtualSCADA
1.0
VirtualSCADA Senior Design Project
|
Protected Member Functions | |
| getDefaultQueryGrammar () | |
| getDefaultSchemaGrammar () | |
| getDefaultPostProcessor () | |
| getPdoForSelect ($useReadPdo=true) | |
| run ($query, $bindings, Closure $callback) | |
| runQueryCallback ($query, $bindings, Closure $callback) | |
| tryAgainIfCausedByLostConnection (QueryException $e, $query, $bindings, Closure $callback) | |
| causedByLostConnection (QueryException $e) | |
| reconnectIfMissingConnection () | |
| fireConnectionEvent ($event) | |
| getElapsedTime ($start) | |
Protected Attributes | |
| $pdo | |
| $readPdo | |
| $reconnector | |
| $queryGrammar | |
| $schemaGrammar | |
| $postProcessor | |
| $events | |
| $fetchMode = PDO::FETCH_ASSOC | |
| $transactions = 0 | |
| $queryLog = array() | |
| $loggingQueries = false | |
| $pretending = false | |
| $database | |
| $tablePrefix = '' | |
| $config = array() | |
Definition at line 13 of file Connection.php.
| __construct | ( | PDO | $pdo, |
$database = '' , |
|||
$tablePrefix = '' , |
|||
| array | $config = array() |
||
| ) |
Create a new database connection instance.
| \PDO | $pdo | |
| string | $database | |
| string | $tablePrefix | |
| array | $config |
Definition at line 129 of file Connection.php.
| affectingStatement | ( | $query, | |
$bindings = array() |
|||
| ) |
Run an SQL statement and get the number of rows affected.
| string | $query | |
| array | $bindings |
Implements ConnectionInterface.
Definition at line 369 of file Connection.php.
| beginTransaction | ( | ) |
Start a new database transaction.
Implements ConnectionInterface.
Definition at line 470 of file Connection.php.
|
protected |
Determine if the given exception was caused by a lost connection.
| \Illuminate\Database\QueryException | $e |
Definition at line 657 of file Connection.php.
| commit | ( | ) |
Commit the active database transaction.
Implements ConnectionInterface.
Definition at line 487 of file Connection.php.
| delete | ( | $query, | |
$bindings = array() |
|||
| ) |
Run a delete statement against the database.
| string | $query | |
| array | $bindings |
Implements ConnectionInterface.
Definition at line 338 of file Connection.php.
| disableQueryLog | ( | ) |
Disable the query log on the connection.
Definition at line 1050 of file Connection.php.
| disconnect | ( | ) |
Disconnect from the underlying PDO connection.
Definition at line 673 of file Connection.php.
| enableQueryLog | ( | ) |
|
protected |
Fire an event for this connection.
| string | $event |
Definition at line 748 of file Connection.php.
| flushQueryLog | ( | ) |
| getConfig | ( | $option | ) |
Get an option from the configuration options.
| string | $option |
Definition at line 885 of file Connection.php.
| getDatabaseName | ( | ) |
Get the name of the connected database.
Definition at line 1070 of file Connection.php.
|
protected |
|
protected |
|
protected |
| getDoctrineColumn | ( | $table, | |
| $column | |||
| ) |
Get a Doctrine Schema Column instance.
| string | $table | |
| string | $column |
Definition at line 774 of file Connection.php.
| getDoctrineConnection | ( | ) |
Get the Doctrine DBAL database connection instance.
Definition at line 796 of file Connection.php.
| getDoctrineSchemaManager | ( | ) |
Get the Doctrine DBAL schema manager for the connection.
Definition at line 786 of file Connection.php.
| getDriverName | ( | ) |
|
protected |
Get the elapsed time since a given starting point.
| int | $start |
Definition at line 762 of file Connection.php.
| getEventDispatcher | ( | ) |
Get the event dispatcher used by the connection.
Definition at line 968 of file Connection.php.
| getFetchMode | ( | ) |
Get the default fetch mode for the connection.
Definition at line 999 of file Connection.php.
| getName | ( | ) |
| getPdo | ( | ) |
|
protected |
Get the PDO connection to use for a select query.
| bool | $useReadPdo |
Definition at line 302 of file Connection.php.
| getPostProcessor | ( | ) |
Get the query post processor used by the connection.
Definition at line 947 of file Connection.php.
| getQueryGrammar | ( | ) |
Get the query grammar used by the connection.
Definition at line 905 of file Connection.php.
| getQueryLog | ( | ) |
| getReadPdo | ( | ) |
Get the current PDO connection used for reading.
Definition at line 820 of file Connection.php.
| getSchemaBuilder | ( | ) |
Get a schema builder instance for the connection.
Definition at line 212 of file Connection.php.
| getSchemaGrammar | ( | ) |
Get the schema grammar used by the connection.
Definition at line 926 of file Connection.php.
| getTablePrefix | ( | ) |
Get the table prefix for the connection.
Definition at line 1091 of file Connection.php.
| insert | ( | $query, | |
$bindings = array() |
|||
| ) |
Run an insert statement against the database.
| string | $query | |
| array | $bindings |
Implements ConnectionInterface.
Definition at line 314 of file Connection.php.
| listen | ( | Closure | $callback | ) |
Register a database query listener with the connection.
| \Closure | $callback |
Definition at line 734 of file Connection.php.
| logging | ( | ) |
Determine whether we're logging queries.
Definition at line 1060 of file Connection.php.
| logQuery | ( | $query, | |
| $bindings, | |||
$time = null |
|||
| ) |
Log a query in the connection's query log.
| string | $query | |
| array | $bindings | |
| float | null | $time |
Definition at line 716 of file Connection.php.
| prepareBindings | ( | array | $bindings | ) |
Prepare the query bindings for execution.
| array | $bindings |
Implements ConnectionInterface.
Definition at line 408 of file Connection.php.
| pretend | ( | Closure | $callback | ) |
Execute the given callback in "dry run" mode.
| \Closure | $callback |
Implements ConnectionInterface.
Definition at line 533 of file Connection.php.
| pretending | ( | ) |
Determine if the connection in a "dry run".
Definition at line 989 of file Connection.php.
| raw | ( | $value | ) |
Get a new raw query expression.
| mixed | $value |
Implements ConnectionInterface.
Definition at line 240 of file Connection.php.
| reconnect | ( | ) |
|
protected |
Reconnect to the database if a PDO connection is missing.
Definition at line 700 of file Connection.php.
| rollBack | ( | ) |
Rollback the active database transaction.
Implements ConnectionInterface.
Definition at line 501 of file Connection.php.
|
protected |
Run a SQL statement and log its execution context.
| string | $query | |
| array | $bindings | |
| \Closure | $callback |
Definition at line 565 of file Connection.php.
|
protected |
Run a SQL statement.
| string | $query | |
| array | $bindings | |
| \Closure | $callback |
Definition at line 605 of file Connection.php.
| select | ( | $query, | |
$bindings = array() , |
|||
$useReadPdo = true |
|||
| ) |
Run a select statement against the database.
| string | $query | |
| array | $bindings | |
| bool | $useReadPdo |
Definition at line 279 of file Connection.php.
| selectFromWriteConnection | ( | $query, | |
$bindings = array() |
|||
| ) |
Run a select statement against the database.
| string | $query | |
| array | $bindings |
Definition at line 266 of file Connection.php.
| selectOne | ( | $query, | |
$bindings = array() |
|||
| ) |
Run a select statement and return a single result.
| string | $query | |
| array | $bindings |
Implements ConnectionInterface.
Definition at line 252 of file Connection.php.
| setDatabaseName | ( | $database | ) |
Set the name of the connected database.
| string | $database |
Definition at line 1081 of file Connection.php.
| setEventDispatcher | ( | Dispatcher | $events | ) |
Set the event dispatcher instance on the connection.
Definition at line 979 of file Connection.php.
| setFetchMode | ( | $fetchMode | ) |
Set the default fetch mode for the connection.
| int | $fetchMode |
Definition at line 1010 of file Connection.php.
| setPdo | ( | $pdo | ) |
Set the PDO connection.
| \PDO | null | $pdo |
Definition at line 833 of file Connection.php.
| setPostProcessor | ( | Processor | $processor | ) |
Set the query post processor used by the connection.
Definition at line 958 of file Connection.php.
| setQueryGrammar | ( | Query\Grammars\Grammar | $grammar | ) |
Set the query grammar used by the connection.
Definition at line 916 of file Connection.php.
| setReadPdo | ( | $pdo | ) |
Set the PDO connection used for reading.
| \PDO | null | $pdo |
Definition at line 849 of file Connection.php.
| setReconnector | ( | callable | $reconnector | ) |
Set the reconnect instance on the connection.
| callable | $reconnector |
Definition at line 862 of file Connection.php.
| setSchemaGrammar | ( | Schema\Grammars\Grammar | $grammar | ) |
Set the schema grammar used by the connection.
Definition at line 937 of file Connection.php.
| setTablePrefix | ( | $prefix | ) |
Set the table prefix in use by the connection.
| string | $prefix |
Definition at line 1102 of file Connection.php.
| statement | ( | $query, | |
$bindings = array() |
|||
| ) |
Execute an SQL statement and return the boolean result.
| string | $query | |
| array | $bindings |
Implements ConnectionInterface.
Definition at line 350 of file Connection.php.
| table | ( | $table | ) |
Begin a fluent query against a database table.
| string | $table |
Implements ConnectionInterface.
Definition at line 225 of file Connection.php.
| transaction | ( | Closure | $callback | ) |
Execute a Closure within a transaction.
| \Closure | $callback |
Implements ConnectionInterface.
Definition at line 438 of file Connection.php.
| transactionLevel | ( | ) |
Get the number of active transactions.
Implements ConnectionInterface.
Definition at line 522 of file Connection.php.
|
protected |
Handle a query exception that occurred during query execution.
| \Illuminate\Database\QueryException | $e | |
| string | $query | |
| array | $bindings | |
| \Closure | $callback |
Definition at line 639 of file Connection.php.
| unprepared | ( | $query | ) |
Run a raw, unprepared query against the PDO connection.
| string | $query |
Implements ConnectionInterface.
Definition at line 392 of file Connection.php.
| update | ( | $query, | |
$bindings = array() |
|||
| ) |
Run an update statement against the database.
| string | $query | |
| array | $bindings |
Implements ConnectionInterface.
Definition at line 326 of file Connection.php.
| useDefaultPostProcessor | ( | ) |
Set the query post processor to the default implementation.
Definition at line 192 of file Connection.php.
| useDefaultQueryGrammar | ( | ) |
Set the query grammar to the default implementation.
Definition at line 155 of file Connection.php.
| useDefaultSchemaGrammar | ( | ) |
Set the schema grammar to the default implementation.
Definition at line 175 of file Connection.php.
| withTablePrefix | ( | Grammar | $grammar | ) |
Set the table prefix and return the grammar.
| \Illuminate\Database\Grammar | $grammar |
Definition at line 1115 of file Connection.php.
|
protected |
Definition at line 118 of file Connection.php.
|
protected |
Definition at line 104 of file Connection.php.
|
protected |
Definition at line 62 of file Connection.php.
|
protected |
Definition at line 69 of file Connection.php.
|
protected |
Definition at line 90 of file Connection.php.
|
protected |
Definition at line 20 of file Connection.php.
|
protected |
Definition at line 55 of file Connection.php.
|
protected |
Definition at line 97 of file Connection.php.
|
protected |
Definition at line 41 of file Connection.php.
|
protected |
Definition at line 83 of file Connection.php.
|
protected |
Definition at line 27 of file Connection.php.
|
protected |
Definition at line 34 of file Connection.php.
|
protected |
Definition at line 48 of file Connection.php.
|
protected |
Definition at line 111 of file Connection.php.
|
protected |
Definition at line 76 of file Connection.php.


About me
input label
Recommended labels
Travel
Internet
it
French
English
JAVA
Photograph
Sculpture
Drawing
Jazziness
Running
PHP
Dreamweaver
Shopping
Writing
Diving
Basketball
Reading


val appName: String
Name of the CorDapp jar hosting the flow, without the .jar extension. It will include a unique identifier to deduplicate it from other releases of the same CorDapp, typically a version string. See the CorDapp JAR format for more details.


rainbow
- getting started shows the basics of using Rainbow
- intro to rainbow dives into how surface reconstruction
would work and the "right" way of builds apps would be.
- hello physics shows how to enable physics and create
simple scenes
- intro to animation shows how to create basic property
tweening animations
- controls shows a basic control model
- extrude graphs shows how we can build data visualizations using extruded 3D
- load mesh shows how to load a scene from a file (only works when hosted in a web server)
unit tests


Welcome to Dogoo.
Computers proccess data, which are effectively the manipulation of electric signals that are abstracted in such a way that they can represent meaningful information. The human brain effectively does the same. Those signals of course are meaningless unless there's a *processor* that is capable of give them meaning. But what if it was possible to backup all the data that represent's a person's conscience to a computer?
What if science knew enough about the human brain so that a processor capable of working exactly like a brain could be developed? Would that be a means to achieve immortality? Would the new conscience, now living inside a machine, be the same person as the original? Or just an exact copy?
These questions are brought into light in this epic sci-fi fantasy adventure roguelike, under development by Doggo Software studios.


STS Workforce on E-Learning & Educational Innovation Dashboard
Learn CT Surgery Usage
Curriculum Updates
E-Books
About
Learn CT Surgery Usage
Curriculum Updates
E-Books
About
E-Books
Cardiac & Congenital e-Book
73
Out of 108 manuscripts turned in
17
Out of 108 chapters finalized
Pearson's Thoracic & Esophageal Surgery e-Book
145
Out of 236 chapters


Star Wars: The Mandalorian's Baby Yoda Brought Werner Herzog to Tears
by Renaldo MatadeenWerner Herzog has given his seal of approval to Baby Yoda, aka "the Asset," admitting it brought tears to his eyes on the set of the Disney+ Star Wars series The Mandalorian.
Herzog plays the Client, the person who hires the titular bounty hunter to steal the child for him, and he revealed the emotional gravity of the baby impacted on him even though he's yet to see it on screen. "I have seen it on the set. I've seen it on the set," he told Variety. "And it's heartbreaking! It's heartbreakingly beautiful."
He explained how he was moved witnessing two technicians operating its various mechanisms, saying, "one was for the eyes and the mouth and the other one was for other facial expressions." Herzog, who admits he hasn't seen any Star Wars movies or anything from the portfolio of showrunner Jon Favreau, also said it was "a phenomenal technological achievement but, beyond the technological achievement, it's heartbreaking."
When asked why the animatronic was so heartbreaking to him, Herzog made it clear the innocence of it touched his soul. "It looked absolutely convincing," he continued. "It made you cry when you saw it."
Created by Jon Favreau, The Mandalorian stars Pedro Pascal, Gina Carano, Carl Weathers, Giancarlo Esposito, Emily Swallow, Omid Abtahi, Werner Herzog and Nick Nolte. The first two episodes are streaming now on Disney+.
https://schema.orgBreadcrumbListListItem1Homehttps://www.cbr.com/ListItem2TVhttps://www.cbr.com/category/tv/ListItem3TV Newshttps://www.cbr.com/category/tv/news-tv/ListItem4Star Wars: The Mandalorian's Baby Yoda Brought Werner Herzog to Tearshttps://www.cbr.com/star-wars-mandalorian-baby-yoda-werner-herzog/


You have done 57.6% more sales today. Check your new badge in your profile.
Meet world popular developers
Design high-quality designs, graphics, mock-ups and layouts for both new and existing web sites/ web applications / mobile applications.
Invoices have been paid to the company.
Project meeting with john @10:15am
Add files to new design folder
Add files to new design folder
Here, i focus ona range of items and featured that we use in life without giving them
Counter August 2020
You can Find Only Post and Quotes Related to IOS like ipad app design, iphone app design
Due Date
Budget
Cost


Enumerations
The following enumerations are available globally.
-
Undocumented
See moreDeclaration
Swift
public enum SwipeDirection
-
Undocumented
See moreDeclaration
Swift
public enum SwipeLength : Equatable
-
Undocumented
See moreDeclaration
Swift
public enum ToggleSwitch : String
-
Undocumented
See moreDeclaration
Swift
public enum DatePickerMode : Equatable
-
Undocumented
See moreDeclaration
Swift
public enum DatePickerWheelSetup : Equatable
-
Undocumented
See moreDeclaration
Swift
public enum DateMonthFormat
-
Undocumented
See moreDeclaration
Swift
public enum YearsFormat : String
-
Undocumented
See moreDeclaration
Swift
public enum MonthFormat : String
-
Undocumented
See moreDeclaration
Swift
public enum DayFormat : String
-
Undocumented
See moreDeclaration
Swift
public enum HoursFormat : String
-
Undocumented
See moreDeclaration
Swift
public enum MinutesFormat : String
-
Undocumented
See moreDeclaration
Swift
public enum SecondsFormat : String


If you didn't receive the confirmation message, check your spam folder or resend it via email settings.


Download App
Best Sellers
New Releases
©1997-2021 Audible, Inc. Audible and the Audible logo are trademarks of Audible, Inc, or its affiliates. 1 Washington Park, 16th Floor. Newark, NJ 07102. All Rights Reserved. Email reference number: 579041620


Justice Ginsburg hospitalized with fever
by Alex SwoyerJustice Ruth Bader Ginsburg was admitted to the hospital Friday evening with a fever and chills, the Supreme Court announced Saturday.
Justice Ginsburg, 86, was first evaluated at Sibley Memorial Hospital in Washington, D.C., before being admitted to Johns Hopkins Hospital in Baltimore.
“With intravenous antibiotics and fluids, her symptoms have abated and she expects to be released from the hospital as early as Sunday morning,” said a spokesperson from the Supreme Court.
Justice Ginsburg had cancer removed from her lung last year and was treated earlier this year for pancreatic cancer.
Sign up for Daily Newsletters
Copyright © 2019 The Washington Times, LLC. Click here for reprint permission.
Please read our comment policy before commenting.


public static class FloatControl.Type extends Control.Type
FloatControl.Type
inner class identifies one kind of
float control. Static instances are provided for the
common types.| Modifier and Type | Field and Description |
|---|---|
static FloatControl.Type |
AUX_RETURN
Represents a control for the auxiliary return gain on a line.
|
static FloatControl.Type |
AUX_SEND
Represents a control for the auxiliary send gain on a line.
|
static FloatControl.Type |
BALANCE
Represents a control for the relative balance of a stereo signal
between two stereo speakers.
|
static FloatControl.Type |
MASTER_GAIN
Represents a control for the overall gain on a line.
|
static FloatControl.Type |
PAN
Represents a control for the relative pan (left-right positioning)
of the signal.
|
static FloatControl.Type |
REVERB_RETURN
Represents a control for the post-reverb gain on a line.
|
static FloatControl.Type |
REVERB_SEND
Represents a control for the pre-reverb gain on a line.
|
static FloatControl.Type |
SAMPLE_RATE
Represents a control that changes the sample rate of audio playback.
|
static FloatControl.Type |
VOLUME
Represents a control for the volume on a line.
|
public static final FloatControl.Type MASTER_GAIN
Gain is a quantity in decibels (dB) that is added to the intrinsic decibel level of the audio signal--that is, the level of the signal before it is altered by the gain control. A positive gain amplifies (boosts) the signal's volume, and a negative gain attenuates (cuts) it. The gain setting defaults to a value of 0.0 dB, meaning the signal's loudness is unaffected. Note that gain measures dB, not amplitude. The relationship between a gain in decibels and the corresponding linear amplitude multiplier is:
linearScalar = pow(10.0, gainDB/20.0)
The FloatControl
class has methods to impose a maximum and
minimum allowable value for gain. However, because an audio signal might
already be at a high amplitude, the maximum setting does not guarantee
that the signal will be undistorted when the gain is applied to it (unless
the maximum is zero or negative). To avoid numeric overflow from excessively
large gain settings, a gain control can implement
clipping, meaning that the signal's amplitude will be limited to the maximum
value representable by its audio format, instead of wrapping around.
These comments apply to gain controls in general, not just master gain controls. A line can have more than one gain control. For example, a mixer (which is itself a line) might have a master gain control, an auxiliary return control, a reverb return control, and, on each of its source lines, an individual aux send and reverb send.
AUX_SEND
,
AUX_RETURN
,
REVERB_SEND
,
REVERB_RETURN
,
VOLUME
public static final FloatControl.Type AUX_SEND
MASTER_GAIN
,
AUX_RETURN
public static final FloatControl.Type AUX_RETURN
MASTER_GAIN
,
AUX_SEND
public static final FloatControl.Type REVERB_SEND
MASTER_GAIN
,
REVERB_RETURN
,
EnumControl.Type.REVERB
public static final FloatControl.Type REVERB_RETURN
MASTER_GAIN
,
REVERB_SEND
public static final FloatControl.Type VOLUME
public static final FloatControl.Type PAN
BALANCE
public static final FloatControl.Type BALANCE
PAN
public static final FloatControl.Type SAMPLE_RATE
AudioFormat
object. For example, if the natural rate
of the media is 11025 samples per second and the sample rate is set
to 22050 samples per second, the media will play back at twice the
normal speed.
Changing the sample rate with this control does not affect the data line's audio format. Also note that whenever you change a sound's sample rate, a change in the sound's pitch results. For example, doubling the sample rate has the effect of doubling the frequencies in the sound's spectrum, which raises the pitch by an octave.
protected Type(String name)
name
- the name of the new float control type Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2015, Oracle and/or its affiliates. All rights reserved.


Cumulative Precipitation
Curves show the total precipitation accumulated daily by each model listed in the key for the "Upper Mississippi" domain (37N-47N; 89W-99W).
[Higgins = gridded observations; RSM/NC = NCEP RSM; RSM/Sc = Scripps RSM]


The recommended way of obtaining the latest xia2 is to install the latest xia2/DIALS bundle which can be obtained here.
xia2 depends critically on having CCP4 available. The -dials and -2d pipelines will work with only xia2 and CCP4 installed. In order to use the -3d, -3di and -3dii pipelines you will also need XDS. Optionally xia2 can make use of LABELIT which requires installation of LABELIT or PHENIX (the latter includes the former).
The standard recommended procedure for installing xia2 is therefore:
By and large, if these instruction are followed you should end up with a happy xia2 installation. If you find any problems it’s always worth checking the blog or sending an email to<EMAIL_ADDRESS>| [1] | To use -xparallel you will need to fiddle with forkintegrate in the XDS distribution |


Reports odd-even checks of the following form:
x % 2 == 1
. Such checks fail when used with negative odd values. Consider using
x % 2 != 0
or
(x & 1) == 1
instead.


s6-networking
Software
skarnet.org
The s6-sntpclock program
s6-sntpclock is a small SNTP client. It connects to an
SNTP or NTP server, computes an estimated discrepancy between the
local clock time and the absolute time given by the server, and
outputs it on stdout.
Interface
s6-sntpclock [ -f ] [ -v verbosity ] [ -r roundtrips ] [ -t triptimeout ] [ -h throttle ] [ -T totaltimeout ] [ -e errmax ] [ -p port ] ipaddress | s6-clockview
- s6-sntpclock exchanges SNTPv4 messages with a SNTP server
listening on ipaddress, UDP port 123.
ipaddress can be IPv4 or IPv6.
- It computes the mean difference between the absolute time
given by the system clock and the one given by the server.
- It prints the difference to stdout in a format understood
by s6-clockadd and
s6-clockview. It then exits 0.
Options
- -f : force. Normally, s6-sntpclock exits 111 if it cannot
compute a time with a smaller uncertainty than errmax. If this
option is set, it will output a time difference and exit 0 even if the
error is too big.
- -v verbosity : be more or less verbose.
By default, verbosity is 1. 0 means only print fatal error
messages; 3 means trace every exchange with the server.
- -r roundtrips : perform roundtrips
exchanges with the server. By default, roundtrips is 10. A lower
value yields a higher time uncertainty; a higher value puts more load on
the server.
- -t triptimeout : if a SNTP exchange with
the server takes more than triptimeout milliseconds, abort this
exchange and move on to the next one. By default, triptimeout
is 2000.
- -h throttle : wait throttle
milliseconds between exchanges with the server. A lower value gets the
final result earlier, but exerts more load on the server. A higher
value puts a lighter load on the server, but delays the computation.
By default, throttle is 0. It is recommended to set it to a
reasonable nonzero value when increasing roundtrips.
- -T totaltimeout : if the whole
operation takes more than totaltimeout milliseconds, abort
and exit 1. By default, totaltimeout is 10000.
- -e errmax : accept a maximum time
uncertainty of errmax milliseconds. By default, errmax
is 100.
- -p port : contact a server on port
port. By default, port is 123.
Notes
- There are a lot of infelicities in the NTP protocol (which SNTP is
a subset of). The biggest offender is probably that NTP cannot handle
a time difference of more than 34 years: if the time given by the NTP
server is more than 34 years away from the time given by the system clock,
then NTP just cannot compute. This is a problem for CMOS-less systems,
where the system clock is initialized to the Unix Epoch. The solution
is to first manually initialize the system clock with a program such as
date or
s6-clock
to a closer time (such as 2013-01-01, which will be good up to 2047), then
contact the NTP server.
- A less obvious problem with NTP is that it works with UTC time,
which means that it gives inaccurate results when close to a leap second,
up to one second off when used during a leap second, and this
is bound to the use of UTC: there is nothing you can do about it. The
only solution to get reliable results even around a leap second is to
use linear time such as TAI; the
s6-taiclock and
s6-taiclockd programs provide tools to
do so.
A word on ntpd
From a Unix software engineering standpoint, the well-known
ntpd program is an
eldritch abomination. The main reason for it is that, just like its
lovely cousin BIND,
ntpd performs a lot of different tasks in a unique process, instead
of separating what could, and should, be separated. This is confusing
for both the programmer and the software user.
- The term "NTP server" means two different things:
- A program that serves NTP time to the Internet and can be
accessed by NTP clients.
- A daemon, i.e. a long-lived process, that runs on a machine
and handles NTP-related stuff such as keeping the system clock accurate.
The former is the real meaning of "NTP server". The latter is a common
usage for the term, but comes from a misuse of "server" to mean "daemon".
ntpd does not help clear the misunderstanding since it does both. It acts
as an NTP server, and as an NTP client getting its time from
lower-strata NTP servers, and as a local system clock management
daemon. Those are already 3 separate tasks.
- Local system clock management itself involves several duties. There
is the regular setting of the system clock, which can be done with
a loop over a simple program such as s6-clockadd.
There is also control of the clock skew, which s6-networking does not
provide because there is no portable interface for that; there is such a tool
in the clockspeed package.
- ntpd includes a complete cryptographic key management system for the
crypto part of NTP. NTP is not the only protocol that uses cryptography
and asymmetric keys; managing keys in a separate tool, not in the NTP
daemon itself, would be simpler and smarter.
- ntpd provides monitoring support for client and server timekeeping
performance. This would be best implemented as a separate specific log
analyzing tool.
And of course, no matter how many layers of complexity you add onto
ntpd, it will never be able to give accurate time in the vicinity of a
leap second, since the very protocol is flawed by design - but
the ntpd authors cannot be blamed for that. Also, the ntpd
writers, not the designers, should be praised: the history of
ntpd security flaws is remarkably small, which is quite a feat for a
huge monolithic root daemon.
Network synchronization is important, NTP has its perks and
valid use cases, and its existence is a good thing. However, I wish that
the main NTP implementation weren't written as a big fat clumsy process
running as root. s6-sntpclock together with
s6-clockadd aims to provide a small, simple
tool to keep system clocks, especially in embedded devices, synchronized
to a NTP server.


badge
Basic Usage
Some Label
Some Label w/Accessibility
Pill Shaped
Some Label
Anchors
Redirect to Google
Variants
Primary
Secondary
Success
Danger
Warning
Info
Dark
Muted
Light
Some Header Value 1
Some Header Value 1
Some Header Value 1
Some Header Value 1
Some Header Value 1
Some Header Value 1


Plugin Information |
|---|
View One-Shot Executor on the plugin site for more information. |
TLDR;
A One-Shot Executor is a Slave created for a specific Build in Jenkins Queue. It is launched as the Build start, and destroyed as the Build Complete. Think as a 1:1 lifecycle between your Build and the Slave to run it.
This plugin doesn't provide anything by itself, it is designed for being used by other plugin that require this new paradigm, typically relying on container technology.
Why ?
A classic (or Cloud) Jenkins slave has it standalone lifecycle and do accept task from the build queue. Especially, even when using a Cloud slave, which can create a fresh new slave for a Build, Slave will still precede the Build, and survive it. Cloud API can be tweaked to ensure slave will be created asap and destroyed after use for a Build, but
1. Cloud API do introduce some delays. Can be tweaked to limit them to a strict minimum, but still exists
2. The relation between a Build and a Slave is "Slave host a Build" as a special case for "Salve do host Builds" .
So the Slave precede the Build, what's wrong ?
When relying on Docker containers, and the actual container image to host the build is defined by the Job or Build parameters, the slave launch can fail. A Cloud Slave would try to provision a slave repeatedly as an infinite loop to match the Queue Task executor request, until someone wonder why the build never started, investigate, and find a typo in job configuration.
So, what about One-Shot ?
A OneShot executor is an executor dedicated to a Builld.
We don't need the Cloud API and it's provisioning logic to estimate the load and determine when a new slave has to be created, we KNOW a new slave is required. So One-Shot just bypass the Cloud logic and immediately create a Slave. The fresh new slave claim to be ready so the task is assigned, and a Build is started. As the Build start to execute, the Slave actually starts as well.
This lazy-bootstrap let us create a tight coupling between a Build and it's Slave, and actually reverse the relation to "a Build has a Slave".
Reversing the Slave/Build relation and forwarding Slave's log into build log, we can report the container bootstrap process. User will see in log the image is pulled from registry, container is started, may fail and report errors. In such circumstances, this is not Jenkins fault, but an actual failure caused by the Build's configuration. So getting this in the Build log, and reporting to the user by build failure notification will let him know something is wrong without delay.
How ?
One-Shot Executor is an infrastructure plugin, it does not provide new Slaves by itself, but just the API for a Slave provider to implement this new approach and only focus on running a Slave according to the Job configuration / Build parameters.
Implementation require Jenkins 2.9 or later as we had to introduce some dedicated hooks to allow the Build:Executor inverse relation.
History
This plugin has been extracted from docker-slaves, we created for Docker Hack Day 2015 (we won the 3rd prize!), and which is an experiment sandbox for us. So this specific piece of code was created by extracting stable components to let them become mature and usable by others.
Attachments:
Capture d’écran 2016-03-04 à 09.23.19.png (image/png)


 When your account is activated, you will receive a notification email.
Return to the home page (requires an active account; click log out to attempt to sign in again).
{% endblock %}


{% include "includes/header.html" with search=search%}
Search Results for:
Search
#
Status Code
Url (click to see details)
{% for i in search_results %}
{{i.number}}
{{i.status_code}}
{{ i.url }}
{% endfor %}
{% include "includes/footer.html" %}


US military loses drone over Libyan capital
by SAMY MAGDYCAIRO (AP) — The U.S. military said Friday it lost an unmanned drone aircraft over the Libyan capital, Tripoli, where rival armed groups have been fighting for control of the city for months.
The U.S. Africa Command said the drone was lost Thursday while assessing the security situation and monitoring extremist activity.
AFRICOM did not give a reason for the drone’s loss, but said it was investigating. It said drone operations in Libya were “fully coordinated with appropriate government officials.”
Since 2015, Libya has been divided between two governments, one based in Tripoli and the other in the country’s east. Forces loyal to the eastern government have been trying to wrest control of the capital since April.
An Italian drone was shot down Wednesday southeast of Tripoli by forces loyal to the eastern government.
In September, the U.S. military said it carried out several airstrikes against the Islamic State group in Libya, killing more than 40 militants. Those were the first U.S. strikes in the North African country in over a year.
Oil-rich Libya descended into chaos in 2011, when an international military coalition helped rebels overthrow longtime autocrat Moammar Gadhafi. Islamic extremists have exploited the chaos to expand their reach in the country.
SAMY MAGDY


Login System Tutorial Part 6 - Logout¶
In this tutorial, we will discuss about logging out a user account from the home page.
First of all, go to home.html in the templates folder and add the logout link text in the code.

Logout

Create a new file in the views folder named logout.go. Inside the file, create a handler for the logout process.
package views
import (
"net/http"
"github.com/uadmin/uadmin"
)
// LogoutHandler !
func LogoutHandler(w http.ResponseWriter, r *http.Request, session *uadmin.Session) {
// Log out the user.
uadmin.Logout(r)
// Expire all cookies on logout by setting MaxAge to be less than 0.
for _, cookie := range r.Cookies() {
c := &http.Cookie{
Name: cookie.Name,
Value: "",
Path: "/",
MaxAge: -1,
}
http.SetCookie(w, c)
}
http.Redirect(w, r, "/login_system/", http.StatusSeeOther)
}
Lastly, add a validation depending on the request URL path in views_main.go.
// MainHandler is the main handler for the login system.
func MainHandler(w http.ResponseWriter, r *http.Request) {
// Some codes
// ------------- ADD THIS CODE ------------- //
if r.URL.Path == "" {
// HomeHandler handles the home page.
HomeHandler(w, r, session)
return
} else if r.URL.Path == "/logout" {
/* If the request URL Path is /logout after the /login_system/, it will proceed to this part.
e.g. localhost:8080/login_system/logout */
// LogoutHandler handles the logout process for the user.
LogoutHandler(w, r, session)
return
}
// ---------------------------------------- //
}
Now run your application and login your account where OTPRequired is disabled.
Result
Now let’s try to manipulate the system. To ensure that login process really works, let’s refresh the page and see what happens.
Nice! The webpage sticks to the home page after we refresh it. Let’s check if the session cookie is created in the browser.
Now let’s click Logout and see what happens.
Refresh the page one more time to ensure if logout process really works.
Nice! The webpage sticks to the login page after we refresh it. Let’s check if the session cookie is removed in the browser.
The session cookie is there by now but once you did anything in the browser such as clicking the login button or refreshing the page, the session cookie will disappear.
Same thing goes if the account you login has OTPRequired enabled.
Result
And if you click logout
Congrats, now you know how to do the following in the entire series:
Preparing uAdmin files in the project folder
Build an application from scratch
Change the dashboard title
Create custom login form in HTML
Sending request from front-end to back-end
Getting the session key based on the user credentials
Setting an HTTP cookie
OTP Scanning
Logout user
Deleting the cookie
Maintaining the webpage based on the user login status
Click here to view the full progress of this application.
If you want to learn more and discover about the concepts of uAdmin, you may go to these references with examples:


News
July 15, 2016 - I've added some links to my Github, and set up a new LinkedIn account.
Hello! My name is Hayley. I'm a recent highschool graduate aiming for my bachelor's degree in Computer Science. I've always been interested in technology, and I've had a lot of fun making websites, designing web apps, hacking/repurposing old devices, and coding mods for videogames. I also enjoy composing music, creating art, and studying the environment. In 5 years I would like to be putting my skills to good use - perhaps creating therapeutic games for people with disabilities, analyzing statistics for healthcare, or managing websites and volunteer databases for nonprofits.
July 15, 2016 - I've added some links to my Github, and set up a new LinkedIn account.
Every day I try to learn something new. Here's a few things I'm very proud to know how to do:
Web development. I had the great opprotunity to be a part of the Web Development Skills Bootcamp offered by the SIEC. We learned about HTML, CSS, and just a little bit of Javascript, as well as responsive web design. Since then I've learned much more about Javascript, as well as JQuery and PHP. Check out some of the websites in my portfolio!
Programming. I've always been pretty passionate about programming. My first experience was when I was 12 years old, and I wanted to hack my Pokemon games to make my own story. Since then I've taken a lot of classes and made a lot of cool programs and games. I've learned VB, C++, Python, and Javascript, as well as some niche languages like Boo. Check out my portfolio, download some goodies from my GitHub, or catch me at a Game Jam!
Art and design. I've loved art since I was a little kid, and I've done a lot of traditional and digital art. I love using lots of bright colours and symbolism in my artwork, as well as using thick, bold lines. Traditionally, I like using bright markers and black pens, as well as panels of undiluted, bright paint for murals. Digitally, I've used programs like Photoshop, Corel Painter, and SAI to make digital paintings, sketches, and graphics, as well as edit photos. I've also used programs like Illustrator to make icons, video game sprites, and GUI elements using vector graphics.
Being involved in the community has always been important to me. I've had the opprotunity to be involved with a lot of great causes that have benefitted from my skills.
My classmates and I had the opprotunity to help out St. Pauls Hospital run their Community Day on May 25. We helped set up and close down, served hotdogs, and answered questions to give everyone a great time.
In the 2015-2016 school year, many students from TDC got together to create the school's first Off The Grid Ecoclub. We met many times to discuss our clean energy goals, and got many things accomplished in our first year. We started a social media campaign and made several videos to support our cause. We built and maintained several vermi composts, and worked very hard to establish a garden at the back of the school for all to enjoy. We also did an energy audit to see how much power the school wasted and how we could cut back, as well as fundraising and establishing a deal with SaskPower to install solar panels.
In the 2015-2016 school year I had the amazing opprotunity to work with TDC's art club to complete two murals in the hallway of the school. We collaborated with local artists and with eachother to design a unique mural to represent our community's roots and values. We completed the project over several weekends, putting in long hours to get the job done.
A web app that allows you to draw lines that dissipate into colourful bubbles. Take a look by clicking here!
Hi! I'm always looking to make new connections. Whether you're interested in working together on a project, having me come out and volunteer, or just have some feedback, I'm excited to hear from you. Please fill out the form below, and I'll get back to you as soon as possible. You can also reach me through my LinkedIn.


|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DataInput
The DataInput
interface provides methods to read data.
| Method Summary | |
|---|---|
void |
readArray(boolean[] source)
Reads an array of booleans. |
void |
readArray(boolean[] destination,
int offset,
int length)
Reads a (slice of) an array of booleans. |
void |
readArray(byte[] source)
Reads an array of bytes. |
void |
readArray(byte[] destination,
int offset,
int length)
Reads a (slice of) an array of booleans. |
void |
readArray(char[] source)
Reads an array of characters. |
void |
readArray(char[] destination,
int offset,
int length)
Reads a (slice of) an array of characters. |
void |
readArray(double[] source)
Reads an array of doubles. |
void |
readArray(double[] destination,
int offset,
int length)
Reads a (slice of) an array of doubles. |
void |
readArray(float[] source)
Reads an array of floats. |
void |
readArray(float[] destination,
int offset,
int length)
Reads a (slice of) an array of floats. |
void |
readArray(int[] source)
Reads an array of integers. |
void |
readArray(int[] destination,
int offset,
int length)
Reads a (slice of) an array of integers. |
void |
readArray(long[] source)
Reads an array of longs. |
void |
readArray(long[] destination,
int offset,
int length)
Reads a (slice of) an array of longs. |
void |
readArray(short[] source)
Reads an array of shorts. |
void |
readArray(short[] destination,
int offset,
int length)
Reads a (slice of) an array of shorts. |
boolean |
readBoolean()
Reads a boolean value. |
byte |
readByte()
Reads a byte value. |
char |
readChar()
Reads a character value. |
double |
readDouble()
Reads a double value. |
float |
readFloat()
Reads a float value. |
int |
readInt()
Reads a integer value. |
long |
readLong()
Reads a long value. |
short |
readShort()
Reads a short value. |
int |
readUnsignedByte()
Reads an unsigned byte value. |
int |
readUnsignedShort()
Reads an unsigned short value. |
| Method Detail |
|---|
boolean readBoolean() throws IOException
IOException
byte readByte() throws IOException
IOException
char readChar() throws IOException
IOException
short readShort() throws IOException
IOException
int readInt() throws IOException
IOException
int readUnsignedByte() throws IOException
IOException
int readUnsignedShort() throws IOException
IOException
long readLong() throws IOException
IOException
float readFloat() throws IOException
IOException
double readDouble() throws IOException
IOException
void readArray(boolean[] destination, int offset, int length) throws IOException
destination
- The array to write to.offset
- The first element to writelength
- The number of elements to write
IOException
void readArray(byte[] destination, int offset, int length) throws IOException
destination
- The array to write to.offset
- The first element to writelength
- The number of elements to write
IOException
void readArray(char[] destination, int offset, int length) throws IOException
destination
- The array to write to.offset
- The first element to writelength
- The number of elements to write
IOException
void readArray(short[] destination, int offset, int length) throws IOException
destination
- The array to write to.offset
- The first element to writelength
- The number of elements to write
IOException
void readArray(int[] destination, int offset, int length) throws IOException
destination
- The array to write to.offset
- The first element to writelength
- The number of elements to write
IOException
void readArray(long[] destination, int offset, int length) throws IOException
destination
- The array to write to.offset
- The first element to writelength
- The number of elements to write
IOException
void readArray(float[] destination, int offset, int length) throws IOException
destination
- The array to write to.offset
- The first element to writelength
- The number of elements to write
IOException
void readArray(double[] destination, int offset, int length) throws IOException
destination
- The array to write to.offset
- The first element to writelength
- The number of elements to write
IOException
void readArray(boolean[] source) throws IOException
source
- the array to read
IOException
- on an IO errorvoid readArray(byte[] source) throws IOException
source
- the array to read
IOException
- on an IO errorvoid readArray(char[] source) throws IOException
source
- the array to read
IOException
- on an IO errorvoid readArray(short[] source) throws IOException
source
- the array to read
IOException
- on an IO errorvoid readArray(int[] source) throws IOException
source
- the array to read
IOException
- on an IO errorvoid readArray(long[] source) throws IOException
source
- the array to read
IOException
- on an IO errorvoid readArray(float[] source) throws IOException
source
- the array to read
IOException
- on an IO errorvoid readArray(double[] source) throws IOException
source
- the array to read
IOException
- on an IO error
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


I'am a software developer in Tech in Moringa School,i'am 21years old.
I was Born in Nairobi raised in a place known as Gatwekera i do spend most of my times in kibra i travel to kisumu often my goal is to become a software developer in the field of technology and advance in my skills.I also want to take the world of technology to the Highest levels possible with the legite ideas i will be having in control. I'am based in Nairobi.
2001-2013 This was my scratch learning platform in St.Stephen Education Center {std 1-8}.
2014-2018 I took another step in going to Secondary School known as Olympic High School {form 1-4}.
2019 I joined tech platform in Moringa School.
I love Artwork and Fashion.
Riding Bykes.
Networking and Exploration.
HTML5.
CSS3.
Commandline
Git


Dense
keras.layers.Dense(units, activation=None, use_bias=True, kernel_initializer='glorot_uniform', bias_initializer='zeros', kernel_regularizer=None, bias_regularizer=None, activity_regularizer=None, kernel_constraint=None, bias_constraint=None)
Just your regular densely-connected NN layer.
Dense
implements the operation:
output = activation(dot(input, kernel) + bias)
where activation
is the element-wise activation function
passed as the activation
argument, kernel
is a weights matrix
created by the layer, and bias
is a bias vector created by the layer
(only applicable if use_bias
is True
).
Note: if the input to the layer has a rank greater than 2, then
it is flattened prior to the initial dot product with kernel
.
Example
# as first layer in a sequential model:
model = Sequential()
model.add(Dense(32, input_shape=(16,)))
# now the model will take as input arrays of shape (*, 16)
# and output arrays of shape (*, 32)
# after the first layer, you don't need to specify
# the size of the input anymore:
model.add(Dense(32))
Arguments
- units: Positive integer, dimensionality of the output space.
- activation: Activation function to use
(see activations).
If you don't specify anything, no activation is applied
(ie. "linear" activation:
a(x) = x
). - use_bias: Boolean, whether the layer uses a bias vector.
- kernel_initializer: Initializer for the
kernel
weights matrix (see initializers). - bias_initializer: Initializer for the bias vector (see initializers).
- kernel_regularizer: Regularizer function applied to
the
kernel
weights matrix (see regularizer). - bias_regularizer: Regularizer function applied to the bias vector (see regularizer).
- activity_regularizer: Regularizer function applied to the output of the layer (its "activation"). (see regularizer).
- kernel_constraint: Constraint function applied to
the
kernel
weights matrix (see constraints). - bias_constraint: Constraint function applied to the bias vector (see constraints).
Input shape
nD tensor with shape: (batch_size, ..., input_dim)
.
The most common situation would be
a 2D input with shape (batch_size, input_dim)
.
Output shape
nD tensor with shape: (batch_size, ..., units)
.
For instance, for a 2D input with shape (batch_size, input_dim)
,
the output would have shape (batch_size, units)
.
Activation
keras.layers.Activation(activation)
Applies an activation function to an output.
Arguments
- activation: name of activation function to use (see: activations), or alternatively, a Theano or TensorFlow operation.
Input shape
Arbitrary. Use the keyword argument input_shape
(tuple of integers, does not include the samples axis)
when using this layer as the first layer in a model.
Output shape
Same shape as input.
Dropout
keras.layers.Dropout(rate, noise_shape=None, seed=None)
Applies Dropout to the input.
Dropout consists in randomly setting
a fraction rate
of input units to 0 at each update during training time,
which helps prevent overfitting.
Arguments
- rate: float between 0 and 1. Fraction of the input units to drop.
- noise_shape: 1D integer tensor representing the shape of the
binary dropout mask that will be multiplied with the input.
For instance, if your inputs have shape
(batch_size, timesteps, features)
and you want the dropout mask to be the same for all timesteps, you can usenoise_shape=(batch_size, 1, features)
. - seed: A Python integer to use as random seed.
References
Flatten
keras.layers.Flatten(data_format=None)
Flattens the input. Does not affect the batch size.
Arguments
- data_format: A string,
one of
channels_last
(default) orchannels_first
. The ordering of the dimensions in the inputs. The purpose of this argument is to preserve weight ordering when switching a model from one data format to another.channels_last
corresponds to inputs with shape(batch, ..., channels)
whilechannels_first
corresponds to inputs with shape(batch, channels, ...)
. It defaults to theimage_data_format
value found in your Keras config file at~/.keras/keras.json
. If you never set it, then it will be "channels_last".
Example
model = Sequential()
model.add(Conv2D(64, (3, 3),
input_shape=(3, 32, 32), padding='same',))
# now: model.output_shape == (None, 64, 32, 32)
model.add(Flatten())
# now: model.output_shape == (None, 65536)
Input
keras.engine.input_layer.Input()
Input()
is used to instantiate a Keras tensor.
A Keras tensor is a tensor object from the underlying backend (Theano, TensorFlow or CNTK), which we augment with certain attributes that allow us to build a Keras model just by knowing the inputs and outputs of the model.
For instance, if a, b and c are Keras tensors,
it becomes possible to do:
model = Model(input=[a, b], output=c)
The added Keras attributes are:
_keras_shape
: Integer shape tuple propagated
via Keras-side shape inference.
_keras_history
: Last layer applied to the tensor.
the entire layer graph is retrievable from that layer,
recursively.
Arguments
- shape: A shape tuple (integer), not including the batch size.
For instance,
shape=(32,)
indicates that the expected input will be batches of 32-dimensional vectors. - batch_shape: A shape tuple (integer), including the batch size.
For instance,
batch_shape=(10, 32)
indicates that the expected input will be batches of 10 32-dimensional vectors.batch_shape=(None, 32)
indicates batches of an arbitrary number of 32-dimensional vectors. - name: An optional name string for the layer. Should be unique in a model (do not reuse the same name twice). It will be autogenerated if it isn't provided.
- dtype: The data type expected by the input, as a string
(
float32
,float64
,int32
...) - sparse: A boolean specifying whether the placeholder to be created is sparse.
- tensor: Optional existing tensor to wrap into the
Input
layer. If set, the layer will not create a placeholder tensor.
Returns
A tensor.
Example
# this is a logistic regression in Keras
x = Input(shape=(32,))
y = Dense(16, activation='softmax')(x)
model = Model(x, y)
Reshape
keras.layers.Reshape(target_shape)
Reshapes an output to a certain shape.
Arguments
- target_shape: target shape. Tuple of integers. Does not include the batch axis.
Input shape
Arbitrary, although all dimensions in the input shaped must be fixed.
Use the keyword argument input_shape
(tuple of integers, does not include the batch axis)
when using this layer as the first layer in a model.
Output shape
(batch_size,) + target_shape
Example
# as first layer in a Sequential model
model = Sequential()
model.add(Reshape((3, 4), input_shape=(12,)))
# now: model.output_shape == (None, 3, 4)
# note: `None` is the batch dimension
# as intermediate layer in a Sequential model
model.add(Reshape((6, 2)))
# now: model.output_shape == (None, 6, 2)
# also supports shape inference using `-1` as dimension
model.add(Reshape((-1, 2, 2)))
# now: model.output_shape == (None, 3, 2, 2)
Permute
keras.layers.Permute(dims)
Permutes the dimensions of the input according to a given pattern.
Useful for e.g. connecting RNNs and convnets together.
Example
model = Sequential()
model.add(Permute((2, 1), input_shape=(10, 64)))
# now: model.output_shape == (None, 64, 10)
# note: `None` is the batch dimension
Arguments
- dims: Tuple of integers. Permutation pattern, does not include the
samples dimension. Indexing starts at 1.
For instance,
(2, 1)
permutes the first and second dimension of the input.
Input shape
Arbitrary. Use the keyword argument input_shape
(tuple of integers, does not include the samples axis)
when using this layer as the first layer in a model.
Output shape
Same as the input shape, but with the dimensions re-ordered according to the specified pattern.
RepeatVector
keras.layers.RepeatVector(n)
Repeats the input n times.
Example
model = Sequential()
model.add(Dense(32, input_dim=32))
# now: model.output_shape == (None, 32)
# note: `None` is the batch dimension
model.add(RepeatVector(3))
# now: model.output_shape == (None, 3, 32)
Arguments
- n: integer, repetition factor.
Input shape
2D tensor of shape (num_samples, features)
.
Output shape
3D tensor of shape (num_samples, n, features)
.
Lambda
keras.layers.Lambda(function, output_shape=None, mask=None, arguments=None)
Wraps arbitrary expression as a Layer
object.
Examples
# add a x -> x^2 layer
model.add(Lambda(lambda x: x ** 2))
# add a layer that returns the concatenation
# of the positive part of the input and
# the opposite of the negative part
def antirectifier(x):
x -= K.mean(x, axis=1, keepdims=True)
x = K.l2_normalize(x, axis=1)
pos = K.relu(x)
neg = K.relu(-x)
return K.concatenate([pos, neg], axis=1)
def antirectifier_output_shape(input_shape):
shape = list(input_shape)
assert len(shape) == 2 # only valid for 2D tensors
shape[-1] *= 2
return tuple(shape)
model.add(Lambda(antirectifier,
output_shape=antirectifier_output_shape))
# add a layer that returns the hadamard product
# and sum of it from two input tensors
def hadamard_product_sum(tensors):
out1 = tensors[0] * tensors[1]
out2 = K.sum(out1, axis=-1)
return [out1, out2]
def hadamard_product_sum_output_shape(input_shapes):
shape1 = list(input_shapes[0])
shape2 = list(input_shapes[1])
assert shape1 == shape2 # else hadamard product isn't possible
return [tuple(shape1), tuple(shape2[:-1])]
x1 = Dense(32)(input_1)
x2 = Dense(32)(input_2)
layer = Lambda(hadamard_product_sum, hadamard_product_sum_output_shape)
x_hadamard, x_sum = layer([x1, x2])
Arguments
- function: The function to be evaluated. Takes input tensor or list of tensors as first argument.
- output_shape: Expected output shape from function.
Only relevant when using Theano.
Can be a tuple or function.
If a tuple, it only specifies the first dimension onward;
sample dimension is assumed either the same as the input:
output_shape = (input_shape[0], ) + output_shape
or, the input isNone
and the sample dimension is alsoNone
:output_shape = (None, ) + output_shape
If a function, it specifies the entire shape as a function of the input shape:output_shape = f(input_shape)
- mask: Either None (indicating no masking) or a Tensor indicating the input mask for Embedding.
- arguments: optional dictionary of keyword arguments to be passed to the function.
Input shape
Arbitrary. Use the keyword argument input_shape (tuple of integers, does not include the samples axis) when using this layer as the first layer in a model.
Output shape
Specified by output_shape
argument
(or auto-inferred when using TensorFlow or CNTK).
ActivityRegularization
keras.layers.ActivityRegularization(l1=0.0, l2=0.0)
Layer that applies an update to the cost function based input activity.
Arguments
- l1: L1 regularization factor (positive float).
- l2: L2 regularization factor (positive float).
Input shape
Arbitrary. Use the keyword argument input_shape
(tuple of integers, does not include the samples axis)
when using this layer as the first layer in a model.
Output shape
Same shape as input.
Masking
keras.layers.Masking(mask_value=0.0)
Masks a sequence by using a mask value to skip timesteps.
If all features for a given sample timestep are equal to mask_value
,
then the sample timestep will be masked (skipped) in all downstream layers
(as long as they support masking).
If any downstream layer does not support masking yet receives such an input mask, an exception will be raised.
Example
Consider a Numpy data array x
of shape (samples, timesteps, features)
,
to be fed to an LSTM layer.
You want to mask sample #0 at timestep #3, and sample #2 at timestep #5,
because you lack features for these sample timesteps. You can do:
- set
x[0, 3, :] = 0.
andx[2, 5, :] = 0.
- insert a
Masking
layer withmask_value=0.
before the LSTM layer:
model = Sequential()
model.add(Masking(mask_value=0., input_shape=(timesteps, features)))
model.add(LSTM(32))
Arguments
- mask_value: Either None or mask value to skip
SpatialDropout1D
keras.layers.SpatialDropout1D(rate)
Spatial 1D version of Dropout.
This version performs the same function as Dropout, however it drops entire 1D feature maps instead of individual elements. If adjacent frames within feature maps are strongly correlated (as is normally the case in early convolution layers) then regular dropout will not regularize the activations and will otherwise just result in an effective learning rate decrease. In this case, SpatialDropout1D will help promote independence between feature maps and should be used instead.
Arguments
- rate: float between 0 and 1. Fraction of the input units to drop.
Input shape
3D tensor with shape:
(samples, timesteps, channels)
Output shape
Same as input
References
SpatialDropout2D
keras.layers.SpatialDropout2D(rate, data_format=None)
Spatial 2D version of Dropout.
This version performs the same function as Dropout, however it drops entire 2D feature maps instead of individual elements. If adjacent pixels within feature maps are strongly correlated (as is normally the case in early convolution layers) then regular dropout will not regularize the activations and will otherwise just result in an effective learning rate decrease. In this case, SpatialDropout2D will help promote independence between feature maps and should be used instead.
Arguments
- rate: float between 0 and 1. Fraction of the input units to drop.
- data_format: 'channels_first' or 'channels_last'.
In 'channels_first' mode, the channels dimension
(the depth) is at index 1,
in 'channels_last' mode is it at index 3.
It defaults to the
image_data_format
value found in your Keras config file at~/.keras/keras.json
. If you never set it, then it will be "channels_last".
Input shape
4D tensor with shape:
(samples, channels, rows, cols)
if data_format='channels_first'
or 4D tensor with shape:
(samples, rows, cols, channels)
if data_format='channels_last'.
Output shape
Same as input
References
SpatialDropout3D
keras.layers.SpatialDropout3D(rate, data_format=None)
Spatial 3D version of Dropout.
This version performs the same function as Dropout, however it drops entire 3D feature maps instead of individual elements. If adjacent voxels within feature maps are strongly correlated (as is normally the case in early convolution layers) then regular dropout will not regularize the activations and will otherwise just result in an effective learning rate decrease. In this case, SpatialDropout3D will help promote independence between feature maps and should be used instead.
Arguments
- rate: float between 0 and 1. Fraction of the input units to drop.
- data_format: 'channels_first' or 'channels_last'.
In 'channels_first' mode, the channels dimension (the depth)
is at index 1, in 'channels_last' mode is it at index 4.
It defaults to the
image_data_format
value found in your Keras config file at~/.keras/keras.json
. If you never set it, then it will be "channels_last".
Input shape
5D tensor with shape:
(samples, channels, dim1, dim2, dim3)
if data_format='channels_first'
or 5D tensor with shape:
(samples, dim1, dim2, dim3, channels)
if data_format='channels_last'.
Output shape
Same as input
References


--- layout: page title: Hi, I'm Zhiming Ruan subtitle: Research Assistant in Robotics use-site-title: true ---
My name is Zhiming Ruan, currently a research assistant in The Laboratory for PROGRESS headed by Prof. Chad Jenkins. My current research interests are pose estimation and object tracking.
I obtained B.SC degree in Computer Science and Engineering department at University of Michigan in 2019.
Research Assistant in The Laboratory for PROGRESS
Research Assistant on Prof. David Hung's research team
Teaching Assistant for Probabilistic Method in Eng. at UM-SJTU Joint Institute
Submitted one paper to ICRA 2020.


If you think I can help you, or you have any questions, please reach out.
You can email me at<EMAIL_ADDRESS>or use https://oyvindsk.com/contact
Phone: +47 482 78 480
Company: Devbyte AS, Org nr 920 646 417, Dannevigsveien 8, 0463 Oslo, Norway.
Offices: Working from home at the moment


JAVA
LUA
MUSIC
Lua
Small Games I've made in Lua with Löve2d / Corona SDK.
Nihongo
- Practice Hiragana and Katakana
Ultimate Tic-Tac-Toe
- (Multiplayer) Tic-Tac-Toe


- Client
- {{ job.client }}
- Job Type
- {{ job.jobType }}
- Period Ended
- {{ job.periodEnded }}
- Entities
- {{ job.entities }}
- Branch Location
- {{ job.branchLocation }}
- Job Owner
- {{ job.jobOwner }}
- Currently Responsible
- {{ job.currentlyResponsible }}
- Target End Date
- {{ job.targetEndDate }}
- Job Status
- {{ job.jobStatus }}
- Priority
- {{ job.priority }}
- Job Details
- {{ job.jobDetails }}
- Opening Wip
- {{ job.openingWip }}
- Opening Wipdescription
- {{ job.openingWipdescription }}
- Agreed Fee
- {{ job.agreedFee }}
- Budget Total
- {{ job.budgetTotal }}


Settings
Log Out
Share Your Poster
|
Print Business Code
Share Business Page
Change Image
|
Change Location
Delivery Cost
Delivery Time
Instant Deliveries
Next Day Deliveries
Phone Number
+234 (Nigeria)
Bank Account
Select Bank
Fidelity
GTB
Zenith
UBA
First
FCMB
Union
Access
Sterling
Heritage
Wema
Unity
Standard
Stanbic
Skye
Mainstreet
Keystone
Enterprise
Ecobank
Citibank
Kuda
Jaiz
Taj


Picasa Web Albums is a service which allows users to maintain albums of their own pictures, and browse the albums and pictures of others. The API offers a programmatic interface to this service, allowing users to add to, update, and remove from their albums, as well as providing the ability to tag and comment on photos.
Access to public albums and photos is not restricted by account, however, a user must be logged in for non-read-only access.
For more information on the API, including instructions for enabling API access, refer to the Picasa Web Albums Data API Overview.
Note
Authentication
The API provides authentication via AuthSub (recommended) and ClientAuth. HTTP connections must be authenticated for write support, but non-authenticated connections have read-only access.
The Picasa Web Albums API, like all GData APIs, is based off of the Atom Publishing Protocol (APP), an XML based format for managing web-based resources. Traffic between a client and the servers occurs over HTTP and allows for both authenticated and unauthenticated connections.
Before any transactions can occur, this connection needs to be made. Creating a connection to the Picasa servers involves two steps: creating an HTTP client and binding a ZendGData\Photos service instance to that client.
The Google Picasa API allows access to both public and private photo feeds. Public feeds do not require authentication, but are read-only and offer reduced functionality. Private feeds offers the most complete functionality but requires an authenticated connection to the Picasa servers. There are three authentication schemes that are supported by Google Picasa :
The ZendGData library provides support for both authentication schemes. The rest of this chapter will assume that you are familiar the authentication schemes available and how to create an appropriate authenticated connection. For more information, please see section the Authentication section of this manual or the Authentication Overview in the Google Data API Developer’s Guide.
In order to interact with the servers, this library provides the ZendGData\Photos service class. This class provides a common interface to the Google Data and Atom Publishing Protocol models and assists in marshaling requests to and from the servers.
Once deciding on an authentication scheme, the next step is to create an instance of ZendGData\Photos. The class constructor takes an instance of Zend\Http\Client as a single argument. This provides an interface for AuthSub and ClientAuth authentication, as both of these require creation of a special authenticated HTTP client. If no arguments are provided, an unauthenticated instance of Zend\Http\Client will be automatically created.
The example below shows how to create a service class using ClientAuth authentication:
1 2 3 4 5 6 7 8 9 10 | // Parameters for ClientAuth authentication
$service = ZendGData\Photos::AUTH_SERVICE_NAME;
$user =<EMAIL_ADDRESS>$pass = "pa$$w0rd";
// Create an authenticated HTTP client
$client = ZendGData\ClientLogin::getHttpClient($user, $pass, $service);
// Create an instance of the service
$service = new ZendGData\Photos($client);
|
A service instance using AuthSub can be created in a similar, though slightly more lengthy fashion:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | session_start();
/**
* Returns the full URL of the current page, based upon env variables
*
* Env variables used:
* $_SERVER['HTTPS'] = (on|off|)
* $_SERVER['HTTP_HOST'] = value of the Host: header
* $_SERVER['SERVER_PORT'] = port number (only used if not http/80,https/443)
* $_SERVER['REQUEST_URI'] = the URI after the method of the HTTP request
*
* @return string Current URL
*/
function getCurrentUrl()
{
global $_SERVER;
/**
* Filter php_self to avoid a security vulnerability.
*/
$php_request_uri = htmlentities(substr($_SERVER['REQUEST_URI'], 0,
strcspn($_SERVER['REQUEST_URI'], "\n\r")), ENT_QUOTES);
if (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') {
$protocol = 'https://';
} else {
$protocol = 'http://';
}
$host = $_SERVER['HTTP_HOST'];
if ($_SERVER['SERVER_PORT'] != '' &&
(($protocol == 'http://' && $_SERVER['SERVER_PORT'] != '80') ||
($protocol == 'https://' && $_SERVER['SERVER_PORT'] != '443'))) {
$port = ':' . $_SERVER['SERVER_PORT'];
} else {
$port = '';
}
return $protocol . $host . $port . $php_request_uri;
}
/**
* Returns the AuthSub URL which the user must visit to authenticate requests
* from this application.
*
* Uses getCurrentUrl() to get the next URL which the user will be redirected
* to after successfully authenticating with the Google service.
*
* @return string AuthSub URL
*/
function getAuthSubUrl()
{
$next = getCurrentUrl();
$scope = 'http://picasaweb.google.com/data';
$secure = false;
$session = true;
return ZendGData\AuthSub::getAuthSubTokenUri($next, $scope, $secure,
$session);
}
/**
* Returns a HTTP client object with the appropriate headers for communicating
* with Google using AuthSub authentication.
*
* Uses the $_SESSION['sessionToken'] to store the AuthSub session token after
* it is obtained. The single use token supplied in the URL when redirected
* after the user successfully authenticated to Google is retrieved from the
* $_GET['token'] variable.
*
* @return Zend\Http\Client
*/
function getAuthSubHttpClient()
{
global $_SESSION, $_GET;
if (!isset($_SESSION['sessionToken']) && isset($_GET['token'])) {
$_SESSION['sessionToken'] =
ZendGData\AuthSub::getAuthSubSessionToken($_GET['token']);
}
$client = ZendGData\AuthSub::getHttpClient($_SESSION['sessionToken']);
return $client;
}
/**
* Create a new instance of the service, redirecting the user
* to the AuthSub server if necessary.
*/
$service = new ZendGData\Photos(getAuthSubHttpClient());
|
Finally, an unauthenticated server can be created for use with public feeds:
1 2 | // Create an instance of the service using an unauthenticated HTTP client
$service = new ZendGData\Photos();
|
The primary method to request data from the service is by constructing a query. There are query classes for each of the following types:
A new UserQuery can be constructed as followed:
1 2 3 4 5 6 | $service = ZendGData\Photos::AUTH_SERVICE_NAME;
$client = ZendGData\ClientLogin::getHttpClient($user, $pass, $service);
$service = new ZendGData\Photos($client);
$query = new ZendGData\Photos\UserQuery();
$query->setUser("sample.user");
|
for each query, a number of parameters limiting the search can be requested, or specified, with get(Parameter) and set(Parameter), respectively. They are as follows:
The service has functions to retrieve a feed, or individual entries, for users, albums, and individual photos.
The service supports retrieving a user feed and list of the user’s content. If the requested user is also the authenticated user, entries marked as “hidden” will also be returned.
The user feed can be accessed by passing the username to the getUserFeed() method:
1 2 3 4 5 6 7 8 9 | $service = ZendGData\Photos::AUTH_SERVICE_NAME;
$client = ZendGData\ClientLogin::getHttpClient($user, $pass, $service);
$service = new ZendGData\Photos($client);
try {
$userFeed = $service->getUserFeed("sample.user");
} catch (ZendGData\App\Exception $e) {
echo "Error: " . $e->getMessage();
}
|
Or, the feed can be accessed by constructing a query, first:
1 2 3 4 5 6 7 8 9 10 11 12 | $service = ZendGData\Photos::AUTH_SERVICE_NAME;
$client = ZendGData\ClientLogin::getHttpClient($user, $pass, $service);
$service = new ZendGData\Photos($client);
$query = new ZendGData\Photos\UserQuery();
$query->setUser("sample.user");
try {
$userFeed = $service->getUserFeed(null, $query);
} catch (ZendGData\App\Exception $e) {
echo "Error: " . $e->getMessage();
}
|
Constructing a query also provides the ability to request a user entry object:
1 2 3 4 5 6 7 8 9 10 11 12 13 | $service = ZendGData\Photos::AUTH_SERVICE_NAME;
$client = ZendGData\ClientLogin::getHttpClient($user, $pass, $service);
$service = new ZendGData\Photos($client);
$query = new ZendGData\Photos\UserQuery();
$query->setUser("sample.user");
$query->setType("entry");
try {
$userEntry = $service->getUserEntry($query);
} catch (ZendGData\App\Exception $e) {
echo "Error: " . $e->getMessage();
}
|
The service supports retrieving an album feed and a list of the album’s content.
The album feed is accessed by constructing a query object and passing it to getAlbumFeed():
1 2 3 4 5 6 7 8 9 10 11 12 13 | $service = ZendGData\Photos::AUTH_SERVICE_NAME;
$client = ZendGData\ClientLogin::getHttpClient($user, $pass, $service);
$service = new ZendGData\Photos($client);
$query = new ZendGData\Photos\AlbumQuery();
$query->setUser("sample.user");
$query->setAlbumId("1");
try {
$albumFeed = $service->getAlbumFeed($query);
} catch (ZendGData\App\Exception $e) {
echo "Error: " . $e->getMessage();
}
|
Alternatively, the query object can be given an album name with setAlbumName(). Setting the album name is mutually exclusive with setting the album id, and setting one will unset the other.
Constructing a query also provides the ability to request an album entry object:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | $service = ZendGData\Photos::AUTH_SERVICE_NAME;
$client = ZendGData\ClientLogin::getHttpClient($user, $pass, $service);
$service = new ZendGData\Photos($client);
$query = new ZendGData\Photos\AlbumQuery();
$query->setUser("sample.user");
$query->setAlbumId("1");
$query->setType("entry");
try {
$albumEntry = $service->getAlbumEntry($query);
} catch (ZendGData\App\Exception $e) {
echo "Error: " . $e->getMessage();
}
|
The service supports retrieving a photo feed and a list of associated comments and tags.
The photo feed is accessed by constructing a query object and passing it to getPhotoFeed():
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | $service = ZendGData\Photos::AUTH_SERVICE_NAME;
$client = ZendGData\ClientLogin::getHttpClient($user, $pass, $service);
$service = new ZendGData\Photos($client);
$query = new ZendGData\Photos\PhotoQuery();
$query->setUser("sample.user");
$query->setAlbumId("1");
$query->setPhotoId("100");
try {
$photoFeed = $service->getPhotoFeed($query);
} catch (ZendGData\App\Exception $e) {
echo "Error: " . $e->getMessage();
}
|
Constructing a query also provides the ability to request a photo entry object:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | $service = ZendGData\Photos::AUTH_SERVICE_NAME;
$client = ZendGData\ClientLogin::getHttpClient($user, $pass, $service);
$service = new ZendGData\Photos($client);
$query = new ZendGData\Photos\PhotoQuery();
$query->setUser("sample.user");
$query->setAlbumId("1");
$query->setPhotoId("100");
$query->setType("entry");
try {
$photoEntry = $service->getPhotoEntry($query);
} catch (ZendGData\App\Exception $e) {
echo "Error: " . $e->getMessage();
}
|
The service supports retrieving comments from a feed of a different type. By setting a query to return a kind of “comment”, a feed request can return comments associated with a specific user, album, or photo.
Performing an action on each of the comments on a given photo can be accomplished as follows:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | $service = ZendGData\Photos::AUTH_SERVICE_NAME;
$client = ZendGData\ClientLogin::getHttpClient($user, $pass, $service);
$service = new ZendGData\Photos($client);
$query = new ZendGData\Photos\PhotoQuery();
$query->setUser("sample.user");
$query->setAlbumId("1");
$query->setPhotoId("100");
$query->setKind("comment");
try {
$photoFeed = $service->getPhotoFeed($query);
foreach ($photoFeed as $entry) {
if ($entry instanceof ZendGData\Photos\CommentEntry) {
// Do something with the comment
}
}
} catch (ZendGData\App\Exception $e) {
echo "Error: " . $e->getMessage();
}
|
The service supports retrieving tags from a feed of a different type. By setting a query to return a kind of “tag”, a feed request can return tags associated with a specific photo.
Performing an action on each of the tags on a given photo can be accomplished as follows:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | $service = ZendGData\Photos::AUTH_SERVICE_NAME;
$client = ZendGData\ClientLogin::getHttpClient($user, $pass, $service);
$service = new ZendGData\Photos($client);
$query = new ZendGData\Photos\PhotoQuery();
$query->setUser("sample.user");
$query->setAlbumId("1");
$query->setPhotoId("100");
$query->setKind("tag");
try {
$photoFeed = $service->getPhotoFeed($query);
foreach ($photoFeed as $entry) {
if ($entry instanceof ZendGData\Photos\TagEntry) {
// Do something with the tag
}
}
} catch (ZendGData\App\Exception $e) {
echo "Error: " . $e->getMessage();
}
|
The service has functions to create albums, photos, comments, and tags.
The service supports creating a new album for an authenticated user:
1 2 3 4 5 6 7 8 | $service = ZendGData\Photos::AUTH_SERVICE_NAME;
$client = ZendGData\ClientLogin::getHttpClient($user, $pass, $service);
$service = new ZendGData\Photos($client);
$entry = new ZendGData\Photos\AlbumEntry();
$entry->setTitle($service->newTitle("test album"));
$service->insertAlbumEntry($entry);
|
The service supports creating a new photo for an authenticated user:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | $service = ZendGData\Photos::AUTH_SERVICE_NAME;
$client = ZendGData\ClientLogin::getHttpClient($user, $pass, $service);
$service = new ZendGData\Photos($client);
// $photo is the name of a file uploaded via an HTML form
$fd = $service->newMediaFileSource($photo["tmp_name"]);
$fd->setContentType($photo["type"]);
$entry = new ZendGData\Photos\PhotoEntry();
$entry->setMediaSource($fd);
$entry->setTitle($service->newTitle($photo["name"]));
$albumQuery = new ZendGData\Photos\AlbumQuery;
$albumQuery->setUser("sample.user");
$albumQuery->setAlbumId("1");
$albumEntry = $service->getAlbumEntry($albumQuery);
$service->insertPhotoEntry($entry, $albumEntry);
|
The service supports creating a new comment for a photo:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | $service = ZendGData\Photos::AUTH_SERVICE_NAME;
$client = ZendGData\ClientLogin::getHttpClient($user, $pass, $service);
$service = new ZendGData\Photos($client);
$entry = new ZendGData\Photos\CommentEntry();
$entry->setTitle($service->newTitle("comment"));
$entry->setContent($service->newContent("comment"));
$photoQuery = new ZendGData\Photos\PhotoQuery;
$photoQuery->setUser("sample.user");
$photoQuery->setAlbumId("1");
$photoQuery->setPhotoId("100");
$photoQuery->setType('entry');
$photoEntry = $service->getPhotoEntry($photoQuery);
$service->insertCommentEntry($entry, $photoEntry);
|
The service supports creating a new tag for a photo:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | $service = ZendGData\Photos::AUTH_SERVICE_NAME;
$client = ZendGData\ClientLogin::getHttpClient($user, $pass, $service);
$service = new ZendGData\Photos($client);
$entry = new ZendGData\Photos\TagEntry();
$entry->setTitle($service->newTitle("tag"));
$photoQuery = new ZendGData\Photos\PhotoQuery;
$photoQuery->setUser("sample.user");
$photoQuery->setAlbumId("1");
$photoQuery->setPhotoId("100");
$photoQuery->setType('entry');
$photoEntry = $service->getPhotoEntry($photoQuery);
$service->insertTagEntry($entry, $photoEntry);
|
The service has functions to delete albums, photos, comments, and tags.
The service supports deleting an album for an authenticated user:
1 2 3 4 5 6 7 8 9 10 11 12 | $service = ZendGData\Photos::AUTH_SERVICE_NAME;
$client = ZendGData\ClientLogin::getHttpClient($user, $pass, $service);
$service = new ZendGData\Photos($client);
$albumQuery = new ZendGData\Photos\AlbumQuery;
$albumQuery->setUser("sample.user");
$albumQuery->setAlbumId("1");
$albumQuery->setType('entry');
$entry = $service->getAlbumEntry($albumQuery);
$service->deleteAlbumEntry($entry, true);
|
The service supports deleting a photo for an authenticated user:
1 2 3 4 5 6 7 8 9 10 11 12 13 | $service = ZendGData\Photos::AUTH_SERVICE_NAME;
$client = ZendGData\ClientLogin::getHttpClient($user, $pass, $service);
$service = new ZendGData\Photos($client);
$photoQuery = new ZendGData\Photos\PhotoQuery;
$photoQuery->setUser("sample.user");
$photoQuery->setAlbumId("1");
$photoQuery->setPhotoId("100");
$photoQuery->setType('entry');
$entry = $service->getPhotoEntry($photoQuery);
$service->deletePhotoEntry($entry, true);
|
The service supports deleting a comment for an authenticated user:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | $service = ZendGData\Photos::AUTH_SERVICE_NAME;
$client = ZendGData\ClientLogin::getHttpClient($user, $pass, $service);
$service = new ZendGData\Photos($client);
$photoQuery = new ZendGData\Photos\PhotoQuery;
$photoQuery->setUser("sample.user");
$photoQuery->setAlbumId("1");
$photoQuery->setPhotoId("100");
$photoQuery->setType('entry');
$path = $photoQuery->getQueryUrl() . '/commentid/' . "1000";
$entry = $service->getCommentEntry($path);
$service->deleteCommentEntry($entry, true);
|
The service supports deleting a tag for an authenticated user:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | $service = ZendGData\Photos::AUTH_SERVICE_NAME;
$client = ZendGData\ClientLogin::getHttpClient($user, $pass, $service);
$service = new ZendGData\Photos($client);
$photoQuery = new ZendGData\Photos\PhotoQuery;
$photoQuery->setUser("sample.user");
$photoQuery->setAlbumId("1");
$photoQuery->setPhotoId("100");
$photoQuery->setKind("tag");
$query = $photoQuery->getQueryUrl();
$photoFeed = $service->getPhotoFeed($query);
foreach ($photoFeed as $entry) {
if ($entry instanceof ZendGData\Photos\TagEntry) {
if ($entry->getContent() == $tagContent) {
$tagEntry = $entry;
}
}
}
$service->deleteTagEntry($tagEntry, true);
|
GData feeds, including those of the Picasa Web Albums service, implement optimistic concurrency, a versioning system that prevents users from overwriting changes, inadvertently. When deleting a entry through the service class, if the entry has been modified since it was last fetched, an exception will be thrown, unless explicitly set otherwise (in which case the deletion is retried on the updated entry).
An example of how to handle versioning during a deletion is shown by deleteAlbumEntry():
1 2 3 4 5 6 7 8 9 10 11 12 | // $album is the albumEntry to be deleted
try {
$this->delete($album);
} catch (ZendGData\App\HttpException $e) {
if ($e->getMessage()->getStatus() === 409) {
$entry =
new ZendGData\Photos\AlbumEntry($e->getMessage()->getBody());
$this->delete($entry->getLink('edit')->href);
} else {
throw $e;
}
}
|
The source code of this file is hosted on GitHub. Everyone can update and fix errors in this document with few clicks - no downloads needed.