CL-ODATA-CLIENT is a Common Lisp client for accessing ODATA services.
| • Intro | ||
| • Installation | ||
| • Usage | ||
| • CL-ODATA-CLIENT Basic Tutorial | ||
| • API | ||
| • Index |
Next: Installation, Previous: Top, Up: Top [Contents][Index]
CL-ODATA-CLIENT is a Common Lisp client for accessing ODATA services.
Next: CL-ODATA-CLIENT Basic Tutorial, Previous: Installation, Up: Top [Contents][Index]
This is CL-ODATA-CLIENT version of TripPin tutorial. See the original tutorial at: https://www.odata.org/getting-started/basic-tutorial/
The tutorial uses a sample service called TripPin based on OData V4. Generally speaking, TripPin provides a service that can manage people’s trips. The service is designed for below purposes:
Build a service that will cover as many features for OData V4 as possible. Build a more real world service, and will use it to build an end-to-end ecosystem. Make a service reference for developers to follow when they try to build an OData service.
https://services.odata.org/V4/TripPinServiceRW
| • Introduction | ||
| • Requesting Data | ||
| • Requesting an Individual Entity by ID | ||
| • Requesting an Individual Property | ||
| • Querying Data | ||
| • Data Modification | ||
| • Entities |
Next: Requesting Data, Up: CL-ODATA-CLIENT Basic Tutorial [Contents][Index]
The Open Data Protocol (OData) is a data access protocol built on core protocols like HTTP and commonly accepted methodologies like REST for the web. There are various kinds of libraries and tools can be used to consume OData services. But for beginners and those who want to write their own libraries, the pure HTTP requests and responses are also very important. This documentation will not cover every feature details for OData V4 services but will try to cover various typical scenarios. If you want to have a more detailed understanding, please refer to OData Documentation.
We start by defining a package:
(defpackage :odata.trip-pin (:use :cl :odata-client :odata/lang :arrows :access)) (in-package :odata.trip-pin)
and declaring the service urls:
(defparameter +trip-pin-base+ "https://services.odata.org/V4/TripPinServiceRW")
TripPin services uses a special url for read/write, so we get that:
(defparameter +trip-pin-modify+
(multiple-value-bind (response status headers modify-url)
(drakma:http-request +trip-pin-base+)
(quri:uri (princ-to-string modify-url))))
Next: Requesting an Individual Entity by ID, Previous: Introduction, Up: CL-ODATA-CLIENT Basic Tutorial [Contents][Index]
OData services support requests for data via HTTP GET requests.
| • Requesting Entity Collections |
Up: Requesting Data [Contents][Index]
The request below returns the the collection of Person People.
(-> +trip-pin-modify+
(collection "People")
(fetch :collection))
(((:odata-id . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/People('russellwhyte')") (:odata-etag . "W/\"08D7983E303B2043\"") (:odata-edit-link . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/People('russellwhyte')") (:user-name . "russellwhyte") (:first-name . "Russell") (:last-name . "Whyte") (:emails<EMAIL_ADDRESS><EMAIL_ADDRESS>(:address-info ((:address . "187 Suffolk Ln.") (:city (:country-region . "United States") (:name . "Boise") (:region . "ID")))) (:gender . "Male") (:concurrency .<PHONE_NUMBER>60790083)) ((:odata-id . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/People('scottketchum')") (:odata-etag . "W/\"08D7983E303B2043\"") (:odata-edit-link . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/People('scottketchum')") (:user-name . "scottketchum") (:first-name . "Scott") (:last-name . "Ketchum") (:emails<EMAIL_ADDRESS>(:address-info ((:address . "2817 Milton Dr.") (:city (:country-region . "United States") (:name . "Albuquerque") (:region . "NM")))) (:gender . "Male") (:concurrency .<PHONE_NUMBER>60790083)) ((:odata-id . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/People('ronaldmundy')") (:odata-etag . "W/\"08D7983E303B2043\"") (:odata-edit-link . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/People('ronaldmundy')") (:user-name . "ronaldmundy") (:first-name . "Ronald") (:last-name . "Mundy") (:emails<EMAIL_ADDRESS><EMAIL_ADDRESS>(:address-info) (:gender . "Male") (:concurrency .<PHONE_NUMBER>60790083)) ((:odata-id . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/People('javieralfred')") (:odata-etag . "W/\"08D7983E303B2043\"") (:odata-edit-link . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/People('javieralfred')") (:user-name . "javieralfred") (:first-name . "Javier") (:last-name . "Alfred") (:emails<EMAIL_ADDRESS><EMAIL_ADDRESS>(:address-info ((:address . "89 Jefferson Way Suite 2") (:city (:country-region . "United States") (:name . "Portland") (:region . "WA")))) (:gender . "Male") (:concurrency .<PHONE_NUMBER>60790083)) ((:odata-id . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/People('willieashmore')") (:odata-etag . "W/\"08D7983E303B2043\"") (:odata-edit-link . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/People('willieashmore')") (:user-name . "willieashmore") (:first-name . "Willie") (:last-name . "Ashmore") (:emails<EMAIL_ADDRESS><EMAIL_ADDRESS>(:address-info) (:gender . "Male") (:concurrency .<PHONE_NUMBER>60790083)) ((:odata-id . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/People('vincentcalabrese')") (:odata-etag . "W/\"08D7983E303B2043\"") (:odata-edit-link . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/People('vincentcalabrese')") (:user-name . "vincentcalabrese") (:first-name . "Vincent") (:last-name . "Calabrese") (:emails<EMAIL_ADDRESS><EMAIL_ADDRESS>(:address-info ((:address . "55 Grizzly Peak Rd.") (:city (:country-region . "United States") (:name . "Butte") (:region . "MT")))) (:gender . "Male") (:concurrency .<PHONE_NUMBER>60790083)) ((:odata-id . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/People('clydeguess')") (:odata-etag . "W/\"08D7983E303B2043\"") (:odata-edit-link . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/People('clydeguess')") (:user-name . "clydeguess") (:first-name . "Clyde") (:last-name . "Guess") (:emails<EMAIL_ADDRESS>(:address-info) (:gender . "Male") (:concurrency .<PHONE_NUMBER>60790083)) ((:odata-id . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/People('keithpinckney')") (:odata-etag . "W/\"08D7983E303B2043\"") (:odata-edit-link . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/People('keithpinckney')") (:user-name . "keithpinckney") (:first-name . "Keith") (:last-name . "Pinckney") (:emails<EMAIL_ADDRESS><EMAIL_ADDRESS>(:address-info) (:gender . "Male") (:concurrency .<PHONE_NUMBER>60790083)))
Next: Requesting an Individual Property, Previous: Requesting Data, Up: CL-ODATA-CLIENT Basic Tutorial [Contents][Index]
The request below returns an individual entity of type Person by the given UserName "russellwhyte"
(-> +trip-pin-modify+
(collection "People")
(id "russellwhyte")
(fetch))
((:odata-context . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/$metadata#People/$entity") (:odata-id . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/People('russellwhyte')") (:odata-etag . "W/\"08D7983E303B2043\"") (:odata-edit-link . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/People('russellwhyte')") (:user-name . "russellwhyte") (:first-name . "Russell") (:last-name . "Whyte") (:emails<EMAIL_ADDRESS><EMAIL_ADDRESS>(:address-info ((:address . "187 Suffolk Ln.") (:city (:country-region . "United States") (:name . "Boise") (:region . "ID")))) (:gender . "Male") (:concurrency .<PHONE_NUMBER>60790083))
Next: Querying Data, Previous: Requesting an Individual Entity by ID, Up: CL-ODATA-CLIENT Basic Tutorial [Contents][Index]
To address an entity property clients append a path segment containing property name to the URL of the entity. If the property has a complex type, properties of that value can be addressed by further property name composition. First let’s take a look at how to get a simple property. The request below returns the Name property of an Airport.
(-> +trip-pin-modify+
(collection "Airports")
(id "KSFO")
(property "Name")
(fetch :value))
"San Francisco International Airport"
Then let’s see how to get a property value of a complex type. The request below returns the Address of the complex type Location in an Airport.
(-> +trip-pin-modify+
(collection "Airports")
(id "KSFO")
(property "Location")
(property "Address")
(fetch :value))
"South McDonnell Road, San Francisco, CA 94128"
Next: Data Modification, Previous: Requesting an Individual Property, Up: CL-ODATA-CLIENT Basic Tutorial [Contents][Index]
OData supports various kinds of query options for querying data. This section will help you go through the common scenarios for these query options. System Query Option $filter
The $filter system query option allows clients to filter a collection of resources that are addressed by a request URL. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response.
Next: Filter on Complex Type, Up: Querying Data [Contents][Index]
There are several kinds of basic predicates and built-in functions for $filter, including logical operators and arithmetic operators. For more detailed information, please refer to OData V4 URL Conventions Document. The request below using $filter to get people with FirstName "Scott".
Just use raw expressions as $filter input.
(-> +trip-pin-modify+
(collection "People")
($filter "FirstName eq 'Scott'")
(fetch :collection))
(((:odata-id . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/People('scottketchum')") (:odata-etag . "W/\"08D7983E303B2043\"") (:odata-edit-link . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/People('scottketchum')") (:user-name . "scottketchum") (:first-name . "Scott") (:last-name . "Ketchum") (:emails<EMAIL_ADDRESS>(:address-info ((:address . "2817 Milton Dr.") (:city (:country-region . "United States") (:name . "Albuquerque") (:region . "NM")))) (:gender . "Male") (:concurrency .<PHONE_NUMBER>60790083)))
Or Lisp based expressions:
(-> +trip-pin-modify+
(collection "People")
($filter '(:= "FirstName" "Scott"))
(fetch :collection))
(((:odata-id . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/People('scottketchum')") (:odata-etag . "W/\"08D7983E303B2043\"") (:odata-edit-link . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/People('scottketchum')") (:user-name . "scottketchum") (:first-name . "Scott") (:last-name . "Ketchum") (:emails<EMAIL_ADDRESS>(:address-info ((:address . "2817 Milton Dr.") (:city (:country-region . "United States") (:name . "Albuquerque") (:region . "NM")))) (:gender . "Male") (:concurrency .<PHONE_NUMBER>60790083)))
Next: Filter on Enum Properties, Previous: Basic predicates built-in functions, Up: Querying Data [Contents][Index]
$filter can also work on complex type. The request below returns airports with "San Francisco" contained in its Address. And Address is property of complex type Location.
(-> +trip-pin-modify+
(collection "Airports")
($filter "contains(Location/Address, 'San Francisco')")
(fetch :collection))
(((:odata-id . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/Airports('KSFO')") (:odata-edit-link . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/Airports('KSFO')") (:icao-code . "KSFO") (:name . "San Francisco International Airport") (:iata-code . "SFO") (:location (:address . "South McDonnell Road, San Francisco, CA 94128") (:city (:country-region . "United States") (:name . "San Francisco") (:region . "California")) (:loc (:type . "Point") (:coordinates -122.374725 37.61889) (:crs (:type . "name") (:properties (:name . "EPSG:4326")))))))
(-> +trip-pin-modify+
(collection "Airports")
($filter '(:contains "Location/Address" "San Francisco"))
(fetch :collection))
(((:odata-id . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/Airports('KSFO')") (:odata-edit-link . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/Airports('KSFO')") (:icao-code . "KSFO") (:name . "San Francisco International Airport") (:iata-code . "SFO") (:location (:address . "South McDonnell Road, San Francisco, CA 94128") (:city (:country-region . "United States") (:name . "San Francisco") (:region . "California")) (:loc (:type . "Point") (:coordinates -122.374725 37.61889) (:crs (:type . "name") (:properties (:name . "EPSG:4326")))))))
Next: System Query Option $orderby, Previous: Filter on Complex Type, Up: Querying Data [Contents][Index]
The request below returns all female People of entity type Person. The Gender is a property of Enum type.
(-> +trip-pin-modify+
(collection "People")
($filter `(:eq "Gender" ,+person-gender/female+))
(fetch :collection))
(((:odata-id . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/People('elainestewart')") (:odata-etag . "W/\"08D7983E303B2043\"") (:odata-edit-link . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/People('elainestewart')") (:user-name . "elainestewart") (:first-name . "Elaine") (:last-name . "Stewart") (:emails<EMAIL_ADDRESS><EMAIL_ADDRESS>(:address-info) (:gender . "Female") (:concurrency .<PHONE_NUMBER>60790083)) ((:odata-id . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/People('salliesampson')") (:odata-etag . "W/\"08D7983E303B2043\"") (:odata-edit-link . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/People('salliesampson')") (:user-name . "salliesampson") (:first-name . "Sallie") (:last-name . "Sampson") (:emails<EMAIL_ADDRESS><EMAIL_ADDRESS>(:address-info ((:address . "87 Polk St. Suite 5") (:city (:country-region . "United States") (:name . "San Francisco") (:region . "CA"))) ((:address . "89 Chiaroscuro Rd.") (:city (:country-region . "United States") (:name . "Portland") (:region . "OR")))) (:gender . "Female") (:concurrency .<PHONE_NUMBER>60790083)) ((:odata-id . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/People('jonirosales')") (:odata-etag . "W/\"08D7983E303B2043\"") (:odata-edit-link . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/People('jonirosales')") (:user-name . "jonirosales") (:first-name . "Joni") (:last-name . "Rosales") (:emails<EMAIL_ADDRESS><EMAIL_ADDRESS>(:address-info) (:gender . "Female") (:concurrency .<PHONE_NUMBER>60790083)) ((:odata-id . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/People('georginabarlow')") (:odata-etag . "W/\"08D7983E303B2043\"") (:odata-edit-link . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/People('georginabarlow')") (:user-name . "georginabarlow") (:first-name . "Georgina") (:last-name . "Barlow") (:emails<EMAIL_ADDRESS><EMAIL_ADDRESS>(:address-info) (:gender . "Female") (:concurrency .<PHONE_NUMBER>60790083)) ((:odata-id . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/People('angelhuffman')") (:odata-etag . "W/\"08D7983E303B2043\"") (:odata-edit-link . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/People('angelhuffman')") (:user-name . "angelhuffman") (:first-name . "Angel") (:last-name . "Huffman") (:emails<EMAIL_ADDRESS>(:address-info) (:gender . "Female") (:concurrency .<PHONE_NUMBER>60790083)) ((:odata-id . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/People('laurelosborn')") (:odata-etag . "W/\"08D7983E303B2043\"") (:odata-edit-link . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/People('laurelosborn')") (:user-name . "laurelosborn") (:first-name . "Laurel") (:last-name . "Osborn") (:emails<EMAIL_ADDRESS><EMAIL_ADDRESS>(:address-info) (:gender . "Female") (:concurrency .<PHONE_NUMBER>60790083)) ((:odata-id . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/People('sandyosborn')") (:odata-etag . "W/\"08D7983E303B2043\"") (:odata-edit-link . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/People('sandyosborn')") (:user-name . "sandyosborn") (:first-name . "Sandy") (:last-name . "Osborn") (:emails<EMAIL_ADDRESS><EMAIL_ADDRESS>(:address-info) (:gender . "Female") (:concurrency .<PHONE_NUMBER>60790083)) ((:odata-id . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/People('ursulabright')") (:odata-etag . "W/\"08D7983E303B2043\"") (:odata-edit-link . "http://services.odata.org/V4/(S(wgkqtxlasrgtwhbtgoqbxc1l))/TripPinServiceRW/People('ursulabright')") (:user-name . "ursulabright") (:first-name . "Ursula") (:last-name . "Bright") (:emails<EMAIL_ADDRESS><EMAIL_ADDRESS>(:address-info) (:gender . "Female") (:concurrency .<PHONE_NUMBER>60790083)))
Next: System Query Option $top and $skip, Previous: Filter on Enum Properties, Up: Querying Data [Contents][Index]
The $orderby system query option allows clients to request resources in either ascending order using asc or descending order using desc. If asc or desc not specified, then the resources will be ordered in ascending order. The request below orders Trips on property EndsAt in descending order.
(-> +trip-pin-modify+
(collection "People")
(id "scottketchum")
(property "Trips")
($orderby "EndsAt" :desc)
(fetch :collection))
(((:trip-id . 2004) (:share-id . "f94e9116-8bdd-4dac-ab61-08438d0d9a71") (:description . "Trip from Shanghai to Beijing") (:name . "Trip in Beijing") (:budget . 11000) (:starts-at . "2014-02-01T00:00:00Z") (:ends-at . "2014-02-04T00:00:00Z") (:tags "Travel" "Beijing")) ((:trip-id . 0) (:share-id . "9d9b2fa0-efbf-490e-a5e3-bac8f7d47354") (:description . "Trip from San Francisco to New York City. Nice trip with two friends. It is a 4 days' trip. We actually had a client meeting, but we also took one to go sightseeings in New York.") (:name . "Trip in US") (:budget . 3000) (:starts-at . "2014-01-01T00:00:00Z") (:ends-at . "2014-01-04T00:00:00Z") (:tags "Trip in New York" "business" "sightseeing")))
Next: System Query Option $count, Previous: System Query Option $orderby, Up: Querying Data [Contents][Index]
The $top system query option requests the number of items in the queried collection to be included in the result. The $skip query option requests the number of items in the queried collection that are to be skipped and not included in the result. The request below returns the first two people of the People entity set.
(-> +trip-pin-modify+
(collection "People")
($top 2)
(fetch :collection))
(((:odata-id . "http://services.odata.org/V4/(S(dbwnjvoyanwfvbktg1eu5zvg))/TripPinServiceRW/People('russellwhyte')") (:odata-etag . "W/\"08D799E6ED7BA93B\"") (:odata-edit-link . "http://services.odata.org/V4/(S(dbwnjvoyanwfvbktg1eu5zvg))/TripPinServiceRW/People('russellwhyte')") (:user-name . "russellwhyte") (:first-name . "Russell") (:last-name . "Whyte") (:emails<EMAIL_ADDRESS><EMAIL_ADDRESS>(:address-info ((:address . "187 Suffolk Ln.") (:city (:country-region . "United States") (:name . "Boise") (:region . "ID")))) (:gender . "Male") (:concurrency .<PHONE_NUMBER>02046779)) ((:odata-id . "http://services.odata.org/V4/(S(dbwnjvoyanwfvbktg1eu5zvg))/TripPinServiceRW/People('scottketchum')") (:odata-etag . "W/\"08D799E6ED7BA93B\"") (:odata-edit-link . "http://services.odata.org/V4/(S(dbwnjvoyanwfvbktg1eu5zvg))/TripPinServiceRW/People('scottketchum')") (:user-name . "scottketchum") (:first-name . "Scott") (:last-name . "Ketchum") (:emails<EMAIL_ADDRESS>(:address-info ((:address . "2817 Milton Dr.") (:city (:country-region . "United States") (:name . "Albuquerque") (:region . "NM")))) (:gender . "Male") (:concurrency .<PHONE_NUMBER>02046779)))
The request below returns people starting with the 19th people of the entity set People
(-> +trip-pin-modify+
(collection "People")
($skip 18)
(fetch :collection))
(((:odata-id . "http://services.odata.org/V4/(S(dbwnjvoyanwfvbktg1eu5zvg))/TripPinServiceRW/People('genevievereeves')") (:odata-etag . "W/\"08D799E6ED7BA93B\"") (:odata-edit-link . "http://services.odata.org/V4/(S(dbwnjvoyanwfvbktg1eu5zvg))/TripPinServiceRW/People('genevievereeves')") (:user-name . "genevievereeves") (:first-name . "Genevieve") (:last-name . "Reeves") (:emails<EMAIL_ADDRESS><EMAIL_ADDRESS>(:address-info) (:gender . "Female") (:concurrency .<PHONE_NUMBER>02046779)) ((:odata-id . "http://services.odata.org/V4/(S(dbwnjvoyanwfvbktg1eu5zvg))/TripPinServiceRW/People('kristakemp')") (:odata-etag . "W/\"08D799E6ED7BA93B\"") (:odata-edit-link . "http://services.odata.org/V4/(S(dbwnjvoyanwfvbktg1eu5zvg))/TripPinServiceRW/People('kristakemp')") (:user-name . "kristakemp") (:first-name . "Krista") (:last-name . "Kemp") (:emails<EMAIL_ADDRESS>(:address-info) (:gender . "Female") (:concurrency .<PHONE_NUMBER>02046779)))
Next: System Query Option $expand, Previous: System Query Option $top and $skip, Up: Querying Data [Contents][Index]
The $count system query option allows clients to request a count of the matching resources included with the resources in the response. The request below returns the total number of people in the collection.
Next: System Query Option $select, Previous: System Query Option $count, Up: Querying Data [Contents][Index]
The $expand system query option specifies the related resources to be included in line with retrieved resources. The request below returns people with navigation property Friends of a Person
(-> +trip-pin-modify+
(collection "People")
(id "keithpinckney")
($expand "Friends")
(fetch))
((:odata-context . "http://services.odata.org/V4/(S(dbwnjvoyanwfvbktg1eu5zvg))/TripPinServiceRW/$metadata#People/$entity") (:odata-id . "http://services.odata.org/V4/(S(dbwnjvoyanwfvbktg1eu5zvg))/TripPinServiceRW/People('keithpinckney')") (:odata-etag . "W/\"08D799E6ED7BA93B\"") (:odata-edit-link . "http://services.odata.org/V4/(S(dbwnjvoyanwfvbktg1eu5zvg))/TripPinServiceRW/People('keithpinckney')") (:user-name . "keithpinckney") (:first-name . "Keith") (:last-name . "Pinckney") (:emails<EMAIL_ADDRESS><EMAIL_ADDRESS>(:address-info) (:gender . "Male") (:concurrency .<PHONE_NUMBER>02046779) (:friends ((:odata-id . "http://services.odata.org/V4/(S(dbwnjvoyanwfvbktg1eu5zvg))/TripPinServiceRW/People('clydeguess')") (:odata-etag . "W/\"08D799E6ED7BA93B\"") (:odata-edit-link . "http://services.odata.org/V4/(S(dbwnjvoyanwfvbktg1eu5zvg))/TripPinServiceRW/People('clydeguess')") (:user-name . "clydeguess") (:first-name . "Clyde") (:last-name . "Guess") (:emails<EMAIL_ADDRESS>(:address-info) (:gender . "Male") (:concurrency .<PHONE_NUMBER>02046779)) ((:odata-id . "http://services.odata.org/V4/(S(dbwnjvoyanwfvbktg1eu5zvg))/TripPinServiceRW/People('marshallgaray')") (:odata-etag . "W/\"08D799E6ED7BA93B\"") (:odata-edit-link . "http://services.odata.org/V4/(S(dbwnjvoyanwfvbktg1eu5zvg))/TripPinServiceRW/People('marshallgaray')") (:user-name . "marshallgaray") (:first-name . "Marshall") (:last-name . "Garay") (:emails<EMAIL_ADDRESS><EMAIL_ADDRESS>(:address-info) (:gender . "Male") (:concurrency .<PHONE_NUMBER>02046779))))
Next: System Query Option $search, Previous: System Query Option $expand, Up: Querying Data [Contents][Index]
The $select system query option allows the clients to requests a limited set of properties for each entity or complex type. The request below returns Name and IcaoCode of all Airports.
(-> +trip-pin-modify+
(collection "Airports")
($select '("Name" "IcaoCode"))
(fetch :collection))
(((:odata-id . "http://services.odata.org/V4/(S(dbwnjvoyanwfvbktg1eu5zvg))/TripPinServiceRW/Airports('KSFO')") (:odata-edit-link . "http://services.odata.org/V4/(S(dbwnjvoyanwfvbktg1eu5zvg))/TripPinServiceRW/Airports('KSFO')") (:name . "San Francisco International Airport") (:icao-code . "KSFO")) ((:odata-id . "http://services.odata.org/V4/(S(dbwnjvoyanwfvbktg1eu5zvg))/TripPinServiceRW/Airports('KLAX')") (:odata-edit-link . "http://services.odata.org/V4/(S(dbwnjvoyanwfvbktg1eu5zvg))/TripPinServiceRW/Airports('KLAX')") (:name . "Los Angeles International Airport") (:icao-code . "KLAX")) ((:odata-id . "http://services.odata.org/V4/(S(dbwnjvoyanwfvbktg1eu5zvg))/TripPinServiceRW/Airports('ZSSS')") (:odata-edit-link . "http://services.odata.org/V4/(S(dbwnjvoyanwfvbktg1eu5zvg))/TripPinServiceRW/Airports('ZSSS')") (:name . "Shanghai Hongqiao International Airport") (:icao-code . "ZSSS")) ((:odata-id . "http://services.odata.org/V4/(S(dbwnjvoyanwfvbktg1eu5zvg))/TripPinServiceRW/Airports('ZBAA')") (:odata-edit-link . "http://services.odata.org/V4/(S(dbwnjvoyanwfvbktg1eu5zvg))/TripPinServiceRW/Airports('ZBAA')") (:name . "Beijing Capital International Airport") (:icao-code . "ZBAA")) ((:odata-id . "http://services.odata.org/V4/(S(dbwnjvoyanwfvbktg1eu5zvg))/TripPinServiceRW/Airports('KJFK')") (:odata-edit-link . "http://services.odata.org/V4/(S(dbwnjvoyanwfvbktg1eu5zvg))/TripPinServiceRW/Airports('KJFK')") (:name . "John F. Kennedy International Airport") (:icao-code . "KJFK")) ((:odata-id . "http://services.odata.org/V4/(S(dbwnjvoyanwfvbktg1eu5zvg))/TripPinServiceRW/Airports('LIRA')") (:odata-edit-link . "http://services.odata.org/V4/(S(dbwnjvoyanwfvbktg1eu5zvg))/TripPinServiceRW/Airports('LIRA')") (:name . "Rome Ciampino Airport") (:icao-code . "LIRA")) ((:odata-id . "http://services.odata.org/V4/(S(dbwnjvoyanwfvbktg1eu5zvg))/TripPinServiceRW/Airports('CYYZ')") (:odata-edit-link . "http://services.odata.org/V4/(S(dbwnjvoyanwfvbktg1eu5zvg))/TripPinServiceRW/Airports('CYYZ')") (:name . "Toronto Pearson International Airport") (:icao-code . "CYYZ")) ((:odata-id . "http://services.odata.org/V4/(S(dbwnjvoyanwfvbktg1eu5zvg))/TripPinServiceRW/Airports('YSSY')") (:odata-edit-link . "http://services.odata.org/V4/(S(dbwnjvoyanwfvbktg1eu5zvg))/TripPinServiceRW/Airports('YSSY')") (:name . "Sydney Airport") (:icao-code . "YSSY")))
Next: Lambda Operators, Previous: System Query Option $select, Up: Querying Data [Contents][Index]
The $search system query option restricts the result to include only those entities matching the specified search expression. The definition of what it means to match is dependent upon the implementation. The request below get all People who has ’Boise’ in their contents.
serviceRoot/People?$search=United
(-> +trip-pin-modify+
(collection "People")
($search "United")
(fetch :collection))
(((:odata-id . "http://services.odata.org/V4/(S(jreo0syd1dcfhrharzudcfgy))/TripPinServiceRW/People('russellwhyte')") (:odata-etag . "W/\"08D79AA36F81DD60\"") (:odata-edit-link . "http://services.odata.org/V4/(S(jreo0syd1dcfhrharzudcfgy))/TripPinServiceRW/People('russellwhyte')") (:user-name . "russellwhyte") (:first-name . "Russell") (:last-name . "Whyte") (:emails<EMAIL_ADDRESS><EMAIL_ADDRESS>(:address-info ((:address . "187 Suffolk Ln.") (:city (:country-region . "United States") (:name . "Boise") (:region . "ID")))) (:gender . "Male") (:concurrency .<PHONE_NUMBER>37343072)) ((:odata-id . "http://services.odata.org/V4/(S(jreo0syd1dcfhrharzudcfgy))/TripPinServiceRW/People('scottketchum')") (:odata-etag . "W/\"08D79AA36F81DD60\"") (:odata-edit-link . "http://services.odata.org/V4/(S(jreo0syd1dcfhrharzudcfgy))/TripPinServiceRW/People('scottketchum')") (:user-name . "scottketchum") (:first-name . "Scott") (:last-name . "Ketchum") (:emails<EMAIL_ADDRESS>(:address-info ((:address . "2817 Milton Dr.") (:city (:country-region . "United States") (:name . "Albuquerque") (:region . "NM")))) (:gender . "Male") (:concurrency .<PHONE_NUMBER>37343072)) ((:odata-id . "http://services.odata.org/V4/(S(jreo0syd1dcfhrharzudcfgy))/TripPinServiceRW/People('javieralfred')") (:odata-etag . "W/\"08D79AA36F81DD60\"") (:odata-edit-link . "http://services.odata.org/V4/(S(jreo0syd1dcfhrharzudcfgy))/TripPinServiceRW/People('javieralfred')") (:user-name . "javieralfred") (:first-name . "Javier") (:last-name . "Alfred") (:emails<EMAIL_ADDRESS><EMAIL_ADDRESS>(:address-info ((:address . "89 Jefferson Way Suite 2") (:city (:country-region . "United States") (:name . "Portland") (:region . "WA")))) (:gender . "Male") (:concurrency .<PHONE_NUMBER>37343072)) ((:odata-id . "http://services.odata.org/V4/(S(jreo0syd1dcfhrharzudcfgy))/TripPinServiceRW/People('vincentcalabrese')") (:odata-etag . "W/\"08D79AA36F81DD60\"") (:odata-edit-link . "http://services.odata.org/V4/(S(jreo0syd1dcfhrharzudcfgy))/TripPinServiceRW/People('vincentcalabrese')") (:user-name . "vincentcalabrese") (:first-name . "Vincent") (:last-name . "Calabrese") (:emails<EMAIL_ADDRESS><EMAIL_ADDRESS>(:address-info ((:address . "55 Grizzly Peak Rd.") (:city (:country-region . "United States") (:name . "Butte") (:region . "MT")))) (:gender . "Male") (:concurrency .<PHONE_NUMBER>37343072)) ((:odata-id . "http://services.odata.org/V4/(S(jreo0syd1dcfhrharzudcfgy))/TripPinServiceRW/People('salliesampson')") (:odata-etag . "W/\"08D79AA36F81DD60\"") (:odata-edit-link . "http://services.odata.org/V4/(S(jreo0syd1dcfhrharzudcfgy))/TripPinServiceRW/People('salliesampson')") (:user-name . "salliesampson") (:first-name . "Sallie") (:last-name . "Sampson") (:emails<EMAIL_ADDRESS><EMAIL_ADDRESS>(:address-info ((:address . "87 Polk St. Suite 5") (:city (:country-region . "United States") (:name . "San Francisco") (:region . "CA"))) ((:address . "89 Chiaroscuro Rd.") (:city (:country-region . "United States") (:name . "Portland") (:region . "OR")))) (:gender . "Female") (:concurrency .<PHONE_NUMBER>37343072)))
Previous: System Query Option $search, Up: Querying Data [Contents][Index]
OData defines two operators any and all that evaluate a Boolean expression on a collection. They can work on either collection properties or collection of entities.
The request below returns People with Emails containing<EMAIL_ADDRESS>The Emails is a collection of primitive type string.

Next: Remove an Entity, Up: Data Modification [Contents][Index]
To create an entity in a collection, the client sends a POST request to that collection’s URL. The POST body MUST contain a single valid entity representation. The request below creates a Person which contains complex type and collection property.
(defparameter *p*<EMAIL_ADDRESS>. "Microsoft.OData.SampleService.Models.TripPin.Person") ("UserName" . "teresa") ("FirstName" . "Teresa") ("LastName" . "Gilbert") ("Gender" . "Female") ("Emails"<EMAIL_ADDRESS>"teresa@contoso.com")) ("AddressInfo" . ((("Address" . "1 Suffolk Ln.") ("City" . (("CountryRegion" . "United States") ("Name" . "Boise") ("Region" . "ID")))))))) (princ (-> +trip-pin-modify+ (collection "People") (post *p*)))
((odata-context . http://services.odata.org/V4/(S(dbwnjvoyanwfvbktg1eu5zvg))/TripPinServiceRW/$metadata#People/$entity) (odata-id . http://services.odata.org/V4/(S(dbwnjvoyanwfvbktg1eu5zvg))/TripPinServiceRW/People('teresa')) (odata-etag . W/"08D799ECFD4995C4") (odata-edit-link . http://services.odata.org/V4/(S(dbwnjvoyanwfvbktg1eu5zvg))/TripPinServiceRW/People('teresa')) (user-name . teresa) (first-name . Teresa) (last-name . Gilbert) (emails<EMAIL_ADDRESS><EMAIL_ADDRESS>(address-info ((address . 1 Suffolk Ln.) (city (country-region . United States) (name . Boise) (region . ID)))) (gender . Female) (concurrency .<PHONE_NUMBER>37004228))
Next: Update an Entity, Previous: Create an Entity, Up: Data Modification [Contents][Index]
The request below deletes the Person with UserName ’vincentcalabrese’. DELETE serviceRoot/People(’vincentcalabrese’)
(-> +trip-pin-modify+
(collection "People")
(id "vincentcalabrese")
(del))
nil
Next: Relationship Operations, Previous: Remove an Entity, Up: Data Modification [Contents][Index]
The OData services SHOULD support PATCH as the preferred means of updating an entity. But also services MAY additionally support PUT. The request below update the Emails of a person using PATCH.
(-> +trip-pin-modify+
(collection "People")
(id "russellwhyte")
(update<EMAIL_ADDRESS>. "Microsoft.OData.SampleService.Models.TripPin.Person")
("Emails"<EMAIL_ADDRESS><EMAIL_ADDRESS>"newRussell@contoso.com")))))
Next: Change a Link, Previous: Update an Entity, Up: Data Modification [Contents][Index]
Relationships from one entity to another are represented as navigation properties. Link to Related Entities
A successful POST request to a navigation property’s references collection adds a relationship to an existing entity. The request below adds ’vincentcalabrese’ to friends of ’scottketchum’.
(-> +trip-pin-modify+
(collection "People") (id "scottketchum")
(property "Friends") ($ref)
(link<EMAIL_ADDRESS>. ,(quri:render-uri +trip-pin-modify+))
<EMAIL_ADDRESS>. "People('vincentcalabrese')"))))
nil
Next: Functions and Actions, Previous: Relationship Operations, Up: Data Modification [Contents][Index]
A successful PUT request to a single-valued navigation propertyâs reference resource changes the related entity. The request below change the Airline of a Flight.
(-> +trip-pin-modify+
(collection "People")
(id "russellwhyte")
(path "Trips(0)"
"PlanItems(11)"
"Microsoft.OData.SampleService.Models.TripPin.Flight"
"Airline")
(update-link<EMAIL_ADDRESS>. ,(quri:render-uri +trip-pin-modify+))
<EMAIL_ADDRESS>. "Airlines('FM')"))))
nil
Next: Invoking Bound Functions, Previous: Change a Link, Up: Data Modification [Contents][Index]
OData supports custom operations (Actions and Functions). Functions are operations exposed by an OData service that MUST return data and MUST have no observable side effects. Actions are operations exposed by an OData service that MAY have side effects when invoked. Functions and actions both MAY bound to an entity type, primitive type, complex type, or a collection.
The function below returns the nearest airport with the input geography point.
(-> +trip-pin-modify+
(fcall 'get-nearest-airport :lat 33 :lon -118)
(fetch))
((:odata-context . "http://services.odata.org/V4/(S(jreo0syd1dcfhrharzudcfgy))/TripPinServiceRW/$metadata#Airports/$entity") (:odata-id . "http://services.odata.org/V4/(S(jreo0syd1dcfhrharzudcfgy))/TripPinServiceRW/Airports('KLAX')") (:odata-edit-link . "http://services.odata.org/V4/(S(jreo0syd1dcfhrharzudcfgy))/TripPinServiceRW/Airports('KLAX')") (:icao-code . "KLAX") (:name . "Los Angeles International Airport") (:iata-code . "LAX") (:location (:address . "1 World Way, Los Angeles, CA, 90045") (:city (:country-region . "United States") (:name . "Los Angeles") (:region . "California")) (:loc (:type . "Point") (:coordinates -118.40806 33.9425) (:crs (:type . "name") (:properties (:name . "EPSG:4326"))))))
Next: Invoking Unbound Actions, Previous: Functions and Actions, Up: Data Modification [Contents][Index]
The request below returns the favorite airline of a person, in TripPin service, "favorite airline" means airline which user choose most times. The function GetFavoriteAirline() is bound to Person.
(-> +trip-pin-modify+
(collection "People")
(id "russellwhyte")
(fcall "Microsoft.OData.SampleService.Models.TripPin.GetFavoriteAirline")
(fetch))
((:odata-context . "http://services.odata.org/V4/(S(jreo0syd1dcfhrharzudcfgy))/TripPinServiceRW/$metadata#Airlines/$entity") (:odata-id . "http://services.odata.org/V4/(S(jreo0syd1dcfhrharzudcfgy))/TripPinServiceRW/Airlines('AA')") (:odata-edit-link . "http://services.odata.org/V4/(S(jreo0syd1dcfhrharzudcfgy))/TripPinServiceRW/Airlines('AA')") (:airline-code . "AA") (:name . "American Airlines"))
Next: Invoking Bound Actions, Previous: Invoking Bound Functions, Up: Data Modification [Contents][Index]
TripPin currently has no scenario supported for unbound actions.
Previous: Invoking Unbound Actions, Up: Data Modification [Contents][Index]
The action below shares a trip to one of his friend. In TripPin service, by "share a trip" we mean that the owner and his friend now both have the trip and the trip share the same ShareId property.
(-> +trip-pin-modify+
(collection "People")
(id "russellwhyte")
(path "Microsoft.OData.SampleService.Models.TripPin.ShareTrip")
(post '(("userName" . "scottketchum")
("tripId" . 0))))
nil
Previous: Data Modification, Up: CL-ODATA-CLIENT Basic Tutorial [Contents][Index]
Instead of working with raw data (Lisp association lists), it is also possible to work with wrapping CLOS objects, available in the ODATA/ENTITY package.
Use T
as parameter to fetch
. Instead of association lists, we get ENTITY
objects:
(-> +trip-pin-modify+
(collection "People")
(fetch t))
#<http://services.odata.org/V4/(S(4olvgljic51nt3x0pqp5mpbl))/TripPinServiceRW/$metadata#People>
The elements of an entity set can be accessed with ODATA/ENTITY:ENTITY-SET-ELEMENTS
:
(-> +trip-pin-modify+
(collection "People")
(fetch t)
(odata/entity:entity-set-elements))
(#<http://services.odata.org/V4/(S(4olvgljic51nt3x0pqp5mpbl))/TripPinServiceRW/People('russellwhyte')> #<http://services.odata.org/V4/(S(4olvgljic51nt3x0pqp5mpbl))/TripPinServiceRW/People('scottketchum')> #<http://services.odata.org/V4/(S(4olvgljic51nt3x0pqp5mpbl))/TripPinServiceRW/People('ronaldmundy')> #<http://services.odata.org/V4/(S(4olvgljic51nt3x0pqp5mpbl))/TripPinServiceRW/People('javieralfred')> #<http://services.odata.org/V4/(S(4olvgljic51nt3x0pqp5mpbl))/TripPinServiceRW/People('willieashmore')> #<http://services.odata.org/V4/(S(4olvgljic51nt3x0pqp5mpbl))/TripPinServiceRW/People('vincentcalabrese')> #<http://services.odata.org/V4/(S(4olvgljic51nt3x0pqp5mpbl))/TripPinServiceRW/People('clydeguess')> #<http://services.odata.org/V4/(S(4olvgljic51nt3x0pqp5mpbl))/TripPinServiceRW/People('keithpinckney')>)
As you can see, the elements of the entity set are also entities (wrapped objects).
To access entity objects, you can use either ODATA/ENTITY:GET-PROPERTY or ODATA/ENTITY:WITH-PROPERTIES macro:
(let ((russell (-> +trip-pin-modify+
(collection "People")
(id "russellwhyte")
(fetch t))))
(odata/entity:get-property russell :user-name))
russellwhyte
(let ((russell (-> +trip-pin-modify+
(collection "People")
(id "russellwhyte")
(fetch t))))
(odata/entity:with-properties (user-name) russell
(concatenate 'string "Hello " user-name)))
Hello russellwhyte
One of the advantages of using entities over raw data is that you can call the api using entities as base, like in this example:
;; We get russell user entity first
(let ((russell (-> +trip-pin-modify+
(collection "People")
(id "russellwhyte")
(fetch t))))
;; Then we use the entity as base for new api call and fetch its friends
(-> russell
(collection "Friends")
(fetch t)))
#<http://services.odata.org/V4/(S(4olvgljic51nt3x0pqp5mpbl))/TripPinServiceRW/$metadata#People>
Next: Index, Previous: CL-ODATA-CLIENT Basic Tutorial, Up: Top [Contents][Index]
| • ODATA-CLIENT package | ||
| • ODATA/LANG package | ||
| • ODATA/ENTITY package |
Next: ODATA/LANG package, Up: API [Contents][Index]
Provides core functions for interacting with an ODATA service.
ODATA service api token.
ODATA service base url.
Make a POST request to ODATA service at URI.
DATA is the data to be posted. It is encoded using ‘ENCODE-JSON-TO-STRING’.
Make an ODATA-GET request using *SERVICE-ROOT* as URL base.
Make a PUT (update) request to ODATA service at URI.
DATA is the data to be posted. It is encoded using ‘ENCODE-JSON-TO-STRING’.
Make a PATCH request to ODATA service at URI.
DATA is the data to be posted. It is encoded using ‘ENCODE-JSON-TO-STRING’.
‘GET’ request on an ODATA service at URL.
$filter is an ODATA $filter expression.
$expand is an ODATA $expand expression.
AUTHORIZATION is the authorization token.
See: http://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/part1-protocol/odata-v4.0-errata03-os-part1-protocol-complete.html#_The_$filter_System
Class precedence list: odata-request-error, error, serious-condition, condition, t
Next: ODATA/ENTITY package, Previous: ODATA-CLIENT package, Up: API [Contents][Index]
This package exports functions that are meant to be used with arrows syntax to interact with an ODATA service.
Add ODATA $filter parameter to URL.
The $filter system query option allows clients to filter a collection of resources that are addressed by a request URL. The expression specified with $filter is evaluated for each resource in the collection, and only items where the expression evaluates to true are included in the response. Resources for which the expression evaluates to false or to null, or which reference properties that are unavailable due to permissions, are omitted from the response.
See: ‘ODATA-CLIENT::compile-$filter’
See: https://www.odata.org/getting-started/basic-tutorial/#filter
Address the raw value of a primitive property.
Example: returns the raw value of property Name of an Airport.
(-> +trip-pin-modify+
(collection "Airports") (id "KSFO")
(property "Name") ($value)
See: https://www.odata.org/getting-started/basic-tutorial/#propertyVal
Access the resource property with name NAME.
Access the resource collection at NAME.
The $skip query option requests the number of items in the queried collection that are to be skipped and not included in the result.
See: https://www.odata.org/getting-started/basic-tutorial/#topskip
Perform a resource PATCH request with DATA to ODATA service at URL.
The $top system query option requests the number of items in the queried collection to be included in the result.
See: https://www.odata.org/getting-started/basic-tutorial/#topskip
Access the ODATA singleton with name NAME at URL.
See: https://www.odata.org/getting-started/advanced-tutorial/#querySingleton .
The $count system query option allows clients to request a count of the matching resources included with the resources in the response.
Update an already existent link.
A successful PUT request to a single-valued navigation propertyâs reference resource changes the related entity.
Example: change the Airline of a Flight
(-> +trip-pin-modify+
(collection "People")
(id "russellwhyte")
(path "Trips(0)"
"PlanItems(11)"
"Microsoft.OData.SampleService.Models.TripPin.Flight"
"Airline")
(update-link<EMAIL_ADDRESS>. ,(‘quri:render-uri’ +trip-pin-modify+))
<EMAIL_ADDRESS>. "Airlines(’FM’)"))))
Add a link to a related entity.
Relationships from one entity to another are represented as navigation properties.
A successful POST request to a navigation property’s references collection adds a relationship to an existing entity.
Example: add ’vincentcalabrese’ to friends of ’scottketchum’
(-> +trip-pin-modify+
(collection "People") (id "scottketchum")
(property "Friends") ($ref)
(link<EMAIL_ADDRESS>. ,(‘quri:render-uri’ +trip-pin-modify+))
<EMAIL_ADDRESS>. "People(’vincentcalabrese’)"))))
The $orderby system query option allows clients to request resources in either ascending order using asc or descending order using desc. If asc or desc not specified, then the resources will be ordered in ascending order.
Perform a resource deletion request at ODATA service at URL.
Add ODATA $expand parameter to URL.
The $expand system query option specifies the related resources to be included in line with retrieved resources.
EXP is the list of things to expand.
Examples:
’("asdf" "foo")) => "asdf,foo"
’("asdf" "foo" ("Bar" "Baz")) => "asdf,foo,Bar/Baz"
See: ‘ODATA-CLIENT::COMPILE-$EXPAND’ .
See: https://www.odata.org/getting-started/basic-tutorial/#expand .
Access entity in a PATH.
Example:
(-> +trip-pin-modify+
(collection "People")
(id "russellwhyte")
(path "Trips(0)"
"PlanItems(11)"
"Microsoft.OData.SampleService.Models.TripPin.Flight"
"Airline"))
Perform a resource creation request with DATA at ODATA service at URL.
Adds ODATA $select parameter to URL.
The $select system query option allows the clients to requests a limited set of properties for each entity.
EXP can be either a string or a list of strings.
Elements of EXP are just separated by comma.
Examples:
(compile-$select "name") => "foo"
(compile-$select ’("name" "surname")) => "name,surname"
See: ‘ODATA-CLIENT::COMPILE-$SELECT’
See: https://www.odata.org/getting-started/basic-tutorial/#select
Perform a resource update (PUT request) with DATA to ODATA service at URL.
Get ODATA resource id.
Call the ODATA action with name NAME and arguments ARGS.
Actions are operations exposed by an OData service that MAY have side effects when invoked. Actions MAY return data but MUST ‘NOT’ be further composed with additional path segments.
See: https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_Actions
The $search system query option restricts the result to include only those entities matching the specified search expression.
See: https://www.odata.org/getting-started/basic-tutorial/#search
A successful POST request to a navigation property’s references collection adds a relationship to an existing entity.
Previous: ODATA/LANG package, Up: API [Contents][Index]
Bind PROPERTIES in ENTITY.
Example:
(with-properties (user-name) user
(print user-name))
Unserializes an ODATA request response.
Return cached schema at SCHEMA-URL, or fetch and add to the cache.
Fetch and parse and ODATA schema from SCHEMA-URL.
Get value of property PROPERTY-NAME in ENTITY.
And ODATA entity set.
Class precedence list: odata-entity-set, standard-object, t
An ODATA entity.
Class precedence list: odata-entity, standard-object, t
| Jump to: | C O |
|---|
| Index Entry | Section | ||
|---|---|---|---|
| | |||
| C | |||
| cl-odata-client: | Top | ||
| | |||
| O | |||
| odata-client: | Top | ||
| |
| Jump to: | C O |
|---|
| Jump to: | *
O |
|---|
| Index Entry | Section | ||
|---|---|---|---|
| | |||
| * | |||
*ACCESS-TOKEN* : | ODATA-CLIENT package | ||
*SERVICE-ROOT* : | ODATA-CLIENT package | ||
| | |||
| O | |||
ODATA-CLIENT:*ACCESS-TOKEN* : | ODATA-CLIENT package | ||
ODATA-CLIENT:*SERVICE-ROOT* : | ODATA-CLIENT package | ||
| |
| Jump to: | *
O |
|---|
| Jump to: | O |
|---|
| Jump to: | O |
|---|


|
liberis
|
Low-level control of the KING processor's SCSI controller. More...
#include <eris/types.h>
Go to the source code of this file.
Enumerations | |
| enum | scsi_low_phase { SCSI_LOW_PHASE_BUS_FREE = 0, SCSI_LOW_PHASE_SELECT = 1, SCSI_LOW_PHASE_DATA_OUT = 2, SCSI_LOW_PHASE_DATA_IN = 3, SCSI_LOW_PHASE_COMMAND = 4, SCSI_LOW_PHASE_STATUS = 5, SCSI_LOW_PHASE_MESSAGE_OUT = 6, SCSI_LOW_PHASE_MESSAGE_IN = 7, SCSI_LOW_PHASE_ILLEGAL = 8 } |
| enum | scsi_low_status { SCSI_LOW_STATUS_MISC = -5, SCSI_LOW_STATUS_NEED_MESSAGE = -4, SCSI_LOW_STATUS_NEED_DATA = -3, SCSI_LOW_STATUS_HAVE_DATA = -2, SCSI_LOW_STATUS_IN_PROGRESS = -1, SCSI_LOW_STATUS_GOOD = 0x0, SCSI_LOW_STATUS_CHECK_CONDITION = 0x2, SCSI_LOW_STATUS_CONDITION_MET = 0x4, SCSI_LOW_STATUS_BUSY = 0x6, SCSI_LOW_STATUS_INTERMEDIATE = 0x10 } |
| enum | scsi_low_cmd { SCSI_LOW_CMD_TEST_UNIT_READY = 0x00, SCSI_LOW_CMD_REQ_SENSE = 0x03, SCSI_LOW_CMD_READ10 = 0x28, SCSI_LOW_CMD_SEEK10 = 0x2B, SCSI_LOW_CMD_PREFETCH10 = 0x34, SCSI_LOW_CMD_READ_SUBQ = 0x42, SCSI_LOW_CMD_READ_TOC = 0x43, SCSI_LOW_CMD_READ_HEADER = 0x44, SCSI_LOW_CMD_PLAY_AUDIO_INDEX = 0x48, SCSI_LOW_CMD_PAUSE = 0x4B } |
Functions | |
| scsi_low_phase | eris_low_scsi_get_phase (void) |
| Get SCSI phase. | |
| scsi_low_status | eris_low_scsi_status (void) |
| Get SCSI status. | |
| void | eris_low_scsi_reset (void) |
| Reset the SCSI drive. | |
| u32 | eris_low_scsi_data_in (u8 *buf, u32 maxlen) |
| Read data from the SCSI drive. | |
| u32 | eris_low_scsi_data_out (u8 *buf, u32 len) |
| Write data to the SCSI drive. | |
| void | eris_low_scsi_begin_dma (u32 kram_addr, u32 size) |
| Begin a DMA from the SCSI drive. | |
| int | eris_low_scsi_check_dma (void) |
| Check if a DMA is in progress. | |
| void | eris_low_scsi_finish_dma (void) |
| Finish a DMA from the SCSI drive. | |
| void | eris_low_scsi_abort (void) |
| Abort the current SCSI operation. | |
| int | eris_low_scsi_command (u8 *cdb, u32 len) |
| Send a command to the SCSI drive. |
Low-level control of the KING processor's SCSI controller.
Begin a DMA from the SCSI drive.
| kram_addr | Address in KRAM to DMA to. |
| size | How many bytes to transfer (must be a multiple of 2). |
| int eris_low_scsi_check_dma | ( | void | ) |
Check if a DMA is in progress.
Send a command to the SCSI drive.
| cdb | Command bytes. |
| len | Length of the command data. |
Read data from the SCSI drive.
| buf | Buffer to read into. |
| maxlen | Maximum length to read from. |
Write data to the SCSI drive.
| buf | Buffer to write from. |
| len | Length of the buffer. |
| scsi_low_phase eris_low_scsi_get_phase | ( | void | ) |
Get SCSI phase.
| scsi_low_status eris_low_scsi_status | ( | void | ) |
Get SCSI status.


|
CoAP Protobuf RPC library
0.0.1
|
Handles RPC service and registry of services. More...
#include "HandleService.h"
Functions | |
| string | coappbrpc::handleService (const char *, const size_t) |
| Uses handleRPC function of ServiceManager instance. More... | |
| void | coappbrpc::handleRegService (Service *) |
| Uses register Service function of ServiceManager instance. More... | |
Variables | |
| ServiceManager | coappbrpc::__srv_man |
Handles RPC service and registry of services.
| void coappbrpc::handleRegService | ( | Service * | service | ) |
Uses register Service function of ServiceManager instance.
| service | Service reference to be sent to Service Manager |
| string coappbrpc::handleService | ( | const char * | data, |
| const size_t | len | ||
| ) |
Uses handleRPC function of ServiceManager instance.
| data | Data reference to be sent to Service Manager, of type char |
| len | length of data of type size_t |
| ServiceManager coappbrpc::__srv_man |
Instance of a ServiceManager


Welcome!¶
This is the home of Pygments. It is a generic syntax highlighter suitable for use in code hosting, forums, wikis or other applications that need to prettify source code. Highlights are:
- a wide range of over 300 languages and other text formats is supported
- special attention is paid to details that increase highlighting quality
- support for new languages and formats are added easily; most languages use a simple regex-based lexing mechanism
- a number of output formats is available, among them HTML, RTF, LaTeX and ANSI sequences
- it is usable as a command-line tool and as a library
- ... and it highlights even Perl 6!
Read more in the FAQ list or the documentation, or download the latest release.
Contribute¶
Like every open-source project, we are always looking for volunteers to help us with programming. Python knowledge is required, but don’t fear: Python is a very clear and easy to learn language.
Development takes place on Bitbucket, where the Mercurial repository, tickets and pull requests can be viewed.
Our primary communication instrument is the IRC channel #pocoo on the
Freenode network. To join it, let your IRC client connect to
irc.freenode.net
and do /join #pocoo
.
If you found a bug, just open a ticket in the Bitbucket tracker. Be sure to log in to be notified when the issue is fixed – development is not fast-paced as the library is quite stable. You can also send an e-mail to the developers, see below.


The Activeledger Node SDK has been built to provide an easy way to connect your Node based application with an Activeledger network. This SDK can be used in JavaScript and TypeScript projects.
$ npm i -s @activeledger/sdk
The SDK currently supports the following functionality
Once the SDK has been installed import the classes and interfaces as you need them.
// Example
import { Connection } from "@activeledger/sdk";
The Activeledger Node SDK provides an enum to help handle key types.
| Key | Ref |
|---|---|
| Elliptic Curve | KeyType.EllipticCurve |
| RSA | KeyType.RSA |
The Activeledger Node SDK provides multiple interfaces to provide you with.
| Interface | Description |
|---|---|
| IKey | For Activeledger keys |
| IOnboardTx | Specifically for key onboarding, mainly used internally |
| IOnboardTxBody | Used by IOnboardTx for $tx variable |
| INodeKeyData | Used to hold the node key data for encrypting a transaction |
| IHttpOptions | Internal interface for setting HTTP options |
| ILedgerResponse | A helper for the ledger response |
| ISummaryObject | Used by ILedgerResponse |
| IStreamsObject | Used by ILedgerResponse |
| INewObject | Used by IStreamsObject |
| IUpdatedObject | Used by IStreamsObject |
| IBaseTransaction | Helper for creating transactions |
| ITxBody | Used by IBaseTransaction for the $tx variable |
When sending a transaction, you must pass a connection that provides the information needed to establish a link to the network and specified node.
To do this a connection object must be created. This object must be passed the protocol, address, port, and optionally the encryption flag.
import { Connection } from "@activeledger/sdk";
// Setup the connection object to use localhost over http unencrypted
const connection = new Connection("http", "localhost", 5260);
// Use localhost but encrypt transactions
const connection = new Connection("http", "localhost", 5260, true);
Note: Generating an RSA key is resource intensive and can take a few seconds.
The Key Handler can be used to generate and onboard a key.
The Key generation function and key onboard function are setup to be used separately as you may not want to immediately onboard a key. Additionally, you will need to store the key as it is used to sign all transactions involving the identity created when you onboard it.
There are two key types that can be generated currently, more are planned and will be implemented into Activeledger first. These types are RSA and Elliptic Curve.
When generating a key you must pass it a name and the key type.
Note: This example uses the IKey interface which provides the structure of the key
import { KeyHandler, IKey, KeyType } from "@activeledger/sdk";
const keyHandler = new KeyHandler();
let key: IKey;
// Generate RSA Key
keyHandler
.generateKey("keyname", KeyType.RSA)
.then((generatedKey: IKey) => {
key = generatedKey;
})
.catch();
// or to generate an Elliptic Curve key
// keyHandler.generateKey("keyname", KeyType.EllipticCurve)
Once you have a key generated, to use it to sign transactions it must be onboarded to the ledger network
import { Connection, KeyHandler, IKey, KeyType, ILedgerResponse } from "@activeledger/sdk";
const connection = new Connection("http", "localhost", 5260);
const keyHandler = new KeyHandler();
let key: IKey;
keyHandler
.generateKey("keyname", KeyType.EllipticCurve)
.then((generatedKey: IKey) => {
key = generatedKey;
return keyHandler.onboardKey(key, connection);
})
.then((ledgerResp: ILedgerResponse) => {
resolve(ledgerResp);
})
.catch();
You can use the SDK to export a key in JSON format to the filesystem. This will be in the same structure as the IKey interface.
When exporting a key the required parameters are the Key object and the location to store it. Note that the location should not include the name of the file, this is an optional parameter.
| Parameter | Description | Type | Required |
|---|---|---|---|
| key | The Key object | IKey | Yes |
| location | The storage location | string | Yes |
| createDir | Create directory if it doesn't exist | boolean | No |
| overwrite | Overwrite a file with the same name | boolean | No |
| name | The name of the file | string | No |
import { KeyHandler } from "@activeledger/sdk";
const keyHandler = new KeyHandler();
const key: IKey = await keyHandler.generateKey("Key Name", KeyType.EllipticCurve);
keyHandler.exportKey(key, "./").then(() => {
// Now export is finished do something
});
You can also use the SDK to import a key from the file system. Note that this key file must follow the same structure as the IKey interface.
The import function requires that the location parameter includes the file name with .json extension.
| Parameter | Description | Type | Required |
|---|---|---|---|
| location | The storage location | string | Yes |
import { KeyHandler } from "@activeledger/sdk";
const keyHandler = new KeyHandler();
keyHandler.importKey(`./${key.name}.json`).then((importedKey: IKey) => {
// Do something with the key
});
The Transaction Handler is used to sign and send transactions.
You can use the IBaseTransaction as a helper when building a transaction to be sent to the ledger.
When signing a transaction you must send the finished version of it. No changes can be made after signing as this will cause the ledger to reject it.
You must pass the transaction and the correct key to this function. The key must be one that has been successfully onboarded to the ledger which the transaction is being sent to.
It is also possible to send the transaction to be signed as a string, the signing function will then return just the signature as a string.
import { TransactionHandler, IBaseTransaction } from "@activeledger/sdk";
// Connection and key code goes here if needed
// Create a transaction. In this example a namespace onboarding transaction
const txHandler = new TransactionHandler();
const tx: IBaseTransaction = {
$sigs: {},
$tx: {
$contract: "namespace",
$i: {},
$namespace: "default",
},
};
// The identity of the key that the namespace will be linked to
tx.$tx.$i[key.identity] = {
namespace: "example-namespace",
};
// Sign the transaction
txHandler
.signTransaction(tx, key)
.then((signedTx: IBaseTransaction) => {
tx = signedTx;
})
.catch();
// Sign a string transaction
txHandler
.signTransaction("Hello world", key)
.then((signature: string) => {
// Do something with the signature
})
.catch();
import { TransactionHandler, IBaseTransaction } from "@activeledger/sdk";
// Connection setup, Transaction building and signing here
// Send the transaction
txHandler
.sendTransaction(tx, connection)
.then((response: ILedgerResponse) => {
// Do something with the response
})
.catch();
The event class of the SDK provides the caller with easy access to the server side events provided by ActiveCore.
import { LedgerEvents } from "@activeledger/sdk";
const events = new LedgerEvents("{ActiveCore URL}");
const reference = events.subscribeToActivity(eventData => {
// Do something with event data
});
const reference = events.subscribeToActivity("{activityStream}", eventData => {
// Do something with event data
});
const reference = events.subscribeToEvent(eventData => {
// Do something with event data
});
const config: IEventConfig {
contract: "{contractId}"
};
const reference = events.subscribeToEvent(eventData => {
// Do something with event data
},
config
);
const config: IEventConfig {
contract: "{contractId}",
event: "{contractId}"
};
const reference = events.subscribeToEvent(eventData => {
// Do something with event data
},
config
);
This is the same for both Activity events and Events
// Create a subscription and store the returned reference number
const reference = events.subscribeToActivity(eventData => {
// Do something with event data
});
// Unsubscribe
events.unsubscribe(reference);
You can read further documentation here.
Read Activeledgers documentation
This project is licensed under the MIT License
Generated using TypeDoc


Connectivity is only as useful as what runs on it. We are offering bespoke solutions to secure and upgrade local customer networks. They include:
Our Software Defined Wide Area Network solution ensures seamless interconnectivity between offices that have two or more branches across different geographical areas.
We can extend WiFi coverage across large properties and manage private networks remotely on behalf of customers.
You don’t have to worry about security of your information. Mawingu’s connectivity customers can store critical data in an off-site location in case of equipment failure or disaster.
Collaborate with online versions of Microsoft Word, PowerPoint, Excel, and OneNote. Save documents, spreadsheets and presentations online.
Email us on<EMAIL_ADDRESS>to get connected or call +254 740 500 600


§431:10C-209 Rate administration. (a) Except as otherwise provided in this article, the commissioner shall implement and evaluate motor vehicle insurance rates in compliance with article 14.
(b) The commissioner shall order insurers to rebate to policyholders any excessive profit realized by insurers from their operations. [L 1987, c 347, pt of §2]


✱Reminders help with the procedure.
Enter title and message for the reminder: Repeat Once Day Week Enter date and time to trigger reminder:
Google Chrome is a web browser.
Firefox is a web browser.
Google Chrome is a free, open-source web browser. Released in 2008.
Firefox is a web browser from Mozilla. Released in 2004.


Start creating your site by using the administrator page.
The following libraries already exist in private folders
A file placed in the public folder override the private one. Place your own index.html and start to override this presentation page.


Arsenal have 'made contact with Reinier Jesus' father' over potential transfer
Arsenal have moved to get ahead of the competition in the race for Brazilian teenager Reinier Jesus, who is wanted by a host of Europe’s top clubs.
The 17-year-old is fast becoming one of the most sought-after talents in the word games due to his performances for Brazil at youth level and for his club side Flamengo.
The midfielder only made his Flamengo debut at the end of July, but already has four goals in 11 Serie A games as he appears to be living up to the hype surrounding him.
The likes of Liverpool, Manchester City, Juventus, Real Madrid and Atletico Madrid are all thought to be interested in the teenager, while Everton were also thought to be keen over the summer.
However, Arsenal appear to have made a move to bring him to the Emirates as representative have spoken to the youngster’s father over a possible transfer.
Advertisement Advertisement
Spanish publication Mundo Deportivo reports that the Gunners have made their interest clear to Reinier’s dad and hope to persuade him that north London is the best destination for his son.
The Brazilian has not spoken of his link with Arsenal, but he has previously expressed his delight that Atletico Madrid have shown an interest in him.
‘It’s an honour that Atletico are interested in me because they are a huge club,’ said the young midfielder.
‘It’s another honour to know that one of the biggest clubs in the world is watching me.
‘But I’m a Flamengo player and my objective is to keep doing a good job here to win many titles in Brazil.’
Reinier is under contract at Flamengo until 2020 and has a release clause of around £60m in his deal, a fee which his club would expect to be met by any potential suitor.


In this implementation, the FineSelectionFunction would be the core part because we have to rank the stocks in this process. We also need a ScheduledEvent handler to rebalance the portfolio every month. We would introduce the process step by step.
This function is a filter for the whole asset universe(around 8000 stocks). We select the top 250 with highest dollar volume to ensure liquidity. We also filter out the stocks without fundamental information or with a too low price(less than $5).
def CoarseSelectionFunction(self, coarse): # if the rebalance flag is not 1, return null list to save time. if self.reb != 1: return return self.long + self.short # make universe selection once a month # drop stocks which have no fundamental data or have too low prices selected = [x for x in coarse if (x.HasFundamentalData) and (float(x.Price) > 5)] sortedByDollarVolume = sorted(selected, key=lambda x: x.DollarVolume, reverse=True) top = sortedByDollarVolume[:self.num_coarse] return [i.Symbol for i in top]
Here is the core function. The process is that we make three sorted list to store the stocks, and then use a dictionary to store the score information. For the dictionary, the keys are Symbols and the values are their scores. Finally we sort the dictionary to get the final rank. we store the top 20 stocks to long in the list self.long and the bottom 20 stocks to short in the list self.short.
def FineSelectionFunction(self, fine): # return the same symbol list if it's not time to rebalance if self.reb != 1: return self.long+self.short self.reb = 0 # drop stocks which don't have the information we need. # you can try replacing those factor with your own factors here filtered_fine = [x for x in fine if x.OperationRatios.OperationMargin.Value and x.ValuationRatios.PriceChange1M and x.ValuationRatios.BookValuePerShare] self.Log('remained to select %d'%(len(filtered_fine))) # rank stocks by three factor. sortedByfactor1 = sorted(filtered_fine, key=lambda x: x.OperationRatios.OperationMargin.Value, reverse=True) sortedByfactor2 = sorted(filtered_fine, key=lambda x: x.ValuationRatios.PriceChange1M, reverse=True) sortedByfactor3 = sorted(filtered_fine, key=lambda x: x.ValuationRatios.BookValuePerShare, reverse=True) stock_dict = {} # assign a score to each stock, you can also change the rule of scoring here. for i,ele in enumerate(sortedByfactor1): rank1 = i rank2 = sortedByfactor2.index(ele) rank3 = sortedByfactor3.index(ele) score = sum([rank1*0.2,rank2*0.4,rank3*0.4]) stock_dict[ele] = score # sort the stocks by their scores self.sorted_stock = sorted(stock_dict.items(), key=lambda d:d[1],reverse=False) sorted_symbol = [x[0] for x in self.sorted_stock] # sotre the top stocks into the long_list and the bottom ones into the short_list self.long = [x.Symbol for x in sorted_symbol[:self.num_fine]] self.short = [x.Symbol for x in sorted_symbol[-self.num_fine:]] return self.long+self.short
Our portfolio is rebalanced monthly, so first of all we should write a ScheduledEvent handler in the Initialize function:
def Initialize(self): # Use SPY as a benchmark for market open self.Schedule.On(self.DateRules.MonthStart(self.spy), self.TimeRules.AfterMarketOpen(self.spy,5), Action(self.rebalance)) Our rebalanced method is straightforward: We first liquidate the stocks that are no longer in the long/short list, and then assign equal weight to the stocks we are going to long or short. def rebalance(self): # if this month the stock are not going to be long/short, liquidate it. long_short_list = self.long + self.short for i in self.Portfolio.Values: if (i.Invested) and (i.Symbol not in long_short_list): self.Liquidate(i.Symbol) # Assign each stock equally. Always hold 10% cash to avoid margin call for i in self.long: self.SetHoldings(i,0.9/self.num_fine) for i in self.short: self.SetHoldings(i,-0.9/self.num_fine)


A video podcast in which we share with you a few ideas that we think you should try, but we definitely won't.
Hosted by:
Coming soon to an iTunes near you.


| Interface | Description |
|---|---|
| OFExperimenterData |
The base class for all vendor data.
|
| Class | Description |
|---|---|
| OFBasicExperimenterDataType |
Subclass of OFVendorDataType that works with any vendor data format that
begins with a integral value to indicate the format of the remaining data.
|
| OFBasicExperimenterId |
Basic subclass of OFVendorId that works with any vendor data format where
the data begins with an integral data type value.
|
| OFByteArrayExperimenterData |
Basic implementation of OFVendorData that just treats the data as a
byte array.
|
| OFExperimenterDataType |
Class that represents a specific vendor data type format in an
OFVendor message.
|
| OFExperimenterId |
Base class for the vendor ID corresponding to vendor extensions from a
given vendor.
|


Delete Supplies
Supply Name
Theraband - Green
Theraband - Yellow
Hot Packs
ACE wrap 2
Cavicide
Thermometer Sheaths
Location
Cabinet 1
Cabinet 2
Cabinet 3
Back Cabinet
Delete
Cancel


Finished playing Portal last night. Gosh it was fun. I wish the newspaper included a daily Portal puzzle instead of those silly sudoku things. Doubt they could match the script though — those words have power.
Listening to Never Mind the Bollocks… for the second time ever. More music like this please.
We mean it, man.
Sounds like:
- Stooges three albums (different to Lust for Life)
- The MC5 (live album)
- New York Dolls
- Ramones first few albums
- First Clash album
- X-Ray Spex (great girl-fronted group from the same scene)
- The Undertones, The Damned & The Buzzcocks (get best of's)
- The Saints, Radio Birdman and the Birthday Party (all Australian!)
- Dead Kennedys first few albums
- X (American - Los Angeles album, and Australian bands)
- Husker Du
- Um, the Pixies of course
- Huggy Bear (cause I love them)
…and a whole heap of 80's Indie bands leading up to grunge
Most of these won't trouble you with extensive discographies. Go with The Birthday Party and the Stooges for equal visceral impact (give them some time!)
Mikey, McLaren continues to sound like an utter tosser.
Jason, I think there’s never a reason to fear the video game sequel. I don’t really know why.
What a wonderful game. The days proceeding the upcoming sequel will be filled with both fear and hope.
Mikey, there is an easy way for you to play it…
i also would like more music like Never Mind… but I don't think you'll find it in the Sex Pistols' discography. I like Deri's suggestion.
Little trivia: Malcolm McLaren, the manager, was all into getting the Pistols to play up their S&M image. But Johnny Rotten thought this was a bit lame.
Malcolm McLaren tells them to write a song about Submission. So they write a song about a submarine mission :-)


Goodreads Quotes Scraper
Find code on GitHub here
When looking for material to run semantic searches on, I was surprised that I could not find a database of Goodreads quotes. Kaggle has datasets for other kinds of Goodreads data, but no quotes. The Goodreads API does not allow for quote scraping either.
Thus I coded a Python quote scraper gets the quote text, title, author, tags, and number of likes. If you enter the author name, with number of pages of quotes as an optional argument, the function will both return the results in a list and print the results in the Terminal. If you don’t specify a page number, the scraper will get quotes from all the pages available on Goodreads.
The command is:
>>> quotes_by_author(author, page_num=None):
An example…
>>> quotes_by_author("jk rowling")
looking through 6244 pages
scraping page 1
scraping page 2
...
...
Snippet of results…
scraping page 1
“If you want to know what a man's like, take a good look at how he treats his inferiors, not his equals.”
―
J.K. Rowling
Harry Potter and the Goblet of Fire
None
95138
“It is our choices, Harry, that show what we truly are, far more than our abilities.”
J.K. Rowling
Harry Potter and the Chamber of Secrets
['choices']
49192
“It does not do to dwell on dreams and forget to live.”
J.K. Rowling
Harry Potter and the Sorcerer's Stone
['life']
47176
“I solemnly swear that I am up to no good.”
J.K. Rowling
Harry Potter and the Prisoner of Azkaban
[]
37420
I fed a list of all the authors on Goodreads into the scraper to build a database of quotes, which I will release on Kaggle soon.


Cell-type specific differential expression of a microarray experiment of heterogeneous tissue samples, using SAM.
| Version: | 1.2.4 |
| Depends: | R (≥ 2.15), compiler |
| Published: | 2013-05-13 |
| Author: | Shai Shen-Orr [aut, cre], Rob Tibshirani [aut], Narasimhan Balasubramanian [aut], David Wang [aut], Renaud Gaujoux [ctb] (roxygen/debug/CRAN-compliance) |
| Maintainer: | Shai Shen-Orr <shenorr at technion.ac.il> |
| License: | LGPL-2 | LGPL-2.1 | LGPL-3 [expanded from: LGPL] |
| NeedsCompilation: | no |
| Materials: | NEWS |
| CRAN checks: | csSAM results |
| Reference manual: | csSAM.pdf |
| Package source: | csSAM_1.2.4.tar.gz |
| Windows binaries: | r-devel: csSAM_1.2.4.zip, r-release: csSAM_1.2.4.zip, r-oldrel: csSAM_1.2.4.zip |
| OS X binaries: | r-release: csSAM_1.2.4.tgz, r-oldrel: csSAM_1.2.4.tgz |
| Old sources: | csSAM archive |
Please use the canonical form https://CRAN.R-project.org/package=csSAM to link to this page.


Cascade Farms is a third generation, family run Christmas Tree Farm located in the Pacific Northwest, we sell Christmas trees and custom Christmas wreaths, made right here on the farm. Let us help you make your holidays special!
Our Wreaths are hand made by exprienced wreath-makers to ensure every wreath is up to our quality standards. We use only Noble Fir branches, the most popular and preferred tree type for Christmas Trees, to make our wreaths
"Cascade Farms helped bring the holiday season to our home this Christmas. Our neighbors all commented on our wreath and asked where they could buy one. It stayed green long past Christmas, we didnt want to throw it away! We'll definitely be back next year"
-Jane Doe
Cascade Farms
12345 Snoqualmie Pass
Easton, WA 98925
Open Daily from Black Friday until December 24th, 10 am to 8 pm


Jock Dalby
Web Developer
Welcome,
I am an enthusiastic, motivated and happy-go-lucky web developer loving life in
Wellington, NZ.
I love... being part of a creative team, coming up with innovative
solutions to challenging problems. I am well versed with the build-measure-learn / agile approach to
development, no stranger to hard work or long hours and will always go the extra mile to ensure success.
In my free time... you will find me hanging out with my family, enjoying
delicious food and taking our dog for long walks in the great outdoors.
It all began...... in early 2015, when I made the decision to leave a
successful career in the hospitality industry to co-found a tech startup, with the vision of providing
cafes, bars and restaurants with something they often lack, but so desperately need; honest, private and
direct customer feedback.
I recruited 2 co-founders and together we created MightyGem.com and
had the distinction of being selected from over 200 applicants as
one of 10 teams to partake in
Lightning
Lab, Christchurch 2015
- New Zealand's premier business accelerator
program for high-growth digital startups. It was here I found my passion for
web development.
Between January and June, 2016, I worked hard to learn the basics of web development using online
resources (Codecademy, Treehouse, freeCodeCamp) before enrolling with Enspiral
Dev Academy, Wellington. At
EDA, I arrived 2-3 hours early each day to recap on the previous day and prepare for the current day's
learnings. It was this extra commitment, dedication and drive which saw me move from one of the greenest in
the class to one of the most proficient. By the final cohort project, I had a solid understanding of the
JS, React & Redux stack and was appointed the project manager, team leader and product owner to help lead 6
new devs to victory.
I gained employment on the day I graduated from EDA and have been working in tech ever since. I love the
work I do and continue to put time aside each day to grow bigger,
better, faster,
stronger by reading publications and completing online tutorials.
Thanks for stopping by to check out my work,
Current skillset
- Front-end -
HTML5, CSS3, SASS, JavaScript, Typescript, Angular 5,
ngrx/store, RxJS,
React, Redux, React Apollo, Next.js, Ember, jQuery
- Back-end -
Node.js, GraphQL
- Testing -
Jasmine, Karma, Cucumber, Gherkin, Selenium
My Portfolio
Here are some applications I have created either as part of my learning at EDA, through completing online tutorials or simply out of personal interest.
EDA Final Group Project
As final group project at Dev Academy, myself and 6 fellow students created and
launched a coffee-ordering web app for the thriving Wellington coffee scene, in only 7 days. Caffeinati enables
users to order from a wide range of coffee vendors and for those vendors to receive orders and update order
status in realtime.
- React - Redux - Socket.io -
Contact
If you would like to get in touch, please use the contact details on my CV or via email.
Download CV Send email


coalda.data
Class CalculationAccess
java.lang.Object
coalda.data.CalculationAccess
public class CalculationAccess
- extends java.lang.Object
- Author:
- kesslewd
Class that reads the result of a calculation with matlab and imports them
into prefuse data structures.
|
Field Summary |
private int |
calcID
ID of the calculation that is imported at the moment |
private boolean |
debug
Change to debug mode (a lot of debug lines printed on System.out) |
private Reader |
reader
This does the actual reading of the data, whether
from the database or from files. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
debug
private boolean debug
- Change to debug mode (a lot of debug lines printed on System.out)
reader
private Reader reader
- This does the actual reading of the data, whether
from the database or from files.
calcID
private int calcID
- ID of the calculation that is imported at the moment
CalculationAccess
public CalculationAccess()
- Constructor.
Loads appropriate reader for reading from
database or files, according to the value of
Constants.db
setCalcID
public void setCalcID(int calculationID)
- Method setCalcID.
Sets the calculation ID for the current calculation.
- Parameters:
calculationID
- ID of current calculation.
readNodes
public void readNodes(Table nodes)
- Method readNodes.
Reads the nodes of the SOM (the map units)
with their X and Y value into an existing
table (nodes are appended at the end).
Names/Type of the columns added:
- Constants.kind (enum kind) : Kind = node
- Constants.nodeKey (int) : ID of the node
- Constants.nodeXValue (float) : X Value of the node
(in SOM space)
- Constants.nodeYValue (float) : Y Value of the node
(in SOM space)
- Parameters:
nodes
- Table where the nodes are added
readEdges
public void readEdges(Table edges)
- Method readEdges.
Reads the neighbourhood relations of the SOM
and converts them into a table of edges. Edges
are appended to an existing table.
Names/Type of the columns added:
- Constants.kind (enum kind) : Kind = edge
- Constants.edgeKey (int) : ID of the edge
- Constants.edgeSource (int) : ID of the source node
- Constants.edgeTarget (int) : ID of the target node
- Parameters:
edges
- Table with the edges
readBMUs
public void readBMUs(Table nodes)
- Method readBMUs.
Gets the Best Matching Unit (BMU) for every feature
vector and saves the IDs of all feature vectors who
have this map unit as a BMU with every map unit.
Names of the columns added:
- Constants.nodeFVNumber (int) : number of feature vectors
associated with a node
- Constants.nodeFVectors (String) :IDs of feature
vectors that have this node as BMU, IDs are
separated with spaces
- Parameters:
nodes
- Table with the nodes
readCodebook
public void readCodebook(Table nodes)
- Method readCodebook.
Reads the weights of every map unit of the SOM
in every dimension of the feature vector space.
Names/Type of the columns added:
- Constants.nodeWeightI (float) : weight of this
map unit in dimension I (where I ranges from
1 to number of dimensions)
- Parameters:
nodes
- Table with the nodes
readUmatrix
public void readUmatrix(Table nodes,
Table edges)
- Method readUmatrix.
Reads the values of an U-Matrix into the tables
of nodes and edges. At the end every node and
every edge should have an U-Matrix value.
This is only tested for hexagonal shapes.
Names/Type of the columns added to the table nodes:
- Constants.nodeUmatValue (float) : U-Matrix value of
this node (the average of the U-Matrix
values of all the edges)
Names of the columns added to the table edges:
- Constants.edgeUmatValue (float) : U-Matrix value
of this edge
- Parameters:
nodes
- Table with the nodes (must be not null)edges
- Table with the edges (must be not null)
getProportions
public void getProportions(Table nodes)
- Method getProportions.
Calculates the number of coreferent and
disreferent feature vectors associated with this
node and the proportions.
Names/Type of the columns added:
- nodeProportion (float) : Proportion of coreferent
fv out of all fvs associated with this node.
- nodeProportionDis (float) : Proportion of disreferent
fv out of all fvs associated with this node.
- nodeCorefNumber (int) : Number of coreferent
fv associated with this node.
- nodeDisrefNumber (int) : Number of disreferent
fv associated with this node.
- nodeCoDisLabel (String) : Label
(nodeCorefNumber / nodeDisrefNumber)
- Parameters:
nodes
- Table with the nodes
getNextCalcID
public int getNextCalcID()
- Method getNextCalcID.
Gets next calculation ID.
If we are working on a database, this is the
next value of the sequence.
If we are working on files, 0 is returned.
- Returns:
- calculationID ID of calculation.


---
layout: default
title: Why Us | Cute Smile Dr Samina Kathawala Dentist Hackensack NJ<PHONE_NUMBER>
description: What makes our dental office unique? We are a Gentle Painless Dentistry clinic. Relaxing environment, and never rushed. Read our reviews and why patient choose Dr. Samina Kathawala to be their trusted dentist in NJ.<PHONE_NUMBER>.
---
Why Us
1. Your Comfort Comes First
Going to the dentist can be intimidating.Enjoy our comfortable and relaxed office setting.
Every treatment room has large windows for a pleasant view and natural sunlight during your visit.
Enjoy the convenience of our private "FREE" PARKING lot. No need to stress about finding parking.
2. The Dentist Costs Too Much!
Our fees are UP FRONT and LOWEST in the area; we always provide a full fee breakdown before we begin any work.
We offer low fees by keeping our overhead low, we love emails and texts but hate phone calls, so email or text for quicker service.
3. Weekend Appointments Available.. yes!
We know you are busy, so we work around your schedules.
We work late hours Friday and are open full day Saturday and Sunday.
We are here for you, working around your convenience, as oppose to ours...
4. We take all INSURANCES
We take all major PPO plans such as Delta Dental, Aetna, Metlife, Guardian and many more ... . We will verify your coverage before your visit, and will work HARD to get you the most benefit from your coverage
No surprises - when you arrive for your visit we will provide insurance breakdown, and answer all your questions.
5. We provide TRUSTED CARE
We want to earn your trust. We will treat you like family.
Dr Kathawala is a caring dentist, she believes in educating and answering all patient concerns.
We want to DELIGHT you - Give us a chance, you want be disappointed!
6. KINDNESS and EMPATHY are our CORE values
Dr Kathawala grew up, surrounded by doctors in her family. Her mom is a gynecologist. At an early age, she has seen suffering and what empathy can do to patients.
Besides working here, she still spends a lot of time, helping people in need in poor neighborhoods of Jersey City NJ.
Patients at her Jersey City Clinic revere her. Check out her many reviews on the web
She is COMMITTED to doing what's RIGHT for the patient.
7. KIDS LOVES US!
Every child deserves to have a bright and healthy smile.
Dr Kathawala has two small kids of her own.
She is AMAZING with kids.... on an average 40% of her patients are kids.
Her immense patience, and her gifted engagement skills, helps her, get cooperation from her little patients.
If you child had trouble at the dentist office, its time to try us!
8. Gentle Painless Dentist
We pride in our outcomes.
Many patients have come to our clinic really afraid and fearful of the dentist.
Most in pain.
And after they are gently treated by Dentist Samina, they keep returning back, most times bringing along their extended family members.
Dr Samina is never in rush and her gentle and painless approach calm nerves and provides the empathy that you as a patient deserve.
Be it a root canal, extraction or anything else....
Try her to experience the difference!
9. WE WILL TAKE CARE OF YOU
Its just as simple...
Your satisfaction is guaranteed
98% of our patients refer their family and friends.


Notes pattern : Inversion of logging
A typical requirement in applications is to keep a log of changes. The simplest form is to keep fields with the author and date/time of the latest change (which has the distinct disadvantage not knowing what has been changed by whom). The next level would be to keep the list of all authors and change times (still leaving the question " what unanswered) followed by very sophisticated tools like Audit Manager or similar home grown solutions.
All these solutions have in common, that they "merely" record changes made (typically in a query or post save event) after they happened (From a big picture perspective, a log on query-save is technically before, but after the trigger that will commit the change). While this works reasonable well for audit, adding another typical requirement calls for a different solution. More often than not the parts of a (workflow) document which can be altered by any given user change in the course of an [workflow] application. While Author fields protect a document at large, safeguarding individual fields becomes more tedious, especially when you can't group them in access controlled sections (e.g. in a web application).
In a related use case: documents could be updated by users, who have current information, but don't "own" the documents. Typically they send an email to the document owner (if that is visible) asking for the update of that information. Asking somebody to update data into some other system, that involves copy & paste from an eMail *is* a sign of a broken process. The solution to that seemingly contrary requirements: "update of certain fields" only and "update by anybody" can be solved using a pattern that I christianed " Inversion of Logging":
Instead of logging what has changed an application using this pattern creates a change request, stating what will be changed. This request is then processed by a central system and checked against system constraints. If an authorized user requests a change, the changes are applied without further user interaction. The change request is kept as record. If an unauthorized user requests a change a workflow is kicked of to determine if the request is suitable for approval to be then routed to the data owner (or data guardian) for approval. Once approved the changes are applied to the main document.
To make this internal flow transparent and pleasant to the users a few considerations need to be made:
All these solutions have in common, that they "merely" record changes made (typically in a query or post save event) after they happened (From a big picture perspective, a log on query-save is technically before, but after the trigger that will commit the change). While this works reasonable well for audit, adding another typical requirement calls for a different solution. More often than not the parts of a (workflow) document which can be altered by any given user change in the course of an [workflow] application. While Author fields protect a document at large, safeguarding individual fields becomes more tedious, especially when you can't group them in access controlled sections (e.g. in a web application).
In a related use case: documents could be updated by users, who have current information, but don't "own" the documents. Typically they send an email to the document owner (if that is visible) asking for the update of that information. Asking somebody to update data into some other system, that involves copy & paste from an eMail *is* a sign of a broken process. The solution to that seemingly contrary requirements: "update of certain fields" only and "update by anybody" can be solved using a pattern that I christianed " Inversion of Logging":
Instead of logging what has changed an application using this pattern creates a change request, stating what will be changed. This request is then processed by a central system and checked against system constraints. If an authorized user requests a change, the changes are applied without further user interaction. The change request is kept as record. If an unauthorized user requests a change a workflow is kicked of to determine if the request is suitable for approval to be then routed to the data owner (or data guardian) for approval. Once approved the changes are applied to the main document.
To make this internal flow transparent and pleasant to the users a few considerations need to be made:
- Default Access to Database is Author, but documents don't contain Author fields. So users can create new documents, but can't edit existing documents.
- You need to handle QueryOpen (mode=edit) and QueryModeChange events (from read to edit) in Notes clients as well as ?EditDocument in web applications. Ideally to a user it looks like going into edit mode, so the inner workings of the solution stay transparent.
- You need a mail-in database (Default access=Depositor) to collect the change requests. If the interval of the "if new mail arrives" agent is too long for you, you might consider an XPage and a @URLOpen agent as faster trigger option (more on that in another post)
- You need to have a rule book for what fields can be updated in which application by whom based on what document status. This sounds awfully like business process engineering and as a matter of fact: it is.
- You need to make a call how do you want to handle pending changes. For one you probably want to display a hint on the form. That costs you one @DBLookup (which should be bearable). You could also include the pending changes into the working copy of the document. The interesting question here: how to handle the flow if such a pending change is rejected. Or - if you base the working copy on the existing document, what if the changes requested match a pending change request (e.g. waiting for approval) and would get auto-approval. So you need to plan for a potential resequencing.
- Don't resort to email as the default notification mechanism. Rather add a record to a notification application (using a web service for that seems like an excellent idea) where a user could define how (s)he wants to be notified and what eventual notification exceptions (e.g. delegation of authority) exist.
- This pattern is suitable for master data management and workflow applications. You might not want to use it for transactional applications, while you might very well use it for updates to the pricelist driving the transactional application.
- Plan your archive well. You can keep the current archive in a profile in the change request database and switch based on calendar, size or number of entries
- The change request database should have a short deletion stub lifecycle (default is 30 days, cut it to 5) since you create and delete a lot of documents during the course of the application. You could consider to delete/recreate that database during a time-out period (or use 2 different database names based on the day of week, so you can recreate savely on alternate days.
- Make sure that in a multi-server environment the apply-changes agent is running only on one server. Make sure to plan for agent fail-over in a cluster environment.
- Provide an easy UI for data integrity checks. I don't think an automatic check would be needed in most of the cases. It might be smart to record the archive databases in the main document, so lookups will be faster. However you want to have an "Auditor" function that does a deep check. Eventually you would send a request to a mail-in database, so the UI isn't blocked while a lot of archives get queried.
Posted by Stephan H Wissel on 03 May 2009 | Comments (c) | categories: Show-N-Tell Thursday


Crystal Palace striker Christian Benteke banned from driving for speeding
The Belgian already had nine points on his licence for previous offences.
Crystal Palace striker Christian Benteke has been criticised by a magistrate after he was banned from driving for a series of speeding offences.
The Belgium international, who already had nine points on his licence for previous offences, was handed a 12-month road ban at London’s Lavender Hill Magistrates Court on Friday.
Chair of the bench Pamela Stokes said the 28-year-old, who did not attend the hearing, had “fallen far short” of being a role model to fans.
She said: “I note that Benteke is someone who has offended before, and I also noted the very high speeds recorded for these matters before us today.
“Benteke is a well-known footballer who has many fans, and he should be seen as a role model to those fans – his offending has fallen far short of being a role model.”
The court heard Benteke, of Kingston Hill, Surrey, was caught driving his Bentley at 80mph in a 50mph zone on the A3 in Richmond, south-west London, on January 20.
He was later clocked at 89mph in a 40mph zone on a stretch of the same road in Putney on March 11. He admitted both offences.
He was also found guilty of driving the vehicle at 64mph in a 30mph zone in Streatham Place, south-west London, on July 22.
Benteke was also ordered to pay £2,780 in fines, costs and surcharges.


Three killed in accident
by Staff ReporterMADURAI
Three persons were killed in a head-on collision between a car and a TNSTC bus at Puliankulam near Tirumangalam on Madurai-Tirunelveli highway early on Saturday morning.
The Austinpatti police identified the deceased as Prasanna, 28, belonging to Tirumangalam, Dinesh Kumar, 29, and Guna, 23, belonging to Ponmeni here. The victims are said to be photographers.
The police said that the trio was proceeding in the car towards Tirumangalam from Madurai around 3 a.m. on Saturday, when the TNSTC bus plying from Tirunelveli to Madurai collided head-on. All the three men died on the spot.
Fire and Rescue Service personnel from Madurai and Tirumangalam rushed to the spot and retrieved the bodies from the mangled remains of the car and sent them to the Government Rajaji Hospital for post-mortem.
The police have registered a case.


Max Hailperin, Barbara Kaiser, Karl Knight
Referred to by Bratteteig. Offers a set of abstractions for computation, which are presented as educational, but also perhaps exhaustive of the space of possible computations.
"This book is divided into three parts, dealing with procedural abstractions, data
abstractions, and abstractions of state.
"A procedure is a way of abstracting what’s called a computational process. Roughly speaking, a process is a dynamic succession of events—a happening."
"Data is the information processed by computational processes, not only the externally visible information, but also the internal information structures used within the processes."
"State is anything that can be changed by one part of a computation in order to have an effect on a later part of the computation."