WFS - OGC WFS service
Driver short name
WFS
Build dependencies
libcurl
This driver can connect to a OGC WFS service. It supports WFS 1.0, 1.1 and 2.0 protocols. GDAL/OGR must be built with Curl support in order for the WFS driver to be compiled. Usually WFS requests return results in GML format, so the GML driver should generally be set-up for read support (thus requiring GDAL/OGR to be built with Xerces or Expat support). It is sometimes possible to use alternate underlying formats when the server supports them (such as OUTPUTFORMAT=json).
The driver supports read-only services, as well as transactional ones (WFS-T).
Driver capabilities
Supports Georeferencing
This driver supports georeferencing
Dataset name syntax
The minimal syntax to open a WFS datasource is : WFS:http://path/to/WFS/service or http://path/to/WFS/service?SERVICE=WFS
Additional optional parameters can be specified such as TYPENAME, VERSION, MAXFEATURES (WFS < 2) or COUNT (WFS > 2) as specified in WFS specification.
The name provided to the TYPENAME parameter must be exactly the layer name reported by OGR, in particular with its namespace prefix when its exists. Note: several type names can be provided and separated by comma.
It is also possible to specify the name of an XML file whose content matches the following syntax (the <OGRWFSDataSource> element must be the first bytes of the file):
<OGRWFSDataSource>
<URL>http://path/to/WFS/service[?OPTIONAL_PARAMETER1=VALUE[&OPTIONAL_PARAMETER2=VALUE]]</URL>
</OGRWFSDataSource>
Note: the URL must be XML-escaped, for example the & character must be written as &
At the first opening, the content of the result of the GetCapabilities request will be appended to the file, so that it can be cached for later openings of the dataset. The same applies for the DescribeFeatureType request issued to discover the field definition of each layer.
The service description file has the following additional elements as
immediate children of the OGRWFSDataSource
element that may be
optionally set.
Timeout: The timeout to use for remote service requests. If not provided, the libcurl default is used.
UserPwd: May be supplied with userid:password to pass a userid and password to the remote server.
HttpAuth: May be BASIC, NTLM or ANY to control the authentication scheme to be used.
Version: Set a specific WFS version to use (either 1.0.0 or 1.1.0).
PagingAllowed: Set to ON if paging must be enabled. See "Request paging" section.
PageSize: Page size when paging is enabled. See "Request paging" section.
BaseStartIndex: Base of the start index when paging is enabled (0 or 1). See "Request paging" section.
COOKIE: HTTP cookies that are passed in HTTP requests, formatted as COOKIE1=VALUE1; COOKIE2=VALUE2... Starting with GDAL 2.3, additional HTTP headers can be sent by setting the
GDAL_HTTP_HEADER_FILE
configuration option to point to a filename of a text file with “key: value” HTTP headers.
Request paging
The WFS driver will read the GML content as a
stream instead as a whole file, which will improve interactivity and
help when the content cannot fit into memory. This can be turned off by
setting the OGR_WFS_USE_STREAMING
configuration
option to NO if this is
not desirable (for example, when iterating several times on a layer that
can fit into memory). When streaming is enabled, GZip compression is
also requested. It has been observed that some WFS servers, that cannot
do on-the-fly compression, will cache on their side the whole content to
be sent before sending the first bytes on the wire. To avoid this, you
can set the CPL_CURL_GZIP
configuration option to NO.
Paging with WFS 2.0
The WFS driver will automatically detect if server supports paging, when
requesting a WFS 2.0 server. The page size (number of features fetched in a
single request) is limited to 100 by default when not declared by the server.
It can be changed by setting the OGR_WFS_PAGE_SIZE
configuration option, or by
specifying COUNT as a query parameter in the URL of the connection string.
If only the N first features must be downloaded and paging through the whole
layer is not desirable, the OGR_WFS_PAGING_ALLOWED
configuration option should be set to OFF.
Starting with GDAL 3.8, if the feature count is already known before
fetching the first feature, and the feature count is less than the page
size, then the WFS driver will not use paging (no STARTINDEX
parameter
will be used in the requests). (This behavior improves compatibility with
Geoserver when datasources with no primary key.)
Paging with WFS 1.0 or 1.1
Some servers (such as MapServer >= 6.0) support the use of STARTINDEX
that allows doing the requests per "page", and thus to avoid
downloading the whole content of the layer in a single request. Paging
was introduced in WFS 2.0.0 but servers may support it as an vendor
specific option also with WFS 1.0.0 and 1.1.0. The OGR WFS client will
use paging when the OGR_WFS_PAGING_ALLOWED
configuration option is explicitly set to ON.
The page size (number of features fetched in a single request)
is limited to 100 by default when not declared by the server.
It can be changed by setting the OGR_WFS_PAGE_SIZE
configuration option.
WFS 2.0.2 specification has clarified that the first feature in paging
is at index 0. But some server implementations of WFS paging have
considered that it was at index 1 (including MapServer <= 6.2).
The default base start index is 0, as mandated
by the specification. The OGR_WFS_BASE_START_INDEX
configuration option can however be set to 1 to be compatible with the
server implementations that considered the first feature to be at
index 1.
Paging options
Those 3 options (OGR_WFS_PAGING_ALLOWED
,
OGR_WFS_PAGE_SIZE
,
OGR_WFS_BASE_START_INDEX
) can also be set in
a WFS XML description file with the elements of similar names
(PagingAllowed, PageSize, BaseStartIndex).
Filtering
The driver will forward any spatial filter set with SetSpatialFilter() to the server. It also makes its best effort to do the same for attribute filters set with SetAttributeFilter() when possible (turning OGR SQL language into OGC filter description). When this is not possible, it will default to client-side only filtering, which can be a slow operation because involving fetching all the features from the servers.
The following spatial functions can be used :
the 8 spatial binary predicate: ST_Equals, ST_Disjoint, ST_Touches, ST_Contains, ST_Intersects, ST_Within, ST_Crosses and ST_Overlaps that take 2 geometry arguments. Typically the geometry column name, and a constant geometry such as built with ST_MakeEnvelope or ST_GeomFromText.
ST_DWithin(geom1,geom2,distance_in_meters)
ST_Beyond(geom1,geom2,distance_in_meters)
ST_MakeEnvelope(xmin,ymin,xmax,ymax[,srs]): to build an envelope. srs can be an integer (an EPSG code), or a string directly set as the srsName attribute of the gml:Envelope. GDAL will take care of needed axis swapping, so coordinates should be expressed in the "natural GIS order" (for example long,lat for geodetic systems)
ST_GeomFromText(wkt,[srs]): to build a geometry from its WKT representation.
Note that those spatial functions are only supported as server-side filters.
Layer joins
For WFS 2.0 servers that support joins, SELECT statements that involve joins will be run on server side. Spatial joins can also be done by using the above mentioned spatial functions, if the server supports spatial joins.
There might be restrictions set by server on the complexity of the joins. The OGR WFS driver also restricts column selection to be column names, potentially with aliases and type casts, but not expressions. The ON and WHERE clauses must also be evaluated on server side, so no OGR special fields are allowed for example. ORDER BY clauses are supported, but the fields must belong to the primary table.
Example of valid statement :
SELECT t1.id, t1.val1, t1.geom, t2.val1 FROM my_table AS t1 JOIN another_table AS t2 ON t1.id = t2.t1id
or
SELECT * FROM my_table AS t1 JOIN another_table AS t2 ON ST_Intersects(t1.geom, t2.geom)
Write support / WFS-T
The WFS-T protocol only enables the user to operate at feature level. No datasource, layer or field creations are possible.
Write support is only enabled when the datasource is opened in update mode.
The mapping between the operations of the WFS Transaction service and the OGR concepts is the following:
OGRFeature::CreateFeature() <==> WFS insert operation
OGRFeature::SetFeature() <==> WFS update operation
OGRFeature::DeleteFeature() <==> WFS delete operation
Lock operations (LockFeature service) are not available at that time.
There are a few caveats to keep in mind. OGR feature ID (FID) is an integer based value, whereas WFS/GML gml:id attribute is a string. Thus it is not always possible to match both values. The WFS driver exposes then the gml:id attribute of a feature as a 'gml_id' field.
When inserting a new feature with CreateFeature(), and if the command is successful, OGR will fetch the returned gml:id and set the 'gml_id' field of the feature accordingly. It will also try to set the OGR FID if the gml:id is of the form layer_name.numeric_value. Otherwise the FID will be left to its unset default value.
When updating an existing feature with SetFeature(), the OGR FID field will be ignored. The request issued to the driver will only take into account the value of the gml:id field of the feature. The same applies for DeleteFeature().
Write support and OGR transactions
The above operations are by default issued to the server synchronously with the OGR API call. This however can cause performance penalties when issuing a lot of commands due to many client/server exchanges.
It is possible to surround those operations between OGRLayer::StartTransaction() and OGRLayer::CommitTransaction(). The operations will be stored into memory and only executed at the time CommitTransaction() is called.
The drawback for CreateFeature() is that the user cannot know which gml:id have been assigned to the inserted features. A special SQL statement has been introduced into the WFS driver to workaround this : by issuing the "SELECT _LAST_INSERTED_FIDS_ FROM layer_name" (where layer_name is to be replaced with the actual layer_name) command through the OGRDataSource::ExecuteSQL(), a layer will be returned with as many rows with a single attribute gml_id as the count of inserted features during the last committed transaction.
Note : currently, only CreateFeature() makes use of OGR transaction mechanism. SetFeature() and DeleteFeature() will still be issued immediately.
Special SQL commands
The following SQL / pseudo-SQL commands passed to OGRDataSource::ExecuteSQL() are specific of the WFS driver :
"DELETE FROM layer_name WHERE expression" : this will result into a WFS delete operation. This can be a fast way of deleting one or several features. In particularly, this can be a faster replacement for OGRLayer::DeleteFeature() when the gml:id is known, but the feature has not been fetched from the server.
"SELECT _LAST_INSERTED_FIDS_ FROM layer_name" : see above paragraph.
Currently, any other SQL command will be processed by the generic layer, meaning client-side only processing. Server side spatial and attribute filtering must be done through the SetSpatialFilter() and SetAttributeFilter() interfaces.
Special layer : WFSLayerMetadata
A "hidden" layer called "WFSLayerMetadata" is filled with records with metadata for each WFS layer.
Each record contains a "layer_name", "title" and "abstract" field, from the document returned by GetCapabilities.
That layer is returned through GetLayerByName("WFSLayerMetadata").
Special layer : WFSGetCapabilities
A "hidden" layer called "WFSGetCapabilities" is filled with the raw XML result of the GetCapabilities request.
That layer is returned through GetLayerByName("WFSGetCapabilities").
Open options
The following options are available:
URL=value: URL to the WFS server endpoint. Required when using the "WFS:" string as the connection string.
TRUST_CAPABILITIES_BOUNDS=[YES/NO]: Defaults to
NO
. Whether to trust layer bounds declared in GetCapabilities response, for faster GetExtent() runtime.EMPTY_AS_NULL=[YES/NO]: Defaults to
YES
. By default (EMPTY_AS_NULL=YES
), fields with empty content will be reported as being NULL, instead of being an empty string. This is the historic behavior. However this will prevent such fields to be declared as not-nullable if the application schema declared them as mandatory. So this option can be set to NO to have both empty strings being report as such, and mandatory fields being reported as not nullable.INVERT_AXIS_ORDER_IF_LAT_LONG=[YES/NO]: Defaults to
YES
. Whether to present SRS and coordinate ordering in traditional GIS order.CONSIDER_EPSG_AS_URN=[YES/NO/AUTO]: Defaults to
AUTO
. Whether to consider srsName like EPSG:XXXX as respecting EPSG axis order.EXPOSE_GML_ID=[YES/NO]: Defaults to
YES
. Whether to expose the gml:id attribute of a GML feature as the gml_id OGR field. Note that hiding gml_id will prevent WFS-T from working.
Configuration options
The following configuration options are available:
OGR_WFS_USE_STREAMING=[YES/NO]: Defaults to
YES
. Set toNO
to disable streaming. See Request paging.OGR_WFS_PAGE_SIZE=value: Control the number of features fetched in a single request.
OGR_WFS_PAGING_ALLOWED=[ON/OFF]: Set to
NO
to prevent paging through the whole layer.OGR_WFS_BASE_START_INDEX=<integer>: Sets the index of the first feature in paging.
Examples
Listing the types of a WFS server :
ogrinfo -ro WFS:http://www2.dmsolutions.ca/cgi-bin/mswfs_gmap
Listing the types of a WFS server whose layer structures are cached in a XML file:
ogrinfo -ro mswfs_gmap.xml
Listing the features of the popplace layer, with a spatial filter :
ogrinfo -ro WFS:http://www2.dmsolutions.ca/cgi-bin/mswfs_gmap popplace -spat 0 0 2961766.250000 3798856.750000
Retrieving the features of gml:id "world.2" and "world.3" from the tows:world layer :
ogrinfo "WFS:http://www.tinyows.org/cgi-bin/tinyows" tows:world -ro -al -where "gml_id='world.2' or gml_id='world.3'"
Display layer metadata:
ogrinfo -ro -al "WFS:http://v2.suite.opengeo.org/geoserver/ows" WFSLayerMetadata


