SOAP is an XML-based communication protocol and encoding format for inter-application communication. Originally conceived by Microsoft and Userland software, it has evolved through several generations; the current spec is version, SOAP 1.2, though version1.1 is more widespread. The W3C's XML Protocol working group is in charge of the specification.
SOAP is widely viewed as the backbone to a new generation of cross-platform cross-language distributed computing applications, termed Web Services.
But Axis isn't just a SOAP engine -- it also includes:
Axis is the third generation of Apache SOAP (which began at IBM as "SOAP4J"). In late 2000, the committers of Apache SOAP v2 began discussing how to make the engine much more flexible, configurable, and able to handle both SOAP and the upcoming XML Protocol specification from the W3C.
After a little while, it became clear that a ground-up rearchitecture was required. Several of the v2 committers proposed very similar designs, all based around configurable "chains" of message "handlers" which would implement small bits of functionality in a very flexible and composable manner.
After months of continued discussion and coding effort in this direction, Axis now delivers the following key features:
We hope you enjoy using Axis. Please note that this is an open-source effort - if you feel the code could use some new features or fixes, please get involved and lend a hand! The Axis developer community welcomes your participation. And in case you're wondering what Axis stands for, it's Apache EXtensible Interaction System - a fancy way of implying it's a very configurable SOAP engine.
Please click for a list of what we think needs doing - and please consider helping out if you're interested & able!
Before running the examples in this guide, you'll need to make sure that your CLASSPATH includes (Note: If you build Axis from a CVS checkout, these will be in xml-axis/java/build/lib instead of axis-1_2/lib):
1 import org.apache.axis.client.Call; 2 import org.apache.axis.client.Service; 3 import javax.xml.namespace.QName; 4 5 public class TestClient { 6 public static void main(String [] args) { 7 try { 8 String endpoint = 9 "http://nagoya.apache.org:5049/axis/services/echo"; 10 11 Service service = new Service(); 12 Call call = (Call) service.createCall(); 13 14 call.setTargetEndpointAddress( new java.net.URL(endpoint) ); 15 call.setOperationName(new QName("http://soapinterop.org/", "echoString")); 16 17 String ret = (String) call.invoke( new Object[] { "Hello!" } ); 18 19 System.out.println("Sent 'Hello!', got '" + ret + "'"); 20 } catch (Exception e) { 21 System.err.println(e.toString()); 22 } 23 } 24 }(You'll find this file in samples/userguide/example1/TestClient.java)
Assuming you have a network connection active, this program can be run as follows:
% java samples.userguide.example1.TestClient Sent 'Hello!', got 'Hello!' %So what's happening here? On lines 11 and 12 we create new Service and Call objects. These are the standard JAX-RPC objects that are used to store metadata about the service to invoke. On line 14, we set up our endpoint URL - this is the destination for our SOAP message. On line 15 we define the operation (method) name of the Web Service. And on line 17 we actually invoke the desired service, passing in an array of parameters - in this case just one String.
You can see what happens to the arguments by looking at the SOAP request that goes out on the wire (look at the colored sections, and notice they match the values in the call above):
<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SOAP-ENV:Body> <ns1:echoString xmlns:ns1="http://soapinterop.org/"> <arg0 xsi:type="xsd:string">Hello!</arg0> </ns1:echoString> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
The String argument is automatically serialized into XML, and the server responds with an identical String, which we deserialize and print.
Note: To actually watch the XML flowing back and forth between a SOAP client and server, you can use the included tcpmon tool or SOAP monitor tool. See the appendix for an overview.
call.addParameter("testParam", org.apache.axis.Constants.XSD_STRING, javax.xml.rpc.ParameterMode.IN); call.setReturnType(org.apache.axis.Constants.XSD_STRING);This will assign the name testParam to the 1st (and only) parameter on the invoke call. This will also define the type of the parameter (org.apache.axis.Constants.XSD_STRING) and whether it is an input, output or inout parameter - in this case its an input parameter. Now when you run the program you'll get a message that looks like this:
<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SOAP-ENV:Body> <ns1:echoString xmlns:ns1="http://soapinterop.org/"> <testParam xsi:type="xsd:string">Hello!</testParam> </ns1:echoString> </SOAP-ENV:Body> </SOAP-ENV:Envelope>Note that the param is now named "testParam" as expected.
Here's what a typical response might look like to the echoString method:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SOAP-ENV:Body> <ns1:echoStringResponse xmlns:ns1="http://soapinterop.org/"> <result xsi:type="xsd:string">Hello!</result> </ns1:echoStringResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
Take a look at the section which we've highlighted in red - that attribute is a schema type declaration, which Axis uses to figure out that the contents of that element are, in this case, deserializable into a Java String object. Many toolkits put this kind of explicit typing information in the XML to make the message "self-describing". On the other hand, some toolkits return responses that look like this:
<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SOAP-ENV:Body> <ns1:echoStringResponse xmlns:ns1="http://soapinterop.org/"> <result>Hello, I'm a string!</result> </ns1:echoStringResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
There's no type in the message, so how do we know what Java object we should deserialize the <result> element into? The answer is metadata - data about data. In this case, we need a description of the service that tells us what to expect as the return type. Here's how to do it on the client side in Axis:
call.setReturnType( org.apache.axis.Constants.XSD_STRING );
This method will tell the Axis client that if the return element is not typed then it should act as if the return value has an xsi:type attribute set to the predefined SOAP String type. (You can see an example of this in action in the interop echo-test client - samples/echo/TestClient.java.)
There is also a similar method which allows you to specify the Java class of the expected return type:
call.setReturnClass(String.class);
OK - so now you know the basics of accessing SOAP services as a client. But how do you publish your own services?
public class Calculator { public int add(int i1, int i2) { return i1 + i2; } public int subtract(int i1, int i2) { return i1 - i2; } }(You'll find this very class in samples/userguide/example2/Calculator.java.)
How do we go about making this class available via SOAP? There are a couple of answers to that question, but we'll start with the easiest way Axis provides to do this, which takes almost no effort at all!
% copy Calculator.java <your-webapp-root>/axis/Calculator.jwsNow for step 2... hm, wait a minute. You're done! You should now be able to access the service at the following URL (assuming your Axis web application is on port 8080):
http://localhost:8080/axis/Calculator.jws
Axis automatically locates the file, compiles the class, and converts SOAP calls correctly into Java invocations of your service class. Try it out - there's a calculator client in samples/userguide/example2/CalcClient.java, which you can use like this:
% java samples.userguide.example2.CalcClient -p8080 add 2 5 Got result : 7 % java samples.userguide.example2.CalcClient -p8080 subtract 10 9 Got result : 1 %(Note that you may need to replace the "-p8080" with whatever port your J2EE server is running on)
Important: JWS web services are intended for simple web services. You cannot use packages in the pages, and as the code is compiled at run time you can not find out about errors until after deployment. Production quality web services should use Java classes with custom deployment.
To really use the flexibility available to you in Axis, you should get familiar with the Axis Web Service Deployment Descriptor (WSDD) format. A deployment descriptor contains a bunch of things you want to "deploy" into Axis - i.e. make available to the Axis engine. The most common thing to deploy is a Web Service, so let's start by taking a look at a deployment descriptor for a basic service (this file is samples/userguide/example3/deploy.wsdd):
<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"> <service name="MyService" provider="java:RPC"> <parameter name="className" value="samples.userguide.example3.MyService"/> <parameter name="allowedMethods" value="*"/> </service> </deployment>Pretty simple, really - the outermost element tells the engine that this is a WSDD deployment, and defines the "java" namespace. Then the service element actually defines the service for us. A service is a targeted chain (see the Architecture Guide), which means it may have any/all of: a request flow, a pivot Handler (which for a service is called a "provider"), and a response flow. In this case, our provider is "java:RPC", which is built into Axis, and indicates a Java RPC service. The actual class which handles this is org.apache.axis.providers.java.RPCProvider. We'll go into more detail later on the different styles of services and their providers.
We need to tell the RPCProvider that it should instantiate and call the correct class (e.g. samples.userguide.example3.MyService), and we do so by including <parameter> tags, giving the service one parameter to configure the class name, and another to tell the engine that any public method on that class may be called via SOAP (that's what the "*" means; we could also have restricted the SOAP-accessible methods by using a space or comma separated list of available method names).
WSDD descriptors can also contain other information about services, and also other pieces of Axis called "Handlers" which we'll cover in a later section.
Axis supports scoping service objects (the actual Java objects which implement your methods) three ways. "Request" scope, the default, will create a new object each time a SOAP request comes in for your service. "Application" scope will create a singleton shared object to service all requests. "Session" scope will create a new object for each session-enabled client who accesses your service. To specify the scope option, you add a <parameter> to your service like this (where "value" is request, session, or application):
<service name="MyService"...> <parameter name="scope" value="value"/> ... </service>
% java org.apache.axis.client.AdminClient deploy.wsdd <Admin>Done processing</Admin>This command has now made our service accessible via SOAP. Check it out by running the Client class - it should look like this:
% java samples.userguide.example3.Client -lhttp://localhost:8080/axis/services/MyService "test me!" You typed : test me! %If you want to prove to yourself that the deployment really worked, try undeploying the service and calling it again. There's an "undeploy.wsdd" file in the example3/ directory which you can use just as you did the deploy.wsdd file above. Run the AdminClient on that file, then try the service Client again and see what happens.
You can also use the AdminClient to get a listing of all the deployed components in the server:
% java org.apache.axis.client.AdminClient list <big XML document returned here>In there you'll see services, handlers, transports, etc. Note that this listing is an exact copy of the server's "server-config.wsdd" file, which we'll talk about in more detail a little later.
<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"> <!-- define the logging handler configuration --> <handler name="track" type="java:samples.userguide.example4.LogHandler"> <parameter name="filename" value="MyService.log"/> </handler> <!-- define the service, using the log handler we just defined --> <service name="LogTestService" provider="java:RPC"> <requestFlow> <handler type="track"/> </requestFlow> <parameter name="className" value="samples.userguide.example4.Service"/> <parameter name="allowedMethods" value="*"/> </service> </deployment>
The first section defines a Handler called "track" that is implemented by the class samples.userguide.example4.LogHandler. We give this Handler an option to let it know which file to write its messages into.
Then we define a service, LogTestService, which is an RPC service just like we saw above in our first example. The difference is the <requestFlow> element inside the <service> - this indicates a set of Handlers that should be invoked when the service is invoked, before the provider. By inserting a reference to "track", we ensure that the message will be logged each time this service is invoked.
<service name="AdminService" provider="java:MSG"> <parameter name="className" value="org.apache.axis.util.Admin"/> <parameter name="allowedMethods" value="*"/> <parameter name="enableRemoteAdmin" value="true"/> </service>
WARNING: enabling remote administration may give unauthorized parties access to your machine. If you do this, please make sure to add security to your configuration!
There are four "styles" of service in Axis. RPC services use the SOAP RPC conventions, and also the SOAP "section 5" encoding. Document services do not use any encoding (so in particular, you won't see multiref object serialization or SOAP-style arrays on the wire) but DO still do XML<->Java databinding. Wrapped services are just like document services, except that rather than binding the entire SOAP body into one big structure, they "unwrap" it into individual parameters. Message services receive and return arbitrary XML in the SOAP Envelope without any type mapping / data binding. If you want to work with the raw XML of the incoming and outgoing SOAP Envelopes, write a message service.
Document services and wrapped services are similar in that neither uses the SOAP encoding for data; it's just plain old XML schema. In both cases, however, Axis still "binds" Java representations to the XML (see the databinding section for more), so you end up dealing with Java objects, not directly with XML constructs.
A good place to start in describing the difference between document and wrapped services is with a sample SOAP message containing a purchase order:
<soap:Envelope xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"> <soap:Body> <myNS:PurchaseOrder xmlns:myNS="http://commerce.com/PO"> <item>SK001</item> <quantity>1</quantity> <description>Sushi Knife</description> </myNS:PurchaseOrder> </soap:Body> </soap:Envelope>
The relevant schema for the PurchaseOrder looks like this:
<schema targetNamespace="http://commerce.com/PO"> <complexType name="POType"> <sequence> <element name="item" type="xsd:string"/> <element name="quantity" type="xsd:int"/> <element name="description" type="xsd:string"/> </sequence> </complexType> <element name="PurchaseOrder" type="POType"/> </deployment>
For a document style service, this would map to a method like this:
public void method(PurchaseOrder po)
In other words, the ENTIRE <PurchaseOrder> element would be handed to your method as a single bean with three fields inside it. On the other hand, for a wrapped style service, it would map to a method like this:
public void purchaseOrder(String item, int quantity, String description)
Note that in the "wrapped" case, the <PurchaseOrder> element is a "wrapper" (hence the name) which only serves to indicate the correct operation. The arguments to our method are what we find when we "unwrap" the outer element and take each of the inner ones as a parameter.
The document or wrapped style is indicated in WSDD as follows:
<service ... style="document">
for document style
<service ... style="wrapped"> for
wrapped style
In most cases you won't need to worry about document or wrapped services if you are starting from a WSDL document (see below).
Finally, we arrive at "Message" style services, which should be used when you want Axis to step back and let your code at the actual XML instead of turning it into Java objects. There are four valid signatures for your message-style service methods:
public Element [] method(Element [] bodies);
public SOAPBodyElement [] method (SOAPBodyElement [] bodies);
public Document method(Document body);
public void method(SOAPEnvelope req, SOAPEnvelope resp);
The first two will pass your method arrays of either DOM Elements or SOAPBodyElements - the arrays will contain one element for each XML element inside the <soap:body> in the envelope.
The third signature will pass you a DOM Document representing the <soap:body>, and expects the same in return.
The fourth signature passes you two SOAPEnvelope objects representing the request and response messages. This is the signature to use if you need to look at or modify headers in your service method. Whatever you put into the response envelope will automatically be sent back to the caller when you return. Note that the response envelope may already contain headers which have been inserted by other Handlers.
Message Example
A sample message service can be found in samples/message/MessageService.java.
The service class, MessageService
, has one public method, echoElements
,
which matches the first of the three method signatures above:
public Element[] echoElements(Element [] elems)
The MsgProvider
handler calls the method with an array
of
org.w3c.dom.Element
objects that correspond to the immediate
children of the incoming message's SOAP Body. Often, this array will contain
a single Element (perhaps the root element of some XML document conforming to
some agreed-upon schema), but the SOAP Body can handle any number of children.
The method returns an Element[]
array to be returned in the SOAP
body of the response message.
Message services must be deployed with a WSDD file. Here is the full WSDD for
the MessageService
class:
<deployment name="test" xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java" xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"> <service name="MessageService" style="message"> <parameter name="className" value="samples.message.MessageService"/> <parameter name="allowedMethods" value="echoElements"/> </service>
</deployment>
Note that the "style" attribute is different from the RPC deployment
example. The "message" style tells Axis that this service is to be
handled by org.apache.axis.providers.java.MsgProvider
rather than
org.apache.axis.providers.java.RPCProvider
.
You can test this service by deploying it, then running samples.message.TestMsg (look at the source to see what the test driver does).
| xsd:base64Binary | byte[] |
| xsd:boolean | boolean |
| xsd:byte | byte |
| xsd:dateTime | java.util.Calendar |
| xsd:decimal | java.math.BigDecimal |
| xsd:double | double |
| xsd:float | float |
| xsd:hexBinary | byte[] |
| xsd:int | int |
| xsd:integer | java.math.BigInteger |
| xsd:long | long |
| xsd:QName | javax.xml.namespace.QName |
| xsd:short | short |
| xsd:string | java.lang.String |
If the WSDL says that an object can be nillable, that is the caller may choose to return a value of nil, then the primitive data types are replaced by their wrapper classes, such as Byte, Double, Boolean, etc.
Alongside the XSD datatypes are the SOAP 'Section 5' datatypes that are all nillable, and so only ever map to the wrapper classes. These types exist because they all support the "ID" and "HREF" attributes, and so will be used when in an RPC-encoded context to support multi-ref serialization.
Obviously, if the recipient does not know how to create an instance of the received fault, this mechanism does not work. Unless you include information about the exception class in the WSDL description of the service, or sender and receiver share the implementation, you can only reliably throw java.rmi.RemoteException instances, rather than subclasses.
When an implementation in another language receives such an exception, it should see the name of the class as the faultCode, but still be left to parse the body of the exception. You need to experiment to find out what happens there.
If your exception meets this specification, then the WSDL describing the method will describe the exception too, enabling callers to create stub implementations of the exception, regardless of platform.
Again, to be sure of interoperability, you need to be experiment a bit. Remember, the calling language may not have the notion of Exceptions, or at least not be as rigorous as Java in the rules as to how exceptions must be handled.
<beanMapping qname="ns:local" xmlns:ns="someNamespace" languageSpecificType="java:my.java.thingy"/>The <beanMapping> tag maps a Java class (presumably a bean) to an XML QName. You'll note that it has two important attributes, qname and languageSpecificType. So in this case, we'd be mapping the "my.java.thingy" class to the XML QName [someNamespace]:[local].
Let's take a look at how this works in practice. Go look at samples/userguide/example5/BeanService.java. The key thing to notice is that the argument to the service method is an Order object. Since Order is not a basic type which Axis understands by default, trying to run this service without a type mapping will result in a fault. (If you want to try this for yourself, you can use the bad-deploy.wsdd file in the example5 directory.) But if we put a beanMapping into our deployment, all will be well. Here's how to run this example (from the example5 directory):
% java org.apache.axis.client.AdminClient -llocal:///AdminService deploy.wsdd <Admin>Done processing</Admin> % java samples.userguide.example5.Client -llocal:// Hi, Glen Daniels! You seem to have ordered the following: 1 of item : mp3jukebox 4 of item : 1600mahBattery If this had been a real order processing system, we'd probably have charged you about now. %
TBD - this section will be expanded in a future version! For now look at the DataSer/DataDeser classes (in samples/encoding). Also look at the BeanSerializer, BeanDeserializer, ArraySerializer, ArrayDeserializer and other classes in the org.apache.axis.encoding.ser package.
<typeMapping qname="ns:local" xmlns:ns="someNamespace" languageSpecificType="java:my.java.thingy" serializer="my.java.Serializer" deserializer="my.java.DeserializerFactory" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
This looks a lot like the <beanMapping> tag we saw earlier, but there are three extra attributes. One, serializer, is the Java class name of the Serializer factory which gets the serializer to be used to marshal an object of the specified Java class (i.e., my.java.thingy) into XML. Another, deserializer, is the class name of a Deserializer factory that gets the deserializer to be used to unmarshall XML into the correct Java class. The final attribute, the encodingStyle, which is SOAP encoding.
(The <beanMapping> tag is really just shorthand for a <typeMapping> tag with serializer="org.apache.axis.encoding.ser.BeanSerializerFactory", deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory", and encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", but clearly it can save a lot of typing!)
<arrayMapping qname="ns:ArrayOfthingy" xmlns:ns="someNamespaceURI" languageSpecificType="java:my.java.array.thingy[]" innerType="ns2:thingy" xmlns:ns2="anotherNamespaceURI" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>No need here to specify a serializer/deserializer couple, the arrayMapping tag is only about arrays (no List, ...). The added attribute (innerType) is used to tell Axis what precisely is the item type of the Array.
Axis supports WSDL in three ways:
If you access the service URL in a browser, you'll see a message indicating that the endpoint is an Axis service, and that you should usually access it using SOAP. However, if you tack on "?wsdl" to the end of the URL, Axis will automatically generate a service description for the deployed service, and return it as XML in your browser (try it!). The resulting description may be saved or used as input to proxy-generation, described next. You can give the WSDL-generation URL to your online partners, and they'll be able to use it to access your service with toolkits like .NET, SOAP::Lite, or any other software which supports using WSDL.
You can also generate WSDL files from existing Java classes (see Java2WSDL:
Building WSDL from Java ).
You'll find the Axis WSDL-to-Java tool in "org.apache.axis.wsdl.WSDL2Java". The basic invocation form looks like this:
% java org.apache.axis.wsdl.WSDL2Java (WSDL-file-URL)
This will generate only those bindings necessary for the client. Axis follows the JAX-RPC specification when generating Java client bindings from WSDL. For this discussion, assume we executed the following:
% cd samples/addr % java org.apache.axis.wsdl.WSDL2Java AddressBook.wsdl
The generated files will reside in the directory "AddressFetcher2". They are put here because that is the target namespace from the WSDL and namespaces map to Java packages. Namespaces will be discussed in detail later.
| WSDL clause | Java class(es) generated |
| For each entry in the type section | A java class |
| A holder if this type is used as an inout/out parameter | |
| For each portType | A java interface |
| For each binding | A stub class |
| For each service | A service interface |
| A service implementation (the locator) |
The Java class generated from a WSDL type will be named from the WSDL type. This class will typically, though not always, be a bean. For example, given the WSDL (the WSDL used throughout the WSDL2Java discussion is from the Address Book sample):
<xsd:complexType name="phone"> <xsd:all> <xsd:element name="areaCode" type="xsd:int"/> <xsd:element name="exchange" type="xsd:string"/> <xsd:element name="number" type="xsd:string"/> </xsd:all> </xsd:complexType>
WSDL2Java will generate:
public class Phone implements java.io.Serializable { public Phone() {...} public int getAreaCode() {...} public void setAreaCode(int areaCode) {...} public java.lang.String getExchange() {...} public void setExchange(java.lang.String exchange) {...} public java.lang.String getNumber() {...} public void setNumber(java.lang.String number) {...} public boolean equals(Object obj) {...} public int hashCode() {...} }
Notice in the mapping above, the XML type name is "phone" and the generated Java class is "Phone" - the capitalization of the first letter has changed to match the Java coding convention that classes begin with an uppercase letter. This sort of thing happens a lot, because the rules for expressing XML names/identifiers are much less restrictive than those for Java. For example, if one of the sub-elements in the "phone" type above was named "new", we couldn't just generate a Java field called "new", since that is a reserved word and the resultant source code would fail to compile.
To support this kind of mapping, and also to enable the serialization/deserialization of XML attributes, we have a type metadata system which allows us to associate Java data classes with descriptors which control these things.
When the WSDL2Java tool creates a data bean like the Phone class above, it notices if the schema contains any attributes, or any names which do not map directly to Java field/property names. If it finds any of these things, it will generate a static piece of code to supply a type descriptor for the class. The type descriptor is essentially a collection of field descriptors, each of which maps a Java field/property to an XML element or attribute.
To see an example of this kind of metadata, look at the "test.encoding.AttributeBean" class in the Axis source, or generate your own bean from XML which uses attributes or names which would be illegal in Java.
This type may be used as an inout or out parameter. Java does not have the concept of inout/out parameters. In order to achieve this behavior, JAX-RPC specifies the use of holder classes. A holder class is simply a class that contains an instance of its type. For example, the holder for the Phone class would be:
package samples.addr.holders; public final class PhoneHolder implements javax.xml.rpc.holders.Holder { public samples.addr.Phone value; public PhoneHolder() { } public PhoneHolder(samples.addr.Phone value) { this.value = value; } }
A holder class is only generated for a type if that type is used as an inout or out parameter. Note that the holder class has the suffix "Holder" appended to the class name, and it is generated in a sub-package with the "holders".
The holder classes for the primitive types can be found in javax.xml.rpc.holders.
The Service Definition Interface (SDI) is the interface that's derived from a WSDL's portType. This is the interface you use to access the operations on the service. For example, given the WSDL:
<message name="empty"> <message name="AddEntryRequest"> <part name="name" type="xsd:string"/> <part name="address" type="typens:address"/> </message> <portType name="AddressBook"> <operation name="addEntry"> <input message="tns:AddEntryRequest"/> <output message="tns:empty"/> </operation> </portType>
WSDL2Java will generate:
public interface AddressBook extends java.rmi.Remote { public void addEntry(String name, Address address) throws java.rmi.RemoteException; }
A note about the name of the SDI. The name of the SDI is typically the name of the portType. However, to construct the SDI, WSDL2Java needs information from both the portType and the binding. (This is unfortunate and is a topic of discussion for WSDL version 2.)
JAX-RPC says (section 4.3.3): "The name of the Java interface is mapped from the name attribute of the wsdl:portType element. ... If the mapping to a service definition interface uses elements of the wsdl:binding ..., then the name of the service definition interface is mapped from the name of the wsdl:binding element."
Note the name of the spec. It contains the string "RPC". So this spec, and WSDL2Java, assumes that the interface generated from the portType is an RPC interface. If information from the binding tells us otherwise (in other words, we use elements of the wsdl:binding), then the name of the interface is derived instead from the binding.
Why? We could have one portType - pt - and two bindings - bRPC and bDoc. Since document/literal changes what the interface looks like, we cannot use a single interface for both of these bindings, so we end up with two interfaces - one named pt and another named bDoc - and two stubs - bRPCStub (which implements pt) and bDocStub (which implements bDoc).
Ugly, isn't it? But you can see why it's necessary. Since document/literal changes what the interface looks like, and we could have more than one binding referring to a single portType, we have to create more than one interface, and each interface must have a unique name.
Given the following WSDL snippet:
<binding name="AddressBookSOAPBinding" type="tns:AddressBook"> ... </binding>
WSDL2Java will generate:
public class AddressBookSOAPBindingStub extends org.apache.axis.client.Stub implements AddressBook { public AddressBookSOAPBindingStub() throws org.apache.axis.AxisFault {...} public AddressBookSOAPBindingStub(URL endpointURL, javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {...}
public AddressBookSOAPBindingStub(javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {...}
public void addEntry(String name, Address address) throws RemoteException {...}
}
<service name="AddressBookService"> <port name="AddressBook" binding="tns:AddressBookSOAPBinding"> <soap:address location="http://localhost:8080/axis/services/AddressBook"/> </port> </service>
WSDL2Java will generate the service interface:
public interface AddressBookService extends javax.xml.rpc.Service { public String getAddressBookAddress();
public AddressBook getAddressBook() throws javax.xml.rpc.ServiceException;
public AddressBook getAddressBook(URL portAddress) throws javax.xml.rpc.ServiceException; }
WSDL2Java will also generate the locator which implements this interface:
public class AddressBookServiceLocator extends org.apache.axis.client.Service implements AddressBookService { ... }
The service interface defines a get method for each port listed in the service element of the WSDL. The locator is the implementation of this service interface. It implements these get methods. It serves as a locator for obtaining Stub instances. The Service class will by default make a Stub which points to the endpoint URL described in the WSDL file, but you may also specify a different URL when you ask for the PortType.
A typical usage of the stub classes would be as follows:
public class Tester { public static void main(String [] args) throws Exception { // Make a service AddressBookService service = new AddressBookServiceLocator(); // Now use the service to get a stub which implements the SDI. AddressBook port = service.getAddressBook(); // Make the actual call Address address = new Address(...); port.addEntry("Russell Butek", address); }
}
% java org.apache.axis.wsdl.WSDL2Java --server-side --skeletonDeploy true AddressBook.wsdl
You will see that WSDL2Java generates all the classes that were generated
before for the client, but it generates a few new files:
| WSDL clause | Java class(es) generated |
| For each binding | A skeleton class |
| An implementation template class | |
| For all services | One deploy.wsdd file |
| One undeploy.wsdd file |
If you don't specify the "--skeletonDeploy true" option, a skeleton will not be generated. Instead, the generated deploy.wsdd will indicate that the implementation class is deployed directly. In such cases, the deploy.wsdd contains extra meta data describing the operations and parameters of the implementation class. Here is how you run WSDL2Java to deploy directly to the implementation:
% java org.apache.axis.wsdl.WSDL2Java --server-side AddressBook.wsdl
And here are the server side files that are generated:
| WSDL clause | Java class(es) generated |
| For each binding | An implementation template class |
| For all services | One deploy.wsdd file with operation meta data |
| One undeploy.wsdd file |
public class AddressBookSOAPBindingSkeleton implements AddressBook, org.apache.axis.wsdl.Skeleton { private AddressBook impl; public AddressBookSOAPBindingSkeleton() { this.impl = new AddressBookSOAPBindingImpl(); } public AddressBookSOAPBindingSkeleton(AddressBook impl) { this.impl = impl; } public void addEntry(java.lang.String name, Address address) throws java.rmi.RemoteException { impl.addEntry(name, address); } }
(The real skeleton is actually much richer. For brevity we just show you the basic skeleton.)
The skeleton contains an implementation of the AddressBook service. This implementation is either passed into the skeleton on construction, or an instance of the generated implementation is created. When the Axis engine calls the skeleton's addEntry method, it simply delegates the invocation to the real implementation's addEntry method.
WSDL2Java also generates an implementation template from the binding:
public class AddressBookSOAPBindingImpl implements AddressBook {
public void addEntry(String name, Address address) throws java.rmi.RemoteException { } }
This template could actually be used as a test implementation but, as you can see, it doesn't do anything. It is intended that the service writer fill out the implementation from this template.
When WSDL2Java is asked to generate the implementation template (via the --server-side flag), it will ONLY generate it if it does not already exist. If this implementation already exists, it will not be overwritten.
The tool also builds you a "deploy.wsdd" and an "undeploy.wsdd" for each service for use with the AdminClient. These files may be used to deploy the service once you've filled in the methods of the Implementation class, compiled the code, and made the classes available to your Axis engine.
package samples.userguide.example6; /** * Interface describing a web service to set and get Widget prices. **/ public interface WidgetPrice { public void setWidgetPrice(String widgetName, String price); public String getWidgetPrice(String widgetName); }
Note: If you compile your class with debug information, Java2WSDL will use the debug information to obtain the method parameter names.
Here is an example invocation that produces the wsdl file (wp.wsdl) from the interface described in the previous section (entered all on one line):
% java org.apache.axis.wsdl.Java2WSDL -o wp.wsdl -l"http://localhost:8080/axis/services/WidgetPrice" -n "urn:Example6" -p"samples.userguide.example6" "urn:Example6" samples.userguide.example6.WidgetPrice
Where:
The Java2WSDL tool has many additional options which are detailed in the reference guide. There is an Ant Task to integrate this action with an Ant based build process.
% java org.apache.axis.wsdl.WSDL2Java -o . -d Session -s -S true -Nurn:Example6 samples.userguide.example6 wp.wsdl
This will generate the following files:
Now you have all of the necessary files to build your client/server side code and deploy the web service!
Hence certain interfaces are designated as published, which means that they are relatively stable. As Axis is refactored, the Axis developers will try to avoid changing published interfaces unnecessarily and will certainly consider the impact on users of any modifications.
So if you stick to using only published interfaces, you'll minimise the pain of migrating between releases of Axis. On the other hand, if you decide to use unpublished interfaces, migrating between releases could be an interesting exercise! If you would like an interface to be published, you should make the case for this on the axis-user mailing list.
The current list of published interfaces is as follows:
So you've skimmed the User's Guide and written your first .jws service, and everything went perfectly! Now it's time to get to work on a real project, and you have something specific you need to do that the User's Guide didn't cover. It's a simple thing, and you know it must be in Axis somewhere, but you don't know what it's called or how to get at it. This section is meant to give you some starting points for your search.
Here are the big categories.
The answer to most "where do I find..." questions for an Axis web service is "in the MessageContext." Essentially everything Axis knows about a given request/response can be retrieved via the MessageContext. Here Axis stores:
org.apache.axis.Message
objects available via getter and setter methods)MessageContext.getProperty()
.
You only need
to know the name of the property. This can be tricky, but it is usually a
constant, like those defined in
org.apache.axis.transport.http.HTTPConstants
.
So, for example, to retrieve the ServletContext for the Axis Servlet, you
would want: ((HttpServlet)msgC.getProperty(HTTPConstants.MC_HTTP_SERVLET)).getServletContext();
From within your service, the current MessageContext object is always
available
via the static method MessageContext.getCurrentContext()
. This
allows you to do any needed customization of the request and response
methods,
even from within an RPC service that has no explicit reference to the
MessageContext.
An org.apache.axis.Message
object is Axis's representation of
a SOAP message. The request and response messages can be retrieved from the
MessageContext as described above. A Message has:
As you can see, starting with the MessageContext lets you work your way down through the API, discovering all the information available to you about a single request/response exchange. A MessageContext has two Messages, which each have a SOAPPart that contains a SOAPEnvelope. The SOAPEnvelope, in turn, holds a full representation of the SOAP Envelope that is sent over the wire. From here you can get and set the contents of the SOAP Header and the SOAP Body. See the Javadocs for a full list of the properties available.
% java org.apache.axis.utils.tcpmon [listenPort targetHost targetPort]Without any of the optional arguments, you will get a gui which looks like this:
To use the program, you should select a local port which tcpmon will monitor for incoming connections, a target host where it will forward such connections, and the port number on the target machine which should be "tunneled" to. Then click "add". You should then notice another tab appearing in the window for your new tunneled connection. Looking at that panel, you'll see something like this:
Now each time a SOAP connection is made to the local port, you will see the request appear in the "Request" panel, and the response from the server in the "Response" panel. Tcpmon keeps a log of all request/response pairs, and allows you to view any particular pair by selecting an entry in the top panel. You may also remove selected entries, or all of them, or choose to save to a file for later viewing.
The "resend" button will resend the request you are currently viewing, and record a new response. This is particularly handy in that you can edit the XML in the request window before resending - so you can use this as a great tool for testing the effects of different XML on SOAP servers. Note that you may need to change the content-length HTTP header value before resending an edited request.
In this utility, a handler has been written and added to the global handler chain. As SOAP requests and responses are received, the SOAP message information is forwarded to a SOAP monitor service where it can be displayed using a web browser interface.
The SOAP message information is accessed with a web browser by going to http://localhost:<port>/axis/SOAPMonitor (where <port> is the port number where the application server is running).
The SOAP message information is displayed through a web browser by using an applet that opens a socket connection to the SOAP monitor service. This applet requires a Java plug-in 1.3 or higher to be installed in your browser. If you do not have a correct plug-in, the browser should prompt you to install one.
The port used by the SOAP monitor service to comminicate with
applets is configurable. Edit the web.xml file for the Axis
web application to change the port to be used.
Note: The SOAP Monitor is NOT enabled by default for security reasons.
To enable it, read Enabling the
SOAP Monitor in the Installation instructions.
Glossary


We present a global climate model simulation, using the Community Climate System Model version 4 (CCSM4, see Methods), run on the interglaciation during Marine Isotope Stage 19c (MIS19) 1 to provide a ground-truth analog for a contemporary climate system not affected by human activities. Both MIS19 and the MIS11 interglaciation have been considered as possible analogs to the Holocene (MIS1) (see Supplementary Information), but MIS19 is regarded as the best analog during the past 800,000 years for which ice-core records are available 2, 3. The insolation histories of MIS19 and MIS1 are very similar, such that their caloric half-year summer insolation differed by no more than 3 W m −2 throughout (Fig. 1a). The only significant difference in their orbital parameters is the weaker amplitude of the obliquity signal during MIS19. By the time equivalent to present day, however, the MIS19 obliquity was nearly identical to the modern value, and the precession and eccentricity parameters were also very similar (Table 1). The strong orbital resemblance between MIS19 and MIS1 enables direct comparisons between climatic signals from these two interglaciations, including GHG trends, such that the closest insolation analog to the present day occurred at the corresponding insolation minimum 777,000 years ago at the close of MIS19 3.
( a) Caloric Northern Hemisphere half-year summer insolation for MIS 1, 5, 7, 9, 11, 17, and 19, relative to each stage’s insolation minimum at year 0 [Updated from a previous version 61, 62]. Trends in (b) CO 2 and ( c) CH 4 concentrations 7 during MIS19 (black) and MIS1 (red). CO 2 data for MIS19 is from Dome C 6 and from Law Dome 9, 10 and Dome C 11, 12 for MIS1.
Orbital parameters and greenhouse gas concentrations 6, 7, 9– 12 used for the four model experiments in this study.
| Forcing | MIS19 (777 ka) | PI (Year 1850) | PI_NAT (Year 1850) | 20 th Century (1850–2005) |
|---|---|---|---|---|
| Obliquity | 23.3° | 23.4° | 23.4° | 23.4° |
| Precession | 108.9° | 102.7° | 102.7° | 102.7° |
| Eccentricity | 0.023 | 0.017 | 0.017 | 0.017 |
| CO 2 (ppm) | 245 | 285 | 245 | 353 |
| CH 4 (ppb) | 631 | 792 | 445 | 1720 |
| N 2O (ppb) | 270 | 276 | 270 | 310 |
| CFC-11 (ppt) | 0 | 0 | 0 | 280 |
| CFC-12 (ppt) | 0 | 0 | 0 | 484 |
| Radiative Forcing (W m −2) | −0.92 | — | −1.04 | +1.92 |
The values for the 20 th Century simulation refer to conditions in year 1990. Radiative forcing is relative to the PI simulation referenced to year 1850.
Substantial glacial inception likely began by 777,500 to 775,500 years ago, based on various criteria: the appearance of millennial-scale oxygen-isotopic oscillations in marine cores, the appearance of ice-rafted debris in marine cores, and an assumed delay between these first-appearance criteria and the accumulation of enough terrestrial ice to have driven them 3. A similar MIS19 end date of 778.4–776.4 ka +/− 2.3 kyr, based on a detailed 40Ar/ 39Ar chronology, was estimated from a high-resolution record from Italy 4.
The comparable orbital configurations but contrasting glaciation histories of MIS19 and MIS1 motivated a recent modeling study 5 using a low-resolution Earth system model of intermediate complexity (EMIC) to compare the potential for glacial inception in both stages. The model simulated a buildup of large-scale ice volume at the close of MIS19, whereas glaciation during MIS1 depended critically on whether Holocene CO 2 concentrations followed an inferred natural trajectory to 240 ppm (slightly lower than our estimate) or the actual trajectory of 280–285 ppm by the dawn of the Industrial Revolution.
This paper also investigates the onset of glaciation in MIS19 but does so using a much higher-resolution global climate model (GCM) simulation that represents circulation patterns, energy transport, and hydrologic processes much more realistically than an EMIC. Furthermore, we ran a single, unconstrained simulation, whereas the previous study 5 first screened a 20-member perturbed-physics model ensemble and selected only the 20% of simulations that matched observations of glacial inception at the end of MIS19 and MIS5 but not MIS1. Our CCSM4 GCM experiment of MIS19 informs whether contemporary climate conditions are suitable for glacial inception under the much lower GHG concentrations estimated in the absence of both ancient and recent carbon emissions from agriculture and industrialization.
Reconstructions of CO 2 and CH 4 concentrations from ice core records 6– 12 at Antarctic Dome C, using the EDC3 chronology 13, can be compared between MIS19 and MIS1. The MIS19 CO 2 trend reached an early peak of 269 ppm, essentially identical to the peak of 270 ppm early in MIS1, after which both trends started falling (Fig. 1b). The MIS19 trend continued declining through the time of the modern-day equivalent (777,000 years ago), but the MIS1 trend reversed direction 7000–8000 years ago and rose for the remainder of the Holocene. These opposing trends are consistent with the prediction from the Early Anthropogenic Hypothesis (EAH) that MIS1 values would have continued falling if not for early agriculture, as they did in other recent interglacials 14. The 245-ppm CO 2 concentration estimated as the modern-day equivalent in MIS19 (see Methods) is very close to the interpolated 248 ppm value from the latest Dome C data 6 and lies at the top of our previously estimated 240–245 ppm range 14. The difference in CO 2 radiative forcing between 245 ppm and 248 ppm amounts to only 0.06 W m −2 and thus should have a minor effect on the model simulation.
CH 4 in MIS19 reached an early-interglacial peak of 739 ppb, compared with the 717-ppb peak early in MIS1, after which both trends began falling (Fig. 1c). The MIS19 concentration then dropped to a value of 631 ppb by the time of the modern-day equivalent at 777 ka, interrupted by a brief CH 4 maximum near 778 ka that is interpreted as a millennial-scale oscillation because it was defined by two data points separated by just a little over 1000 years 14. The CH 4 trend then resumed its gradual orbital-scale downward trend through (and beyond) the time of the modern-day equivalent, dropping to 530 ppb by around 772 ka (not shown). In contrast, the MIS1 CH 4 trend reversed direction 5000 years ago and has moved steadily upward since then, reaching around 790 ppb just before the industrial greenhouse-gas era began in 1850. These opposing directions (down for MIS19, up for MIS1) are again consistent with the EAH prediction. In this case, however, the MIS19 CH 4 trend remained higher than the downward path of the MIS1 trend proposed in the EAH, based on the average trend of many recent interglaciations 15 and estimated Holocene emissions arising from plant and animal domestication (see Methods), but the effect of this difference on radiative forcing is small compared with the influence of CO 2.
Ideally, the contemporary “natural” CO 2 concentration in the absence of all anthropogenic carbon emissions would be derived from an interactive carbon cycle model with an accompanying dynamical vegetation model. Unfortunately, neither of these modules is up to the task. Coupled carbon cycle models in GCMs are unreliable in their simulations of the observed industrial-era rise in CO 2, producing a 45 ppm spread in near-present-day concentration 16, which is about twice as large as the pre-industrial CO 2 increase from the mid-Holocene that we are studying. Interactive global vegetation models in GCMs often produce unrealistic distributions of grasses and trees in the present-day climate, highly divergent future vegetation distributions even for the same climatic forcing scenario, and a large spread in their carbon-climate feedback parameters 17– 20. These modeling inadequacies necessitate the use of prescribed estimates of GHG concentrations.


Match Play. Red trails 6-11 to 13. Should Red double? If doubled, should White take?
pips Red=131 White=133
(CorrectAnswer= 0/0, ErrorScore= 0)
For money this is a clear no double/take – Red has too much work to do.
At this score, however, the gammons that Red will win are very powerful and so he should double. To not turn the cube here is a double blunder.
Despite the gammon threat White has a clear take and two points win the match for him exactly. Passing would be a blunder.
The position demonstrates the very big impact that a skewed match score can have on ‘normal’ cube decisions.
At this score, however, the gammons that Red will win are very powerful and so he should double. To not turn the cube here is a double blunder.
Despite the gammon threat White has a clear take and two points win the match for him exactly. Passing would be a blunder.
The position demonstrates the very big impact that a skewed match score can have on ‘normal’ cube decisions.
Cube analysis 2-ply cubeless equity +0.355 (Money: +0.393) 0.620 0.220 0.004 - 0.380 0.069 0.002 Cubeful equities: 1. Double, take +0.837 2. Double, pass +1.000 (+0.163) 3. No double +0.732 (-0.105) Proper cube action: Double, take


Parser:
- Added support for Dota 7.00 / 7.01
- Lots of small bugfixes
UI:
- Fixed multiple missing images
Devkit:
- Fix performance issues (e.g. laggy audio, interface)
Broadcaster:
- Multi channel support
- Use bicubic instead of linear interpolation
Dashboard:
- End Of Match-Overview
Map:
- Support browser resizing
- Render current heroes when loading tab
- Write renderer directly in WebGL to make it actually useable
Graphs:
- Implement team colors
Combatlog:
- Implement combatlog viewer
Entities:
- Redesign entity viewer
- Keep entities open when switching Tabs


--- layout: page title: "Wallpapers" date: modified: excerpt: tags: [wallpaper] image: feature: --- Keep Calm and Power Through The Awkwardness. A picture I took with iPhone 6Plus camera (no post processing), walking here and I used it as my iPhone lock screen and wallpaper for a while. "It is our choices Harry, that show what we truly are, far more than our abilities" - Albus Percival Wulfric Brian Dumbledore.I use this as a skin for my Macbook see a picture here Do Not Ascribe To Malice What Can Be Explained by Mediocrity, Assume Banal Intentions. Do Not Ascribe To Malice What Can Be Explained by Mediocrity, Assume Banal Intentions.


Democrats win Louisiana Governor's race in election setback for Trump
by Jamie DupreeDespite a series of visits and late political rallies on behalf of the Republican running for Governor in the Bayou State, President Donald Trump's help for the GOP fell short in Louisiana on Saturday, as Democratic Gov. John Bel Edwards narrowly won re-election to a second term, the second election setback for the President in two weeks.
With 100 percent of precincts reporting on Sunday morning, Edwards led Republican Eddie Rispone, a Baton Route area businessman, by 40,000 votes, with 51.3 percent of the vote.
The GOP defeat came just days after Republican Gov. Matt Bevin of Kentucky conceded defeat in a close race from earlier this month, as Democrats overcame as series of campaign rallies held by the President, and won two of the three Governor's races in the South in 2019.
"And as for the President," Edwards said to cheering supporters, "God Bless his heart," using a well known Southern put down.
The President had come to Louisiana three times for rallies, fully embracing the battle to knock off Edwards.
While Democrats celebrated the second direct voter rebuke of Mr. Trump in two weeks, Republicans downplayed the results.
"He was going to own the losses either way," said GOP strategist Liam Donovan on Sunday morning. "Not sure any of it mattered all that much in the end in either direction."
In his campaign stops, and on Twitter, the President had cast the more conservative Edwards as a radical liberal, not worthy of the votes of the Bayou State.
"If you want to defend your values, your jobs, and your freedom, then you need to REPLACE Radical Liberal John Bel Edwards with a true Louisiana Patriot," Mr. Trump said on Twitter before the vote.
But while Eddie Rispone led Edwards for much of the night, the late arriving results from Baton Rouge, New Orleans, and the suburban areas of those cities spelled doom for the President.
It was a familiar formula which has led to GOP losses in once-reliable GOP suburbs in cities all over the country: Houston, Dallas, Atlanta, Minneapolis, Chicago, Detroit, Philadelphia, Oklahoma City, Los Angeles, and more.
"Hey are these Trump rallies definitely helping the Republicans?" asked Sen. Brian Schatz (D-HI) on Twitter as the returns rolled in.
Democrats will find out that answer for 2020, in 50 weeks.


Retrotranslator |
Retrotranslator is a tool that makes Java applications compatible with Java 1.4, Java 1.3 and other environments. It supports all Java 5.0 language features and a significant part of the Java 5.0 API on both J2SE 1.4 and J2SE 1.3. In other Java environments only the Java 5.0 features that don't depend on the new API are supported. Retrotranslator employs the ASM bytecode manipulation framework to transform compiled Java classes and the backport of the Java 5.0 concurrency utilities to emulate the Java 5.0 API.
Retrotranslator-n.n.n-bin.zip
,
where n.n.n is the latest Retrotranslator release number.
myclasses
.
java -jar retrotranslator-transformer-n.n.n.jar -srcdir myclasses
retrotranslator-runtime-n.n.n.jar
and
backport-util-concurrent-n.n.jar
into the
classpath of your application if you use the Java 5.0 API.
The command line syntax:
java -jar retrotranslator-transformer-n.n.n.jar <options>
or
java -cp retrotranslator-transformer-n.n.n.jar
net.sf.retrotranslator.transformer.Retrotranslator <options>
| Option | Description | Default |
|---|---|---|
-srcdir <path> |
The directory with the files to process (can be specified several times). | - |
-srcjar <file> |
The jar file with the files to process (can be specified several times). | - |
-destdir <path> |
The directory to place processed files. | The source. |
-destjar <file> |
The jar file to place processed files. | The source. |
-srcmask <mask> |
The wildcard pattern specifying the files to transform rather than copy
(classes or UTF-8 text files), e.g. *.class;?*.tld .
|
*.class |
-target <version> |
The version of the JVM where the translated application should be able to run (1.1, 1.2, 1.3, 1.4, or 1.5). The Java 5.0 API is supported only for the 1.4 and 1.3 targets, but user-defined backport classes can be used for other targets as well. | 1.4 |
-classpath <path> |
The dependencies of the translated classes including backport packages and jar files from the target JVM.
For the 1.4 target the following files should be specified among others: rt.jar ,
jce.jar , and jsse.jar from Sun JRE 1.4;
retrotranslator-runtime-n.n.n.jar and
backport-util-concurrent-n.n.jar .
For the 1.3 target the files are: rt.jar from Sun JRE 1.3,
retrotranslator-runtime13-n.n.n.jar and
backport-util-concurrent-java12-n.n.jar .
This option can be omitted if the current Java environment matches the target one.
|
The current classpath. |
-verify |
Asks the translator to examine translated bytecode for references to classes, methods, or fields that cannot be found in the classpath. Every use of Java 5.0 API will result in a warning message if the classpath contains jar files from JRE 1.4. | false |
-support <features> |
Enables advanced features. The names specified should be separated with semicolons, e.g.
ThreadLocal.remove;BigDecimal.setScale .
|
- |
-advanced |
Enables all advanced features at once, but it's recommended to enable only required features in order to avoid compatibility issues. | false |
-smart |
Makes all backport classes inheritable provided that the classpath
correctly reflects the target environment.
For example, the backport of the Writer.append(String) method can be used
to translate the following expression: new FileWriter("file.tmp").append("Hello") .
|
false |
-syncvolatile |
Makes access to volatile fields of Java 5.0 classes compliant with Java 5.0 memory model at the cost of decreased performance. Highly recommended to use. | false |
-syncfinal |
Makes access to final instance fields of Java 5.0 classes compliant with Java 5.0 memory model at the cost of decreased performance. Not recommended to use. | false |
-backport <names> |
The backport names separated with semicolons, e.g.
com.myco.all;java.util:com.myco.ju;javax.net.SocketFactory:com.myco.jsse.Factory .
The corresponding backport classes must be present in the classpath.
|
- |
-embed <package> |
The unique package name for a partial copy of retrotranslator-runtime-n.n.n.jar and
backport-util-concurrent-n.n.jar to be put along with translated classes.
This makes the translated application independent of other versions of Retrotranslator present in the classpath.
|
- |
-lazy |
Asks the translator to transform and verify only the classes compiled with a target greater than the current one. | false |
-stripsign |
Whether to remove signature (generics) information. | false |
-stripannot |
Whether to remove annotations and related attributes. | false |
-verbose |
Asks the translator for verbose output. | false |
-retainapi |
Asks the translator to modify classes for JVM compatibility but keep use of API
unless overriden with the backport option.
Any references introduced by a compiler remain unchanged, like the use of
java.lang.StringBuilder for string concatenation or
the implicit valueOf method calls for autoboxing.
|
false |
-keepclasslit |
Prevents replacement of certain types like java.lang.Iterable or java.util.Queue
with their base types in class literals. |
false |
-retainflags |
Whether to keep Java 5.0 specific access modifiers. | false |
-uptodatecheck |
Asks the translator to skip processing of files if the destination files are newer. | false |
-reflection <mode> |
Setting this option to safe makes the translator include additional metadata into classes,
so reflection works even if the classes are unavailable as resources. |
normal |
The distribution contains an Apache Ant task
net.sf.retrotranslator.transformer.RetrotranslatorTask
. Every command line
option can be set using the corresponding attribute. In addition the source files can be specified with nested
fileset
, jarfileset
, and dirset
elements and the
classpath can be set with nested classpath
elements or the classpathref
attribute.
The source directories specified with srcdir
, dirset
,
and the dir
attribute of fileset
should contain the root package of the classes.
In case of warnings the build fails unless the value of the failonwarning
attribute is set to
false
. The following script can be used to build one jar compatible with Java 1.4 and
another one compatible with Java 1.3.
<taskdef name="retrotranslator" classname="net.sf.retrotranslator.transformer.RetrotranslatorTask"> <classpath> <fileset dir="../Retrotranslator-n.n.n-bin"> <include name="retrotranslator-transformer-n.n.n.jar" /> <include name="retrotranslator-runtime-n.n.n.jar" /> <include name="backport-util-concurrent-n.n.jar" /> </fileset> </classpath> </taskdef> <retrotranslator target="1.4" destjar="build/application14.jar" smart="true" verify="true" failonwarning="false"> <fileset dir="build/classes" includes="**/*.class" /> <jarfileset dir="build/lib" includes="**/*.jar" /> <classpath> <fileset dir="../j2sdk1.4.2_17/jre/lib" includes="**/*.jar"/> <fileset dir="../Retrotranslator-n.n.n-bin"> <include name="retrotranslator-runtime-n.n.n.jar" /> <include name="backport-util-concurrent-n.n.jar" /> </fileset> <fileset dir="lib" includes="**/*.jar"/> </classpath> </retrotranslator> <retrotranslator target="1.3" destjar="build/application13.jar" smart="true" verify="true" failonwarning="false"> <fileset dir="build/classes" includes="**/*.class" /> <jarfileset dir="build/lib" includes="**/*.jar" /> <classpath> <fileset dir="../jdk1.3.1_20/jre/lib" includes="**/*.jar"/> <fileset dir="../Retrotranslator-n.n.n-bin"> <include name="retrotranslator-runtime13-n.n.n.jar" /> <include name="backport-util-concurrent-java12-n.n.jar" /> </fileset> <fileset dir="lib" includes="**/*.jar"/> </classpath> </retrotranslator>
Maven users can use the Retrotranslator plugin from the Mojo Project.
There is a plugin to automatically translate and verify classes compiled by IntelliJ IDEA, so you can develop in Java 5.0 but run and debug on Java 1.4.
If you have a myapplication5.jar
file built with Java 5.0 you can use the following command to produce
myapplication4.jar
. The jar file will be compatible with Java 1.4 and independent of Retrotranslator
because backport classes are added to the translated application with a different package name.
java -jar retrotranslator-transformer-n.n.n.jar
-srcjar myapplication5.jar -destjar myapplication4.jar -embed com.mycompany.internal
Also it is recommended to specify the classpath, verify, and smart options. In case of verification failure try the support option.
In order to run a Java 5.0 application on Java 1.4 start it with JIT Retrotranslator using one of the following commands:
java -cp retrotranslator-transformer-n.n.n.jar
net.sf.retrotranslator.transformer.JITRetrotranslator
<options> -jar <jarfile> [<args...>]
java -cp <classpath including Retrotranslator>
net.sf.retrotranslator.transformer.JITRetrotranslator
<options> <class> [<args...>]
The options include support
,
advanced
, smart
,
backport
, syncvolatile
,
syncfinal
, and
keepclasslit
. When running on J2SE 5.0 JIT Retrotranslator simply
calls the application, but on J2SE 1.4 it also translates classes compiled for Java 5.0 or later. However this
capability depends on the current JVM and the application itself, so under certain conditions JIT Retrotranslator
may be unable to translate either a jar file or classes from the classpath or both.
An asterisk designates all API members introduced in Java 5.0. Most classes and methods added in Java 1.4 and in Java 6.0 cannot be used on earlier VMs.
| Package | Class | Members | Compatibility notes |
|---|---|---|---|
java.io |
Closeable2
|
* (all members introduced in Java 5.0) | |
Flushable2 |
* | ||
PrintStream |
* (11 new methods and constructors)PrintStream(File, String)5 ,PrintStream(String, String)5
|
||
PrintWriter |
* (11 new methods and constructors) |
The PrintWriter.format and PrintWriter.printf methods always flush the output buffer.
|
|
Reader5 |
* (1 new method) | ||
Writer |
* (3 new methods) | ||
java.lang |
Appendable2 |
* | |
Boolean |
* (2 new methods)toString(boolean)6 ,valueOf(boolean)6
|
||
Byte |
* (1 new method) | ||
Character |
* (44 new methods)getDirectionality(int)5 ,isMirrored(int)5 ,toString(char)6
|
New members of Character.UnicodeBlock are not supported.
All supplementary code points are considered as unassigned.
|
|
CharSequence6 |
* | ||
Class |
* (21 new methods) |
Enable feature "Class.forName " to use backported classes as a fallback when calling this
method3.Enable features " Class.getMethod " and "Class.getDeclaredMethod " to use most of
backported static methods as a fallback when calling these methods and for more uniform support of generics
and covariant return types on different platforms3.
|
|
Deprecated |
* | ||
Double |
valueOf(double) |
||
Enum |
* | ||
Float |
valueOf(float) |
||
IllegalArgumentException |
* (2 new constructors) | ||
IllegalStateException |
* (2 new constructors) | ||
Integer |
valueOf(int), |
||
Iterable2 |
* | ||
Long |
valueOf(long), |
||
Math |
cbrt(double), cosh(double), |
The quality of computation may be insufficient for applications of certain types. | |
Package |
* (4 new methods) |
Enable feature "Retrotranslator.fixHyphen " to change the name
of package-info classes to package$info 3.
|
|
Readable2,5 |
* | ||
Short |
* (2 new methods) | ||
StackTraceElement6 |
* (1 new constructor) | ||
String |
* (10 new methods and constructors)
isEmpty()4
|
Enable features "String.matches ", "String.replaceAll ",
"String.replaceFirst " and "String.split " to support
Java 5.0 features in regular expressions when calling these methods on Java 1.43
(they are unavailable on Java 1.3).
|
|
StringBuffer |
* (11 new methods and constructors)
append(StringBuffer)6
|
Enable feature "StringBuffer.trimToSize " to use an empty implementation of
the StringBuffer.trimToSize() method3.
|
|
StringBuilder |
* | StringBuilder is being replaced with StringBuffer . |
|
SuppressWarnings |
* | ||
System |
nanoTime()1, |
The System.nanoTime() method precision
may vary on different platforms.Enable feature " System.getProperty " to identify the current JVM as compatible
with Java 5.0 when calling this method at runtime3.
|
|
Thread |
* (8 new methods) |
The Thread.getId() method does not reflect the order in which threads have been created.The Thread.getStackTrace() and Thread.getAllStackTraces()
methods return non-empty stack trace only for the current thread.Enable feature " Thread.getState " to support this method, but it will detect only
NEW , RUNNABLE and TERMINATED states.3Enable features " Thread.setUncaughtExceptionHandler " and
"Thread.setDefaultUncaughtExceptionHandler " to support exception handlers for threads
created by translated code (in contrast to Java 5.0 the default UncaughtExceptionHandler
takes precedence over ThreadGroup )3.
|
|
Thread.State |
* | ||
Thread.UncaughtExceptionHandler2 |
* | ||
ThreadLocal |
* (1 new method) | Enable feature "ThreadLocal.remove " to use alternative ThreadLocal
and InheritableThreadLocal implementations with method
remove() 3.
|
|
TypeNotPresentException |
* | ||
Throwable |
Throwable(String, Throwable)6 ,Throwable(String, Throwable)6 ,getCause()6 ,getStackTrace()6 ,initCause(Throwable)6
|
The additional constructors and methods are available for all Java 1.3 exception classes
if the smart option has been used.
|
|
UnsupportedOperationException |
* (2 new constructors) | ||
java.lang.annotation |
* (all classes) | * | |
java.lang.instrument |
* | * | Bytecode instrumentation is not implemented. |
java.lang.management |
ManagementFactory |
getPlatformMBeanServer() |
The ManagementFactory.getPlatformMBeanServer() method simply returns
the first registered MBeanServer or creates it when no one exists.
Requires an implementation of JMX 1.2.
|
java.lang.ref |
SoftReference |
* |
Enable feature "SoftReference.NullReferenceQueue " to
support null for the second parameter of
SoftReference(Object,ReferenceQueue)
on all platforms3.
|
WeakReference |
* |
Enable feature "WeakReference.NullReferenceQueue " to
support null for the second parameter of
WeakReference(Object,ReferenceQueue)
on all platforms3.
|
|
java.lang.reflect |
AccessibleObject |
* (4 new methods) | |
AnnotatedElement2 |
* | ||
Constructor |
* (11 new methods) | ||
Field |
* (8 new methods) | ||
GenericArrayType |
* | ||
GenericDeclaration2 |
* | ||
GenericSignatureFormatError |
* | ||
MalformedParameterizedTypeException |
* | ||
Member |
* (1 new method) | ||
Method |
* (14 new methods) | ||
ParameterizedType |
* | ||
Type2 |
* | ||
TypeVariable |
* | ||
WildcardType |
* | ||
java.math |
BigDecimal |
ZERO, ONE, TEN, |
Enable feature "BigDecimal.setScale " to support negative scales in the
BigDecimal.setScale(int, int) method3.
|
BigInteger |
TEN |
||
java.net |
HttpURLConnection |
* (6 new methods) |
Enable features "HttpURLConnection.setChunkedStreamingMode ",
"HttpURLConnection.setFixedLengthStreamingMode "
to use the corresponding methods, but on Java 1.4 they will simply return.
Consider using alternative or writing own protocol handlers.
|
Proxy5 |
* | ||
ProxySelector5 |
* | ||
Socket3,5 |
Socket(Proxy) |
Enable feature "Socket.New "
to to call the Socket(Proxy)
constructor, but the Proxy parameter will be ignored.
| |
URL5 |
* (2 new methods) | The Proxy parameter is ignored by the
URL.openConnection(Proxy) method.
|
|
URLConnection |
* (4 new methods) |
Enable features "URLConnection.getConnectTimeout ", "URLConnection.setConnectTimeout ",
"URLConnection.getReadTimeout ", "URLConnection.setReadTimeout "
to use the corresponding methods, but on Java 1.4 they will simply return.
Consider using alternative or writing own protocol handlers.
|
|
java.nio5 |
CharBuffer |
* (4 new methods) | |
Charset |
* (1 new method) | The Charset.defaultCharset() method returns UTF-8
if the default charset is unavailable (occurs on JDK 1.4.0).
|
|
java.rmi.server |
RemoteObjectInvocationHandler |
* | |
java.text |
DecimalFormat |
* (2 new methods) |
Enable feature "DecimalFormat.setParseBigDecimal " to support the
DecimalFormat.setParseBigDecimal(boolean) method, but
parsing and formatting precision will still be limited by the java.lang.Double
or java.lang.Long precision3.
|
java.util |
AbstractQueue1 |
* | |
ArrayDeque1,4 |
* | ||
Arrays |
* (21 new methods)copyOf(...) 4 (10 methods)copyOfRange(...) 4 (10 methods)
|
||
Calendar |
getTimeInMillis() 6,setTimeInMillis(long) 6
|
||
Collections1 |
* (13 new methods)newSetFromMap(Map) 4,list(Enumeration) 6,replaceAll(List, Object, Object) 6,swap(List, int, int) 6
|
||
Deque1,2,4 |
* | ||
EnumMap |
* | ||
EnumSet |
* | ||
Formatter |
* | ||
LinkedList |
* (5 new methods) | ||
PriorityQueue1 |
* | ||
Properties |
* | Requires an implementation of JAXP 1.3 for J2SE 1.3. | |
Queue1,2 |
* | ||
Timer |
* (3 new methods and constructors) |
Enable feature "Timer.All " to use alternative Timer
and TimerTask implementations in order to be able to call Timer(String) ,
Timer(String, boolean) , and Timer.purge() 3.
|
|
UUID |
* | ||
java.util.concurrent, |
almost all classes1 | almost all methods | The LockSupport class may be unusable due to insufficient performance.
The Condition.awaitNanos(long) method has
little accuracy guarantees.
|
java.util.regex5 |
Matcher |
quoteReplacement(String), |
|
MatchResult2 |
* | ||
Pattern |
LITERAL3, |
Enable features "Pattern.compile " and "Pattern.matches " to support
Java 5.0 features in regular expressions when calling these methods3.
|
|
javax.net.ssl5 |
HttpsURLConnection |
* (2 new methods) |
1 Supported via the
Backport of JSR 166.
2 In most cases this type is being replaced with its base type.
3 Supported only when the corresponding feature is enabled via the
support
or
advanced
options.
4 Introduced in Java 6.
5 Not supported on J2SE 1.3.
6 Introduced in Java 1.4 and supported on J2SE 1.3.
In order to support the API unavailable on the target platform Retrotranslator should be able to replace all references
to new classes, constructors, methods, and fields with references to backports compatible with the platform.
The location of the backports must be specified with the classpath option. The
default
backports for the 1.4 target have been packaged into the retrotranslator-runtime-n.n.n.jar
and
backport-util-concurrent-n.n.jar
files, and to complement or override them additional backport
names can be specified via the backport option or a
properties
file. The backport names can have five
different forms, the first one declares a universal backport package and the others allow reusing existing backports.
| Backport name form | Example |
|---|---|
<universal backport package name> |
net.sf.retrotranslator.runtime |
<original package name>:<backport package name> |
java.util.concurrent:edu.emory.mathcs.backport.java.util.concurrent |
<original class name>:<backport class name> |
java.lang.StringBuilder:java.lang.StringBuffer |
<original method name>:<backport method name> |
java.lang.System.nanoTime:edu.emory.mathcs.backport.java.util.concurrent.helpers.Utils.nanoTime |
<original field name>:<backport field name> |
java.util.Collections.EMPTY_MAP:edu.emory.mathcs.backport.java.util.Collections.EMPTY_MAP |
The names of backport classes in a universal backport package consist of the backport package name,
the name of the original class, and an optional trailing underscore. For example,
net.sf.retrotranslator.runtime.java.util.EnumSet_
is a complete backport of
java.util.EnumSet
.
But when classes exist on the target platform then the backports of their new fields, constructors and methods are
grouped into classes with a leading underscore in their names. Look at the
net.sf.retrotranslator.runtime.java.math._BigDecimal
class:
convertConstructorArguments
method that
accepts constructor's arguments and returns an argument for a Java 1.4 constructor.
The
net.sf.retrotranslator.runtime.java.io._PrintStream
and
net.sf.retrotranslator.runtime.java.lang._SecurityException
classes use another type of
constructor backports. There is a public static
createInstanceBuilder
method that accepts constructor's arguments an returns an object with public
argument1
...argumentN
methods and an optional public void initialize
method.
All the argumentX
methods don't have any parameters and provide arguments for a constructor that exists
on the target platform. The initialize
method has a single parameter for the created instance and can be
used for postprocessing. And the most flexible but unsupported in certain cases way has been used by
net.sf.retrotranslator.runtime.java.lang._StackTraceElement
.
If backported methods require access to non-public methods or fields of the instance, they can do it with reflection
when the security manager allows such access. The backports of public instance fields are not supported, but private
instance fields can be emulated using a weak identity map, see
net.sf.retrotranslator.runtime.java.lang._Thread
for an example.
Copyright (c) 2005 - 2009 Taras Puchko All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holders nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.


main
hierarchy
annotated types
type index
functions
globals
files
directories
related pages
IFXVertexMap Member List
This is the complete list of members for
IFXVertexMap
, including all inherited members.
AddVertex
(U32 origVertexIndex, U32 indexIFXMesh, U32 indexIFXVertex)
IFXVertexMap
AllocateMap
(U32 numOrigVertices)
IFXVertexMap
Concatenate
(U32 *pMapArray, U32 arraySize)
IFXVertexMap
ConcatenateVertexMap
(IFXVertexMap *pVMap, IFXVertexMap **ppResultMap)
IFXVertexMap
GetNumMapEntries
(void)
IFXVertexMap
GetNumVertexCopies
(U32 originalVertexIndex)
IFXVertexMap
GetVertexCopy
(U32 originalVertexIndex, U32 copyIndex, U32 *pIndexIFXMesh, U32 *pIndexIFXVertex)
IFXVertexMap
IFXVertexMap
()
IFXVertexMap
m_mapSize
IFXVertexMap
[private]
m_pBlockSizes
IFXVertexMap
[private]
m_pCounts
IFXVertexMap
[private]
m_ppCopies
IFXVertexMap
[private]
~IFXVertexMap
()
IFXVertexMap
© 1999 - 2006 Intel Corporation. All rights reserved.
* Other names and brands may be claimed as the property of others.


I had a job as an accountant for a few years but I did not have a passion for what I did. I decided that I needed to find something I would enjoy doing everyday (or most days). I always had an interest in computer science but never really took the time to learn any programming. Wanting to see if I would enjoy programming, I bought a book on java. The book was ok but it gave me enough to see that I would like this type of work. I wanted a more hands on approach to learning so I applied for Epicodus because of the amount of time students spend coding and learning.


Welcome to Visionlib’s documentation!¶
Face Detection¶
-
class
visionlib.face.detection.
FDetector
¶ - This class contains all functions to detect face in an image.
…
Methods:
detect_face():
Used to detect face in an image. Returns the image with bounding boxes. Uses detector set by set_detector() method.
vdetect_face():
Used to detect face in a video. Yields the frame with bounding boxes. Uses detector set by set_detector() method.
set_detector():
Used to set detector to used by detect_face() method. If not set will use dnn detector as default.
-
detect_face
(img=None, show=False, enable_gpu=False)¶ This method is used to detect face in an image.
- Args:
- img (numpy array)
This argument must the output which similar to opencv’s imread method’s output.
- show (bool)
Set True to show image via cv2.imshow method.
- Returns:
- img (np.array)
Returns a numpy array of the image with bounding box.
- box (list)
Returns x, y, w, h coordinates of the detected face Returns an empty list if no face is detected.
- confidences (list)
Returns the associated confidences for the detected face.
-
set_detector
(detector='dnn')¶ This method is used to set detector to be used to detect faces in an image.
- Args:
- detector (str)
The detector to be used. Can be any of the following: haar, hog, mtcnn, dnn. Dnn will be used as default.
-
vdetect_face
(vid_path=None, show=False, enable_gpu=False, url=False)¶ This method is used to detect face in an video
- Args:
- vid_path (str)
Absolute Path to the video file.
- show (bool)
Set True to show image via cv2.imshow method.
- Yields:
- img (np.array)
Returns a numpy array of the image with bounding box.
box (list) Returns x, y, w, h coordinates of the detected face Returns an empty list if no face is detected.
- confidences (list)
Returns the associated confidences for the detected face.
Gender Detection¶
-
class
visionlib.gender.detection.
GDetector
¶ - This class contains all functions to detect gender of a given face
…
Methods:
detect_gender():
Used to detect gender from an face. Returns Predicted Gender and confidence.
-
detect_gender
(img=None, enable_gpu=False)¶ This method is used to detect gender from an image.
- Args:
- img (numpy array)
This argument must the output which similar to opencv’s imread method’s output.
- enable_gpu (bool) :
Set to True if You want to use gpu for prediction.
- Returns:
- str :
Returns the predicted gender.
- int :
Returns the confidence for the predicted gender.
Object Detection¶
-
class
visionlib.object.detection.detection.
ODetection
¶ - This class contains all functions to detect objects from an image.
…
Methods:
detect_objects():
Used to detect objects from an image. Returns the bounding boxes, labels and confidence. Uses detector set by set_detector() method.
draw_box():
Used to draw the bounding box, labels and confidence in an image. Returns the frame with bounding boxes. Uses detector set by set_detector() method.
set_detector():
Used to set detector to used by detect_objects() method. If not set will use tiny yolo as default.
-
detect_objects
(frame, enable_gpu=False)¶ This method is used to detect objects in an image.
- Args:
- frame (np.array):
Image to detect objects from.
- enable_gpu (bool):
Set to true if You want to use gpu.
- Returns:
- list :
The detected bounding box.
- list :
The detected class.
- list :
Confidence for each detected class
-
draw_bbox
(img, bbox, labels, confidence)¶ Draw’s Box around the detected objects.
- Args
- img (numpy.array):
The image to draw bounding boxes
- bbox (list):
bounding boxes given detect_objects function.
- labels (list):
labels given detect_objects function.
- confidence (list):
Confidence for the detected label.
- Returns
- numpy.array :
The image with bounding boxes and labels.
-
set_detector
(model_name='tiny_yolo', model_path=None, cfg_path=None, label_path=None)¶ Set’s the detector to use. Can be tiny-yolo or yolo. Setting to tiny-yolo will use yolov3-tiny. Setting to yolo will use yolov3.
- Args:
- model_name (str):
The model to use. If the given model is not present in pc, it will download and use it.
- model_path (str):
Set this to path where the custom model You want to load is.
- cfg_path (str):
Set this to path where the config file for custom model, You want to load is.
- label_path (str):
Set this to path where the labels file for custom model, You want to load is.
Object Classification¶
-
class
visionlib.object.classifier.inception_detector.
Inception
¶ This class is used to classify images using pre-trained Inception_v3 model.
Methods:
- predict()
Used to predict the classes from the image.
-
predict
(img=None, top=10)¶ This function is used to predict the possible classes in the image.
- Args
- img (numpy array)
The image for detecting classes
- top (int)
The top n classes detected by the model to return
- Returns
- list
Returns a list of tuples with first value is the detected class and second value is the confidence in each tuple. eg: [(‘coffee_mug’, 88.80746364593506), (‘cup’, 9.322341531515121)]
- Raises
- AssertionError
Raised when no image is given
-
class
visionlib.object.classifier.xception_detector.
Xceptionv1
¶ This class is used to classify images using pre-trained Xception_v1 model.
Methods:
- predict()
Used to predict the classes from the image.
-
predict
(img, top=10)¶ This function is used to predict the possible classes in the image.
- Args
- img (numpy array)
The image for detecting classes
- top (int)
The top n classes detected by the model to return
- Returns
- list
Returns a list of tuples with first value is the detected class and second value is the confidence in each tuple. eg: [(‘coffee_mug’, 88.80746364593506), (‘cup’, 9.322341531515121)]
- Raises
- AssertionError
Raised when no image is given
-
class
visionlib.object.classifier.vgg_detector.
VGG
¶ This class is used to classify images using pre-trained vgg16 model.
Methods:
- predict()
Used to predict the classes from the image.
-
predict
(img=None, top=10)¶ This function is used to predict the possible classes in the image.
- Args
- img (numpy array)
The image for detecting classes
- top (int)
The top n classes detected by the model to return
- Returns
- list
Returns a list of tuples with first value is the detected class and second value is the confidence in each tuple. eg: [(‘coffee_mug’, 88.80746364593506), (‘cup’, 9.322341531515121)]
- Raises
- AssertionError
Raised when no image is given
Keypoint Detection¶
-
class
visionlib.keypoints.detection.
KDetector
¶ - This class contains functions for getting
keypoints for a space
Methods
- set_detector()
Set the detector to detect keypoints
- detect_keypoints()
Detect the keypoints in a face.
- draw_points()
Draws the detected points in an image
-
detect_keypoints
(img, rects=None, enable_gpu=False)¶ This function is used to detect keypoints.
- Args
- img (numpy array)
The image for detection.
- rects (list)
The coordinates of face. (Not Needed for mtcnn detector)
- enable_gpu (bool):
Set to True if you want to use gpu
- Returns
- list
Returns detected keypoint for each face
- img
Returned only when no face is there for detection.
-
draw_points
(img, points, show=False, color=0, 50, 255)¶ - This function is used to draw the detected points
into the image.
- Args
- img (numpy array)
The image for drawing.
- points (list)
The coordinates of the keypoints
- show (bool)
Set to true if you want to display the image
- color (tuple)
The color to display the points in.
- Returns
- numpy array
The image with keypoints marked
-
set_detector
(detector)¶ - This function is used to set the detector
to detect keypoints.
- Args
- detector (str)
Can be ‘dlib’ or ‘mtcnn’.
- Raises
- Invalid Selection
Raised when the selection is invalid


{% extends 'layouts/app.html' %} {% block header %}
{{ election['organization'] }} | {{ election['status'] }}
The poll ends at {{ election['end_datetime'] }} UTC. Contact the poll supervisor(s) if you need help.


GitHub Profiles
Ingresa el Nombre
Buscar
Just one second
We're fetching that content for you.
There were some errors with your submission
You must include both a upper and lower case letters in your password.
You need to select your home country.


Before Change
entity_id = new_feature.entity.id
if new_feature.hash() in all_features[entity_id]:
return
raise Exception("DFS runtime error: tried to add feature %s"
" more than once" % (new_feature.get_name()))
all_features[entity_id][new_feature.hash()] = new_feature
def _add_identity_features(self, all_features, entity):
After Change
// It is expected that a seed feature could also be generated by dfs.
if name in all_features[entity_id] and \
name not in (f.unique_name() for f in self.seed_features):
logger.warning("Attempting to add feature %s which is already "
"present. This is likely a bug." % new_feature)
return
all_features[entity_id][name] = new_feature


Man 'killed and dismembered sex offender for revenge before strangling daughter'
Police believe Nathaniel Henry, 37, killed Noel Brown, 69, at his home in Deptford, south-east London, in an act of "revenge or retribution" - then killed Brown's daughter when she arrived to check on her dad
by Mike Bedigan, Tiffany LoA youth worker murdered a convicted sex offender in an act of "revenge or retribution", police believe.
Nathaniel Henry, 37, allegedly strangled and dismembered Noel Brown, 69, and then killed his daughter, Maria Brown, 41, when she arrived to check on her father.
The bodies of the pair were discovered at Mr Brown's home in Deptford, south-east London, on December 4 2017.
Mr Brown had a history of 12 convictions covering 33 offences, several of which were sexual.
DCI Helen Rance, of the Metropolitan Police's specialist crime team, said on Friday that the killings were believed to be linked to one of Mr Brown's previous offences and had been carried out in "revenge or in retribution", although the specific offence was not disclosed.
DCI Simon Harding added that Mr Brown's criminal history was unknown by the community prior to his death and he had been out of prison since 2004.
Officers investigating the case, dubbed Operation Needingworth, were initially unsure about how many offenders were involved.
Hours of CCTV footage were analysed and images of a man seen carrying a distinctive large backpack, dubbed Rucksack-man, were later issued.
DNA later found inside the flat was linked to Henry with help from the National Crime Agency.
On the night of the incident, police responded to a missing persons report at 2.20am and were told that Ms Brown had gone to check on her father after she was unable to contact him.
Officers forced entry into the one-bedroom flat and found both bodies.
Mr Brown was discovered strangled and partially dismembered in the bath and there were signs of bleach burns on his body.
Ms Brown, a primary school teacher, was found dead in the living room.
It is believed she was strangled after disturbing the killer.
DCI Harding said the success of linking the crime to Henry was "tinged with frustration and sadness" at being unable to provide the victims' family with closure.
He said: "I don't feel that they feel they have (received closure).
"I think anyone in this circumstance would want somebody to face justice in the normal way that we would want in a court, and serve a long sentence for what they did. To be punished.
"So I don't feel that they're really content with it, which is perfectly understandable. It's very difficult to not have their time to see that person face justice in the way they probably should have done."
Henry's body was subsequently found at an address in Southwark near to his home on December 31 2017.
A post-mortem examination revealed his cause of death to be a drug-related overdose, though it could not be ruled as a suicide.
Henry, who worked as a youth mentor, was described as a "true pillar of the community" by neighbours following his death.


{% for times in session.proposed %}
Your friend preposes that they can meet at {{ times }}
{% endfor %}
{% if session.proposed is defined %}
To rechoose proposals, replace the ending url with /proposals Share this link to the person whom you are arranging times with
{% endif %}


Roadmap
The intention is for stable releases to follow a continuous release model. As soon as a functionality is tested and reviewed, it can be released. Features that could cause to backwards-incompatibilities will remain on hold and be released at most twice a year, after a new release of Laravel.
Core
Version 0.1
Expected release: December 2014
Unstable and not ready for production, everything could change at any time.
Development of:
- User management with native driver
- Entity classes and repositories
- Basic admin backend
Version 0.2
Expected release: February 2015
Unstable and not ready for production, everything could change at any time.
Development of:
- User management with Sentry driver and Confide/Entrust driver
- Plugins and widgets
- Creating 'regular' pages
Version 1.0
Expected release: May 2015
First stable release.
- Implementation of possible new Laravel features
- Better admin backend
- Language files
Displore
Version 0.1
Expected release: December 2014
Unstable and not ready for production, everything could change at any time.
Development of:
- Basic functions such as boards, categories, threads, posts.
- Themes and layouts
- Implementation of Core
Version 0.2
Expected release: February 2015
Unstable and not ready for production, everything could change at any time.
Development of:
- Implementation of plugins and pages
- Forum statistics
- Moderation abilities and logging
- Basic user profile pages
- BBcode and emoticons
Version 1.0
Expected release: May 2015
First stable release.
- Implementation of possible new Laravel features
- Better user profile pages
- Language files
- Private boards
- Starting threads as announcements/sticky posts
Journal
Development will start after first stable release of Displore.


-->
Lorem ipsum dolor sit, amet consectetur adipisicing elit.Velit, eum neque provident sequi ratione, ex adipisci recusandae nulla, repellendus quisquam perspiciatis pariatur quis expedita commodi nesciunt optio voluptate quod et!
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Lorem ipsum dolor sit amet consectetur adipisicing elit. Molestias magnam aliquid porro perspiciatis debitis, ducimus fuga reiciendis excepturi amet soluta! Tempore exercitationem beatae temporibus non fuga, asperiores deleniti laboriosam minus!
Cards are a convenient means of displaying content composed of different types of objects. They’re also well-suited for presenting similar objects whose size or supported actions can vary considerably, like photos with captions of variable length.
Cards are a convenient means of displaying content composed of different types of objects. They’re also well-suited for presenting similar objects whose size or supported actions can vary considerably, like photos with captions of variable length.
Cards are a convenient means of displaying content composed of different types of objects. They’re also well-suited for presenting similar objects whose size or supported actions can vary considerably, like photos with captions of variable length.
Cards are a convenient means of displaying content composed of different types of objects. They’re also well-suited for presenting similar objects whose size or supported actions can vary considerably, like photos with captions of variable length.
This organization is amazing!
This organization is trashy!
This organization is fine!


$68/104: Flag for disk initialisation Automatic disk initialisation if ID MISMATCH occurred (1 = no, 0 = yes) ROM-Reference: LDA $68 : $C63D Previous Page / Next Page


{{if debug}}
{{else}}
{{/if}}
{{html body}}
{{if !debug}}
{{/if}}
Published ⇀
↼ Received
+
- this game made with three.js, a framework for making 3D graphics with JavaScript
- made massively-muliplayer with pubnub - there are no game rooms or lobbies. everyone sees the same thing, world-wide
- it has a central server but it doesn't act as a central node
- the server only interferes if a client begins acting up
- completely open-source, here


I am a web developer specializing in front-end web development
and design currently studying at Moringa school.
Other than than progamming
i do online writting having specified in article writing which help me also
sharpen my skills of becoming a great writter in future.
I decided to take progamming classes
since am passionate to become a Front end developer in future
<EMAIL_ADDRESS>Telephone:0790448596
copyright(c)Balvine mbari@2020


JavaScript is disabled on your browser.
Skip navigation links
Overview
Package
Class
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes
A
B
C
D
E
G
H
I
J
K
L
M
N
O
P
R
S
T
U
V
W
T
testAddBodyLocation()
- Method in class com.example.cmput301f18t09.cureall.
RecordTest
testAddBodyLocationPhoto()
- Method in class com.example.cmput301f18t09.cureall.
BodyLocationTest
testAddCommit()
- Method in class com.example.cmput301f18t09.cureall.
CareProviderTest
testAddPatient()
- Method in class com.example.cmput301f18t09.cureall.
CareProviderTest
Init for class CareProviderTest problem a new problem for testing provider a new care provider for testing comment a string to be added as comment
testAddProblem()
- Method in class com.example.cmput301f18t09.cureall.
PatientTest
testAddRecord()
- Method in class com.example.cmput301f18t09.cureall.
ProblemTest
testCoordinate()
- Method in class com.example.cmput301f18t09.cureall.
GeoLocationTest
testDeleteProblem()
- Method in class com.example.cmput301f18t09.cureall.
PatientTest
testEditProblem()
- Method in class com.example.cmput301f18t09.cureall.
PatientTest
testGetComment()
- Method in class com.example.cmput301f18t09.cureall.
RecordTest
testGetDescription()
- Method in class com.example.cmput301f18t09.cureall.
ProblemTest
testGetRecordArrayList()
- Method in class com.example.cmput301f18t09.cureall.
ProblemTest
testGetTime()
- Method in class com.example.cmput301f18t09.cureall.
ProblemTest
testGetTime()
- Method in class com.example.cmput301f18t09.cureall.
RecordTest
testGetTitle()
- Method in class com.example.cmput301f18t09.cureall.
ProblemTest
testGetTitle()
- Method in class com.example.cmput301f18t09.cureall.
RecordTest
testGetUsername()
- Method in class com.example.cmput301f18t09.cureall.
ProblemTest
testLocation()
- Method in class com.example.cmput301f18t09.cureall.
GeoLocationTest
testSetComment()
- Method in class com.example.cmput301f18t09.cureall.
RecordTest
testSetRecordTrackingPhoto()
- Method in class com.example.cmput301f18t09.cureall.
TracePhotoTest
testSetTime()
- Method in class com.example.cmput301f18t09.cureall.
RecordTest
testSetTitle()
- Method in class com.example.cmput301f18t09.cureall.
RecordTest
time
- Variable in class com.example.cmput301f18t09.cureall.model.
Problem
time
- Variable in class com.example.cmput301f18t09.cureall.model.
Record
title
- Variable in class com.example.cmput301f18t09.cureall.model.
Problem
title
- Variable in class com.example.cmput301f18t09.cureall.model.
Record
title
- Variable in class com.example.cmput301f18t09.cureall.PatientAdapter.
PatientProblemListPageAdapter.viewHolder
titleSymbol
- Variable in class com.example.cmput301f18t09.cureall.PatientAdapter.
PatientProblemDetailPageAdapter.viewHolder
titleSymbol
- Variable in class com.example.cmput301f18t09.cureall.ProviderAdapter.
ProblemDetailPageAdapter.viewHolder
TracePhotoTest
- Class in
com.example.cmput301f18t09.cureall
TracePhotoTest()
- Constructor for class com.example.cmput301f18t09.cureall.
TracePhotoTest
A
B
C
D
E
G
H
I
J
K
L
M
N
O
P
R
S
T
U
V
W
Skip navigation links
Overview
Package
Class
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes


Audrey Hepburn was a popular actress during the 1950's and 60's. Again, another nice inspirational quote that I enjoyed.


Movie Theatre
Movie
Little Mermaid
Silence of the Lambs
You've Got Mail
Age
Senior
Adult
Child
Time
Evening
Matinee
Late
Find Ticket Price
The price of your movie is $
.00. Enjoy the show!


My Cat Cheeto
Cheeto as a kitten with his mouse toy
My little kitty cheeto is a hungry boy. he loves to eat everything he can find
cheetos favorite foods
- popcorn
- bread
- buttter
Cheeto begging for popcorn
Cheeto is a little ball of energy and he loves to play. he sometimes plays with hands or toes if hes's not givin a proper playtime.
cheetos favorite toys
- feathers
- balls with bells
- strings
Cheeto plays hard but he also sleeps hard. he loves to stretch out when he sleeps and he's not afraid to show you his belly.
Cheeto is a very cuddly boy and he will make a spot for himself on your lap. he loves to cuddle me, my boyfirend and his older brother jinkins.
thank you for reading