Standard output
07:38:14.437 [Test worker] INFO o.m.release.comparison.ZipCompare - Comparing /tmp/junit4357189034725827240/junit7843417331941123776/zip-1.zip with /tmp/junit4357189034725827240/junit7843417331941123776/zip-2.zip
07:38:14.438 [Test worker] INFO o.m.release.comparison.ZipCompare - 4 entries matched
07:38:14.438 [Test worker] INFO o.m.release.comparison.ZipCompare - Comparing /tmp/junit4357189034725827240/junit7843417331941123776/zip-2.zip with /tmp/junit4357189034725827240/junit7843417331941123776/zip-1.zip
07:38:14.439 [Test worker] INFO o.m.release.comparison.ZipCompare - 4 entries matched
07:38:14.439 [Test worker] INFO o.m.release.comparison.ZipCompare - Comparing /tmp/junit4357189034725827240/junit7843417331941123776/zip-6.zip with /tmp/junit4357189034725827240/junit7843417331941123776/zip-7.zip
07:38:14.439 [Test worker] INFO o.m.release.comparison.ZipCompare - 0 entries matched
07:38:14.440 [Test worker] INFO o.m.release.comparison.ZipCompare - Comparing /tmp/junit4357189034725827240/junit7843417331941123776/zip-7.zip with /tmp/junit4357189034725827240/junit7843417331941123776/zip-6.zip
07:38:14.440 [Test worker] INFO o.m.release.comparison.ZipCompare - 0 entries matched
07:38:14.467 [Test worker] INFO o.m.release.comparison.ZipCompare - Comparing /tmp/junit4357189034725827240/junit7843417331941123776/zip-1.zip with /tmp/junit4357189034725827240/junit7843417331941123776/zip-3.zip
07:38:14.470 [Test worker] INFO o.m.release.comparison.ZipCompare - x/y/4.txt does not match
07:38:14.474 [Test worker] INFO o.m.release.comparison.ZipCompare - 3 entries matched
07:38:14.481 [Test worker] INFO o.m.release.comparison.ZipCompare - 1 entries did not match
07:38:14.489 [Test worker] INFO o.m.release.comparison.ZipCompare - Comparing /tmp/junit4357189034725827240/junit7843417331941123776/zip-1.zip with /tmp/junit4357189034725827240/junit7843417331941123776/zip-4.zip
07:38:14.491 [Test worker] INFO o.m.release.comparison.ZipCompare - x/y/4.txt not found in /tmp/junit4357189034725827240/junit7843417331941123776/zip-4.zip
07:38:14.491 [Test worker] INFO o.m.release.comparison.ZipCompare - 3 entries matched
07:38:14.492 [Test worker] INFO o.m.release.comparison.ZipCompare - 1 entries did not match
07:38:14.493 [Test worker] INFO o.m.release.comparison.ZipCompare - Comparing /tmp/junit4357189034725827240/junit7843417331941123776/zip-1.zip with /tmp/junit4357189034725827240/junit7843417331941123776/zip-5.zip
07:38:14.494 [Test worker] INFO o.m.release.comparison.ZipCompare - x.txt not found in /tmp/junit4357189034725827240/junit7843417331941123776/zip-1.zip
07:38:14.495 [Test worker] INFO o.m.release.comparison.ZipCompare - 4 entries matched
07:38:14.496 [Test worker] INFO o.m.release.comparison.ZipCompare - 1 entries did not match
07:38:14.505 [Test worker] INFO o.m.release.comparison.ZipCompare - Comparing /tmp/junit4357189034725827240/junit7843417331941123776/zip-1.zip with /tmp/junit4357189034725827240/junit7843417331941123776/zip-6.zip
07:38:14.514 [Test worker] INFO o.m.release.comparison.ZipCompare - 1.txt not found in /tmp/junit4357189034725827240/junit7843417331941123776/zip-6.zip
07:38:14.515 [Test worker] INFO o.m.release.comparison.ZipCompare - x/2.txt not found in /tmp/junit4357189034725827240/junit7843417331941123776/zip-6.zip
07:38:14.515 [Test worker] INFO o.m.release.comparison.ZipCompare - x/y/3.txt not found in /tmp/junit4357189034725827240/junit7843417331941123776/zip-6.zip
07:38:14.516 [Test worker] INFO o.m.release.comparison.ZipCompare - x/y/4.txt not found in /tmp/junit4357189034725827240/junit7843417331941123776/zip-6.zip
07:38:14.517 [Test worker] INFO o.m.release.comparison.ZipCompare - 0 entries matched
07:38:14.517 [Test worker] INFO o.m.release.comparison.ZipCompare - 4 entries did not match