The Java API for RESTful Web Services (JAX-RS, defined in JSR 339) is designed to make it easy to develop applications that use the REST architecture. This chapter describes advanced features of JAX-RS. If you are new to JAX-RS, see Chapter 29, "Building RESTful Web Services with JAX-RS" before you proceed with this chapter.
JAX-RS is integrated with Contexts and Dependency Injection for Java EE (CDI), Enterprise JavaBeans (EJB) technology, and Java Servlet technology.
The following topics are addressed here:
JAX-RS annotations for resource classes let you extract specific parts or values from a Uniform Resource Identifier (URI) or request header.
JAX-RS provides the annotations listed in Table 31-1.
Table 31-1 Advanced JAX-RS Annotations
| Annotation | Description |
|---|---|
|
|
Injects information into a class field, bean property, or method parameter |
|
|
Extracts information from cookies declared in the cookie request header |
|
|
Extracts information from a request representation whose content type is |
|
|
Extracts the value of a header |
|
|
Extracts the value of a URI matrix parameter |
|
|
Extracts the value of a URI template parameter |
|
|
Extracts the value of a URI query parameter |
URI path templates are URIs with variables embedded within the URI syntax. The @PathParam
annotation lets you use variable URI path fragments when you call a method.
The following code snippet shows how to extract the last name of an employee when the employee's email address is provided:
<EMAIL_ADDRESS>public class EmpResource { @GET @Produces("text/xml") public String getEmployeelastname(@PathParam("lastname") String lastName) { ... } }
In this example, the @Path
annotation defines the URI variables (or path parameters) {firstname}
, {lastname}
, and {domain}
. The @PathParam
in the method parameter of the request method extracts the last name from the email address.
If your HTTP request is GET
<EMAIL_ADDRESS>, the value "doe
" is injected into {lastname}
.
You can specify several path parameters in one URI.
You can declare a regular expression with a URI variable. For example, if it is required that the last name must consist only of lowercase and uppercase characters, you can declare the following regular expression:
<EMAIL_ADDRESS>If the last name does not match the regular expression, a 404 response is returned.
Use the @QueryParam
annotation to extract query parameters from the query component of the request URI.
For instance, to query all employees who have joined within a specific range of years, use a method signature like the following:
@Path("/employees/") @GET public Response getEmployees( @DefaultValue("2003") @QueryParam("minyear") int minyear, @DefaultValue("2013") @QueryParam("maxyear") int maxyear) {...}
This code snippet defines two query parameters, minyear
and maxyear
. The following HTTP request would query for all employees who have joined between 2003 and 2013:
GET /employees?maxyear=2013&minyear=2003
The @DefaultValue
annotation defines a default value, which is to be used if no values are provided for the query parameters. By default, JAX-RS assigns a null value for Object
values and zero for primitive data types. You can use the @DefaultValue
annotation to eliminate null or zero values and define your own default values for a parameter.
Use the @FormParam
annotation to extract form parameters from HTML forms. For example, the following form accepts the name, address, and manager's name of an employee:
<FORM action="http://example.com/employees/" method="post"> <p> <fieldset> Employee name: <INPUT type="text" name="empname" tabindex="1"> Employee address: <INPUT type="text" name="empaddress" tabindex="2"> Manager name: <INPUT type="text" name="managername" tabindex="3"> </fieldset> </p> </FORM>
Use the following code snippet to extract the manager name from this HTML form:
@POST @Consumes("application/x-www-form-urlencoded") public void post(@FormParam("managername") String managername) { // Store the value ... }
To obtain a map of form parameter names to values, use a code snippet like the following:
@POST @Consumes("application/x-www-form-urlencoded") public void post(MultivaluedMap<String, String> formParams) { // Store the message }
The javax.ws.rs.core.Context
annotation retrieves the Java types related to a request or response.
The javax.ws.rs.core.UriInfo
interface provides information about the components of a request URI. The following code snippet shows how to obtain a map of query and path parameter names to values:
@GET public String getParams(@Context UriInfo ui) { MultivaluedMap<String, String> queryParams = ui.getQueryParameters(); MultivaluedMap<String, String> pathParams = ui.getPathParameters(); }
The javax.ws.rs.core.HttpHeaders
interface provides information about request headers and cookies. The following code snippet shows how to obtain a map of header and cookie parameter names to values:
@GET public String getHeaders(@Context HttpHeaders hh) { MultivaluedMap<String, String> headerParams = hh.getRequestHeaders(); MultivaluedMap<String, Cookie> pathParams = hh.getCookies(); }
JAX-RS supports the Bean Validation to verify JAX-RS resource classes. This support consists of:
Adding constraint annotations to resource method parameters
Ensuring entity data is valid when the entity is passed in as a parameter
Bean Validation constraint annotations may be applied to parameters for a resource. The server will validate the parameters and either pass or throw a javax.validation.ValidationException
.
@POST @Path("/createUser") @Consumes(MediaType.APPLICATION_FORM_URLENCODED) public void createUser(@NotNull @FormParam("username") String username, @NotNull @FormParam("firstName") String firstName, @NotNull @FormParam("lastName") String lastName, @Email @FormParam("email") String email) { ... }
In the preceding example, the built-in constraint @NotNull
is applied to the username
, firstName
, and lastName
form fields. The user-defined @Email
constraint validates that the email address supplied by the email
form field is correctly formatted.
The constraints may also be applied to fields within a resource class.
@Path("/createUser") public class CreateUserResource { @NotNull @FormParam("username") private String username; @NotNull @FormParam("firstName") private String firstName; @NotNull @FormParam("lastName") private String lastName; @Email @FormParam("email") private String email; ... }
In the preceding example, the same constraints that were applied to the method parameters in the previous example are applied to the class fields. The behavior is the same in both examples.
Constraints may also be applied to a resource class's JavaBeans properties by adding the constraint annotations to the getter method.
@Path("/createuser") public class CreateUserResource { private String username; @FormParam("username") public void setUsername(String username) { this.username = username; } @NotNull public String getUsername() { return username; } ... }
Constraints may also be applied at the resource class level. In the following example, @PhoneRequired
is a user-defined constraint that ensures that a user enters at least one phone number. That is, either homePhone
or mobilePhone
can be null, but not both.
@Path("/createUser") @PhoneRequired public class CreateUserResource { @FormParam("homePhone") private Phone homePhone; @FormParam("mobilePhone") private Phone mobilePhone; ... }
Classes that contain validation constraint annotations may be used in method parameters in a resource class. To validate these entity classes, use the @Valid
annotation on the method parameter. For example, the following class is a user-defined class containing both standard and user-defined validation constraints.
@PhoneRequired public class User { @NotNull private String username; private Phone homePhone; private Phone mobilePhone; ... }
This entity class is used as a parameter to a resource method.
@Path("/createUser") public class CreateUserResource { ... @POST @Consumers(MediaType.APPLICATION_XML) public void createUser(@Valid User user) { ... } ... }
The @Valid
annotation ensures that the entity class is validated at runtime. Additional user-defined constraints can also trigger validation of an entity.
@Path("/createUser") public class CreateUserResource { ... @POST @Consumers(MediaType.APPLICATION_XML) public void createUser(@ActiveUser User user) { ... } ... }
In the preceding example, the user-defined @ActiveUser
constraint is applied to the User
class in addition to the @PhoneRequired
and @NotNull
constraints defined within the entity class.
If a resource method returns an entity class, validation may be triggered by applying the @Valid
or any other user-defined constraint annotation to the resource method.
@Path("/getUser") public class GetUserResource { ... @GET @Path("{username}") @Produces(MediaType.APPLICATION_XML) @ActiveUser @Valid public User getUser(@PathParam("username") String username) { // find the User return user; } ... }
As in the previous example, the @ActiveUser
constraint is applied to the returned entity class as well as the @PhoneRequired
and @NotNull
constraints defined within the entity class.
If a javax.validation.ValidationException
or any subclass of ValidationException
except ConstraintValidationException
is thrown, the JAX-RS runtime will respond to the client request with a 500 (Internal Server Error) HTTP status code.
If a ConstraintValidationException
is thrown, the JAX-RS runtime will respond to the client with one of the following HTTP status codes:
500 (Internal Server Error) if the exception was thrown while validating a method return type
400 (Bad Request) in all other cases
You can use a resource class to process only a part of the URI request. A root resource can then implement subresources that can process the remainder of the URI path.
A resource class method that is annotated with @Path
is either a subresource method or a subresource locator.
A subresource method is used to handle requests on a subresource of the corresponding resource.
A subresource locator is used to locate subresources of the corresponding resource.
A subresource method handles an HTTP request directly. The method must be annotated with a request method designator, such as @GET
or @POST
, in addition to @Path
. The method is invoked for request URIs that match a URI template created by concatenating the URI template of the resource class with the URI template of the method.
The following code snippet shows how a subresource method can be used to extract the last name of an employee when the employee's email address is provided:
@Path("/employeeinfo") public class EmployeeInfo { public employeeinfo() {} @GET<EMAIL_ADDRESS>@Produces("text/xml") public String getEmployeeLastName(@PathParam("lastname") String lastName) { ... } }
The getEmployeeLastName
method returns doe
for the following GET
request:
GET<EMAIL_ADDRESS>A subresource locator returns an object that will handle an HTTP request. The method must not be annotated with a request method designator. You must declare a subresource locator within a subresource class, and only subresource locators are used for runtime resource resolution.
The following code snippet shows a subresource locator:
// Root resource class @Path("/employeeinfo") public class EmployeeInfo { // Subresource locator: obtains the subresource Employee // from the path /employeeinfo/employees/{empid} @Path("/employees/{empid}") public Employee getEmployee(@PathParam("empid") String id) { // Find the Employee based on the id path parameter Employee emp = ...; ... return emp; } } // Subresource class public class Employee { // Subresource method: returns the employee's last name @GET @Path("/lastname") public String getEmployeeLastName() { ... return lastName; } }
In this code snippet, the getEmployee
method is the subresource locator that provides the Employee
object, which services requests for lastname
.
If your HTTP request is GET /employeeinfo/employees/as209/
, the getEmployee
method returns an Employee
object whose id is as209
. At runtime, JAX-RS sends a GET /employeeinfo/employees/as209/lastname
request to the getEmployeeLastName
method. The getEmployeeLastName
method retrieves and returns the last name of the employee whose id is as209
.
JAX-RS works with Enterprise JavaBeans technology (enterprise beans) and Contexts and Dependency Injection for Java EE (CDI).
In general, for JAX-RS to work with enterprise beans, you need to annotate the class of a bean with @Path
to convert it to a root resource class. You can use the @Path
annotation with stateless session beans and singleton POJO beans.
The following code snippet shows a stateless session bean and a singleton bean that have been converted to JAX-RS root resource classes.
@Stateless @Path("stateless-bean") public class StatelessResource {...} @Singleton @Path("singleton-bean") public class SingletonResource {...}
Session beans can also be used for subresources.
JAX-RS and CDI have slightly different component models. By default, JAX-RS root resource classes are managed in the request scope, and no annotations are required for specifying the scope. CDI managed beans annotated with @RequestScoped
or @ApplicationScoped
can be converted to JAX-RS resource classes.
The following code snippet shows a JAX-RS resource class.
@Path("/employee/{id}") public class Employee { public Employee(@PathParam("id") String id) {...} } @Path("{lastname}") public final class EmpDetails {...}
The following code snippet shows this JAX-RS resource class converted to a CDI bean. The beans must be proxyable, so the Employee
class requires a nonprivate constructor with no parameters, and the EmpDetails
class must not be final
.
@Path("/employee/{id}") @RequestScoped public class Employee { public Employee() {...} @Inject public Employee(@PathParam("id") String id) {...} } @Path("{lastname}") @RequestScoped public class EmpDetails {...}
JAX-RS provides support for conditional GET
and PUT
HTTP requests. Conditional GET
requests help save bandwidth by improving the efficiency of client processing.
A GET
request can return a Not Modified (304) response if the representation has not changed since the previous request. For example, a website can return 304 responses for all its static images that have not changed since the previous request.
A PUT
request can return a Precondition Failed (412) response if the representation has been modified since the last request. The conditional PUT
can help avoid the lost update problem.
Conditional HTTP requests can be used with the Last-Modified
and ETag
headers. The Last-Modified
header can represent dates with granularity of one second.
@Path("/employee/{joiningdate}") public class Employee { Date joiningdate; @GET @Produces("application/xml") public Employee(@PathParam("joiningdate") Date joiningdate, @Context Request req, @Context UriInfo ui) { this.joiningdate = joiningdate; ... this.tag = computeEntityTag(ui.getRequestUri()); if (req.getMethod().equals("GET")) { Response.ResponseBuilder rb = req.evaluatePreconditions(tag); if (rb != null) { throw new WebApplicationException(rb.build()); } } } }
In this code snippet, the constructor of the Employee
class computes the entity tag from the request URI and calls the request.evaluatePreconditions
method with that tag. If a client request returns an If-none-match
header with a value that has the same entity tag that was computed, evaluate.Preconditions
returns a pre-filled-out response with a 304 status code and an entity tag set that may be built and returned.
The @Produces
and @Consumes
annotations handle static content negotiation in JAX-RS. These annotations specify the content preferences of the server. HTTP headers such as Accept
, Content-Type
, and Accept-Language
define the content negotiation preferences of the client.
For more details on the HTTP headers for content negotiation, see HTTP /1.1 - Content Negotiation (http://www.w3.org/Protocols/rfc2616/rfc2616-sec12.html
).
The following code snippet shows the server content preferences:
@Produces("text/plain") @Path("/employee") public class Employee { @GET public String getEmployeeAddressText(String address) {...} @Produces("text/xml") @GET public String getEmployeeAddressXml(Address address) {...} }
The getEmployeeAddressText
method is called for an HTTP request that looks like the following:
GET /employee Accept: text/plain
This will produce the following response:
500 Oracle Parkway, Redwood Shores, CA
The getEmployeeAddressXml
method is called for an HTTP request that looks like the following:
GET /employee Accept: text/xml
This will produce the following response:
<address street="500 Oracle Parkway, Redwood Shores, CA" country="USA"/>
With static content negotiation, you can also define multiple content and media types for the client and server.
@Produces("text/plain", "text/xml")
In addition to supporting static content negotiation, JAX-RS also supports runtime content negotiation using the javax.ws.rs.core.Variant
class and Request
objects. The Variant
class specifies the resource representation of content negotiation. Each instance of the Variant
class may contain a media type, a language, and an encoding. The Variant
object defines the resource representation that is supported by the server. The Variant.VariantListBuilder
class is used to build a list of representation variants.
The following code snippet shows how to create a list of resource representation variants:
List<Variant> vs = Variant.mediatypes("application/xml", "application/json") .languages("en", "fr").build();
This code snippet calls the build
method of the VariantListBuilder
class. The VariantListBuilder
class is invoked when you call the mediatypes
, languages
, or encodings
methods. The build
method builds a series of resource representations. The Variant
list created by the build
method has all possible combinations of items specified in the mediatypes
, languages
, and encodings
methods.
In this example, the size of the vs
object as defined in this code snippet is 4, and the contents are as follows:
[["application/xml","en"], ["application/json","en"], ["application/xml","fr"],["application/json","fr"]]
The javax.ws.rs.core.Request.selectVariant
method accepts a list of Variant
objects and chooses the Variant
object that matches the HTTP request. This method compares its list of Variant
objects with the Accept
, Accept-Encoding
, Accept-Language
, and Accept-Charset
headers of the HTTP request.
The following code snippet shows how to use the selectVariant
method to select the most acceptable Variant
from the values in the client request:
@GET public Response get(@Context Request r) { List<Variant> vs = ...; Variant v = r.selectVariant(vs); if (v == null) { return Response.notAcceptable(vs).build(); } else { Object rep = selectRepresentation(v); return Response.ok(rep, v); } }
The selectVariant
method returns the Variant
object that matches the request or null if no matches are found. In this code snippet, if the method returns null, a Response
object for a nonacceptable response is built. Otherwise, a Response
object with an OK status and containing a representation in the form of an Object
entity and a Variant
is returned.
Java Architecture for XML Binding (JAXB) is an XML-to-Java binding technology that simplifies the development of web services by enabling transformations between schema and Java objects and between XML instance documents and Java object instances. An XML schema defines the data elements and structure of an XML document. You can use JAXB APIs and tools to establish mappings between Java classes and XML schema. JAXB technology provides the tools that enable you to convert your XML documents to and from Java objects.
By using JAXB, you can manipulate data objects in the following ways.
You can start with an XML schema definition (XSD) and use xjc
, the JAXB schema compiler tool, to create a set of JAXB-annotated Java classes that map to the elements and types defined in the XSD schema.
You can start with a set of Java classes and use schemagen
, the JAXB schema generator tool, to generate an XML schema.
Once a mapping between the XML schema and the Java classes exists, you can use the JAXB binding runtime to marshal and unmarshal your XML documents to and from Java objects and use the resulting Java classes to assemble a web services application.
XML is a common media format that RESTful services consume and produce. To deserialize and serialize XML, you can represent requests and responses by JAXB annotated objects. Your JAX-RS application can use the JAXB objects to manipulate XML data. JAXB objects can be used as request entity parameters and response entities. The JAX-RS runtime environment includes standard MessageBodyReader
and MessageBodyWriter
provider interfaces for reading and writing JAXB objects as entities.
With JAX-RS, you enable access to your services by publishing resources. Resources are just simple Java classes with some additional JAX-RS annotations. These annotations express the following:
The path of the resource (the URL you use to access it)
The HTTP method you use to call a certain method (for example, the GET
or POST
method)
The MIME type with which a method accepts or responds
As you define the resources for your application, consider the type of data you want to expose. You may already have a relational database that contains information you want to expose to users, or you may have static content that does not reside in a database but does need to be distributed as resources. Using JAX-RS, you can distribute content from multiple sources. RESTful web services can use various types of input/output formats for request and response. The customer
example, described in The customer Example Application, uses XML.
Resources have representations. A resource representation is the content in the HTTP message that is sent to, or returned from, the resource using the URI. Each representation a resource supports has a corresponding media type. For example, if a resource is going to return content formatted as XML, you can use application/xml
as the associated media type in the HTTP message.Depending on the requirements of your application, resources can return representations in a preferred single format or in multiple formats. JAX-RS provides @Consumes
and @Produces
annotations to declare the media types that are acceptable for a resource method to read and write.
JAX-RS also maps Java types to and from resource representations using entity providers. A MessageBodyReader
entity provider reads a request entity and deserializes the request entity into a Java type. A MessageBodyWriter
entity provider serializes from a Java type into a response entity. For example, if a String
value is used as the request entity parameter, the MessageBodyReader
entity provider deserializes the request body into a new String
. If a JAXB type is used as the return type on a resource method, the MessageBodyWriter
serializes the JAXB object into a response body.
By default, the JAX-RS runtime environment attempts to create and use a default JAXBContext
class for JAXB classes.However, if the default JAXBContext
class is not suitable, then you can supply a JAXBContext
class for the application using a JAX-RS ContextResolver
provider interface.
The following sections explain how to use JAXB with JAX-RS resource methods.
If you do not have an XML schema definition for the data you want to expose, you can model your data as Java classes, add JAXB annotations to these classes, and use JAXB to generate an XML schema for your data. For example, if the data you want to expose is a collection of products and each product has an ID, a name, a description, and a price, you can model it as a Java class as follows:
@XmlRootElement(name="product") @XmlAccessorType(XmlAccessType.FIELD) public class Product { @XmlElement(required=true) protected int id; @XmlElement(required=true) protected String name; @XmlElement(required=true) protected String description; @XmlElement(required=true) protected int price; public Product() {} // Getter and setter methods // ... }
Run the JAXB schema generator on the command line to generate the corresponding XML schema definition:
schemagen Product.java
This command produces the XML schema as an .xsd
file:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="product" type="product"/> <xs:complexType name="product"> <xs:sequence> <xs:element name="id" type="xs:int"/> <xs:element name="name" type="xs:string"/> <xs:element name="description" type="xs:string"/> <xs:element name="price" type="xs:int"/> </xs:sequence> <xs:complexType> </xs:schema>
Once you have this mapping, you can create Product
objects in your application, return them, and use them as parameters in JAX-RS resource methods. The JAX-RS runtime uses JAXB to convert the XML data from the request into a Product
object and to convert a Product
object into XML data for the response. The following resource class provides a simple example:
@Path("/product") public class ProductService { @GET @Path("/get") @Produces("application/xml") public Product getProduct() { Product prod = new Product(); prod.setId(1); prod.setName("Mattress"); prod.setDescription("Queen size mattress"); prod.setPrice(500); return prod; } @POST @Path("/create") @Consumes("application/xml") public Response createProduct(Product prod) { // Process or store the product and return a response // ... } }
Some IDEs, such as NetBeans IDE, will run the schema generator tool automatically during the build process if you add Java classes that have JAXB annotations to your project. For a detailed example, see The customer Example Application. The customer
example contains a more complex relationship between the Java classes that model the data, which results in a more hierarchical XML representation.
If you already have an XML schema definition in an .xsd
file for the data you want to expose, use the JAXB schema compiler tool. Consider this simple example of an .xsd
file:
<xs:schema targetNamespace="http://xml.product" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xmlns:myco="http://xml.product"> <xs:element name="product" type="myco:Product"/> <xs:complexType name="Product"> <xs:sequence> <xs:element name="id" type="xs:int"/> <xs:element name="name" type="xs:string"/> <xs:element name="description" type="xs:string"/> <xs:element name="price" type="xs:int"/> </xs:sequence> </xs:complexType> </xs:schema>
Run the schema compiler tool on the command line as follows:
xjc Product.xsd
This command generates the source code for Java classes that correspond to the types defined in the .xsd
file. The schema compiler tool generates a Java class for each complexType
defined in the .xsd
file. The fields of each generated Java class are the same as the elements inside the corresponding complexType
, and the class contains getter and setter methods for these fields.
In this case, the schema compiler tool generates the classes product.xml.Product
and product.xml.ObjectFactory
. The Product
class contains JAXB annotations, and its fields correspond to those in the .xsd
definition:
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Product", propOrder = { "id", "name", "description", "price" }) public class Product { protected int id; @XmlElement(required = true) protected String name; @XmlElement(required = true) protected String description; protected int price; // Setter and getter methods // ... }
You can create instances of the Product
class from your application (for example, from a database). The generated class product.xml.ObjectFactory
contains a method that allows you to convert these objects to JAXB elements that can be returned as XML inside JAX-RS resource methods:
@XmlElementDecl(namespace = "http://xml.product", name = "product") public JAXBElement<Product> createProduct(Product value) { return new JAXBElement<Product>(_Product_QNAME, Product.class, null, value); }
The following code shows how to use the generated classes to return a JAXB element as XML in a JAX-RS resource method:
@Path("/product") public class ProductService { @GET @Path("/get") @Produces("application/xml") public JAXBElement<Product> getProduct() { Product prod = new Product(); prod.setId(1); prod.setName("Mattress"); prod.setDescription("Queen size mattress"); prod.setPrice(500); return new ObjectFactory().createProduct(prod); } }
For @POST
and @PUT
resource methods, you can use a Product
object directly as a parameter. JAX-RS maps the XML data from the request into a Product
object.
@Path("/product") public class ProductService { @GET // ... @POST @Path("/create") @Consumes("application/xml") public Response createProduct(Product prod) { // Process or store the product and return a response // ... } }
JAX-RS can automatically read and write XML using JAXB, but it can also work with JSON data. JSON is a simple text-based format for data exchange derived from JavaScript. For the preceding examples, the XML representation of a product is
<?xml version="1.0" encoding="UTF-8"?> <product> <id>1</id> <name>Mattress</name> <description>Queen size mattress</description> <price>500</price> </product>
The equivalent JSON representation is
{ "id":"1", "name":"Mattress", "description":"Queen size mattress", "price":500 }
You can add the format application/json
or MediaType.APPLICATION_JSON
to the @Produces
annotation in resource methods to produce responses with JSON data:
@GET @Path("/get") @Produces({"application/xml","application/json"}) public Product getProduct() { ... }
In this example, the default response is XML, but the response is a JSON object if the client makes a GET
request that includes this header:
Accept: application/json
The resource methods can also accept JSON data for JAXB annotated classes:
@POST @Path("/create") @Consumes({"application/xml","application/json"}) public Response createProduct(Product prod) { ... }
The client should include the following header when submitting JSON data with a POST
request:
Content-Type: application/json
This section describes how to build and run the customer
example application. This application is a RESTful web service that uses JAXB to perform the create, read, update, delete (CRUD) operations for a specific entity.
The customer
sample application is in the tut-install/examples/jaxrs/customer/
directory. See Chapter 2, "Using the Tutorial Examples," for basic information on building and running sample applications.
The source files of this application are at tut-install/examples/jaxrs/customer/src/main/java/
. The application has three parts.
The Customer
and Address
entity classes. These classes model the data of the application and contain JAXB annotations.
The CustomerService
resource class. This class contains JAX-RS resource methods that perform operations on Customer
instances represented as XML or JSON data using JAXB. See The CustomerService Class for details.
The CustomerBean
session bean that acts as a backing bean for the web client. CustomerBean
uses the JAX-RS client API to call the methods of CustomerService
.
The customer
example application shows you how to model your data entities as Java classes with JAXB annotations.
The following class represents a customer's address:
@Entity @Table(name="CUSTOMER_ADDRESS") @XmlRootElement(name="address") @XmlAccessorType(XmlAccessType.FIELD) public class Address { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; @XmlElement(required=true) protected int number; @XmlElement(required=true) protected String street; @XmlElement(required=true) protected String city; @XmlElement(required=true) protected String province; @XmlElement(required=true) protected String zip; @XmlElement(required=true) protected String country; public Address() { } // Getter and setter methods // ... }
The @XmlRootElement(name="address")
annotation maps this class to the address
XML element. The @XmlAccessorType(XmlAccessType.FIELD)
annotation specifies that all the fields of this class are bound to XML by default. The @XmlElement(required=true)
annotation specifies that an element must be present in the XML representation.
The following class represents a customer:
@Entity @Table(name="CUSTOMER_CUSTOMER") @NamedQuery( name="findAllCustomers", query="SELECT c FROM Customer c " + "ORDER BY c.id" ) @XmlRootElement(name="customer") @XmlAccessorType(XmlAccessType.FIELD) public class Customer { @Id @GeneratedValue(strategy = GenerationType.AUTO) @XmlAttribute(required=true) protected int id; @XmlElement(required=true) protected String firstname; @XmlElement(required=true) protected String lastname; @XmlElement(required=true) @OneToOne protected Address address; @XmlElement(required=true) protected String email; @XmlElement (required=true) protected String phone; public Customer() {...} // Getter and setter methods // ... }
The Customer
class contains the same JAXB annotations as the previous class, except for the @XmlAttribute(required=true)
annotation, which maps a property to an attribute of the XML element representing the class.
The Customer
class contains a property whose type is another entity, the Address
class. This mechanism allows you to define in Java code the hierarchical relationships between entities without having to write an .xsd
file yourself.
JAXB generates the following XML schema definition for the two preceding classes:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="address" type="address"/> <xs:element name="customer" type="customer"/> <xs:complexType name="address"> <xs:sequence> <xs:element name="id" type="xs:long" minOccurs="0"/> <xs:element name="number" type="xs:int"/> <xs:element name="street" type="xs:string"/> <xs:element name="city" type="xs:string"/> <xs:element name="province" type="xs:string"/> <xs:element name="zip" type="xs:string"/> <xs:element name="country" type="xs:string"/> </xs:sequence> </xs:complexType> <xs:complexType name="customer"> <xs:sequence> <xs:element name="firstname" type="xs:string"/> <xs:element name="lastname" type="xs:string"/> <xs:element ref="address"/> <xs:element name="email" type="xs:string"/> <xs:element name="phone" type="xs:string"/> </xs:sequence> <xs:attribute name="id" type="xs:int" use="required"/> </xs:complexType> </xs:schema>
The CustomerService
class has a createCustomer
method that creates a customer resource based on the Customer
class and returns a URI for the new resource.
@Stateless @Path("/Customer") public class CustomerService { public static final Logger logger = Logger.getLogger(CustomerService.class.getCanonicalName()); @PersistenceContext private EntityManager em; private CriteriaBuilder cb; @PostConstruct private void init() { cb = em.getCriteriaBuilder(); } ... @POST @Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON}) public Response createCustomer(Customer customer) { try { long customerId = persist(customer); return Response.created(URI.create("/" + customerId)).build(); } catch (Exception e) { logger.log(Level.SEVERE, "Error creating customer for customerId {0}. {1}", new Object[]{customer.getId(), e.getMessage()}); throw new WebApplicationException(e, Response.Status.INTERNAL_SERVER_ERROR); } } ... private long persist(Customer customer) { try { Address address = customer.getAddress(); em.persist(address); em.persist(customer); } catch (Exception ex) { logger.warning("Something went wrong when persisting the customer"); } return customer.getId(); }
The response returned to the client has a URI to the newly created resource. The return type is an entity body mapped from the property of the response with the status code specified by the status property of the response. The WebApplicationException
is a RuntimeException
that is used to wrap the appropriate HTTP error status code, such as 404, 406, 415, or 500.
The @Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
and @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
annotations set the request and response media types to use the appropriate MIME client. These annotations can be applied to a resource method, a resource class, or even an entity provider. If you do not use these annotations, JAX-RS allows the use of any media type ("*/*"
).
The following code snippet shows the implementation of the getCustomer
and findbyId
methods. The getCustomer
method uses the @Produces
annotation and returns a Customer
object, which is converted to an XML or JSON representation depending on the Accept:
header specified by the client.
@GET @Path("{id}") @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON}) public Customer getCustomer(@PathParam("id") String customerId) { Customer customer = null; try { customer = findById(customerId); } catch (Exception ex) { logger.log(Level.SEVERE, "Error calling findCustomer() for customerId {0}. {1}", new Object[]{customerId, ex.getMessage()}); } return customer; } ... private Customer findById(String customerId) { Customer customer = null; try { customer = em.find(Customer.class, customerId); return customer; } catch (Exception ex) { logger.log(Level.WARNING, "Couldn't find customer with ID of {0}", customerId); } return customer; }
Use the JAX-RS Client API to write a client for the customer
example application.
The CustomerBean
enterprise bean class calls the JAX-RS Client API to test the CustomerService
web service:
@Named @Stateless public class CustomerBean { protected Client client; private static final Logger logger = Logger.getLogger(CustomerBean.class.getName()); @PostConstruct private void init() { client = ClientBuilder.newClient(); } @PreDestroy private void clean() { client.close(); } public String createCustomer(Customer customer) { if (customer == null) { logger.log(Level.WARNING, "customer is null."); return "customerError"; } String navigation; Response response = client.target("http://localhost:8080/customer/webapi/Customer") .request(MediaType.APPLICATION_XML) .post(Entity.entity(customer, MediaType.APPLICATION_XML), Response.class); if (response.getStatus() == Status.CREATED.getStatusCode()) { navigation = "customerCreated"; } else { logger.log(Level.WARNING, "couldn''t create customer with " + "id {0}. Status returned was {1}", new Object[]{customer.getId(), response.getStatus()}); navigation = "customerError"; } return navigation; } public String retrieveCustomer(String id) { String navigation; Customer customer = client.target("http://localhost:8080/customer/webapi/Customer") .path(id) .request(MediaType.APPLICATION_XML) .get(Customer.class); if (customer == null) { navigation = "customerError"; } else { navigation = "customerRetrieved"; } return navigation; } public List<Customer> retrieveAllCustomers() { List<Customer> customers = client.target("http://localhost:8080/customer/webapi/Customer") .path("all") .request(MediaType.APPLICATION_XML) .get(new GenericType<List<Customer>>() {}); return customers; } }
This client uses the POST
and GET
methods.
All of these HTTP status codes indicate success: 201 for POST
, 200 for GET
, and 204 for DELETE
. For details about the meanings of HTTP status codes, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
.
You can use either NetBeans IDE or Maven to build, package, deploy, and run the customer
application.
Make sure that GlassFish Server has been started (see Starting and Stopping GlassFish Server).
From the File menu, choose Open Project.
In the Open Project dialog box, navigate to:
tut-install/examples/jaxrs
Select the customer
folder.
Click Open Project.
In the Projects tab, right-click the customer
project and select Build.
This command builds and packages the application into a WAR file, customer.war
, located in the target
directory. Then, the WAR file is deployed to GlassFish Server.
Open the web client in a browser at the following URL:
http://localhost:8080/customer/
The web client allows you to create and view customers.
Make sure that GlassFish Server has been started (see Starting and Stopping GlassFish Server).
In a terminal window, go to:
tut-install/examples/jaxrs/customer/
Enter the following command:
mvn install
This command builds and packages the application into a WAR file, customer.war
, located in the target
directory. Then, the WAR file is deployed to GlassFish Server.
Open the web client in a browser at the following URL:
http://localhost:8080/customer/
The web client allows you to create and view customers.


Text Matching
Analytics Zoo provides a pre-defined KNRM model that can be used for text matching (e.g. question answering). For training, you can use Keras-Style API methods or alternatively feed the model into NNFrames and BigDL Optimizer. More text matching models will be supported in the future.
Build a KNRM Model
Kernel-pooling Neural Ranking Model with RBF kernel. See here for more details.
You can call the following API in Scala and Python respectively to create a KNRM
with pre-trained GloVe word embeddings.
Scala
val knrm = KNRM(text1Length, text2Length, embeddingFile, wordIndex = null, trainEmbed = true, kernelNum = 21, sigma = 0.1, exactSigma = 0.001, targetMode = "ranking")
text1Length
: Sequence length of text1 (query).text2Length
: Sequence length of text2 (doc).embeddingFile
: The path to the word embedding file. Currently only glove.6B.50d.txt, glove.6B.100d.txt, glove.6B.200d.txt, glove.6B.300d.txt, glove.42B.300d.txt, glove.840B.300d.txt are supported. You can download from here.wordIndex
: Map of word (String) and its corresponding index (integer). The index is supposed to start from 1 with 0 reserved for unknown words. During the prediction, if you have words that are not in the wordIndex for the training, you can map them to index 0. Default is null. In this case, all the words in the embeddingFile will be taken into account and you can callWordEmbedding.getWordIndex(embeddingFile)
to retrieve the map.trainEmbed
: Boolean. Whether to train the embedding layer or not. Default is true.kernelNum
: Integer > 1. The number of kernels to use. Default is 21.sigma
: Double. Defines the kernel width, or the range of its softTF count. Default is 0.1.exactSigma
: Double. The sigma used for the kernel that harvests exact matches in the case where RBF mu=1.0. Default is 0.001.targetMode
: String. The target mode of the model. Either 'ranking' or 'classification'. For ranking, the output will be the relevance score between text1 and text2 and you are recommended to use 'rank_hinge' as loss for pairwise training. For classification, the last layer will be sigmoid and the output will be the probability between 0 and 1 indicating whether text1 is related to text2 and you are recommended to use 'binary_crossentropy' as loss for binary classification. Default mode is 'ranking'.
See here for the Scala example that trains a KNRM model on WikiQA dataset.
Python
knrm = KNRM(text1_length, text2_length, embedding_file, word_index=None, train_embed=True, kernel_num=21, sigma=0.1, exact_sigma=0.001, target_mode="ranking")
text1_length
: Sequence length of text1 (query).text2_length
: Sequence length of text2 (doc).embedding_file
: The path to the word embedding file. Currently only glove.6B.50d.txt, glove.6B.100d.txt, glove.6B.200d.txt, glove.6B.300d.txt, glove.42B.300d.txt, glove.840B.300d.txt are supported. You can download from here.word_index
: Dictionary of word (string) and its corresponding index (int). The index is supposed to start from 1 with 0 reserved for unknown words. During the prediction, if you have words that are not in the wordIndex for the training, you can map them to index 0. Default is None. In this case, all the words in the embedding_file will be taken into account and you can callWordEmbedding.get_word_index(embedding_file)
to retrieve the dictionary.train_embed
: Boolean. Whether to train the embedding layer or not. Default is True.kernel_num
: Int > 1. The number of kernels to use. Default is 21.sigma
: Float. Defines the kernel width, or the range of its softTF count. Default is 0.1.exact_sigma
: Float. The sigma used for the kernel that harvests exact matches in the case where RBF mu=1.0. Default is 0.001.target_mode
: String. The target mode of the model. Either 'ranking' or 'classification'. For ranking, the output will be the relevance score between text1 and text2 and you are recommended to use 'rank_hinge' as loss for pairwise training. For classification, the last layer will be sigmoid and the output will be the probability between 0 and 1 indicating whether text1 is related to text2 and you are recommended to use 'binary_crossentropy' as loss for binary classification. Default mode is 'ranking'.
See here for the Python example that trains a KNRM model on WikiQA dataset.
Save Model
After building and training a KNRM model, you can save it for future use.
Scala
knrm.saveModel(path, weightPath = null, overWrite = false)
path
: The path to save the model. Local file system, HDFS and Amazon S3 are supported. HDFS path should be like "hdfs://[host]:[port]/xxx". Amazon S3 path should be like "s3a://bucket/xxx".weightPath
: The path to save weights. Default is null.overWrite
: Whether to overwrite the file if it already exists. Default is false.
Python
knrm.save_model(path, weight_path=None, over_write=False)
path
: The path to save the model. Local file system, HDFS and Amazon S3 are supported. HDFS path should be like 'hdfs://[host]:[port]/xxx'. Amazon S3 path should be like 's3a://bucket/xxx'.weight_path
: The path to save weights. Default is None.over_write
: Whether to overwrite the file if it already exists. Default is False.
Load Model
To load a KNRM model (with weights) saved above:
Scala
KNRM.loadModel(path, weightPath = null)
path
: The path for the pre-defined model. Local file system, HDFS and Amazon S3 are supported. HDFS path should be like "hdfs://[host]:[port]/xxx". Amazon S3 path should be like "s3a://bucket/xxx".weightPath
: The path for pre-trained weights if any. Default is null.
Python
KNRM.load_model(path, weight_path=None)
path
: The path for the pre-defined model. Local file system, HDFS and Amazon S3 are supported. HDFS path should be like 'hdfs://[host]:[port]/xxx'. Amazon S3 path should be like 's3a://bucket/xxx'.weight_path
: The path for pre-trained weights if any. Default is None.


WITNESS LIST Economic Development Committee May 13, 1999-3:00P HB 89 FOR: Skeen, A.F. "Buddy" (McLennan County-Tax Assessor-Collector Assn.), Waco Registering, but not testifying: For: Burson, Janelle (TACA and Bell County), Belton Cornett, Ray (Self), Angleton Gradel, Gary (Tax Assessor-Collector Assn.), Waco McCaghren, Tonya (Self), Angleton HB 792 Registering, but not testifying: For: Pollard, Mike (Texas Assn. of Life & Health Insurers), Austin Vane, Mark (Viaticus), Austin On: Myron, Rhonda (Texas Department of Insurance), Austin HB 969 Registering, but not testifying: For: Barron, Connie (TMA), Austin Davis, Will (Texas Assn. of Life & Health Insurers), Austin Kloster, Jeff (Texas Assn. of Health Plans), Austin Leiferman, Cindy (Advocacy, Inc.), Austin On: Myron, Rhonda (Texas Department of Insurance), Austin HB 1097 Registering, but not testifying: For: McGiffert, Lisa (Self), Austin McPherson, Kim (The Mental Health Assn. in Texas), Austin On: DeLargy, Betty (Texas Health Insurance Risk Pool), Austin Myron, Rhonda (Texas Department of Insurance), Austin HB 1148 Registering, but not testifying: For: Patterson, Jerry (TAHP), Austin On: Ray, Steve (Texas Department of Economic Development), Austin HB 1217 Registering, but not testifying: For: Patterson, Jerry (TAHP), Austin On: Myron, Rhonda (Texas Department of Insurance), Austin HB 1333 Registering, but not testifying: On: Geballe, Leslie (Texas Workforce Commission), Austin HB 1453 Registering, but not testifying: For: Lee, Randy (Stewart Title Guarantee Co.), Austin Rothermal, John (Stewart Title Guarantee Co., Texas Land Title Assn.), San Antonio HB 1822 Registering, but not testifying: For: Johnson, Stan (Stan's Heating & Air Cond., Inc./Tx. Air Cond. Contractors Assn), Austin Jones, Nancy (Texas Air Conditioning Contractors Assn.), Austin HB 1997 Registering, but not testifying: For: Meadows, Mindy (Texas Apartment Assn.), Austin HB 2252 Registering, but not testifying: For: Meadows, Mindy (Texas Apartment Assn.), Austin On: Durden, David (Texas Department of Insurance), Austin HB 2253 Registering, but not testifying: For: Meadows, Mindy (Texas Apartment Assn.), Austin On: Durden, David (Texas Department of Insurance), Austin HB 2337 Registering, but not testifying: For: Neeley, Karen (Independent Bankers Assn. of Texas), Austin Phillips, Shannon (Texas Bankers Assn.), Austin Against: Schneider, Rob (Consumers Union), Austin On: Pettijohn, Leslie (Consumers Union), Austin HB 2338 FOR: Neeley, Karen (Independent Bankers Assn. of Texas), Austin AGAINST: Schneider, Rob (Consumers Union), Austin ON: Pettijohn, Leslie (Consumer Credit Commissioner), Austin Registering, but not testifying: For: Phillips, Shannon (Texas Bankers Assn.), Austin HB 2424 Registering, but not testifying: For: Barron, Connie (TMA), Austin On: Myron, Rhonda (Texas Department of Insurance), Austin HB 2495 Registering, but not testifying: For: Barron, Connie (TMA), Austin Gonzales, David (Legend Pharmacies S.W.), Austin Leiferman, Cynthia (Advocacy, Inc.), Austin McGiffert, Lisa (Consumers Union), Austin McPherson, Kim (The Mental Health Assn. in Texas), Austin Against: Kloster, Jeff (Tx. Assn. of Health Plans), Austin Patterson, Jerry (TAHP), Austin Roy, Tom (Harris Methodist Health Plan), Weatherford On: Myron, Rhonda (Texas Department of Insurance), Austin HB 2511 Registering, but not testifying: On: McAnally, Scott (Research & Oversight Council on Workers' Comp.), Austin HB 2513 Registering, but not testifying: For: Simpson, Dee (American Federation of State Munic. Empl., AFL-CIO), Austin On: McAnally, Scott (Research & Oversight Council on Workers' Comp.), Austin HB 2514 Registering, but not testifying: For: Cobb, Ron (American Ins. Assn.), Austin Simpson, Dee (American Federation of State County Munic. Employ., AFL-CIO), Austin On: McAnallly, Scott (Research & Oversight Council on Workers' Comp.), Austin HB 2655 Registering, but not testifying: For: Ross, Lisa (Automotive Service Professionals of Texas), Austin HB 2711 Registering, but not testifying: On: Brady, Kevin (Texas Department of Insurance), Austin HB 2915 Registering, but not testifying: On: Fernandez, Mike (Texas Workforce Commission), Austin HB 3034 Registering, but not testifying: For: Igo, Shanna (Texas Municipal League), Austin Mendez, Mark (Tarrant County Commissioners Court), Fort Worth Oneacre, Amanda (Greater Dallas Chamber), Dallas On: Wilson, Dan (Comptrollers Property Tax Div.), Austin HB 3177 Registering, but not testifying: On: Brady, Kevin (Texas Department of Insurance), Austin HB 3189 FOR: Bryant, Dennis (Self), McKinney Brye, Gary (City of University Park Pollice), West University Dixon, Bob (City of University Park), Dallas Fant, Darrell (Highland Park Department of Public Safety), Highland Park Livingston, Bob (City of University Park), University Park Patterson, L.A.(George) (Town of Highland Park), Highland Park Reed, Malcolm (Self), Irving Touchstone, Gifford (Town of Highland Park (Mayor)), Highland Park Young, Henry (DeSoto Fire Dept.), DeSoto AGAINST: Brodwax, William (City of DeSoto), DeSoto Price, Chief Chris (Memorial Villages Police), Houston Rozier, Richard (City of DeSoto (Mayor)), DeSoto Registering, but not testifying: Against: Igo, Shanna (TML), Austin On: Davis, Mike (Tx. Dept. Insurance), Austin HB 3304 Registering, but not testifying: For: Burner, Burnie (Long, Burner, Parks), Austin Davis, Will (Texas Assn. of Life & Health Insurers), Austin On: Brady, Kevin (Texas Department of Insurance), Austin HB 3431 Registering, but not testifying: On: Curry, Ron (Texas Council on Workforce and Economic Competiveness), Austin Johnson, Claire (Texas Council on Workforce & Economic Competiveness), Austin HB 3480 Registering, but not testifying: On: Geballe, Leslie (TWC), Austin


The following four questions are about the most recent College Board Trends in Student Aid publication 4 [9.11.147].


MESSAGE IN A BOTTLE (Warner Bros.) Starring: Kevin Costner, Robin Wright Penn, Paul Newman, Illeana Douglas. Screenplay: Gerald DiPego, based on the novel by Nicholas Sparks. Producers: Denise Di Novi, Jim Wilson and Kevin Costner. Director: Luis Mandoki.  Reviewed by Scott Renshaw.
Twenty-five years ago, Paul Newman would have played Garret Blake, the grieving, laconic hero of Nicholas Sparks' best-selling novel MESSAGE IN A BOTTLE. He would have brought the ideal combination of elements to the role of a shipbuilder whose sea-borne messages to his dead wife are found by Chicago newspaper researcher Theresa Osborne (Robin Wright Penn), compelling her to seek out the author of the sensitive missives. You can imagine Newman both as a man's man -- a loner dedicated to his craft -- and a ladies' man -- deeply sensitive when touched by the love of a good woman. That's the kind of screen presence you need when you're dealing with one of these mythically appealing romances like THE BRIDGES OF MADISON COUNTY or THE HORSE WHISPERER. You need a Clint Eastwood, or a Robert Redford...or a Paul Newman.
In 1998, you get Paul Newman playing Garret's father Dodge, and as Garret you get...Kevin Costner. Costner has always been at his best in roles where her could be easygoing (SILVERADO, BULL DURHAM, TIN CUP), while his attempts at playing icons (THE UNTOUCHABLES, WATERWORLD, THE POSTMAN) could be most charitably described as uneven. Yet here he is in MESSAGE IN A BOTTLE, playing the emotionally unavailable but romantically irresistable Garret. He's the kind of guy who loves too deeply, whose gestures of self-sacrifice are the stuff of song and story. It's Costner once again as the paradigm, the icon, and I for one didn't believe him for a second.
To be fair, Costner isn't the only thing wrong with MESSAGE IN A BOTTLE. Director Luis Mandoki's adaptation is a technically glorious piece of work -- beautifully photographed by Caleb Deschanel, sweepingly scored by Gabriel Yared -- but it's one heck of a long sit, clocking in at a soggy two hours and fifteen minutes. The storyline parallels Theresa's emergence from emotional isolation after a difficult divorce with Garret's difficulties letting go of his wife, and does so in fetishistic detail. There's a subplot involving Garret's conflict with his embittered in-laws, and the occasional tete-a-tete between Dodge and Garret or between Dodge and Theresa, all building with a gruelling lack of tension to one big cathartic payoff. You may leave the theater with your hanky wet, but it could be from the drool that collects while you nod off to sleep just as easily as from tears.
Lost at sea along the way are extremely effective performances by Robin Wright Penn and Paul Newman. Wright Penn is an actress we don't see very much, which allows her still to be an actress in a role like this rather than a movie star. Her conflicted pursuit of Garret -- a man whose letters should have told her from the start isn't ready to love anyone else -- is convincing in context; her moments of insecurity and disappointment are genuinely affecting. Newman, meanwhile, gets to be gruff in a way that usually turns actors into hams, but turns this veteran into a breath of fresh air. He's so effortlessly charming, it's easy to forget the Harlequin sensibility at the heart of MESSAGE IN A BOTTLE and begin enjoying it as human relationship drama.
Costner, too, can be effortlessly charming, but not here. His interpretation of the role is so focused on Garret's internalized mourning that in the moments when he's supposed to be letting go with Theresa, he looks like a man trying to act like a grieving man trying to be effortlessly charming. If that reads awkwardly, it plays even more awkwardly, with Costner straining for Meaning and Significance in every scene while his leading lady acts circles around him. MESSAGE IN A BOTTLE undoubtedly will have its sob appeal, just as the novel did. Unlike the film adaptations of THE BRIDGES OF MADISON COUNTY and THE HORSE WHISPERER, that's the main thing this one has going for it. It's too bad it couldn't have been made twenty-five years ago, when Paul Newman hadn't yet handed over the iconic roles to actors ill-suited to handling them.
On the Renshaw scale of 0 to 10 empty bottles: 5.
Visit Scott Renshaw's Screening Room http://www.inconnect.com/~renshaw/ *** Subscribe to receive new reviews directly by email! See the Screening Room for details, or reply to this message with subject "Subscribe".
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


--- layout: post status: publish published: true title: New Reading author: display_name: Tomas Restrepo login: tomasr email<EMAIL_ADDRESS>url: http://winterdom.com/ author_login: tomasr author_email<EMAIL_ADDRESS>author_url: http://winterdom.com/ wordpress_id: 549 wordpress_url: http://winterdom.com/2003/11/newreading date: '2003-11-06 18:33:33 +0000' date_gmt: '2003-11-06 18:33:33 +0000' categories: - Personal tags: [] comments: [] ---
I've been doing a bit of reading over the past couple of months, mostly literature (as opposed to technical books). Since my birthday, I've read Lord of the Rings III, Jan Guillou's Cruzades Trilogy part I, Colleen McCullough's Song of Troy, Stephen R. Lawhead's Merlin, and I'm currently going through Gore Vidal's The Golden Age.
I also started reading yesterday Steve McConnell's Professional Software Development book, courtesy of a good friend. It's quite entertaining, and I've found myself agreeing with quite a bit of what Steve points out in the early chapters.
I also got my copy of "The C# Programming Language" today, so it's another one to read soon.


Defines HTML in the right corner of the toolbar.
String, default = ''
If you set .right property it will appear in the right corner of the toolbar. You can also render buttons
in the right corner of the toolbar if you add a toolbar item of type = spacer. If you add a spacer, all
following toolbar items will be aligned to the right.
You can defined it during object creation:
Or any time during run-time:


I've spent a little time and prepared a script which will;
- copy your emoncms feed data and obtain a dump of your emoncms MYSQL database
- create a datestamped tar.gz compressed archive of the data
- upload the archive to your Dropbox cloud account
- each time the script is run, it will delete both local and cloud archives which are older that 7 days (number of days can be changed in script)
I've now uploaded the script to Github if anyone would like to try it, and as always any feedback would be appreciated.
This script hasn't been tested on an emonpi!
DISK SPACE! You will need sufficient free disk space to use this script, as it will need at least the size of your total feed size free PLUS the space occupied by each archive. So for example;
Total feed size (calculated from your feeds page) is 50Mb, so you would need 50Mb free disk space plus 12.5Mb for each archive (each archive is about 25% the size of the feed data). If you are storing 7 days of archives, then you would need in total, 150Mb of writeable free disk space. As archives will be weeded after 7 days, no additional disk space will be needed thereafter.
Paul
Edit 15/4/2016 - Updated version now added to git - see below
Re: Emoncms 'cloud' backup to Dropbox - Updated 23/4
Hi Paul,
Tried your script. I have a file in my dropbox emoncms-2016-04-05_173205.tar.gz
The only thing that I can report is I had the following message presumably because I am not using emonhub:-
Setup completed!
emonhub: unrecognized service
emonhub: unrecognized service
tar: Removing leading `/' from member names
Regards,
Ian
Re: Emoncms 'cloud' backup to Dropbox - Updated 23/4
The reason why you are getting that error is because the script attempts to momentarily stop emonhub, to ensure that when the data directories are copied while they are not being updated by emonhub.
The first error is when it tries to stop it, and the second when it tries to start it again.
You could always comment out the references to emonhub, ie;
# sudo service emonhub stop
# sudo service emonhub start
I'm open to suggestions of how best to handle this, as data could also be written to the data folders via MQTT.
Also, I've found a typo in the script which prevented the weeding of old archives and have just updated it.
Probably the easiest way to update is just delete the dropbox-archive directory, and git clone it again, (add your emoncms password to dropbox_filemanager.sh again).
You won't have to authorize the script with Dropbox again, as the script has already saved the authorization in a hidden file, saved at /home/pi/.dropbox_uploader
I've also added an option (disabled by default) to backup node-red flows, credentials and configuration. To activate it, just select (Y)es in the configuration section of dropbox_filemanager.sh
Paul
Edit 15/4/2016 - now fixed
Re: Emoncms 'cloud' backup to Dropbox - Updated 23/4
Hi Paul
As I am not using emonhub do I need a way of stopping data being posted during the backup run or is it not likely to be an issue.
Regards
Ian
Re: Emoncms 'cloud' backup to Dropbox - Updated 23/4
Hi Ian
You may have seen my other recent post regarding this issue, and to try and overcome the possibility of a corrupted archive, I've found a solution, which doesn't involve stopping services, yet will secure a snapshot of the emoncms data.
I'm going to rewrite the script in php (if I can!), but it may take a week or so to complete.
Paul
Re: Emoncms 'cloud' backup to Dropbox - Updated 23/4
I'm open to suggestions of how best to handle this, as data could also be written to the data folders via MQTT.
Hi Paul,
Here's some info about a method to determine, via a bash script, whether or not a process is running.
Perhaps the logic flow can be of some help if/when you rewrite the script.
Re: Emoncms 'cloud' backup to Dropbox - Updated 23/4
Thanks Bill, I've now found a way to get the feeds data without stopping any of the services, which seems the safest and most resilient option.
I'll update this thread when I've updated the github repo.
Re: Emoncms 'cloud' backup to Dropbox - Updated 23/4
Sounds good! Looking forward to seeing what you've come up with.
Re: Emoncms 'cloud' backup to Dropbox - Updated 23/4
I've just updated git with a new version, which should deal with the issue described by Ian.
The main changes are;
I've been testing the new version for over 3 days now, running the script every 30 minutes via node-red, so have created almost 150 archives, which were automatically weeded after 12 hours. All of the archives were checked for consistency of file size, and have used 5 archives chosen at random to perform full backups onto a 2nd pi, all of which were successful for both emoncms & node-red. Just remember to check the file ownership when using the backups, ie $chown -R pi:pi .node-red (same for emoncms data directories).
Each backup comprised of 29 emoncms feeds, MYSQL dump and the essential node-red files, and was just over 60Mb in size, but was compressed before uploading to just 13Mb.
To update from the previous version, delete the original installation directory, and git clone the latest version as per the readme. (you won't have to re-authorize your dropbox API).
Paul
Re: Emoncms 'cloud' backup to Dropbox - Updated 23/4
Hi,
Thank you for sharing your code, though I am having issues with backing up. At the end of the script, i get the following:
Dumping MYSQL data
Backing up node-red data
An error has occurred, details:tar-based phar "/home/pi/dropbox-archive/backups/archive.tar" cannot be created, contents of file "phpfina/44.dat" could not be written Checking for expired archives...
Uploading new archive to Dropbox, this may take a while...
find: `*.gz': No such file or directory
I presume there is a permissions issue?
Kind Regards,
Dave
Re: Emoncms 'cloud' backup to Dropbox - Updated 23/4
I presume there is a permissions issue?
Doubtful as the script will be running as Root. Can you check how much free space you have left on your pi pls;
Also, from your feeds page, can you tell me what is reported when you 'Refresh Feed Size'.
Paul
Re: Emoncms 'cloud' backup to Dropbox - Updated 23/4
Hi Paul,
the output is:
Kind Regards,
Dave
Re: Emoncms 'cloud' backup to Dropbox - Updated 23/4
Hi Dave
As I said in my first post,it hasn't been tested on an emonpi (as I don't have one).
Presumably, you've installed the script in your writeable /home/pi/data directory which shows that you have 119Mb free.
I don't know how large your feed data is (check by running 'Refresh Feed Size' from your feeds page), but the script will need at least that amount of free space to create the archive PLUS enough space to store the archives locally (which compressed are about a quarter of the size of the feed data each).
So if your feed data size is 100Mb, you would need approx 125Mb free to create the first archive, and an additional 25Mb for each archive.
If you were keeping 7 days worth of archives, then you would need 300Mb of free space. After 7 days, the older archives are weeded, so won't increase further thereafter.
Does this appear to be the issue? If so, it's a shame that you've 1.4G unused in your root partition.
It will probably be a good idea for me to add something in my first post to check for free space before installing...
Paul
Re: Emoncms 'cloud' backup to Dropbox - Updated 23/4
Dropbox changed it's API format 2 days which caused the script to fail.
I've now updated the script in Github, and it's back working!
Paul
Re: Emoncms 'cloud' backup to Dropbox - Updated 23/4
Still working well! 7 days worth of emoncms & nodered archives safely stored in Dropbox. Archives older than 7 days are automatically weeded.


Class Key
Keys Controller This is a basic Key Management REST controller to make and delete keys
- CI_Controller
- REST_Controller
- Key
Package: CodeIgniter\Rest
Category: Controller
License: MIT
Author: Phil Sturgeon, Chris Kacerguis
Link: https://github.com/chriskacerguis/codeigniter-restserver
Located at controllers/api/Key.php
Category: Controller
License: MIT
Author: Phil Sturgeon, Chris Kacerguis
Link: https://github.com/chriskacerguis/codeigniter-restserver
Located at controllers/api/Key.php
public
|
|
public
|
|
public
|
|
public
|
|
public
|
protected
array
|
$methods
Defines the list of method properties such as limit, log and level |
#
[
'index_put' => ['level' => 10, 'limit' => 10],
'index_delete' => ['level' => 10],
'level_post' => ['level' => 10],
'regenerate_post' => ['level' => 10],
]
|
$_allow,
$_apiuser,
$_args,
$_delete_args,
$_enable_xss,
$_end_rtime,
$_get_args,
$_head_args,
$_insert_id,
$_options_args,
$_patch_args,
$_post_args,
$_put_args,
$_query_args,
$_start_rtime,
$_supported_formats,
$_user_ldap_dn,
$allowed_http_methods,
$http_status_codes,
$request,
$response,
$rest,
$rest_format
|


//rack.pub
Blogger API - Basic Browser Integration with Javascript
Click button to load results
Load Results


The combustion of g of an unknown organic compound containing only carbon, hydrogen and oxygen produced g mol CO2 and g mol H2O.


I am taking this class with Epicodus because I was curious about how programming works. Although I wouldn't mind a career change, I don't see myself pursuing this field seriously. I was a Peace Corps volunteer in Ukraine for 3 years and lived in New York for 4 before moving to Chicago. Outside of this class I work as a translator from Ukrainian to English, mostly doing literature and, weirdly, art history. Before COVID-19 struck, I was working in pastry at Floriole, a French bakery here in the city. If I lived in Portland, I would like to get a job at Ken's!

Gosh you're annoying. Want some oatmeal?
This page was practice working with Markdown.
This was the first webpage I made using html more or less on my own.
This html page tells you why you might wish you had voted for Shundar Lin for the Metropolitan Water Reclamation Board on election day in Cook County, IL. If I remember correctly, it was for practicing making lists and using inline elements.
This is a boring lecture in Latin about cheese crackers. It was useful for practicing adding links and photos, and later for learning about divs and spans. It was also the first time we used lorem ipsum. The page uses html.
If I remember correctly, this blog doesn't talk about much. I think it was to practice using divs and spans. The page uses html. The page was supposed to use the box model, but I never got around to it.
Besides the delicious cupcakes, the most important thing about this project was learning how to use CSS to apply different styles to our html.
This was just my first attempt (not quite complete) at putting my résumé online. The two things I learned how to do for this project were use html code to include an n-dash (–) and use an inline class to make the dates float to the right. The page uses html.
This project was a bit tricky. My partner and I were working on using floats, divs, and spans, but we ran into a problem where our boxes were overlapping and the floats kept getting screwed up. Ben helped us fix it by showing us the trick of outlining all elements in red so we could see what was going on. In the end we used some flex wraps. We also added some media queries to the end. The page uses html.
This was a really big project for me and my partner. First it taught us how to use Bootstrap styles. After we stylized it, we were able to add column and row classes to make things fall into line. The page uses html.
My partner and I made this site to increase tourism to Macedonia, a country I've never visited. This was where we practiced using bootstrap on our own, especially helper classes. The page uses html.


Copyright © 2009–2018 Institute of Mathematics and Computer Science, University of Latvia. All rights reserved.


Statistics
Mean
Introduce the numbers to analyze
Calculate Mean
Median
Introduce the numbers to analyze
Calculate Median
Mode
Introduce the numbers to analyze
Calculate Mode


(PECL ps >= 1.1.0)
ps_findfont — Loads a font
$psdoc
, string $fontname
, string $encoding
[, bool $embed
= FALSE
] ) : intLoads a font for later use. Before text is output with a loaded font it must be set with ps_setfont(). This function needs the adobe font metric file in order to calculate the space used up by the characters. A font which is loaded within a page will only be available on that page. Fonts which are to be used in the complete document have to be loaded before the first call of ps_begin_page(). Calling ps_findfont() between pages will make that font available for all following pages.
The name of the afm file must be
fontname
.afm. If the font
shall be embedded the file
fontname
.pfb containing
the font outline must be present as well.
Calling ps_findfont() before the first page requires to output the postscript header which includes the BoundingBox for the whole document. Usually the BoundingBox is set with the first call of ps_begin_page() which now comes after ps_findfont(). Consequently the BoundingBox has not been set and a warning will be issued when ps_findfont() is called. In order to prevent this situation, one should call ps_set_parameter() to set the BoundingBox before ps_findfont() is called.
psdoc
Resource identifier of the postscript file as returned by ps_new().
fontname
The name of the font.
encoding
ps_findfont() will try to load the file passed in
the parameter encoding
. Encoding files are of
the same syntax as those used by dvips(1). They
contain a font encoding vector (which is currently not used but must be
present) and a list of extra ligatures to extend the list of ligatures
derived from the afm file.
encoding
can be NULL
or the empty string if
the default encoding (TeXBase1) shall be used.
If the encoding is set to builtin then there will be no reencoding and the font specific encoding will be used. This is very useful with symbol fonts.
embed
If set to a value >0 the font will be embedded into the document. This requires the font outline (.pfb file) to be present.
Returns the identifier of the font or zero in case of an error. The identifier is a positive number.


To create a free Lets Create account, you will need a valid email address. This address will only be used to send your signup link.


One dead, one transported in crash near Grand and Missouri avenues
by abc15.com staffGLENDALE, AZ — One woman is dead and a pregnant woman is hospitalized after a crash in Glendale Tuesday morning.
According to Glendale police officials, two vehicles were involved in the crash near Grand and Missouri avenues after 6:30 a.m.
Police say a woman was pronounced dead at the scene. A second woman, who is said to be pregnant, was taken to the hospital with unknown injuries.
Grand Avenue is expected to be shut down for several hours for the investigation. The Arizona Department of Transportation says restrictions are between 51st and 43rd avenues.
There is no word yet on what caused the crash.


Monday
11 am - 8 pm
Tuesday
11 am - 8 pm
Wednesday
11 am - 8 pm
Thursday
11 am - 9 pm
Friday
11 am - 9 pm
Saturday
9 am - 9 pm
Sunday
9 am - 8 pm
Join us for breakfast on Saturday and Sunday 9 am - 2 pm
3051 Nutley St, Fairfax, VA 22031
(703) 560-9322
panam@panam.com


--- layout: post permalink: 1010talk.html Tags: Array NameOfCoupon: 1010 Talk Cash Back Summary: See our 1010 Talk Coupon Code, 1010 Talk Rebate, 1010 Talk Promo Code, 1010 Talk Discount, 1010 Talk Coupon Cash Back Rebate here. MetaKeywords: 1010 Talk Coupon Code, 1010 Talk Rebate, 1010 Talk Promo Code, 1010 Talk Cash Back Rebate, 1010 Talk Discount, 1010 Talk Coupon Image: images/30808.jpg LinkURL: http://www.shareasale.com/r.cfm?b=277545&u=412002&m=30808 affiliate_url_link: http://www.icouponblog.com/jane.php?id=9158 thesis_readmore: See the 1010 Talk Coupon thesis_thumb: http://www.icouponblog.com/tn.php?merchantURL=1010talk.com Title: Save 7.50% - 1010 Talk Coupon Code for 1010talk.com. 1010 Talk Rebate & Discount thesis_description: Our 1010 Talk Discount Coupon Code for 1010talk.com. We have the best 1010 Talk Rebate anywhere. thesis_keywords: 1010 Talk, 1010 Talk Coupon Code, 1010 Talk Discount, 1010 Talk Rebate product_name: 1010 Talk hop_url: http://www.icouponblog.com/hop.php?id=9158 ---
Where you born with a phone in each hand? Do you love to talk for hours, nationally and internationally but are hefty phone bills driving you crazy? Switch to 1010 Talk. It is a VoIP phone service that offers the lowest rates available for US and International calling, free voicemail and voicemail to email, and a number of other calling features. Visit www.1010talk.com. Choose from a variety of plans that suit you and your wallet. Get unlimited incoming calls. Check it out today. Use our discount coupons to get a great deal on a great product!
www.1010talk.com is a great VOIP phone service that is low priced and will also save you tons of money. You will no longer have to pay hefty phone bills. For just $10 a month, you can make unlimited calls to the U.S and Canada 24/7 under VOIP Domestic Unlimited Plans. Or for just $20 a month, call 65 countries free. If you are a business owner you can also benefit from VOIP business. Check it out today and you will love www.1010talk.com.
The days of paying an arm and a leg for phone bills are over. Talk your heart out at anytime here in the U.S, Canada or to 65 other countries, all for the lowest monthly fee available with www.1010talk.com. Get pinless plans, global forwarding and lots of features with www.1010talk.com. You will love www.1010talk.com and our coupons will give you great discounts.


The following list can be rearranged with drag'n'drop by just specifying the kendo-sortable attribute on the list tag.
kendo-sortable


View Page
BNO
Title
Title text here.


[§9-7] Requirement for artists receiving an individual artist fellowship. Each artist who, after meeting the qualifications set out in section 9-6, receives an individual artist fellowship from the foundation, is required to hold an exhibition or give a performance for the benefit of the people of Hawaii. [L 1993, c 133, pt of §1]