S2Container.PHP5 is a port of Java version Seasar2 to PHP5. For detailed information about the DIContainer, refer to S2Container.
S2Container Reference
Required Files
Configuration file is required to use S2Container. Configuration file is a specification to build components. Configuration file may be automatically generated by S2 by following S2 programming convention or created manually. Configuration file may be written in XML format and in PHP configuration file format (INI format). File extension of a XML format file may be .dicon or .xml. File extension of a PHP configuration file is .ini. Seasar configuration files are usually written in XML format to be compatible with other versions of Seasar (i.e. Java version and .NET version) and have .dicon extension.
S2Container Definition
S2Container is defined as follows: <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE components PUBLIC "-//SEASAR2.1//DTD S2Container//EN"
"http://www.seasar.org/dtd/components21.dtd">
<components>
<component name="..." class="...">
...
</component>
<component name="..." class="...">
...
</component>
</components>
DOCTYPE may not be omitted. When creating a dicon file, cut and paste the above sample. Root element is a component. Each component is defined by a component tag and class name is defined in a class attribute of a component tag. Component name is defined in a name attribute of a component. Refer to S2Container Definition Reference for further details. <components>
<component name="hoge" class="HogeImpl"/>
</components>
Creating a S2Container
Following methods are used to create a S2Container:
- S2ContainerFactory#create($path) Argument $path is a path to the configuration file<?php
$PATH = "path/to/ccc.dicon";
...
$container = S2ContainerFactory::create($PATH);
?>
Getting a Component
Following method is used to get a component from the S2Container:
- S2Container#getComponent($componentKey) Argument $componentKey is a component class or a component name of component to get. Refer to component Tag for further details. Component class where instanceof class is true may be gotten from the container. The class, however, should be associated with an unique component in the S2Container. If there are several components of the class, TooManyRegistrationRuntimeException is raised because S2Container can not determine which component to get.
Similarly, component name should be unique in the S2Container. Specifying non-unique component name will raise a TooManyRegistrationRuntimeException.
Example: Following defines component named "hoge" of class "Hoge" <components>
<component name="hoge" class="Hoge"/>
</components>
Following code gets the component "hoge" by specifying class "Hoge": <?php
$container = S2ContainerFactory::create($PATH);
$hoge = $container->getComponent('Hoge');
?>
Following code gets the component "hoge" by specifying component name "hoge": <?php
$container = S2ContainerFactory::create($PATH);
$hoge = $container->getComponent('hoge');
?>
Dependency Injection typesFollowing is a list of DependencyInjection types:
| ConstructorInjection |
: |
Use a constructor to set values necessary to construct a component |
| SetterInjection |
: |
Use a setter method to set values necessary to construct a component |
| MethodInjection |
: |
Use initialization method to set values necessary to construct a component |
|
MethodInjection is S2 original DependencyInjection type. All S2 types and their hybrid types are supported.
Constructor Injection
Constructor injection injects dependency through a constructor by using constructor arguments. It is written in a S2Container configuration file as follows:
- Component specification
Component is specified using component tag. Class name is set in class attribute and component name may be set in name attribute.
- Constructor arguments
Arguments to a constructor are set in arg elements that are child elements of a component tag. When the value of an argument is of type String, it is surrounded by double quotation (").
<components>
<component name="..." class="...">
<arg>...</arg>
</component>
</components>
Refer to example in Constructor injection for details.
Setter Injection
Setter injection injects dependencies (properties) by using setter methods. It is written in a S2Container configuration file as follows:
- Component specification
Component is specified using component tag. Class name is set in class attribute and component name may be set in name attribute.
- Properties
Component parameters are set in property elements that are child elements of a component tag. Name of a property is specified using name attribute.
<components>
<component name="..." class="...">
<property name="...">...</property>
</component>
</components>
Refer to Setter Injection example for an example.
Method Injection
Method injection injects by invoking an arbitrary method. It is defined in a S2Container configuration file as follows: It is written in a S2Container configuration file as follows:
- Component specification
Component is specified using component tag. Class name is set in class attribute and component name may be set in name attribute.
- Initialization method
Name and argument of method to invoke is set in a initMethod elements that are child elements of a component tag. Name of a property is specified using name attribute to this initMethod element. Arguments to the method to invoke is specified as values to arg element which is a child of a initMethod element.
<components>
<component name="..." class="...">
<initMethod name="...">
<arg>...</arg>
</initMethod>
</component>
</components>
When there is no argument, name attribute may be omitted and the name of the method may be set by a PHP expression as the value of initMethod element. In this situation, component is represented by $component.
<components>
<component name="..." class="...">
<initMethod>...</initMethod>
</component>
</components>
Refer to Method Injection example for an example.
Dividing and Including S2Container Definition
If all configuration are written in a single file, the file soon becomes very large. S2Container allows developers to divide the configuration file into several files and supports include clause to logically construct one configuration file from these files. Following is an example of including content of bar.dicon file: <components>
<include path="bar.dicon"/>
</components>
File to include is specified in the path attribute of a include tag. Refer to include tag for detailed information. Component are searched in the following order: (1) In the component where the component is registered (2) In child S2Container in order of the include statement. In the following components definition, "Foo" is searched first, followed by "aaa.dicon" and lastly by "bbb". <components>
<include path="aaa.dicon"/>
<include path="bbb.dicon"/>
<component class="Foo" />
</components>
When automatically using constructor injection and setter injection, it is possible to automatically inject components in configuration to be included. Refer to automatic binding for conditions to automatically inject dependencies.
Following is an example to show the order of component search. Property of a component to set by setter injection (HelloImpl) is defined in both included configuration files aaa.dicon and bbb.dicon. Let's find out which component HelloClient will use.
root.dicon<components>
<include path="aaa.dicon"/>
<include path="bbb.dicon"/>
<component name="root" class="RootHelloClient"/>
</components>
aaa.dicon<components>
<component class="HelloImpl">
<property name="message">"Hello Aaa!"</property>
</component>
<component name="aaa" class="AaaHelloClient"/>
</components>
bbb.dicon<components>
<component class="HelloImpl">
<property name="message">"Hello Bbb!"</property>
</component>
<component name="bbb" class="BbbHelloClient"/>
</components>
Content of each component is as follows: <?php
interface HelloClient {
public function showMessage();
}
?>
<?php
class RootHelloClient implements HelloClient {
private $hello_;
public function setHello(Hello $hello) {
$this->hello_ = $hello;
}
public function getHello() {
return $this->hello_;
}
public function showMessage() {
print $this->getHello()->getMessage();
}
}
?>
Implementation of AaaHelloClient and BbbHelloClient is like those of RootHelloClient. <?php
interface Hello {
public function setMessage($helloMessage);
public function getMessage();
}
?>
<?php
class HelloImpl implements Hello {
private $helloMessage_;
public function setMessage($helloMessage) {
$this->helloMessage_ = $helloMessage;
}
public function getMessage() {
return $this->helloMessage_;
}
}
?>
HelloImpl only defines Message property. Following are result of invoking showMessage() method in each HelloClient.
Result of RootHelloClientHello Aaa!
S2Container will first try to find HelloImpl in root.dicon. Since HelloImpl is not defined in root.dicon, S2Container will next try to find it in the first included file, aaa.dicon. Since HelloImpl is defined in aaa.dicon, this definition is used and "Hello Aaa!" is outputted.
Result of AaaHelloClientHello Aaa!
AaaHelloClient used HelloImpl defined in aaa.dicon. When injection is automatically done, child S2Container is unable to use component defined in the parent S2Container. For example, even if HelloImpl is defined in root.dicon, it will not be automatically injected into AaaHelloClient.
Result of BbbHelloClientHello Bbb!
Similar to the case with AaaHelloClient, BbbHelloClient uses HelloImpl component defined in bbb.dicon.
Files is this example are available in the s2container.php5/src/examples/dicon/include folder.
Namespace
Namespace is used to distinguish component definitions from several configuration file. Namespace is specified by namespace attribute of a components tag.
foo.dicon<components namespace="foo">
<component name="aaa" .../>
<component name="bbb" ...>
<arg>aaa</arg>
</component>
</components>
bar.dicon<components namespace="bar">
<include path="foo.dicon"/>
<component name="aaa" .../>
<component name="bbb" ...>
<arg>aaa</arg>
</component>
<component name="ccc" ...>
<arg>foo.aaa</arg>
</component>
</components>
app.dicon<components>
<include path="bar.dicon"/>
</components>
Namespace is not necessary to require to reference components in the same S2Container. To reference components in other S2Container, however, namespace prefix associated with the S2Container is prepended to the component name. For example, foo.aaa and bar.aaa have the same component name "aaa" but have different namespace prefix. Thus, they are treated as two different components.
It is a convention to name the configuration file namespace.dicon.
Instance Management
instance attribute of a component tag specifies how component instance is managed by a S2Container. Default is singleton which implies S2Container#getComponent() method always gets the same component. To get a new component each time S2Container#getComponent() method is invoked, set the instance attribute to prototype. To manage component based on request ($_REQUEST), set the instance attribute to request. To manage based on a session, set the instance attribute to session.
When using Seasar framework with a presentation framework, there may sometimes be a need to set an instance created by a presentation framework to a component managed by S2Container. In this kind of circumstances where Dependency Injection to a component outside the S2Container is necessary, the following method are used.
- S2Container#injectDependency($outerComponent, $componentKey) Specify external component in the first argument and external component class or component name in the second argument. Also, set instance attribute to outer in S2Container definition.
| instance attribute |
Description |
| singleton (default) |
Same instance is returned on every invocation of S2Container#getComponent() |
| prototype |
New instance is returned on each invocation of S2Container#getComponent() |
| request |
One instance is created for each request. A component is saved to a request using the name set to the name attribute. |
| session |
One instance is created for each session. A component is saved to a session using the name set to the name attribute. |
| outer |
Instance of a component is created outside of S2Container. Only dependency is injected. Aspect and Constructor injection can not be applied. |
Lifecycle
Using initMethod and destroyMethod, component lifecycle may also be managed by a container. Method specified by initMethod tag is invoked when S2Container is initialized (S2Container#init()) and method specified by destroyMethod tag is invoked when S2Container is destroyed (S2Container#destroy()). initMethod is executed in order as they are defined in the container configuration and destroyMethod is executed in reverse order as they are defined in the container configuration. When instance attribute is not "singleton", destroyMethod is ignored. Following is an example to set aaa to 111 on initialization and set aa to null termination to HashMap#put method. <components namespace="bar">
<component name="map" class="HashMap">
<initMethod name="put">
<arg>"aaa"</arg>
<arg>111</arg>
</initMethod>
<destroyMethod name="put">
<arg>"aaa"</arg>
<arg>null</arg>
</destroyMethod>
</component>
</components>
Automatic Binding
By default, dependency between container is automatically resolved when type is an interface. It is also possible to specify autoBinding attribute in a component tag.
| autoBinding |
Description |
| auto (default) |
If an argument to a constructor is explicity specified, that argument is used. Is an argument is not specified and type is an interface,it is automatically bound. Default values are set to arguments whose type is not an interface. If default value is not available, an argument is set to null. If a property is explicitly specified, it is used. If property is not specified and property type is an interface, it is automatically bound. |
| constructor |
If an argument to a constructor is explicitly specified, that argument is used. Is an argument is not specified and type is an interface,it is automatically bound. Default values are set to arguments whose type is not an interface. If default value is not available, an argument is set to null. If a property is explicitly specified, it is used. |
| property |
If an argument to a constructor is explicitly specified, that argument is used. Type interface property is automatically bound. |
| none |
If an argument to a constructor is explicitly specified, that argument is used. If a property is explicitly specified, it is used. |
Refer to Automatically binding (constructor injection) and Automatically binding (setter injection) for further details.
Using S2Container from a component
Component should not depend on a S2Container but there are some situations where a component may need to invoke S2Container method. S2Container is defined with a name "container" so is the value of arg or property tag is set to "container" it is possible to get an instance of a container. Furthermore, it is also possible to automatically bind by defining a S2Container type setter method. Following are examples of using arg and property tag to specify "container". <components>
<component class="BarImpl">
<arg>container</arg>
</component>
<component class="FooImpl">
<property name="foo">container</property>
</component>
</components>
Applying AOP
AOP may be applied to a component. Following is an example of applying TraceInterceptor to a Date class. <?php
class Date {
function Date() {}
function getTime(){
return '12:00:30';
}
}
?>
<components>
<component name="traceInterceptor"
class="TraceInterceptor"/>
<component class="Date">
<aspect>traceInterceptor</aspect>
</component>
</components>
Specify Interceptor name as the value of aspect tag. Method names separated by a comma may be specified in pointcut attribute. When pointcut attribute is not specified, all interfaces implemented by a component is used. Method names may be specified using a regular expression. Following is an example using the above component definition. <?php
$PATH ="Aop.dicon";
$container = S2ContainerFactory::create($PATH);
$date = $container->getComponent('Date');
$date->getTime();
?>
Following is a sample output from executing the above script. BEGIN Date#getTime()
END Date#getTime() : 12:00:30
MetaData
meta data may be applied to components, component, arg, and property tags. meta tag is specified as a child element to the element which is to have a meta tag. Following is an example of specifying a meta tag to a components tag. <components>
<meta name="aaa">111</meta>
</components>
Meta data information specified in components, component, arg, and property tags may be retrieved using the following methods defined in S2Container, ComponentDef, ArgDef, and PropertyDef.
- public function getMetaDefSize()
- public function getMetaDef($name)
S2Container Definition Reference
DOCTYPE
DOCTYPE is specified right after XML declaration. Following is an example of a component configuration with a DOCTYPE declaration: <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE components PUBLIC "-//SEASAR2.1//DTD S2Container//EN"
"http://www.seasar.org/dtd/components21.dtd">
<components>
<component name="hello" class="HelloConstructorInjection">
<arg>"Hello World!"</arg>
</component>
</components>
components tag (required)
Root element
namespace attribute (optional)
Namespace may be specified. Namespace may also be used to differentiate PHP elements. <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE components PUBLIC "-//SEASAR2.1//DTD S2Container//EN"
"http://www.seasar.org/dtd/components21.dtd">
<components namespace="hoge">
...
</components>
include tag (optional)
Used to include divided S2Container configuration definitions
path attribute (required)
Specify a path of the configuration file. Must be inserted before a component tag. Full path of a configuration file must be specified. Path may be represented by a constant defined in a PHP by surrounding the constant name with a %. <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE components PUBLIC "-//SEASAR2.1//DTD S2Container//EN"
"http://www.seasar.org/dtd/components21.dtd">
<components>
<include path="path/to/ccc.dicon" />
<include path="%DICON_DIR%/ddd.dicon" />
</components>
component tag (optional)
Define a component
class attribute (optional)
Specify a class name. If a component is specified using a PHP expression as a value to an element, class attribute may be omitted. If class attribute is specified when PHP expression is used, it will be type checked.
name attribute (optional)
Name may be specified. The name should be choosen so it may be used as a PHP key. Refer to Getting a Component for further details.
instance attribute (optional)
Specify how S2Container manages instance of a component. Possible values are singleton (default), prototype, outer, request, and session. Refer to instance management for further details on these values.
autoBinding attribute (optional)
Specify how S2Container resolves dependencies between components. Possible values are auto (default), constructor, property, and none. Refer to automatic binding for further details on these values.
arg tag (optional)
Used to specify arguments to a constructor when added as an child element to a component element. The order they are specified represents their position in the argument.
When used as a child element to initMethod element or a destroyMethod element, value of an arg element is passes as an argument to the method. The order they are specified represents their position in the argument. A value to be passes as an argument may be written in PHP expression and set as a value of an element or set in a child component element.
property tag (optional)
Used as a child of component element. Value of the property may be written in PHP expression and set to as a value of an element or set in a child component element.
name attribute (optional)
Specify property name.
meta tag (optional)
Used as a child element to components element, component element, arg element, and property element. Value of the meta data may be written in PHP expression and set to as a value of an element or set in a child component element.
name attribute (optional)
Specify meta name.
initMethod tag (optional)
Used as a child element of a component element. Arguments are specified in child arg elements. Method in a component may be invoked without specifying name attribute using PHP expression. $component represents the component defining the initMethod element. $component may be used as an object only within the initMethod element.
name attribute (optional)
Specify method name. <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE components PUBLIC "-//SEASAR2.1//DTD S2Container//EN"
"http://www.seasar.org/dtd/components21.dtd">
<components>
<component class="HashMap">
<initMethod name="put">
<arg>"aaa"</arg>
<arg>111</arg>
</initMethod>
<initMethod>$component->put("aaa", 111);</initMethod>
<initMethod>print "Hello";</initMethod>
</component>
</components>
destroyMethod tag (optional)
same as initMethod tag
aspect tag (optional)
Weave aspect into a component. Refer to aspect tag for detailed explanation.
description tag (optional)
Description element may be used as a child to components element, component element, arg element, and property element to write a comment.
Examples
S2Container.PHP must be setup before running the following examples.
Constructor Injection
Use constructor injection to display a message. Following files are created in this example:
- Interface (Hello.class.php)
- Implementation class (HelloConstructorInjection.class.php)
- dicon file (HelloConstructorInjection.dicon)
- Execution script (HelloConstructorInjectionClient.php)
Create interface
Let's start by defining interfaces.  Additionally, implementation may be replaced with a mock to make unit testing easier. <?php
interface Hello {
public function showMessage();
}
?>
Create implementation class
- Define a constructor with one argument
- Implement showMessage()
Next, we'll do implement the interfaces. The constructor of the class will accept a message and output the message using the showMessage() method. <?php
class HelloConstructorInjection implements Hello {
private $message;
public function HelloConstructorInjection($message) {
$this->message = $message;
}
public void showMessage() {
print $this->message . "\n";
}
}
?>
Create dicon file
- Define a component using component tag
- Set an argument by creating an argelement that is a child element to a component element.
S2Container is responsible for setting the message to a component. Components are created based on the configuration file.
s2container.php5/src/examples/dicon/HelloConstructorInjection.dicon <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE components PUBLIC "-//SEASAR2.1//DTD S2Container//EN"
"http://www.seasar.org/dtd/components21.dtd">
<components>
<component name="hello" class="HelloConstructorInjection">
<arg>"Hello World!"</arg>
</component>
</components>
Create execution script
s2container.php5/src/examples/dicon/HelloConstructorInjectionClient.php <?php
require_once(dirname(__FILE__) . '/example.inc.php');
$PATH = EXAMPLE_DIR . "/dicon/HelloConstructorInjection.dicon";
$container = S2ContainerFactory::create($PATH);
$hello = $container->getComponent('Hello');
$hello->showMessage();
$hello2 = $container->getComponent("hello");
$hello2->showMessage();
?>
Result
String value in the arg tag should be displayed as below: % php HelloConstructorInjectionClient.php
Hello World!
Hello World!
%
Files in this example are available in the s2container.php5/src/examples/dicon folder.
Setter Injection
Display a message using setter injection. Following files are created in this example:
- Interface (Hello.class.php)
- Implementation class (HelloSetterInjection.class.php)
- dicon file (HelloSetterInjection.dicon)
- Execution script (HelloSetterInjectionClient.php)
Create interface
Interface is the same as constructor injection. There is no need to define getter method and setter method to a property. This is because whether to use constructor or setter method to inject dependency should be decided by the implementation. <?php
interface Hello {
public void showMessage();
}
?>
Create an implementation class
- Define setter method (setMessage)
- Implement showMessage()
We'll tackle the implementation next. Message is received by the setter method and outputted by the showMessage() method. <?php
class HelloSetterInjection implements Hello {
private $message;
public function HelloSetterInjection() {
}
public function setMessage($message) {
$this->message = $message;
}
public function showMessage() {
print $this->message . "\n";
}
}
?>
Create dicon file
- Define component using component tag
- Define component property in property element which is a child of a component element.
s2container.php5/src/examples/dicon/HelloSetterInjection.dicon <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE components PUBLIC "-//SEASAR2.1//DTD S2Container//EN"
"http://www.seasar.org/dtd/components21.dtd">
<components>
<component class="HelloSetterInjection">
<property name="message">"Hello World!"</property>
</component>
</components>
Create execution script
- Invoke S2ContainerFactory#create($path) and create S2Container
- Use getComponent() and get component from the S2Container
- Invoke on the method in the component from S2Container
s2container.php5/src/examples/dicon/HelloSetterInjectionClient.php <?php
require_once(dirname(__FILE__) . '/example.inc.php');
$PATH = EXAMPLE_DIR . "/dicon/HelloSetterInjection.dicon";
$container = S2ContainerFactory::create($PATH);
$hello = $container->getComponent('Hello');
$hello->showMessage();
?>
Result
String specified in the property tag is displayed as below: % php HelloSetterInjectionClient.php
Hello World!
%
Files in this example are available in the s2container.php5/src/examples/dicon folder.
Method Injection
Display a message using method injection. Following files are created in this example:
- Interface (Hello.class.php)
- Implementation class (HelloMethodInjection.class.php)
- dicon file (HelloMethodInjection.dicon)
- Execution script (HelloMethodInjectionClient.php)
Create interface
In most cases, injected method is called several but in this example, the same interface as the constructor injection example is used.
<?php
interface Hello {
public function showMessage();
}
?>
Create implementation class
- Define addMessage()
- Implement showMessage()
Next, it's implementation. Use addMessage($message) to add messages several times, and display received messages by using showMethod(). <?php
class HelloMethodInjection implements Hello {
private $buf = "";
public function HelloMethodInjection() {}
public function addMessage($message) {
$this->buf .= $message;
}
public function showMessage() {
print $this->buf . "\n";
}
}
?>
Create dicon file
- Define component using component tag
- Define arguments for a method in a component in initMethod element which is a child element of a component element.
First, use arg tag to set String "Hello" to ddMessage($message). Next, use PHP expression to set "World!" to addMessage($message).
s2container.php5/src/examples/dicon/HelloMethodInjection.dicon <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE components PUBLIC "-//SEASAR2.1//DTD S2Container//EN"
"http://www.seasar.org/dtd/components21.dtd">
<components>
<component class="HelloMethodInjection">
<initMethod name="addMessage">
<arg>"Hello "</arg>
</initMethod>
<initMethod>$component->addMessage("World!")</initMethod>
</component>
</components>
Create execution script
- Invoke S2ContainerFactory#create($path) to create S2Container
- Invoke getComponent() to get a component from the S2Container
- Invoke the method in the component from S2Container
<?php
require_once(dirname(__FILE__) . '/example.inc.php');
$PATH = EXAMPLE_DIR . "/dicon/HelloMethodInjection.dicon";
$container = S2ContainerFactory::create($PATH);
$hello = $container->getComponent('Hello');
$hello->showMessage();
?>
Result
String set as the value to initMethod element should display as below: % php HelloMethodInjectionClient.php
Hello World!
%
Files in this example are available in the s2container.php5/src/examples/dicon folder.
Automatic binding (constructor injection)
Let's display a message using automatic binding. Following files are created in this example:
- Interface (Hello.class.php)
- Implementation class of an interface(AutoHelloConstructorInjection.class.php)
- Map interface (Map.class.php)
- Implementation class of a Map interface (HashMap.class.php)
- dicon file (AutoHelloConstructorInjection.dicon)
- Execution script (AutoHelloConstructorInjectionClient.php)
Create an interface
<?php
interface Hello {
public function showMessage();
}
?>
Create execution script
- Define construction with argument Map
- Implement showMessage()
Receive Map from a constructor, use "hello" as a key to showMessage() method to retrieve message from a Map, and output the message. <?php
class AutoHelloConstructorInjection implements Hello {
private $messages;
public function AutoHelloConstructorInjection(Map $messages) {
$this->messages = $messages;
}
public function showMessage() {
print $this->messages->get('hello') . "\n";
}
}
?>
Create Map interface
- Define put($key,$val)
- Define get($key)
<?php
interface Map {
function put($key,$val);
function get($key);
}
?>
Create implementation class of Map interface
- Define constructor with argument Map
- Implement showMessage()
<?php
class HashMap implements Map{
private $pool = array();
function HashMap() {}
function put($key,$val){
$this->pool[$key] = $val;
}
function get($key){
return array_key_exists($key,$this->pool) ? $this->pool[$key] : null;
}
}
?>
Create dicon file
- Define HashMap, which is a specified in a component tag as a implementation class of Map, as a component
- Define a HashMap with key "hello" and value "Hello World!" in a initMethod element which is a child of component element.
- Define a component AutoHelloConstructorInjection in a component tag. Set autoBinding attribute to "auto".
We are explicitly setting "auto" to yes but since this is the default value of autoBinding attribute, it is not required.
Notice that the arg tag does not have a definition of AutoHelloConstructorInjection. arg tag definition is required in a constructor injection but if there is a implementation class of a Map in S2Container, S2Container will search the container and set the argument. However, if the argument type is not a interface, that argument is not automatically bound.
s2container.php5/src/examples/dicon/autobinding/AutoHelloConstructorInjection.dicon <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE components PUBLIC "-//SEASAR2.1//DTD S2Container//EN"
"http://www.seasar.org/dtd/components21.dtd">
<components>
<component class="HashMap">
<initMethod name="put">
<arg>"hello"</arg>
<arg>"Hello World!"</arg>
</initMethod>
</component>
<component autoBinding="auto"
class="AutoHelloConstructorInjection"/>
</components>
Create execution script
<?php
require_once(dirname(dirname(__FILE__)) . '/example.inc.php');
$PATH = EXAMPLE_DIR . "/dicon/autobinding/AutoHelloConstructorInjection.dicon";
$container = S2ContainerFactory::create($PATH);
$hello = $container->getComponent('Hello');
$hello->showMessage();
?>
Result
Value set in the HashMap is display as below showing constructor argument was automatically bound. % php AutoHelloConstructorInjection.php
Hello World!
%
Files in this example are available in the s2container.php5/src/examples/dicon/autobinding folder.
Automatic binding (setter injection)
Display message using automatic binding. Following files are created in this example:
- Interface (Hello.class.php)
- Implementation class of an interface (AutoHelloSetterInjection.class.php)
- dicon file (AutoHelloSetterInjection.dicon)
- Execution script (AutoHelloSetterInjectionClient.php)
Create an interface
<?php
interface Hello {
public function showMessage();
}
?>
Create execution script
- Implement showMessage() with argument Map
Retrieve Map from setMessage(Map map) and output the value retrieve value from a Map with key "hello" using showMessage() <?php
class AutoHelloSetterInjection implements Hello {
private $messages;
public function AutoHelloSetterInjection() {}
public function setMessage(Map $messages) {
$this->messages = $messages;
}
public function showMessage() {
print $this->messages->get('hello') . "\n";
}
}
?>
Create dicon file
- Define HashMap as a component in a component tag.
- Define a HashMap with key "hello" and value "Hello World!" in a initMethod element which is a child of component element.
- Define a component AutoHelloSetterInjection in a component tag. Set autoBinding attribute to "auto".
We are explicitly setting "auto" to yes but since this is the default value of autoBinding attribute, it is not required.
Notice that the property tag does not have a definition of AutoHelloSetterInjection.
property tag definition may be required but if there is a implementation class of a Map in S2Container, S2Container will search the container and set the parameter. However, if the property type is not a interface, that property is not automatically bound.
s2container.php5/src/examples/dicon/autobinding/AutoHelloSetterInjection.dicon <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE components PUBLIC "-//SEASAR2.1//DTD S2Container//EN"
"http://www.seasar.org/dtd/components21.dtd">
<components>
<component class="HashMap">
<initMethod name="put">
<arg>"hello"</arg>
<arg>"Hello World!"</arg>
</initMethod>
</component>
<component autoBinding="auto"
class="AutoHelloSetterInjection"/>
</components>
Create execution script
<?php
require_once(dirname(dirname(__FILE__)) . '/example.inc.php');
$PATH = EXAMPLE_DIR . "/dicon/autobinding/AutoHelloSetterInjection.dicon";
$container = S2ContainerFactory::create($PATH);
$hello = $container->getComponent('Hello');
$hello->showMessage();
?>
Result
Value of HashMap is displayed showing the property was automatically set. % php AutoHelloSetterInjection.php
Hello World!
%
Files in this example are available in the s2container.php5/src/examples/dicon/autobinding folder.
|


Superheroes
Limited Offer Sale !!
Purchase a random superhero to run your errands. Try your luck.
Pay with Payabbhi


---
title: Rudiger Birkner
position: PhD Student (co-advised with Laurent Vanbever)
image: rudi.jpg
email<EMAIL_ADDRESS>office: ETZ G 86
website: https://www.rbirkner.ch/
phone: +41 44 63 27043
cv:
---
About me
I am a fifth year PhD student co-advised by Prof. Dr. Martin Vechev and Prof. Dr. Laurent Vanbever of the Networked Systems Group.
Before starting my PhD, I earned a master degree in electrical engineering from ETH Zurich in 2016. In the course of my studies at ETH, I spent six months as visiting research student at Princeton University working with Nick Feamster. In addition, I completed the UNITECH International programme.
Publications
{% include get-publications.html filter="person" key="Birkner" %}


Users
| S/N | Status | Phone | First Name | Last Name | |
|---|---|---|---|---|---|
| 1 | Verified |<EMAIL_ADDRESS>| +234123456789 | Jackie | Chan |
| 2 | Verified |<EMAIL_ADDRESS>| +234123456789 | Marcus | Rashford |
| 3 | Not Verified |<EMAIL_ADDRESS>| +234123456789 | Jose | Mourinho |
| 3 | Not Verified |<EMAIL_ADDRESS>| +234123456789 | Jose | Mourinho |


Louis Walsh says Westlife have much more to give after comeback album hits No1
EXCLUSIVE: Music mogul Louis and the band are celebrating after landing their first No1 album in 12 years
by Irishmirror.ieLouis Walsh says the Weslife boys have much more to give after they landed back at the top of the charts.
Music mogul Louis formed the band 20 years ago, and now they're back in the No1 spot with their comeback album Spectrum.
Louis exclusively told Mirror Online: "The boys have worked so hard on this album. They’ve put everything into it. They deserve it.
"I knew that people would want to hear Westlife again. The success of the tour showed that this summer and the album hitting No1 more than confirms it. They’ve got a big future ahead. There is more to come from Westlife."
Spectrum is the Irish boyband's first No1 album in 12 years.
Shane Filan, Nicky Byrne, Mark Feehily and Kian Egan has also made history by being officially confirmed as the biggest selling Irish band in the UK in the 21st century.
Spectrum has shifted more than three times as many as the No.2 album, Courage by Celine Dion in its first week of release.
The 11 track album, co-written by Westlife and superstar hitmakers Ed Sheeran and Steve Mac, sees the band on their finest form, showcasing their stunning vocals with a collection of fresh pop anthems and soul-stirring ballads.
It includes the uptempo first comeback single Hello My Love as well as the recently released My Blood.
The chart success cements Westlife’s triumphant return to music.
The boys said: "It is amazing. It means more to us now than at any time in our careers. We’ve been blown away by the reaction to the new album.
"None of us can quite believe that we’re back at Number 1. It has been a great year for us and the resounding success of the album really does round it off.
"We want to say a massive thank you to our fans. We’re looking forward to celebrating with them at our stadium tour next summer."
They added: "We have all driven by trying to create the best album of our careers. We wanted to make something current, something that feels fresh.
"The huge success of our comeback single Hello My Love gave us the confidence that our fans and the public were completely up for a new album of original songs.
"We’ve probably had more input into this album than any other in our careers. We have all driven by trying to create the best album of our careers. We wanted to make something current, something that feels fresh.”
Westlife announced their return to music in October 2018 when they signed a new deal with Virgin EMI.
Do you have a story to sell? Get in touch with us at<EMAIL_ADDRESS>or call us direct 0207 29 33033


Given a linked list, rotate the list to the right by k places, where k is non-negative.
Example 1:
Input: 1->2->3->4->5->NULL, k = 2
Output: 4->5->1->2->3->NULL
Explanation:
rotate 1 steps to the right: 5->1->2->3->4->NULL
rotate 2 steps to the right: 4->5->1->2->3->NULL
Example 2:
Input: 0->1->2->NULL, k = 4
Output: 2->0->1->NULL
Explanation:
rotate 1 steps to the right: 2->0->1->NULL
rotate 2 steps to the right: 1->2->0->NULL
rotate 3 steps to the right: 0->1->2->NULL
rotate 4 steps to the right: 2->0->1->NULL
Classic two-pointers chasing except the k
could be larger than the length of this list.
We first attempt to locate the right pointer while also recording the length of the list.
If we hit the end of list and still do not have the right pointer, we know k
is larger than the length.
Locate the right pointer again with k % len
.
/**
* Definition for singly-linked list.
* function ListNode(val) {
* this.val = val;
* this.next = null;
* }
*/
/**
* @param {ListNode} head
* @param {number} k
* @return {ListNode}
*/
var rotateRight = function(head, k) {
if (head === null || k <= 0) { return head }
let right = head
let len = 0
let kk = k
while (right !== null && kk > 0) {
right = right.next
kk--
len++
}
if (kk > 0) {
right = head
kk = k % len
while (kk--) {
right = right.next
}
}
if (right !== null) {
let left = head
while (right.next !== null) {
left = left.next
right = right.next
}
right.next = head
head = left.next
left.next = null
}
return head
};
Template generated via Leetmark.


Denver Post AUTO🤖PRODUCER™ and AUTO🤖SEARCHER™ Help
Introduction
The goal of the AUTO🤖PRODUCER™ and AUTO🤖SEARCHER™ is to make repetitive production tasks for Denver Post Online producers and editors a lot faster. Here's how:
Filling out the date-range dropdown menus on a Wire Hub search required a minimum of 13 clicks with your mouse — or as many as 119 keystrokes (yes, I counted). With AUTO🤖SEARCHER™ you can search within date ranges of the last 24, 48 or 168 hours (seven days) in two clicks — or just a few keystrokes.
Limiting your search with a date range not only saves the seconds it would take to click (and the carpal tunnel!), but exponentially improves the speed with which the database can find and return your results. For every Wire Hub story you produce, AUTO🤖SEARCHER™ could save several minutes, which adds up to hours of productivity across the team each week.
Similarly, with AUTO🤖PRODUCER™ for Articles, you can execute in a couple of keystrokes and clicks what would take several dozen clicks — not to mention the inevitible lag on some drop-down menus — and reduce the repetitive part of your job by as much as several minutes per story. Yet another savings of hours of productivity, team-wide, each week.
We'd like to spend our time and talents getting good stories in front of readers' eyes, through excellent SEO, inviting social media promotion, and by including interactive tools and sources, such as documents, charts and graphs, slideshows, and more — not checking boxes.
AUTO🤖PRODUCER™ lets us do that.
Get AUTO🤖PRODUCER™
You can get AUTO🤖PRODUCER™ from The Denver Post Bookmarklets page — just visit the page and drag the bookmarklet icon to your web browser's Bookmarks bar.
Contribut to AUTO🤖PRODUCER™: Fork the repo on Github.
Problems or suggestions? File and issue on Github and assign it to Daniel J. Schneider.
AUTO🤖PRODUCER™ for Articles
Start AUTO🤖PRODUCER™ by clicking your bookmarklet. If you have an article open, AUTO🤖PRODUCER™ for Articles will start automatically.
You'll see something that looks like this:
AUTO🤖PRODUCER™ for Articles has a raft of features, most of which are somewhat self-explanatory. Just in case, here's a little guide.
Story types
The numbered list represents sets of Section and Tag selections that can be applied automatically. Enter the number in the input box and hit ENTER (or click AUTO🤖PRODUCE™) to apply the choices. Hover over the (?) to see what the selections will be.
- AUTO🤖PRODUCER™ can set, depending on your selection:
- Sections
- Tags
- Primary Section
- Primary Tag
- Apple News Section
- Story types with a red star automatically insert the Primary Tag Related shortcode.
- The Crime Story story type automatically inserts the Crime Map widget, and will prompt you for a type of crime or neighborhood name.
- The Weather Story story type automatically inserts the Weather widget.
Additional Options
Checkboxes allow you to perform additinal actions, like:
- Insert Related Articles: Story Types with a red star will do this automatically, but you can add the Primary Tag Related shortcode to any story by checking this box.
- The shortcode will be inserted four paragraphs fom the end of the story, if the story is at least six paragraphs long.
- Change Author: When you create an AP or WaPo story, the author may appear to be you. Check this box to quickly change the author.
- If you select both, you'll get an AP byline.
- You can't see this change in the article editor, but after you save you'll see the new author.
- Promos: Check this box to include In-Article Promos. The normal prompts associated with that bookmarklet will appear.
- Inform Video: Check this box to insert an Inform video embed. The normal prompts associated with that bookmarklet will appear.
- YouTube Video: Check this box to insert a YouTube video embed. You will need the URL or ID (just the part after
?v=
) and will be asked whether to autoplay. This is different from the normal OEmbed style of just pasting the URL on a line, which cannot autoplay videos. - Homicide Report: Check this box to include the Homicide Report. This will override the Crime Map insert if you have selected the Crime Story story type.
Content Processing
Every story is massaged gently while applying the options described above.
- Bylines AUTO🤖PRODUCER™ attempts to clean up and format AP and WaPo bylines, and deletes the byline graf if it's just the organizatio name (after checking that the story's author is that organization).
- Excerpts AUTO🤖PRODUCER™ will format AP excerpts to remove the
(AP)
, and will generate an excerpt as best it can if none is present. - Funked-Up The Know Converts those
—
characters that appear in The Know stories via Content Hub back into normal spaces. - Suggested Tags Now AUTO🤖PRODUCER™ examines the content to look for possible tags you may have missed. It's not perfect, but it might help you.
- Automatically compares content to a list of known tags
- Adds a box to the Tags widget in WP, after it runs, with its suggestions -- and scrolls you down to your tags widget, no matter where you've placed it.
- All you have to do is click the suggested tags to add them
- Click "Close" to dismiss the suggestions
Help
Click the link to get to this page.
Handy buttons
Instead of keeping a ton of bookmarklets in your browser bar, a selection of buttons at the bottom of the window will load additional article-production bookmarklets and run them, without altering anything else. Available:
- School Closures widget
- Homicide Report widget
- Crime Map widget
- Corrections
- Inform video embed
- YouTube video embed
- In-Article Promos
Capture New
Don't click this button frivoslously! Capture New is a way to request a new story type with ease. Here's what you do:
- On an article of the type you want to add to AUTO🤖PRODUCER™, set the Sections, Tags, Primary Section and Tag, and Apple News Sections, the way you would set them for every other story of that type. Don't do anything specific to that story yet.
- Click CAPTURE.
- Give the story type a name. Be specific, but concise — use the names of the existing story types as a guide. In most instances, the names are the same as the Primary Section (or strongly descriptive of it). Very short names have "Story" appended to them. Note: You'll get a snarky error if you try to skip this step.
- Select whether the Primary Tag Related shortcode should be automatically appended on this story type (best for stories that will always be related to earlier ones by a tag, such as Ask Amy or movie reviews). (Click OK to add them by default; Cancel to not do that.)
- You'll be offered one last chance to confirm that ths name is right and you really want to submit. This is to protect Dan from spam! Thanks for understanding.
PROFIT!The selections you've made will be captured, formatted for insertion into the Bookmarklet, and sent to Dan.
AUTO🤖PRODUCER™ for Photos
With a Media Library Modal open (the pop-up window that appears when you click to set a Featured Image or Add Media) and an image selected, start AUTO🤖PRODUCER™ by clicking your bookmarklet.
AUTO🤖PRODUCER™ will copy the raw Caption to the Description field, attempt to extract the Photo Credit and set it in the correct field, and attempt to trim the Getty Dateline and Credit from the Caption field. It will also set basic Alt Text for you and remove "APTOPIX" from the Title, if it's there.
Note: Some instances of month names may be abbreviated when they should not be.
This feature is still considered experimental.
AUTO🤖SEARCHER™ for Article Search
Start AUTO🤖PRODUCER™ by clicking your bookmarklet. If you have an article open, AUTO🤖SEARCHER™ for Article Search will start automatically.
You'll see something that looks like this:
Simple in its elegance, AUTO🤖SEARCHER™ sets a date range in the past few days and includes a search term so you don't have to click around as much. To use:
- Select 1, 2 or 7 days for the date range.
- Enter any search term you'd enter into the normal search field (optional).
- Hit ENTER (or click AUTO🤖SEARCH™).
- For sake of ease, the 1-day option is automatically selected and focused; use up/down arrow keys to change the range, then hit TAB to jump to the Search Term field.
AUTO🤖SEARCHER™ for Wire Hub
Start AUTO🤖PRODUCER™ by clicking your bookmarklet. If you have an article open, AUTO🤖SEARCHER™ for Wire Hub will start automatically.
You'll see something that looks like this:
AUTO🤖SEARCHER™ allows you to limit a search to one of three major wire services. Select one of the three, select a date range and enter any additional search terms. Then hit ENTER (or click AUTO🤖SEARCH™).
As with AUTO🤖SEARCHER™ for Articles Search, you can quickly tab between fields.
AUTO🤖SEARCHER™ for Content Hub
Start AUTO🤖PRODUCER™ by clicking your bookmarklet. If you have an article open, AUTO🤖SEARCHER™ for Content Hub will start automatically.
You'll see something that looks like this:
AUTO🤖SEARCHER™ allows you to limit a Content Hub search to certain other DFM papers (beware: there is a lot of overlap that leads to false positives; nevertheless, this does help limit your results). Select one of the papers and enter any additional search terms. Then hit ENTER (or click AUTO🤖SEARCH™). Date range searches are not available in Content Hub.
As with AUTO🤖SEARCHER™ for Articles Search, you can quickly tab between fields.
Changelog
1.0.4
- Adds YouTube embed functionality per Dan Petty request
1.0.3
- Introduced the tag suggestion manager (more above)
- Greatly improved the quality of AUTO🤖PRODUCER™ tag suggestions
1.0.2
- Squished a bug that was causing some stoy types with no Apple News Sections assigned to hang up, and the bug in Capture New that was causing these. Story types affected include
Television
,National Politics
andYourHub General
- Added logic to insertion of Related Articles by Primary Tag that will cause them to appear higher in stories with more than 24 paragraphs
- Removed automatic insertion of Related Articles from the
Weather
story type to avoid constant collisions with the weather widget - Removed "Olympics" section from assignments in the
Mikaela Shiffrin
andLindsey Vonn
story types
1.0.1
- Content processing handles multi-name bylines even better (h/t Kourtney Geers!)
- Added checkbox and subroutine to insert a Newsletter Signup widget at the end of a story (h/t Eric Lubbers!). You'll select a newsletter from a list.
- Tag suggestions are here! The list is static, so if it suggests a tag that should be deleted, or lacks one you've added, let me know.
- Now strips HTML and CQ shortcodes from excerpt when processing one
1.0.0
- Greatly improved handling of multi-name bylines during content processing
- Improved handling of photo credits for WaPo photos during photo processing
- Improved Alt text generation slightly, particularly for file photos during photo processing
- Improved selection of a valid Excerpt during content processing
- Fixed a bug that caused AUTO🤖PRODUCER™ to hang on content processing when option (0) "Do Nothing" was selected
- Content processing now replaces
—
(inserted in The Know stories in Content Hub) with normal spaces
0.9.9
- Fixed more bugs related to Related insertion
- Related items are now inserted in YourHub Crime Blotter story type regardless of story length (could mean at the end, so watch out for that!)
- Added some new requested story types
- Content processing now removes paragraphs with no content other than
0.9.8
- Fixed several bugs related to Related insertion
- Added some new requested story types
- Cleanup now hits the Excerpt -- if it's empty, the first full graph will be used instead, without the AP dateline
- Photo cleaner improvements
0.9.7
- Photo cleanup functions should now more reliably cause the credit to be saved with photos
- Photo cleaner works a lot better in the media library now
0.9.6
- Major code rebuild allows lots of content-altering stuff to go on at the same time (like inserting promos, related stuff, reprocessing bylines and general cleanup, the crime map, weather junk, etc.) without the things crashing into each other
- Weather story type now adds a link to more Denver7 weather per Kourtney
0.9.5
- Photo caption cleaner should now handle most AFP/Getty credits well
- Byline processing! WaPo and AP stories with a byline in the first paragraph should automatically format that byline.
- Wire story processing: Most wire stories should now be split into cleaner paragraphs, with less orphaned and confusing code remains!
0.9.4
- Greatly improved photo caption replacements
- Fixed erroneous "invalid" error when selecting option 0 (Do Nothing)
0.9.3
- Added ability to capture and auto-add the "Outstream" feature
- Improved visibility of Tooltip info
- Greatly improved photo caption/credit processing
0.9.2
- Photo credit and caption cleanup now works in Media Library proper
0.9.1
- Photo captions not convert all complete month names with spaces on either side of them to abbreviations in line with AP Style.
- State name removed from all Colorado towns and cities at the end of captions (", Colorado." becomes ".").
0.9.0
- Photo credit and caption cleanup basic mode enabled
- AP datelines will now be removed from the excerpt field and the "(AP) &mdash" in the dateline converted to a double-hyphen ("--").
0.8.7
- Automatically hide featured images on YourHub Crime Blotter stories
0.8.6
- Improved frivolity detection on CAPTURE function
0.8.5
- Obamacare story type added
- "No dates" and 30-day search options added to AUTO🤖SEARCHER™
- Visual improvements for AUTO🤖SEARCHER™
0.8.4
- New story types for Sports: Broncos, Rockies, Nuggets, Avs and Rapids
- Added lots of other sports-related things
- Added college sports-related things
0.8.3
- Help (this document) now fleshed out!
0.8.2
- Improved Related insert script to handle messier copy
0.8.1
- Visual improvements
- Hide this page (and others) from Google
- Added this page
0.8.0
- Added options to run Inform, Homicide and Promos when AUTO🤖PRODUCER™ runs
- Added buttons for other bookmarklets
- Improved AP search in AUTO🤖SEARCHER™ for Wire Hub
0.7.1
- Add crime map automatically on Crime Stories
0.6.0
- Added AUTO🤖SEARCHER™ for Article Search
- AUTO🤖SEARCHER™ for Wire Hub improvements
0.5.1
- AUTO🤖SEARCHER™ now shows random GIFs while you wait
- Added Book Review option (from Capture tool!)
0.5.0
- Added AUTO🤖SEARCHER™ for Wire Hub
- AUTO🤖SEARCHER™ for Content Hub improvements
- Fixed non-working Primary Tag and Primary Section selections
0.4.0
- Added AUTO🤖SEARCHER™ for Content Hub
- Visual improvements
- Transpiled
es6
code toes5
to return to minified scripts
0.3.0
- Capture New tool enabled
- Visual improvements
- Slight change to name formatting
- Minifying script is broken...
0.2.7
- Capture New tool enabled
- Visual improvements
- Slight change to name formatting
0.2.6
- Tab Indexes improved for better keyboard control
- Option numbering refactored to group related story types
- Options to automatically change author to AP/WaPo added
0.2.5
- Help icons added — hover over the (?)
- Scripts are minified now
0.2.4
- Added option to insert Related by Primary Tag shortcodes
- Insert Related by Primary Tag shortcodes automatically for some story types
0.2.3
- Added Colorado News and Colorado Wildfires story types
0.2.2
- Added YourHub Crime Blotter and YourHub Biz Profile story types
0.2.1
- Added Colorado Legislature and Nation-World story types
0.2.0
- Complete visual overhaul!
0.1.1
- Apple News Section now included in options
0.1.0
- AUTO🤖PRODUCER™ released with nine available story types
- Can set Primary Tag and Primary Section, and add Sections and Tags


This chapter provides information on API resources to create and manage OpenShift teams. A team is a group of users bundled together for the purposes of access control. You can add a team as a member to a domain the same way you would add a user.
The table below describes each parameter associated with an OpenShift team.
| Name | Description |
| name | The name of the team |
| id | The unique identifier |


|
| file | immutable_map.h [code] |
| | Defines the ImmutableMap template class, which is a simple map structure that can be declared as constexpr. This is a useful object to hold pairs of matching values known at compile time.
|
| |
| file | lua_handler.h [code] |
| | Definition of the LuaScriptHandler class, which encapsulates the definition and specializations for handling Lua scripts. It provides an interface to interact with Lua scripts and execute Lua functions from C++ code.
|
| |
| file | macro_logger.h [code] |
| | This file contains logger macros that are used throughout the codebase. The macro_logger.h file defines several macros that can be used to log messages to standard error output. The macros provide different log levels (ERROR, INFO, DEBUG), and can be used to print log messages with different levels of detail. The file also defines a LOG_LEVEL constant that can be used to control the level of logging that is output at runtime.
|
| |


To initiate the password reset process for your KGPExpress Account,
click the link below:
If clicking the link above doesn't work, please copy and paste the URL in a new browser
window instead.
{{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %}
In,case you have forgot, your username for KGPExpress account is {{ user.get_username }}
Sincerely,
The KGPExpress Team


Inspiring Bird Videos
Before getting Apollo I probably watched a million parrot videos on YouTube. These are a few of the best ones I’ve come across because they prove how intelligent budgies really are and how well they do living as pets.
This video is a BBC special on the Youtube superstar Disco. He’s got tons of videos showing all the different phrases he can say. One of my favourites being: “Can I has cheeseburger?”
I actually didn’t come across Wiki until more recently, but he is an awesome example of a budgie’s ability to learn tricks. You can see from this video how much budgies love to play and learn.
Dr. Irene Pepperberg and her African Grey, Alex, proved that parrots can not only mimic human speech, but have cognitive abilities that are similar to a three year old human.


A car (or automobile) is a wheeled motor vehicle used for transportation. Most definitions of car say they run primarily on roads, seat one to eight people, have four tires, and mainly transport people rather than goods. Cars came into global use during the 20th century, and developed economies depend on them.
A car (or automobile) is a wheeled motor vehicle used for transportation. Most definitions of car say they run primarily on roads, seat one to eight people, have four tires, and mainly transport people rather than goods. Cars came into global use during the 20th century, and developed economies depend on them.


{% extends "global/Page.html" %} {% load staticfiles otree %} {% block title %} Round {{ subsession.round_number }} of {{ Constants.num_rounds }} {% endblock %} {% block content %}
You will take part in a labour market. At the beginning of the game you will be randomly allocated the role of either worker or employer. Workers and employers will then be randomly matched together - one worker to one employer. Note that workers and emplyers will be re-matched at the start of each new game. You shall play several times each of the following three games.
{{ instructions | safe }}| Round | Player and outcome |
|---|---|
| {{ p.round_number }} | {% if p.role == 'Employer' %} You were the employer and proposed a wage of {{ p.wage }} for a desired effort level of {{ p.desired_effort_level }}. The employee did an effort level of {{ p.effort_level }} and you earned {{ p.payoff }} {% else %} You were the employee, were proposed a wage of {{ p.wage }} for a desired effort level of {{ p.desired_effort_level }}. You did an effort level of {{ p.effort_level }} and earned {{ p.payoff }} {% endif %} |
You're the employer
{% formfield group.wage label="Proposed wage:" %} {% formfield group.desired_effort_level label="Desired effort level:" %} {% if 'fine' in form_fields %} {% formfield group.fine label="Fine:" %} {% endif %} {% if 'bonus' in form_fields %} {% formfield group.bonus label="Bonus proposed:" %} {% endif %} {% next_button %} {% endblock %}


23rd edition
09:30 AM
Registration Starts
10:00 AM
10:15 AM
Testing Conversational AI - Strategy to Automation
Voice-based home assistants use conversational interfaces unlike other applications to interact. This session will cover the strategy for testing such interfaces, testing the NLP models and sharing experience on how to automate these tests and add it to the CI/CD build pipelines.
By: Shama Ugale
Resources: Presentation
YouTube: Link
11:15 AM
Element classification with ML in Appium
Appium enables test automation of mobile apps using Test.ai's machine-learning element type classifier used find Appium elements using a semantic label instead of having to dig through your app hierarchy. The same labels can be used to find elements with the same general shape across different apps and different visual designs.
By: Spandana
Resources: Presentation
YouTube: Link
11:45 AM
Tea Break
12:00 PM
Taiko - A Deep Dive
Taiko is a node library with a clear and concise API to automate the chrome browser.Taiko is built ground up to test modern web applications.
By: Vidhya & Arun
Resources: Presentation
YouTube: Link
1:00 PM
Lunch
2:00 PM
Test AI and ML Apps - A Worskshop
A Workshop/Presentation to understand QA?s testing approaches and the right algorithms to test Artificial/Machine Learning Applications like Virtual Assistants, Self driven cars.
By: Tarun Maini & Anshul
Resources: Presentation
YouTube: Link
04:00 PM
High Tea and Networking
Siva is the Office Principal of ThoughtWorks Chennai. He has close to 17 years of experience in software development with large part of it being a software architect on large and complex projects. Currently, he owns and manages office operations, delivery, capability development in niche areas and career development of TWers in Chennai office.
Anshul Gautam is Lead Consultant at Thoughtworks, with an industry experience of 11 years, mostly worked in e-commerce and cloud computing domains. Technical leader skilled in Chaos Engineering, Performance analysis and optimization, Workflow orchestration, Test Automation, Object Oriented Design.Currently exploring AI and ML landscape.
Arun is a Quality Analyst with 4+ years of experience, worked on different automation testing solutions.
Shama have worked as a Solution Consultant with focus on designing need based test Automation solutions (Web, Mobile , Webservices, chatbots, NLP, AI and Data), Agile and setting up a DevOps Culture with over 10 years of industry experience. She enjoys talking at the conferences and sharing the knowledge across the community and mentoring.
Tarun is working as a testing engineer at Thoughtworks. Have wore many hats from BA Dev and SDET & likes to explore new technologies/tools. Now a day's working on block chain testing.
Spandana is a very passionate QA and a Agile Practisioner. She has interests in developing skills around cutting edge software testing trends and techniques. She has also worked on domains like Automotive, Media and Publishing.
Vidhya is a passionate QA with 5+ years of experience and enthusiastic personnel who can adapt to any kind of environment.
vodQA, also called Value Oriented Discussion on Quality Analysis is a forum that sports the moto - 'Come Learn Something New'. The forum offers a unique platform within the software testing industry to strengthen the QA community through knowledge sharing.
We love feedback! If you have any suggestions or cribs, feel free to fill out our feedback form. Don't worry, its completely anonymous.
vodQA Volunteers


Brownie recipes from "Joy of Cooking"
by CBS NewsThe new, updated edition of one of the most popular cookbooks ever published, "Joy of Cooking" (Scribner) has been thoroughly revised and expanded by John Becker (great-grandson of the original author, Irma Rombauer) and his wife, Megan Scott.
They offered "CBS Sunday Morning" a few recipes from this 2019 edition.
[Be sure to watch Serena Altschul's report on "Joy of Cooking" on "Sunday Morning" November 10!]
"Almost everyone has their own take on this classic American confection," write Becker and Scott. "This is the classic, lighter brownie that has appeared in 'Joy' since 1931."
Brownies Cockaigne
Makes 16 to 24 two-inch squares
Preheat the oven to 350°F. If you want chewy and moist brownies, use a 13 × 9 × 2-inch pan; if cakey, a 9-inch square pan. Grease the pan and line with parchment paper so it extends over the long sides.
Melt in a small saucepan:
1 stick (4 oz or 115g) unsalted butter
4 ounces (115g) unsweetened chocolate, finely chopped
Let cool. If you don't, your brownies will be heavy and dry. Beat in a large bowl until light in color and foamy in texture:
4 large eggs
1/4 teaspoon salt
Gradually add and continue beating until thick:
2 cups (400g) sugar
1 teaspoon vanilla
With a few swift strokes, stir in the cooled chocolate mixture just until combined. Even if you are using an electric mixer, switch to a wooden spoon for this. Stir in just until combined:
1 cup (125g) all-purpose flour
If desired, gently stir in:
1 cup chopped toasted pecans
Scrape the batter into the prepared pan. Bake about 25 minutes or until a toothpick inserted in the center comes out clean or with moist crumbs attached. Let cool completely in the pan on a rack. If desired, serve with:
Whipped cream or ice cream
Fudgy Brownies
Makes 16 two-inch squares
They write: "Darker, richer, and fudgier than Brownies Cockaigne, this is our idea of the perfect, modern brownie."
Preheat the oven to 350°F. Grease a 9-inch square baking pan and line with parchment paper so it extends over 2 sides. Melt, stirring frequently, in a large saucepan over low heat:
1 stick (4 oz or 115g) unsalted butter, cut into cubes
1 cup (170g) semisweet chocolate chips
Whisk in until the sugar is dissolved:
1/2 cup (100g) sugar
1/2 cup packed (115g) brown sugar
Whisk in until just combined:
2 large eggs
2 teaspoons espresso powder
1 teaspoon vanilla
Stir in just until combined:
3/4 cup (95g) all-purpose flour
1/3 cup (25g) unsweetened cocoa powder
1/4 teaspoon salt
Scrape into the prepared pan. If desired, sprinkle over the top:
1/2 teaspoon flaky sea salt
Bake until a toothpick inserted in the center comes out with moist crumbs attached, 18 to 20 minutes. Let cool completely in the pan on a rack before cutting.
From "Joy of Cooking: 2019 Edition Fully Revised and Updated." Copyright 2019. Reprinted by permission of Scribner Books, of Simon & Schuster (a division of CBS).
See also:
For more info:
- "Joy of Cooking: 2019 Edition Fully Revised and Updated" by Irma S. Rombauer, Marion Rombauer Becker, Ethan Becker, John Becker and Megan Scott (Scribner), in Hardcover, Spiral-Bound and eBook formats, available November 12 via Amazon


"Before I found blocbox, I couldn't' find anything I had bookmarked or saved to my harddrive, or was it my cloud accoutn? Since, joining with blocbox, I have seen an upswing in my performance reviews and client interactions due to me being able to find everything , whenever I need it in mere seconds."
Sandra Crowder
UX Designer, Raleigh NC.
- Free
- Up To 5 Boxes
- Share With 10 People
- 2 GB Storage
- FREE
- BUSINESS
- Unlimited Boxes
- Share With 20 People
- 5 GB Storage
- Real-Time Sharing
- $5
- EXECUTIVE
- Unlimited Boxes
- Unlimited Shares
- Unlimited Storage
- Share and Work Real-Time
- $10
- Create Notes
- Save Media
- Add Links
Everything Within Your Fingertips
built for you
Find out mor about all there is to offer. You can upload your images, transfer your bookmarks from your browser, design boxes to file everything in an organized fashion that makes sense to you. .
Take a Closer Look »


|
You have successfully created a vTutor student account.
Your username is @Model.EmailAddress.
You can access your account, change your password and sign up for tutoring sessions anytime from here: @Model.WhyVTutor
We look forward to seeing you online! The vTutor Team
|


Sorry, but the requested page is unavailable due to a server hiccup.
Our engineers have been notified, so check back later.
If needed please contact us<EMAIL_ADDRESS>skaschool2014@163.com