{% extends "global/Page.html" %} {% load staticfiles otree %} {% block title %} Stage 1 {% endblock %} {% block content %}
In each round you will see two lotteries, each of which is auctioned in a different auction.
Indicate which auction you would prefer to bid in.
{% next_button %} {% endblock %}


Home
About
Services
Contact
My Bag

Login

Signup

Hey

Logout
Order Summary
Order ID :
Order Recieved
Items Recieved
Dry Cleaned
Items Packed
Items Dispatched
Order Delivered


Sq Changelog. For seriously headaching details see here.
| 2013-10-06 | Few bug fixes around pausing and gaining a life after having no more lives. |
| 2013-09-30 | Launch with this site. |
This is not a Geometry War clone, but a battlefield of Experimentation
Encounter 100 unique waves, 46 distinct types of enemies, from simply firing bullets, chasing after you, to blinking, mine-laying, and even bullet-repelling and ninja enemies.
With their deceptive appearance only differ by colour, how long can you survive?
Controls: WASD or arrow keys to move, mouse left-click to fire.
Tilt Blocks Changelog. For seriously headaching details see here.
| 2013-10-03 | Fix level 2-8 having zero allowed steps in some browsers. |
| 2013-09-30 | Launch with this site |
Moving all blocks in one direction. Make use of elements to put them together.
100 Mind-twisting puzzles. Rarely-seen puzzle type. Extra elements from one-way road to moving walls teasing your brain even more.
An extra level editor allowing you to share your very own brain-teasing puzzles with you friends.


Preferences
Privacy
As fellow software engineers, we deeply understand your concern on privacy. AI.codes will NEVER transmit any code to our server.
We infer your intention only based on class and method names, and your intention lines start with ///.
You can add additional incognito class rules here. You can use
-
fully qualified name, e.g.
com.skunkworks.Secret
; or -
regex, e.g.
com.skunkworks.secret.*
.


You need {{points_left}} more points to reach {{next_level}} level
Congratulations! You've attained the highest level
{{achievement.name}}
{{row.player.alias}}
{{row.score}} Points
Welcome to the Playlyfe!
Playlyfe breaks down the high entry barrier to applying gamification. Our online gamification platform can be used to model a wide variety of gamified systems. Websites can use Playlyfe to engage their visitors and drive behaviours.
You can track any user interaction and award points using our API


Tags: nan
Style: Impressionism
Artist: Monet Claude
Title: In The Woods At Giverny Blanche Hoschede
Year: 1887
Genre: genre painting
Categories: chain_saw (67.1%); swing (5.9%); lawn_mower (3.8%); broom (2.1%); apiary (1.9%)
<< previous image next image >>


Assignment 4 | Python, HashCat, Jupiter Notebook
Password Cracking
Part 1: Fast Hashes
For Part 1, I used HashCat to crack 51% of a list of 400 password hashes -- SHA1($pass.$salt).
I used the following methods:
1. brute-force guesses, such as 5 digit numbers, 6 digit numbers, capitalized 5 letter word + two numbers at the end (e.g. Alex87, for an Alex born in 1987).
2. selected wordlists, such as passwords from the RockYou data breach.
3. wordslists + mangling, such as RockYou data breach + leetspeak rule set.
51% of 400 hashes took roughly 4 hours of computing time on Jupiter Notebook.
Part 2: Slow Hashes
Part 3&4: Online Attacks


|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.gwt.inject.rebind.util.SourceWriteUtil
public class SourceWriteUtil
Helper object for source writing.
| Nested Class Summary | |
|---|---|
static interface |
SourceWriteUtil.Factory
Factory for SourceWriteUtil . |
| Constructor Summary | |
|---|---|
protected |
SourceWriteUtil(GuiceUtil guiceUtil,
MemberCollector memberCollector,
MethodCallUtil methodCallUtil,
BindingIndex bindingIndex)
|
| Method Summary | |
|---|---|
SourceSnippet |
createFieldInjection(FieldLiteral<?> field,
java.lang.String injecteeName,
NameGenerator nameGenerator,
java.util.List<InjectorMethod> methodsOutput)
Creates a field injecting method and returns a string that invokes the written method. |
SourceSnippet |
createFieldInjections(java.lang.Iterable<FieldLiteral<?>> fields,
java.lang.String injecteeName,
NameGenerator nameGenerator,
java.util.List<InjectorMethod> methodsOutput)
Appends a field injecting method for each passed field to the sourceWriter and returns a string that invokes all written
methods. |
java.lang.String |
createMemberInjection(TypeLiteral<?> type,
NameGenerator nameGenerator,
java.util.List<InjectorMethod> methodsOutput)
Generates all the required injector methods to inject members of the given type, and a standard member-inject method that invokes them. |
SourceSnippet |
createMethodInjections(java.lang.Iterable<? extends MethodLiteral<?,?>> methods,
java.lang.String injecteeName,
NameGenerator nameGenerator,
java.util.List<InjectorMethod> methodsOutput)
Creates a method injecting method and returns a string that invokes the new method. |
static java.lang.CharSequence |
join(java.lang.CharSequence delimiter,
java.lang.Iterable<? extends java.lang.CharSequence> list)
|
void |
writeBindingContext(com.google.gwt.user.rebind.SourceWriter writer,
Context context)
Writes out a binding context, followed by a newline. |
void |
writeBindingContextJavadoc(com.google.gwt.user.rebind.SourceWriter writer,
Context bindingContext,
Key<?> key)
Write the Javadoc for the binding of a particular key, showing the context of the binding. |
void |
writeBindingContextJavadoc(com.google.gwt.user.rebind.SourceWriter writer,
Context bindingContext,
java.lang.String description)
Write a Javadoc comment for a binding, including its context. |
void |
writeMethod(InjectorMethod method,
com.google.gwt.user.rebind.SourceWriter writer,
InjectorWriteContext writeContext)
Writes the given method to the given source writer. |
void |
writeMethod(com.google.gwt.user.rebind.SourceWriter writer,
java.lang.String signature,
java.lang.String body)
Writes a method with the given signature and body to the source writer. |
void |
writeMethods(java.lang.Iterable<InjectorMethod> methods,
com.google.gwt.user.rebind.SourceWriter writer,
InjectorWriteContext writeContext)
Writes the given methods to the given source writer. |
void |
writeNativeMethod(com.google.gwt.user.rebind.SourceWriter writer,
java.lang.String signature,
java.lang.String body)
Writes a native method with the given signature and body to the source writer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
@Inject protected SourceWriteUtil(GuiceUtil guiceUtil, MemberCollector memberCollector, MethodCallUtil methodCallUtil, BindingIndex bindingIndex)
| Method Detail |
|---|
public SourceSnippet createFieldInjections(java.lang.Iterable<FieldLiteral<?>> fields, java.lang.String injecteeName, NameGenerator nameGenerator, java.util.List<InjectorMethod> methodsOutput) throws NoSourceNameException
sourceWriter
and returns a string that invokes all written
methods.
fields
- fields to be injectedinjecteeName
- variable that references the object into which values
are injected, in the context of the returned call string
NoSourceNameException
public SourceSnippet createFieldInjection(FieldLiteral<?> field, java.lang.String injecteeName, NameGenerator nameGenerator, java.util.List<InjectorMethod> methodsOutput) throws NoSourceNameException
field
- field to be injectedinjecteeName
- variable that references the object into which values
are injected, in the context of the returned call stringnameGenerator
- NameGenerator to be used for ensuring method name uniqueness
NoSourceNameException
public SourceSnippet createMethodInjections(java.lang.Iterable<? extends MethodLiteral<?,?>> methods, java.lang.String injecteeName, NameGenerator nameGenerator, java.util.List<InjectorMethod> methodsOutput) throws NoSourceNameException
Ginjector
.
If the passed method collection contains only one actual method, the native
method will pass on (i.e. return) the result of the actual method's
invocation, if any.
The passed method collection can contain constructors (they'll be treated
correctly) if no injecteeName
is passed. The same applies for
static methods.
If a method without parameters is provided, that method will be called and
no parameters will be passed.
methods
- methods to be called & injectedinjecteeName
- variable that references the object into which values
are injected, in the context of the returned call string. If
null
all passed methods are called as static/constructors.nameGenerator
- NameGenerator to be used for ensuring method name uniquenessmethodsOutput
- a list where all new methods created by this
call are added
NoSourceNameException
public void writeBindingContext(com.google.gwt.user.rebind.SourceWriter writer, Context context)
Binding contexts may contain newlines; this routine translates those for the SourceWriter to ensure that indents, Javadoc comments, etc are handled properly.
public void writeBindingContextJavadoc(com.google.gwt.user.rebind.SourceWriter writer, Context bindingContext, java.lang.String description)
description
- The description of the binding printed before its
location, such as "Foo bound at: "writer
- The writer to use in displaying the context.bindingContext
- The context of the binding.public void writeBindingContextJavadoc(com.google.gwt.user.rebind.SourceWriter writer, Context bindingContext, Key<?> key)
key
- The bound key.writer
- The writer to use to write this comment.bindingContext
- The context of the binding.public void writeMethod(com.google.gwt.user.rebind.SourceWriter writer, java.lang.String signature, java.lang.String body)
writer
- writer that the method is written tosignature
- method's signaturebody
- method's bodypublic void writeNativeMethod(com.google.gwt.user.rebind.SourceWriter writer, java.lang.String signature, java.lang.String body)
writer
- writer that the method is written tosignature
- method's signaturebody
- method's bodypublic void writeMethod(InjectorMethod method, com.google.gwt.user.rebind.SourceWriter writer, InjectorWriteContext writeContext) throws NoSourceNameException
NoSourceNameException
public void writeMethods(java.lang.Iterable<InjectorMethod> methods, com.google.gwt.user.rebind.SourceWriter writer, InjectorWriteContext writeContext) throws NoSourceNameException
methods
- the methods to writewriter
- the source writer to which the methods should be writtenwriteContext
- the context in which to write the methods
NoSourceNameException
public java.lang.String createMemberInjection(TypeLiteral<?> type, NameGenerator nameGenerator, java.util.List<InjectorMethod> methodsOutput) throws NoSourceNameException
type
- type for which the injection is performednameGenerator
- the name generator used to create method namesmethodsOutput
- a list to which the new injection method and all its
helpers are added
NoSourceNameException
public static java.lang.CharSequence join(java.lang.CharSequence delimiter, java.lang.Iterable<? extends java.lang.CharSequence> list)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


{% extends "base.html" %} {% block title %}Common Lisp Tutorial{% endblock %} {% block header %}{{self.title()}}{% endblock %} {% block head %} {% endblock %} {% block content %}
This is my attempt to make a Common Lisp tutorial, since all of the ones I found on the internet were either out of date or needlessly confusing.
This is a guide that I made of information I wish I had when starting with Lisp. It does assume prior programming knowledge in another language. It's hardly comprehensive, but will hopefully be a good starting place for learning the language. Enjoy!
In Lisp, nearly everything is a function. Even the mathematical operators. For example:
(+ (* 2 3) 1)
equals 7.
As you can tell, the functions open and close with parenthesis. The format for calling functions in Lisp is
(function arg1 arg2)
setq
is used to set variables.
(setq var 32)
(setq str "Texas")
(setq lst '(1 2 3))
The three types of data here are numbers, strings, and lists. Notice that Lisp, unlike Java, is dynamically typed.
Note: The '
in list statement is called the quote operator, and tells Lisp that the input is a list, and not to interpret it as a function.
setq
sets the variable globally. To create a local variable (e.g. inside a function), use the let
function.
(let
((a 1)
(b 2))
... )
The variables a
and b
will only be defined within let
's parentheses.
To comment in Lisp, prefix the line with ;
; This is a comment!
The if
statement is a bit different from other programming languages.
(if (< 2 3)
(... true ...)
(... false ...))
Lisp executes the first block of code if the conditional statement is true. The second statement (which is optional) serves as the else statement.
If you want to execute multiple functions in the if statement (which is common) use the progn
function, which serves to group multiple functions together.
(if (> 3 4)
(progn
(setq x (+ x 1))
(setq y x))
(setq x 0))
If you want an if else statement, then you'd want to use the cond
function
(cond
((> x 1) (setq y 1))
((< x 1) (setq y 2))
(t (setq y 0)))
For boolean values, t
represents true, and nil
represents false. Lisp treats an empty list '()
(or nil
) as false and all other inputs as true.
This is a convenient feature of the language to know. For instance, to do something only if a list is not empty, the following two chunks of code are identical.
(if (> (length lst) 0)
(...))
(if lst
(...))
While loops are accomplished in the following manner:
(loop while (> n 0)
(setq n (- n 1)))
Although for the most part, recursion is the more popular way to accomplish loops.
Lists are important in Lisp, which is why Lisp stands for LISt Processing. I'd recommend reading up on Wikipedia's article on linked lists to fully understand this section.
(setq lst '(1 2 3))
To get the first item from the list, use the first
function. To get the rest of the items, use rest
. The are historically known as car
and cdr
, so you may see it referred to as such in older texts.
(first lst) => 1
(rest lst) => (2 3)
Lisp provides some helpful shortcuts to access other items in the list as well.
(second lst) => 2
(third lst) => 3
(fourth lst) => nil
Note: You could access these elements without these functions through repeatedly using first
and rest
. For instance, second
is equivalent to (first (rest lst)))
.
These functions are to save you a bit of typing.
To add an item to the beginning of the list, use the cons
function. cons
returns a new list with the element prefixed to the beginning of the list.
(cons 0 lst) => (0 1 2 3)
These functions really only make sense in the context of recursion, which is very prevalent in Lisp. Below is an example of a recursive sum function which uses both first
and rest
in a recursive context.
(defun sum (lst)
(if (not lst)
0
(+ (first lst) (sum (rest lst)))))
defun
is used to define functions.
(defun square (x)
(* x x))
(defun add (x y)
(+ x y))
Note: Lisp implicitly returns the value of the last statement in a function.
Calling functions is pretty straight forward; we've been doing it throughout this guide.
(square 9) => 81
(add 2 4) => 6
One of Lisp's most powerful features is the ability to pass functions to other functions. I'll list below some of the built in functions in Lisp that take advantage of this feature and are important to know. Most of these functions take two arguments, a function and a list.
mapcar
(map). Returns the list the results from applying the function to each of the items in the list. The following example returns a new list with all the elements squared.(mapcar 'square '(1 2 3 4 5)) => '(1 4 9 16 25)
remove-if
(filter). Removes items from the list if the item, when plugged into the function, returns true. The following example returns a new list with all the odd numbers removed.(remove-if 'oddp '(1 2 3 4 5)) => '(2 4)
Note: Built-in functions in Lisp that end in a 'p' are predicates and return a boolean value.
reduce
. Reduces a list to a single value by applying the function to each of the items. The following example is equivalent to the sum function.(reduce '+ '(1 2 3 4 5)) => 15
Writing your own function to take in a functions is not particularly hard. Below is an example of how you could implement your own mapcar
.
(defun my-mapcar (fn lst)
(if lst
(cons (funcall fn (first lst)) (my-mapcar fn (rest lst)))))
Note: funcall
is used to run functions that are stored in variables
It's occasionally useful (particularly with the higher-order functions listed above) to create a function without a name, typically because it is only getting used once.
For instance, say you wanted to double all the elements in a list. A function to double a number would rarely get used outside this call, so this is a good opportunity to create an anonymous function. The following two chunks of code are equivalent.
(defun double (x) (* x 2))
(mapcar 'double '(1 2 3 4 5)) => '(1 4 6 8 10)
(mapcar (lambda (x) (* x 2)) '(1 2 3 4 5)) => '(1 4 6 8 10)
It'll be a judgement call whether to go with the brevity of an anonymous function or the readability afforded by naming the function.
The print
function can be used for basic output.
(print 512)
More complicated printing in Lisp is a bit difficult. Lisp has the format
function, which is analogous to the printf
function in C. The basic structure is
(format t "~a ~a of beer on the wall.~%" 99 "bottles")
The t
argument means to print to the standard output, ~a
says to replace with the variable, and ~%
means newline.
For a more in depth look at Lisp's format
function, refer to this chapter in Practical Common Lisp. It has everything you could possibly want to know and more about printing in Lisp.
by Max Timkovich (if you have any suggestions for improvements, shoot me an email)
last updated August 6, 2014
{% endblock %}


While the Flare REST API is used to model the hierarchy of environment, zone, thing and device objects, the Flare Socket.IO API is used for real-time communication between the objects.
It uses Socket.IO, a library that enables real-time bidirectional event-based communication and works on every platform, browser and device.
In the object-oriented programming paradigm, objects have data and code. Similarly, the Flare Socket.IO API lets an application get or set data values, and perform actions.
Unline REST APIs that use the HTTP request/response loop, Socket.IO messages are one-way and can be sent from the client to the server, or from the server to the client.
The Flare Socket.IO APIs relate to Flare objects, including environments, zones, things or devices. In any case, it is necessary for all messages to specify the ID of the object that it refers to. The object is specified using its type and ID, for example:
subscribe {"environment": "123"}
subscribe {"zone": "456"}
subscribe {"thing": "789"}
subscribe {"device": "234"}
When an application launches or a web page loads, it creates a socket and connects to the server. Each client can subscribe to one or more Flare objects to receive relevant messages about them. Clients can send a subscribe message to start receiving messages about an object, and later send an unsubscribe message to stop receiving messages about the object. The connection is stateful, so the server remembers which clients have subscribed to which objects. This prevents clients from receiving messages about objects that they don't care about.
Clients apps can have a socket connection that subscribes to one or more objects. Typically, a client represents a single Flare object: a native app on a mobile phone can represent a device object, and a web app on a computer attached to a big screen could represent a thing. In each case, the app would normally subscribe to the object it represents when it starts up. It is not always necessary to unsubscribe, as closing a connection will unsubscribe automatically and the server will clean up its internal state.
Clients may also subscribe to other objects for a short time. For example, the app for a device may subscribe to a thing when the device is physically near to the thing, or when the user wants to interact with it. When the device is no longer near the thing or the user has finished interacting, then the app can unsubscribe from that thing. While devices can be notified when they are near or far from a thing, subscribing and unsubscribing is the responsibility of the app and is not automatic.
If apps on your mobile platform are put to sleep when they are in the background, it may not be possible for them to receive notifications. If that is the case, then it would be better to disconnect the socket before entering the background (which will unsubscribe automatically), and to reconnect and subscribe again when the app returns to the foreground.
Clients that subscribe to an object will not necessarily receive all messages about the object:
These messages are sent from the client to the server.
When: Sent by the client when it wants to subscribe to an object.
Schema:
environment | zone | thing | device: string (required)
all: boolean (optional)
Example:
{"zone": "456"}
Result: The client will receive notifications about the object, for example when a data value or the position is changed, or when an action is performed on the object (and not handled by the server).
If all is true, messages will also be broadcast to all of an environment's zones, things and devices; and to all of a zone's things.
When: Sent by the client when it wants to unsubscribe from an object.
Schema:
environment | zone | thing | device: string (required)
Example:
{"zone": "456"}
Result: The client will no longer receive notifications about the object.
Note: It is not necessary to unsubscribe when the client app wants to receive notifications about an object until the connection is closed.
When: Sent by the client when it wants to get some or all data values for an object.
Schema:
environment | zone | thing | device: string (required)
key: string (optional)
Example:
{"zone": "456"}
{"thing": "789", "key": "color"}
Result: The client will be sent a data message containing some or all data values for the object. If a key is included in the message, then only the corresponding key/value pair will be returned. Otherwise, all key/value pairs will be returned. For example:
{"zone": "456", "data": {"page": 3, "mood": "chill"}}
{"thing": "789", "data": {"color": "red"}}
Note: This is equivalent to calling /environments/{environment_id}/zones/{zone_id}/things/{thing_id}/data to get all data about a thing, or /environments/{environment_id}/zones/{zone_id}/things/{thing_id}/data/{key} to get a specific field. An app can use the Socket.IO or REST interfaces for getting data, depending upon what is more convenient.
When: Sent by the client when it wants to change a data value for an object.
Schema:
environment | zone | thing | device: string (required)
key: string (required)
value: mixed (required)
Example:
{"thing": "789", "key": "color", "value": "purple"}
Result: Other subscribers to the object will receive a data message with the key/value pair that has been changed.
{"thing": "789", "data": {"color": "purple"}}
Note: The client that sent the original setData message will not receive a notification because it would be redundant; presumably it already has the latest information.
When: Sent by the client when it wants to get the position of a thing or device.
Schema:
thing | device: string (required)
Example:
{"device": "234"}
Result: The client will be sent a position message containing the position of the object. For example:
{"device": "234", "position": {"x": 2.3, "y": 3.4}}
Note: This is equivalent to calling the GET /environments/{environment_id}/zones/{zone_id}/things/{thing_id}/position to get the position of a thing. An app can use the Socket.IO or REST interfaces for getting data, depending upon what is more convenient.
When: Sent by the client when it wants to change the position of an object.
Schema:
thing | device: string (required)
position: object (required)
x: number (required)
y: number (required)
Example:
{"device": "234", "position": {"x": 4.5, "y": 5.6}}
Result: Other subscribers to the object will receive a position message with the new position. For example:
{"device": "234", "position": {"x": 4.5, "y": 5.6}}
Note: The client that sent the original setPosition message will not receive a notification because it would be redundant; presumably it already has the latest information.
This may trigger a near or far message if a device becomes near to a thing, or is no longer near to a thing. See the documentation below for those messages.
When: Sent by the client when it wants to perform an action on an object. Actions are identified by strings, and the list of possible actions for an object is contained in the actions property, accessible using the REST API.
Schema:
environment | zone | thing | device: string (required)
action: string (required)
Example:
{"zone": "234", "action": "next"}
Result: The action can be handled by the server or the client. For the server to handle the action, a function with the name of the action should be defined in the file actions.js on the server. The function can interact with the specified object or other objects (by manipulating them directly), and may case other messages to be sent.
If the server does not handle the action, then a handleAction message will be sent to all subscribers of the object, including the sender. For example:
{"zone": "234", "action": "next"}
The client can then interact with the specified object or other objects (by sending more messages to the server).
Note: Actions do not have input or output values, but they can operate on data values. For example, an action can optionally use one or more data values as input, and can optionally use one or more data values as output. For example, a "next" message could increment the "page" value, which would cause a data message to be sent to subscribers of the object.
You don't need to use an action to simply change a data value. You can use setData to set the value directly, and any subscribers for the object will be notified of the change. For example, if the current page is 3, instead of performing a next action you could call setData like this:
{"zone": "234", "key": "page", "value": 4}
These messages are sent from the server to the client, usually in response to other messages that have been sent to the server. Depending upon the event that triggered the message, the could be sent to the sender of the original message, to all other subscribers of an object, or to all subscribers of an object (including the sender).
When: Sent by the server to a client who has requested the current data by sending a getData message, or to all other subscribers when a client has changed a data value by sending a setData message.
Schema:
environment | zone | thing | device: string
data: object
Example:
{"zone": "456", "data": {"page": 3, "mood": "chill"}}
{"thing": "789", "data": {"color": "red"}}
Note: If a key was included in the getData message, then only the corresponding key/value pair will be returned. Otherwise, all key/value pairs will be returned.
When: Sent by the server to a client who has requested the current position by sending a getPosition message, or to all other subscribers when a client has changed the current position by sending a setPosition message.
Schema:
thing | device: string
position: object
x: number
y: number
Example:
{"device": "234", "position": {"x": 2.3, "y": 3.4}}
When: Sent by the server when a device has entered the perimeter of a zone, as a result of a setPosition call for the device. The message is sent to all subscribers of the device and all subscribers of the zone.
Schema:
device: string
zone: string
Example:
{"device": "234", "zone": "456"}
Note: A device is only considered to be inside one zone at a time. If a device is inside the perimeter of two zones that overlap, the device may be considered to be inside one zone or the other. A zone, on the other hand, may have several devices that are inside it.
The device may continue to move around inside a zone. An enter message will only be sent when a device enters the zone, and an exit message will only be sent when the device leaves the zone.
When: Sent by the server when a device is no longer near to a thing, as a result of a setPosition call for the device. The message is sent to all subscribers of the device and all subscribers of the thing.
Schema:
device: string
zone: string
Example:
{"device": "234", "thing": "789"}
When: Sent by the server when a device has become near to a thing, as a result of a setPosition call for the device. The message is sent to all subscribers of the device and all subscribers of the thing. A device is considered near to a device when the diagonal distance is less than a certain threshold defined by the server (by default, 1 meter).
Schema:
device: string
thing: string
distance: number
Example:
{"device": "234", "thing": "789", "distance": 0.91}
Note: When a device and a thing are nearby, they can interact. Typically, the client representing the device can subscribe to the thing, and the client representing the thing can subscribe to the device.
A device is only considered to be near to one thing at a time, so if it is within the given threshold of several devices, it is considered to only be near to the closest one. A thing, on the other hand, may have several devices that are near it.
The device may continue to move around inside a circle around the thing defined by the minimum threshold. A near message will only be sent when a device enters the circle, and a far message will only be sent when the device leaves the circle (unless the device becomes closer to another thing).
The distance value in the near message is the distance between the device and the thing at the time that the server received a setPosition message that caused it to become near to the thing. If the client representing the thing subscribes to the device, then it can continue to receive position updates for the device as it moves around. It should check the ID of the object in the position message to know if it applies to the thing or a nearby device.
When: Sent by the server when a device is no longer near to a thing, as a result of a setPosition call for the device. The message is sent to all subscribers of the device and all subscribers of the thing.
Schema:
device: string
thing: string
Example:
{"device": "234", "thing": "789"}
Note: When a device and a thing are no longer nearby, they may not want to interact anymore. Typically, the client representing the device can unsubscribe from the thing, and the client representing the thing can unsubscribe from the device.
When: Sent by the server to all subscribers of an object when a client has sent a performAction message, and the server did not handle the message. The client may then take any appropriate action.
Schema:
environment | zone | thing | device: string
action: string
Example:
{"thing": "789", "action": "buy"}


New Member Application
PLEASE ANSWER EACH QUESTION AND HIT SUBMIT
* Required
About You
Gender
Male
Female
Other
RACE/NATIONALITY
BLACK/AFRICAN AMERICAN
ASIAN
HISPANIC/LATINO
WHITE/EUROPEAN AMERICAN
AMERICAN INDIAN/ALASKA NATIVE
NATIVE HAWAIIAN/PACIFIC ISLANDER
MULTI-ETHNIC
CONTACT INFO
Interests and Availability
Submit