otp2ocp(1) Omega otp2ocp(1) NAME otp2ocp - convert Omega Translation Process files to Omega Compiled Process files SYNOPSIS otp2ocp OTPFILE[.otp] [OCPFILE[.ocp]] DESCRIPTION otp2ocp is used to create or recreate Omega Compiled Process files (binary) from Omega Translation Process (text) files. Omega Translation Processes are rules used to translate one character set to another and to choose between characters with one or more context-sen‐ sitive variants. OTPs could also be used to change the case or hyphen‐ ation of text. SEE ALSO mkocp(1), omega(1). Draft Manual for the Omega System (omega-manual.dvi). Web page: <http://www.gutenberg.eu.org/omega/> AUTHOR The primary authors of Omega are John Plaice<EMAIL_ADDRESS>and Yannis Haralambous<EMAIL_ADDRESS>This manual page was written by C.M. Connelly<EMAIL_ADDRESS>for the Debian GNU/Linux system. It may be used by other distributions without contacting the author. Any mistakes or omissions in the manual page are my fault; inquiries about or corrections to this manual page should be directed to me (and not to the primary author). Omega September 2000 otp2ocp(1)


Has The First Reading & Leeds 2020 Headliner Been Revealed?
Is Liam Gallagher headlining Reading & Leeds 2020?
Update: Reading & Leeds have just confirmed that Liam Gallagher is indeed headlining next year:
Original story: This time last year we’d already found out all four Reading & Leeds 2019 headliners, with the festival announcing on November 21 that Foo Fighters, twenty one pilots, The 1975 and Post Malone would be topping the bill at Richfield Park and Bramham Park.
Looking ahead to next year’s event, though, and very little is known about the line-up for Reading & Leeds 2020. Well… until now. It looks as though former Oasis frontman Liam Gallagher, who has been enjoying an incredibly successful solo career for the past few years, will be performing, having tweeted, “Reading & Leeds c’mon you know.” With the cat seemingly out of the bag, the festival then quoted his post and wrote: “Nice one Liam Gallagher… kept that quiet.”
Given that just last night Liam headlined London’s O2 Arena – which has a capacity of 20,000 – it only seems right that his name will be right at the very top of the bill, but the festival is yet to confirm his position on the line-up (or, indeed, if the whole thing is just a joke).
British betting and gambling company Ladbrokes recently unveiled their odds on who might also headline Reading & Leeds 2020 (via Leeds-live), with the likes of Royal Blood, Bring Me The Horizon and blink-182 on their 16-act shortlist. Elsewhere, The Vaccines, Billie Eilish, Chance The Rapper, The Libertines and Arctic Monkeys are also named as potential headliners.
Stay tuned…
Until we find out more, check out the highlights from Reading & Leeds 2019.
Read this next: 13 songs that feature unsettling subliminal messages


This is what happens if the datacontent is not providing the correct data - the child component will revert to its default property in the props object.


---
class-body: at-grid at-prototyping case-viasatsport
layout: default-pages
title: CG | Case | Viasatsport
---
Viasatsport.se is a advertising based sport news service with xxx xxx visitors every month. Viasatsport is the MTG and Viasport/viasat has the rights to a huge number of premium sports content. It consists of football, motorsports, golf and many others. It’s this content that the consumer comes to Viasatsport.se for.
One of us is a sports nerd – the other one didn’t even know the difference between Champions League and Premier League in the start of the project. A problem? No, on the contrary: this turned out to be a perfect match!
The problem with a lot of sports sites seems to be that it either is built by sports nerds (think news, stats and content everywhere) or by designers (think white space, large images, and flat icons everywhere).
We wanted to mix these both perspectives to find a solution where the actual sports are in focus and where a modern design approach would help the user in browsing and exploring the content.
Simply put: to create a modern-looking sports product – with lots of content but without the clutter.
From the start the assignment was to create the UX and design for the Rio Olympics 2016 website.
Eventually the project grew and in the end we were Link to medium for the UX and design for the entire responsive website, the app and the editor CMS.
From the start the assignment was to create the UX and design for the Rio Olympics 2016 website.
Eventually the project grew and in the end we were Link to medium for the UX and design for the entire responsive website, the app and the editor CMS.
{{> o-footer.o-footer}}


| Elements' Summary |
| DropAction |
The action performed by the target on the subject of the drop.
|
| DropSuccess |
Indicates if the drop was successful.
|
| Elements' Details |
DropAction
byte DropAction;
- Description
- The action performed by the target on the subject of the drop.
- See also
- DNDConstants
|
|
DropSuccess
boolean DropSuccess;
- Description
- Indicates if the drop was successful.
|
|
Top of Page
Copyright © 2013, The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache, the Apache feather logo, Apache OpenOffice and OpenOffice.org are trademarks of The Apache Software Foundation. Other names may be trademarks of their respective owners.


jQuery TutorialjQuery tutorial for beginners and professionals provides deep knowledge of jQuery technology. Our jQuery tutorial will help you to learn jQuery fundamentals, example, selectors, events, effects, traversing, CSS and attributes. What is jQuery
jQuery ExampleIn this tutorial, you will get a lot of jQuery examples to understand the topic well. Let's see a simple jQuery example. File: firstjquery.htmlOutput: This is first paragraph. This is second paragraph. This is third paragraph. PrerequisiteBefore learning jQuery, you must have the basic knowledge of JavaScript. AudienceOur jQuery tutorial is designed to help beginners and professionals. ProblemWe assure that you will not find any problem in this jQuery tutorial. But if there is any mistake, please post the problem in contact form.
Next Topic
What is jQuery
|


Computer Technician, Software Developer
As a student, I want to create an About Me page as a demonstration of my skills with HTML, CSS, and JavaScript


Passing
When people talk about passing in juggling, they usualy refer to passing with clubs. Ocationaly you will see basic passing done with balls just for beginers, but all of the more complex patterns are done with clubs. It could be just for the simple reason that they are bigger and therefor easier to see, by both the jugglers and spectators.
The social aspect
Passing clubs has become almost a social event. It is a time to get together with all other jugglers and to work with every one to create a working pattern. The entire pattern is only as strong as its weakest link. The more advanced jugglers help out the newer ones to help the progress. This builds unity between the jugglers and creates a special enviorment to be in. One that make passing a favorate for many jugglers.


Section 1
Puppies are cute.
Section 2
Kittens are furry.
Section 3
Elephants have great memory.
toggle(section1)
collapse all


{% include 'photo/base.html' %} {% block content %} About The Gallery Welcome to the gallery application. feel free to search the picture that you want You can search by: Typing in the search bar category.Eithey by sport food nature travell programming Or by location: Nairobi Kisumu Nakuru Mombasa {% endblock %}
Welcome to the gallery application. feel free to search the picture that you want


System Architect Picture "Natural Progression"
Parent Diagram:
Projected Property
(OMT Object Model)


We are tired of people sharing pictures that were meant for their eyes only. Enough slut-shaming, let's share-shame them! All credit goes to @vicfabrice for ranting about this on twitter ;)


A VRID is the NSS part of an urn:valos URI. It is a string with two nested levels of syntactic structure. The outer structure consists of `@`-separated segments.
vrid = vgrid-segment *( "@" sub-segment )
The vgrid-segment uniquely identifies a *global resource*. The optional sub-segments identify an unambiguous path from the global resource to a *structural sub-resource* which also is the *referenced resource* of the VRID. Otherwise if there are no sub-segments the global resource is the referenced resource.
The inner structure consists of `$`-separated parts which specify the semantics of each individual segment.
vgrid-segment = "$" vgrid-format-term "$" vgrid-body
sub-segment = sub-type-term "$" sub-context-term "$" sub-body
The identified resource (and thus the VRID itself) is always affiliated with an event log in the context where the VRID appears. The *term* parts refer the event log JSON-LD context term definitions, both for syntactic purposes (e.g. as simple prefix expansions) as well as semantically (JSON-LD constructs such as index maps have semantic meaning for some VRID subsegments).
The two *body* parts carry the actual encodeURIComponent-encoded segment data. The precise meaning depends on the segment type (e.g. URI suffix, member access etc.).
Two VRIDs refer to the same resource iff their URN representations are urn-equivalent(i.e. if the two VRID's are equivalent after section 3.1. case normalization for step 3. percent-encoding case normalization).
Maintaining this consistency between lexical equivalence and semantic equivalence without having to dereference VRID's is useful but has implications.
When resources are transferred between event logs the semantics of their context terms and body-parts must remain equivalent.
A *simple equivalence* is that two simple prefix term definitions resolve to the same URI. An *extended equivalence* is when two extended term definitions in the source and target event logs are equivalent after normalization. These two equivalences are [will be] defined by this document.
More complex equivalences are outside the scope of this document but can be defined by specifications specifying segment types. These equivalences might take details of the particular sub-type-term into account and/or specify context definition additions which do not change the equivalence semantics.
The first segment identifies the global resource and is also called ValOS /Global/ Resource Id or *VGRID*. If there are no sub-segments then this global resource is also the referenced resource of the VRID.
vgrid-segment = "$" vgrid-format-term "$" vgrid-body
vgrid-format-term = context-term
vgrid-body = 1*unreserved
context-term = ALPHA 0*30( ALPHA / DIGIT / "-" ) ( ALPHA / DIGIT )
The VGRID character set is very restricted, with only "$" in addition to *unreserved* as specified in the URI specification).
Note: when using base64 encoded values as vgrid-body, use url-and-filename-ready base64url characters.
Global resources can be transferred between event logs. To maintain immutability across these transfers VGRID's must not contain partition or other non-identifying locator information. Similar to URN's VRID's always relies external structures and systems for carrying locator information.
Note: uuid v4 (format term `iu4`) is recommended for now, but eventually VGRID generation will be tied to the deterministic event id chain (format term `icc`). This in turn should be seeded by some ValOS authority.
sub-segment = sub-type-term "$" sub-context-term "$" sub-body
sub-type-term = *( unreserved / "!" / "*" / "'" / "(" / ")" )
sub-context-term = context-term
sub-body = *( unreserved / pct-encoded / "!" / "*" / "'" / "(" / ")" )
context-term = ALPHA 0*30( ALPHA / DIGIT / "-" ) ( ALPHA / DIGIT )
Note that while sub-type-term and sub-context-term grammar are still
relatively restricted, *sub-body* allows all characters in percent
encoded form (as per encodeURIComponent).
The sub-resources of a particular global resource can be nested and
thus form a tree. Individual sug-segments specify the edges in this
tree.
Each sub-segment specifies the relationship from its
*host resource* to its sub-resource in addition to other constraints of
the sub-resource. The global resource is the host resource for the
first sub-segment; the sub-resource of that segment is the host
resource of the second sub-segment and so on.
As the VRID identities of the sub-resources are structurally fixed to
this tree the coupling between host and sub-resource must be static.
The typical implementation for this is an ownership coupling.
<urn:valos:$iu4$f00b> a valos:Entity
; valos:prototype <urn:valos:$iu4$f00b-b507-0763>
Ghost sub-resources are products of ghost instantiation. All the ghosts of the directly _and indirectly_ owned resources of the instance prototype are flattened as _direct_ structural sub-resources of the instance itself. The instance is called *ghost host* of all such ghosts.
e.g. `<urn:valos:$iu4$f00b@!$iu4$ba54>` reads as "inside the instance resource `f00b` the ghost of the iu4 resource `ba54`" and infers triples:
<urn:valos:$iu4$f00b@!$iu4$ba54>
valos:ghostHost <urn:valos:$iu4$f00b>
; valos:ghostPrototype <urn:valos:$iu4$ba54>
In case of deeper instantiation chains the outermost ghost segment
provides inferences recursively to all of its sub-resources; nested
ghost segments wont provide any further inferences.
e.g. `<urn:valos:$iu4$f00b@!$iu4$ba54@!$iu4$b7e4>` reads as "inside the instance resource `f00b` the ghost of `<urn:valos:$iu4$ba54@!$iu4$b7e4>`" and infers triples:
<urn:valos:$iu4$f00b@!$iu4$ba54@!$iu4$b7e4>
valos:ghostHost <urn:valos:$iu4$f00b>
; valos:ghostPrototype <urn:valos:$iu4$ba54@!$iu4$b7e4>
Selects a variant resource value for a base resource within a structurally identified subspace. The variant resource provides inferred `subspacePrototype` fallbacks to an *inner* subspace and eventually to the non-variant base resource as well as to the homologous sub-resource of the host resource inheritancePrototype. This means that no matter where a subspace variant is defined in the prototype chain or in the nested sub-structure its value will be found.
e.g. `<urn:valos:$iu4$f00b@.$$myProp@~$lang$fi>` is a lang fi variant of f00b myProp and infers triples:
<urn:valos:$iu4$f00b@.$$myProp@~$lang$fi> a valos:ScopeProperty
; valos:subspacePrototype<EMAIL_ADDRESS>, <urn:valos:$iu4$f00b-b507-0763@.$$myProp@~$lang$fi>
; valos:language "fi"
Subspace selectors can be used to access language variants,
statically identified ghost variants within an instance, statically
identified Relation's etc.
The sub-context-term can also specify triple inferences for *all* sub-resources in the subspace (not just for the immediate sub-resource of the selector segment).
e.g. `<urn:valos:$iu4$f00b@!$iu4$b453@~$lang$fi<EMAIL_ADDRESS>infers triples:
<urn:valos:$iu4$f00b@!$iu4$b453@~$lang$fi<EMAIL_ADDRESS>a valos:ScopeProperty
; valos:ghostHost <urn:valos:$iu4$f00b>
; valos:ghostPrototype <urn:valos:$iu4$b453@~$lang$fi<EMAIL_ADDRESS>; valos:subspacePrototype <urn:valos:$iu4$f00b@!$iu4$b453@!$$iu4$b74e<EMAIL_ADDRESS>; valos:language "fi"
e.g<EMAIL_ADDRESS>is a resource with fixed name "myProp", dominant type ScopeProperty, iu4 resource f00b as the owning scope and a structurally homologous prototype inside f00b-b507-0763 and thus infers triples:
<EMAIL_ADDRESS>a valos:ScopeProperty
; valos:scope <urn:valos:$iu4$f00b>
; valos:inheritancePrototype<EMAIL_ADDRESS>; valos:name "myProp"
e.g. `<urn:valos:$iu4$f00b@*$$PERMISSIONS@~$$1>` is a resource with fixed name "PERMISSIONS", dominant type Relation, iu4 f00b as the source, a structurally homologous prototype inside f00b-b507-0763 and thus infers triples:
<urn:valos:$iu4$f00b@*$$PERMISSIONS> a valos:Relation
; valos:source <urn:valos:$iu4$f00b>
; valos:inheritancePrototype <urn:valos:$iu4$f00b-b507-0763@*$$PERMISSIONS>
; valos:name "PERMISSIONS"
<urn:valos:$iu4$f00b@*$$PERMISSIONS@~$$1> a valos:Relation
; valos:subspacePrototype <urn:valos:$iu4$f00b@*$$PERMISSIONS>
, <urn:valos:$iu4$f00b-b507-0763@*$$PERMISSIONS@~$$1>
e.g<EMAIL_ADDRESS>is a media with fixed name "foo.vs", dominant type Media, iu4 resource f00b as the owning directory and a structurally homologous prototype inside f00b-b507-0763 and thus infers triples:
<EMAIL_ADDRESS>a valos:Media
; valos:directory <urn:valos:$iu4$f00b>
; valos:inheritancePrototype<EMAIL_ADDRESS>; valos:name "foo.vs"
e.g. `<urn:valos:$iu4$f00b@+$$scripts>` is an entity with fixed name "scripts", dominant type Entity, iu4 resource f00b as the owning directory and a structurally homologous prototype inside f00b-b507-0763 and thus infers triples:
<urn:valos:$iu4$f00b@+$$scripts> a valos:Entity
; valos:directory <urn:valos:$iu4$f00b>
; valos:inheritancePrototype <urn:valos:$iu4$f00b-b507-0763@+$$scripts>
; valos:name "scripts"
Extends the preceding sub-segment with a fixed rdf:object triple. The actual rdf:object sub-property depends on the dominant type of the sub-segment: `valos:value` for ScopeProperty, `valos:target` for Relation, `valos:content` for Media, etc.
e.g. `<urn:valos:$iu4$f00b@*$$PERMISSIONS@-$ihi$8766>` is PERMISSIONS relation with fixed ihi target 8766 and thus infers triples:
<urn:valos:$iu4$f00b@*$$PERMISSIONS@-$ihi$8766> a valos:Relation
; valos:source <urn:valos:$iu4$f00b>
; valos:prototype <urn:valos:$iu4$f00b-b507-0763@*$$PERMISSIONS@-$ihi$8766>
; valos:name "PERMISSIONS"
; valos:target <urn:valos:$iu4$8766-src>
Rule content is interpreted depending on the combination of *sub-type-term* and *context-term* (idiomatic example: generic property name if no context-term namespace is provided, otherwise a compact IRI local part for an IRI property).
Currently the only allowed sub-types and their semantics is limited to the exclusive list of three entries:


Product 1
This is Product 1
Product 2
This is Product 2
Product 3
This is Product 3
Product 4
This is Product 4
Product 5
This is Product 5
Product 6
This is Product 6
Product 7
This is Product 7
Product 8
This is Product 8
Product 1
This is Product 1
Product 2
This is Product 2
Product 3
This is Product 3
Product 4
This is Product 4
Product 5
This is Product 5
Product 6
This is Product 6
Product 7
This is Product 7
Product 8
This is Product 8


| < Day Day Up > |
11.1. Introduction to LispYou may have heard of Lisp as a language for artificial intelligence (AI). If you aren't into AI, don't worry. Lisp may have an unusual syntax, but many of its basic features are just like those of more conventional languages you may have seen, such as Java or Perl. We emphasize such features in this chapter. After introducing the basic Lisp concepts, we proceed by building up various example functions that you can actually use in Emacs. In order to try out the examples, you should be familiar with Emacs Lisp mode and Lisp interaction mode, which were discussed in Chapter 9. 11.1.1 Basic Lisp EntitiesThe basic elements in Lisp you need to be familiar with are functions, variables, and atoms. Functions are the only program units in Lisp; they cover the notions of procedures, subroutines, programs, and even operators in other languages. Functions are defined as lists of the above entities, usually as lists of calls to other, existing functions. All functions have return values (as with Perl functions and non-void Java methods); a function's return value is simply the value of the last item in the list, usually the value returned by the last function called. A function call within another function is equivalent to a statement in other languages, and we use statement interchangeably with function call in this chapter. Here is the syntax for function: (function-name argument1 argument2 ...) which is equivalent to this: method_name (argument1, argument2, ...); in Java. This syntax is used for all functions, including those equivalent to arithmetic or comparison operators in other languages. For example, in order to add 2 and 4 in Java or Perl, you would use the expression 2 + 4, whereas in Lisp you would use the following: (+ 2 4) Similarly, where you would use 4 >= 2 (greater than or equal to), the Lisp equivalent is: (>= 4 2) Variables in Lisp are similar to those in any other language, except that they do not have types. A Lisp variable can assume any type of value (values themselves do have types, but variables don't impose restrictions on what they can hold). Atoms are values of any type, including integers, floating point (real) numbers, characters, strings, Boolean truth values, symbols, and special Emacs types such as buffers, windows, and processes. The syntax for various kinds of atoms is:
A simple example that ties many of these basic Lisp concepts together is the function setq.[4] As you may have figured out from previous chapters, setq is a way of assigning values to variables, as in
(setq auto-save-interval 800) Notice that setq is a function, unlike in other languages in which special syntax such as = or := is used for assignment. setq takes two arguments: a variable name and a value. In this example, the variable auto-save-interval (the number of keystrokes between auto-saves) is set to the value 800. setq can actually be used to assign values to multiple variables, as in (setq thisvar thisvalue
thatvar thatvalue
theothervar theothervalue) The return value of setq is simply the last value assigned, in this case theothervalue. You can set the values of variables in other ways, as we'll see, but setq is the most widely applicable. 11.1.2 Defining FunctionsNow it's time for an example of a simple function definition. Start Emacs without any arguments; this puts you into the *scratch* buffer, an empty buffer in Lisp interaction mode (see Chapter 9), so that you can actually try this and subsequent examples. Before we get to the example, however, some more comments on Lisp syntax are necessary. First, you will notice that the dash (-) is used as a "break" character to separate words in names of variables, functions, and so on. This practice is simply a widely used Lisp programming convention; thus the dash takes the place of the underscore (_) in languages like C and Ada. A more important issue has to do with all of the parentheses in Lisp code. Lisp is an old language that was designed before anyone gave much thought to language syntax (it was still considered amazing that you could use any language other than the native processor's binary instruction set), so its syntax is not exactly programmer-friendly. Yet Lisp's heavy use of lists—and thus its heavy use of parentheses—has its advantages, as we'll see toward the end of this chapter. The main problem a programmer faces is how to keep all the parentheses balanced properly. Compounding this problem is the usual programming convention of putting multiple right parentheses at the end of a line, rather than the more readable technique of placing each right parenthesis directly below its matching left parenthesis. Your best defense against this is the support the Emacs Lisp modes give you, particularly the Tab key for proper indentation and the flash-matching-parenthesis feature. Now we're ready for our example function. Suppose you are a student or journalist who needs to keep track of the number of words in a paper or story you are writing. Emacs has no built-in way of counting the number of words in a buffer, so we'll write a Lisp function that does the job: 1 (defun count-words-buffer ( ) 2 (let ((count 0)) 3 (save-excursion 4 (goto-char (point-min)) 5 (while (< (point) (point-max)) 6 (forward-word 1) 7 (setq count (1+ count))) 8 (message "buffer contains %d words." count)))) Let's go through this function line by line and see what it does. (Of course, if you are trying this in Emacs, don't type the line numbers in.) The defun on line 1 defines the function by its name and arguments. Notice that defun is itself a function—one that, when called, defines a new function. (defun returns the name of the function defined, as a symbol.) The function's arguments appear as a list of names inside parentheses; in this case, the function has no arguments. Arguments can be made optional by preceding them with the keyword &optional. If an argument is optional and not supplied when the function is called, its value is assumed to be nil. Line 2 contains a let construct, whose general form is: (let ((var1 value1) (var2 value2) ... ) statement-block) The first thing let does is define the variables var1, var2, etc., and set them to the initial values value1, value2, etc. Then let executes the statement block, which is a sequence of function calls or values, just like the body of a function. It is useful to think of let as doing three things:
If a let is used to define a variable, its value can be reset later within the let block with setq. Furthermore, a variable defined with let can have the same name as a global variable; all setqs on that variable within the let block act on the local variable, leaving the global variable undisturbed. However, a setq on a variable that is not defined with a let affects the global environment. It is advisable to avoid using global variables as much as possible because their names might conflict with those of existing global variables and therefore your changes might have unexpected and inexplicable side effects later on. So, in our example function, we use let to define the local variable count and initialize it to 0. As we will see, this variable is used as a loop counter. Lines 3 through 8 are the statements within the let block. The first of these calls the built-in Emacs function save-excursion, which is a way of being polite. The function is going to move the cursor around the buffer, so we don't want to disorient the user by jumping them to a strange place in their file just because they asked for a word count. Calling save-excursion tells Emacs to remember the location of cursor at the beginning of the function, and go back there after executing any statements in its body. Notice how save-excursion is providing us with capability similar to let; you can think of it as a way of making the cursor location itself a local variable. Line 4 calls goto-char. The argument to goto-char is a (nested) function call to the built-in function point-min. As we have mentioned before, point is Emacs's internal name for the position of the cursor, and we'll refer to the cursor as point throughout the remainder of this chapter. point-min returns the value of the first character position in the current buffer, which is almost always 1; then, goto-char is called with the value 1, which has the effect of moving point to the beginning of the buffer. The next line sets up a while loop; Java and Perl have a similar construct. The while construct has the general form (while condition statement-block) Like let and save-excursion, while sets up another statement block. condition is a value (an atom, a variable, or a function returning a value). This value is tested; if it is nil, the condition is considered to be false, and the while loop terminates. If the value is other than nil, the condition is considered to be true, the statement block gets executed, the condition is tested again, and the process repeats. Of course, it is possible to write an infinite loop. If you write a Lisp function with a while loop and try running it, and your Emacs session hangs, chances are that you have made this all-too-common mistake; just type C-g to abort it. In our sample function, the condition is the function <, which is a less-than function with two arguments, analogous to the < operator in Java or Perl. The first argument is another function that returns the current character position of point; the second argument returns the maximum character position in the buffer, that is, the length of the buffer. The function < (and other relational functions) return a Boolean value, t or nil. The loop's statement block consists of two statements. Line 6 moves point forward one word (i.e., as if you had typed M-f). Line 7 increments the loop counter by 1; the function 1+ is shorthand for (+ 1 variable-name). Notice that the third right parenthesis on line 7 matches the left parenthesis preceding while. So, the while loop causes Emacs to go through the current buffer a word at a time while counting the words. The final statement in the function uses the built-in function message to print a message in the minibuffer saying how many words the buffer contains. The form of the message function will be familiar to C programmers. The first argument to message is a format string, which contains text and special formatting instructions of the form %x, where x is one of a few possible letters. For each of these instructions, in the order in which they appear in the format string, message reads the next argument and tries to interpret it according to the letter after the percent sign. Table 11-1 lists meanings for the letters in the format string.
For example: (message "\"%s\" is a string, %d is a number, and %c is a character" "hi there" 142 ?q) causes the message: "hi there" is a string, 142 is a number, and q is a character to appear in the minibuffer. This is analogous to the C code: printf ("\"%s\" is a string, %d is a number, and %c is a character\n", "hi there", 142, 'q'); The floating-point-format characters are a bit more complicated. They assume a certain number of significant digits unless you tell them otherwise. For example, the following: (message "This book was printed in %f, also known as %e." 2004 2004) yields this: This book was printed in 2004.000000, also known as 2.004000e+03. But you can control the number of digits after the decimal point by inserting a period and the number of digits desired between the % and the e, f, or g. For example, this: (message "This book was printed in %.3e, also known as %.0f." 2004 2004) prints in the minibuffer: This book was printed in 2.004e+03, also known as 2004. 11.1.3 Turning Lisp Functions into Emacs CommandsThe count-words-buffer function that we've just finished works, but it still isn't as convenient to use as the Emacs commands you work with daily. If you have typed it in, try it yourself. First you need to get Emacs to evaluate the lines you typed in, thereby actually defining the function. To do this, move your cursor to just after the last closing parenthesis in the function and type C-j (or Linefeed)—the "evaluate" key in Lisp interaction mode—to tell Emacs to perform the function definition. You should see the name of the function appear again in the buffer; the return value of the defun function is the symbol that has been defined. (If instead you get an error message, double check that your function looks exactly like the example and that you haven't typed in the line numbers, and try again.) Once the function is defined, you can execute it by typing (count-words-buffer) on its own line in your Lisp interaction window, and once again typing C-j after the closing parenthesis. Now that you can execute the function correctly from a Lisp interaction window, try executing the function with M-x, as with any other Emacs command. Try typing M-x count-words-buffer Enter: you will get the error message [No match]. (You can type C-g to cancel this failed attempt.) You get this error message because you need to "register" a function with Emacs to make it available for interactive use. The function to do this is interactive, which has the form: (interactive "prompt-string") This statement should be the first in a function, that is, right after the line containing the defun and the documentation string (which we will cover shortly). Using interactive causes Emacs to register the function as a command and to prompt the user for the arguments declared in the defun statement. The prompt string is optional. The prompt string has a special format: for each argument you want to prompt the user for, you provide a section of prompt string. The sections are separated by newlines (\n). The first letter of each section is a code for the type of argument you want. There are many choices; the most commonly used are listed in Table 11-2.
With the b and f options, Emacs signals an error if the buffer or file given does not already exist. Another useful option to interactive is r, which we will see later. There are many other option letters; consult the documentation for function interactive for the details. The rest of each section is the actual prompt that appears in the minibuffer. The way interactive is used to fill in function arguments is somewhat complicated and best explained through an example. A simple example is in the function goto-percent, which we will see shortly. It contains the statement (interactive "nPercent: ") The n in the prompt string tells Emacs to prompt for an integer; the string Percent: appears in the minibuffer. As a slightly more complicated example, let's say we want to write our own version of the replace-string command. Here's how we would do the prompting: (defun replace-string (from to) (interactive "sReplace string: \nsReplace string %s with: ") ...) The prompt string consists of two sections, sReplace string: and sReplace string %s with:, separated by a Newline. The initial s in each means that a string is expected; the %s is a formatting operator (as in the previous message function) that Emacs replaces with the user's response to the first prompt. When applying formatting operators in a prompt, it is as if message has been called with a list of all responses read so far, so the first formatting operator is applied to the first response, and so on. When this command is invoked, first the prompt Replace string: appears in the minibuffer. Assume the user types fred in response. After the user presses Enter, the prompt Replace fred with: appears. The user types the replacement string and presses Enter again. The two strings the user types are used as values of the function arguments from and to (in that order), and the command runs to completion. Thus, interactive supplies values to the function's arguments in the order of the sections of the prompt string. The use of interactive does not preclude calling the function from other Lisp code; in this case, the calling function needs to supply values for all arguments. For example, if we were interested in calling our version of replace-string from another Lisp function that needs to replace all occurrences of "Bill" with "Deb" in a file, we would use (replace-string "Bill" "Deb") The function is not being called interactively in this case, so the interactive statement has no effect; the argument from is set to "Bill," and to is set to "Deb." Getting back to our count-words-buffer command: it has no arguments, so its interactive command does not need a prompt string. The final modification we want to make to our command is to add a documentation string (or doc string for short), which is shown by online help facilities such as describe-function (C-h f). Doc strings are normal Lisp strings; they are optional and can be arbitrarily many lines long, although, by convention, the first line is a terse, complete sentence summarizing the command's functionality. Remember that any double quotes inside a string need to be preceded by backslashes. With all of the fixes taken into account, the complete function looks like this: (defun count-words-buffer ( ) "Count the number of words in the current buffer; print a message in the minibuffer with the result." (interactive) (save-excursion (let ((count 0)) (goto-char (point-min)) (while (< (point) (point-max)) (forward-word 1) (setq count (1+ count))) (message "buffer contains %d words." count)))) |
| < Day Day Up > |


Encoding and decoding binary data
Warning
The IO implementation is marked as “experimental” as of its introduction in Akka 2.2.0. We will continue to improve this API based on our users’ feedback, which implies that while we try to keep incompatible changes to a minimum the binary compatibility guarantee for maintenance releases does not apply to the contents of the akka.io package.
Akka adopted and adapted the implementation of data processing pipelines found in the spray-io module. The idea is that encoding and decoding often go hand in hand and keeping the code pertaining to one protocol layer together is deemed more important than writing down the complete read side—say—in the iteratee style in one go; pipelines encourage packaging the stages in a form which lends itself better to reuse in a protocol stack. Another reason for choosing this abstraction is that it is at times necessary to change the behavior of encoding and decoding within a stage based on a message stream’s state, and pipeline stages allow communication between the read and write halves quite naturally.
The actual byte-fiddling can be done within pipeline stages, for example using the rich API of ByteIterator and ByteStringBuilder as shown below. All these activities are synchronous transformations which benefit greatly from CPU affinity to make good use of those data caches. Therefore the design of the pipeline infrastructure is completely synchronous, every stage’s handler code can only directly return the events and/or commands resulting from an input, there are no callbacks. Exceptions thrown within a pipeline stage will abort processing of the whole pipeline under the assumption that recoverable error conditions will be signaled in-band to the next stage instead of raising an exception.
An overall “logical” pipeline can span multiple execution contexts, for example starting with the low-level protocol layers directly within an actor handling the reads and writes to a TCP connection and then being passed to a number of higher-level actors which do the costly application level processing. This is supported by feeding the generated events into a sink which sends them to another actor, and that other actor will then upon reception feed them into its own pipeline.
Introducing the Sample Protocol
In the following the process of implementing a protocol stack using pipelines is demonstrated on the following simple example:
frameLen: Int
persons: Int
persons times {
first: String
last: String
}
points: Int
points times Double
mapping to the following data type:
public class Message {
static public class Person {
private final String first;
private final String last;
public Person(String first, String last) {
this.first = first;
this.last = last;
}
public String getFirst() {
return first;
}
public String getLast() {
return last;
}
}
private final Person[] persons;
private final double[] happinessCurve;
public Message(Person[] persons, double[] happinessCurve) {
this.persons = persons;
this.happinessCurve = happinessCurve;
}
public Person[] getPersons() {
return persons;
}
public double[] getHappinessCurve() {
return happinessCurve;
}
}
We will split the handling of this protocol into two parts: the frame-length encoding handles the buffering necessary on the read side and the actual encoding of the frame contents is done in a separate stage.
Building a Pipeline Stage
As a common example, which is also included in the akka-actor package, let us look at a framing protocol which works by prepending a length field to each message (the following is a simplified version for demonstration purposes, the real implementation is more configurable and implemented in Scala).
import java.nio.ByteOrder;
import java.util.ArrayList;
import scala.util.Either;
import akka.io.AbstractSymmetricPipePair;
import akka.io.PipePairFactory;
import akka.io.PipelineContext;
import akka.io.SymmetricPipePair;
import akka.io.SymmetricPipelineStage;
import akka.util.ByteString;
import akka.util.ByteStringBuilder;
public class LengthFieldFrame extends
SymmetricPipelineStage<PipelineContext, ByteString, ByteString> {
final int maxSize;
public LengthFieldFrame(int maxSize) {
this.maxSize = maxSize;
}
@Override
public SymmetricPipePair<ByteString, ByteString> apply(final PipelineContext ctx) {
return PipePairFactory
.create(ctx, new AbstractSymmetricPipePair<ByteString, ByteString>() {
final ByteOrder byteOrder = ByteOrder.BIG_ENDIAN;
ByteString buffer = null;
@Override
public Iterable<Either<ByteString, ByteString>> onCommand(
ByteString cmd) {
final int length = cmd.length() + 4;
if (length > maxSize) {
return new ArrayList<Either<ByteString, ByteString>>(0);
}
final ByteStringBuilder bb = new ByteStringBuilder();
bb.putInt(length, byteOrder);
bb.append(cmd);
return singleCommand(bb.result());
}
@Override
public Iterable<Either<ByteString, ByteString>> onEvent(
ByteString event) {
final ArrayList<Either<ByteString, ByteString>> res =
new ArrayList<Either<ByteString, ByteString>>();
ByteString current = buffer == null ? event : buffer.concat(event);
while (true) {
if (current.length() == 0) {
buffer = null;
return res;
} else if (current.length() < 4) {
buffer = current;
return res;
} else {
final int length = current.iterator().getInt(byteOrder);
if (length > maxSize)
throw new IllegalArgumentException(
"received too large frame of size " + length + " (max = "
+ maxSize + ")");
if (current.length() < length) {
buffer = current;
return res;
} else {
res.add(makeEvent(current.slice(4, length)));
current = current.drop(length);
}
}
}
}
});
}
}
In the end a pipeline stage is nothing more than a set of three methods: one transforming commands arriving from above, one transforming events arriving from below and the third transforming incoming management commands (not shown here, see below for more information). The result of the transformation can in either case be a sequence of commands flowing downwards or events flowing upwards (or a combination thereof).
In the case above the data type for commands and events are equal as both functions operate only on ByteString, and the transformation does not change that type because it only adds or removes four octets at the front.
The pair of command and event transformation functions is represented by an object of type AbstractPipePair, or in this case a AbstractSymmetricPipePair. This object could benefit from knowledge about the context it is running in, for example an Actor, and this context is introduced by making a PipelineStage be a factory for producing a PipePair. The factory method is called apply (a Scala tradition) and receives the context object as its argument. The implementation of this factory method could now make use of the context in whatever way it sees fit, you will see an example further down.
Manipulating ByteStrings
The second stage of our sample protocol stack illustrates in more depth what showed only a little in the pipeline stage built above: constructing and deconstructing byte strings. Let us first take a look at the encoder:
public class MessageStage extends
SymmetricPipelineStage<HasByteOrder, Message, ByteString> {
@Override
public SymmetricPipePair<Message, ByteString> apply(final HasByteOrder context) {
return PipePairFactory
.create(context, new AbstractSymmetricPipePair<Message, ByteString>() {
final ByteOrder byteOrder = context.byteOrder();
private void putString(ByteStringBuilder builder, String str) {
final byte[] bytes = ByteString.fromString(str, "UTF-8").toArray();
builder.putInt(bytes.length, byteOrder);
builder.putBytes(bytes);
}
@Override
public Iterable<Either<Message, ByteString>> onCommand(Message cmd) {
final ByteStringBuilder builder = new ByteStringBuilder();
builder.putInt(cmd.getPersons().length, byteOrder);
for (Message.Person p : cmd.getPersons()) {
putString(builder, p.getFirst());
putString(builder, p.getLast());
}
builder.putInt(cmd.getHappinessCurve().length, byteOrder);
builder.putDoubles(cmd.getHappinessCurve(), byteOrder);
return singleCommand(builder.result());
}
// decoding omitted ...
});
}
}
Note how the byte order to be used by this stage is fixed in exactly one place, making it impossible get wrong between commands and events; the way how the byte order is passed into the stage demonstrates one possible use for the stage’s context parameter.
The basic tool for constucting a ByteString is a ByteStringBuilder. This builder is specialized for concatenating byte representations of the primitive data types like Int and Double or arrays thereof. Encoding a String requires a bit more work because not only the sequence of bytes needs to be encoded but also the length, otherwise the decoding stage would not know where the String terminates. When all values making up the Message have been appended to the builder, we simply pass the resulting ByteString on to the next stage as a command using the optimized singleCommand facility.
Warning
The singleCommand and singleEvent methods provide a way to generate responses which transfer exactly one result from one pipeline stage to the next without suffering the overhead of object allocations. This means that the returned collection object will not work for anything else (you will get ClassCastExceptions!) and this facility can only be used EXACTLY ONCE during the processing of one input (command or event).
Now let us look at the decoder side:
private String getString(ByteIterator iter) {
final int length = iter.getInt(byteOrder);
final byte[] bytes = new byte[length];
iter.getBytes(bytes);
return ByteString.fromArray(bytes).utf8String();
}
@Override
public Iterable<Either<Message, ByteString>> onEvent(ByteString evt) {
final ByteIterator iter = evt.iterator();
final int personLength = iter.getInt(byteOrder);
final Message.Person[] persons = new Message.Person[personLength];
for (int i = 0; i < personLength; ++i) {
persons[i] = new Message.Person(getString(iter), getString(iter));
}
final int curveLength = iter.getInt(byteOrder);
final double[] curve = new double[curveLength];
iter.getDoubles(curve, byteOrder);
// verify that this was all; could be left out to allow future
// extensions
assert iter.isEmpty();
return singleEvent(new Message(persons, curve));
}
The decoding side does the same things that the encoder does in the same order, it just uses a ByteIterator to retrieve primitive data types or arrays of those from the underlying ByteString. And in the end it hands the assembled Message as an event to the next stage using the optimized singleEvent facility (see warning above).
Building a Pipeline
Given the two pipeline stages introduced in the sections above we can now put them to some use. First we define some message to be encoded:
final Message msg = new Message(
new Message.Person[] {
new Message.Person("Alice", "Gibbons"),
new Message.Person("Bob", "Sparseley")
},
new double[] { 1.0, 3.0, 5.0 });
Then we need to create a pipeline context which satisfies our declared needs:
class Context extends AbstractPipelineContext implements HasByteOrder {
@Override
public ByteOrder byteOrder() {
return java.nio.ByteOrder.BIG_ENDIAN;
}
}
final Context ctx = new Context();
Building the pipeline and encoding this message then is quite simple:
final PipelineStage<Context, Message, ByteString, Message, ByteString> stages =
PipelineStage.sequence(
new MessageStage(),
new LengthFieldFrame(10000)
);
final PipelineSink<ByteString, Message> sink =
new PipelineSink<ByteString, Message>() {
@Override
public void onCommand(ByteString cmd) throws Throwable {
commandHandler.tell(cmd, ActorRef.noSender());
}
@Override
public void onEvent(Message evt) throws Throwable {
eventHandler.tell(evt, ActorRef.noSender());
}
};
final PipelineInjector<Message, ByteString> injector =
PipelineFactory.buildWithSink(ctx, stages, sink);
injector.injectCommand(msg);
First we sequence the two stages, i.e. attach them such that the output of one becomes the input of the other. Then we create a PipelineSink which is essentially a callback interface for what shall happen with the encoded commands or decoded events, respectively. Then we build the pipeline using the PipelineFactory, which returns an interface for feeding commands and events into this pipeline instance. As a demonstration of how to use this, we simply encode the message shown above and the resulting ByteString will then be sent to the commandHandler actor. Decoding works in the same way, only using injectEvent.
Injecting into a pipeline using a PipelineInjector will catch exceptions resulting from processing the input, in which case the exception (there can only be one per injection) is passed into the respective sink. The default implementation of onCommandFailure and onEventFailure will re-throw the exception (whence originates the throws declaration of the inject* method).
Using the Pipeline’s Context
Up to this point there was always a parameter ctx which was used when constructing a pipeline, but it was not explained in full.  The context may also carry behavior, provide infrastructure or helper methods etc. It should be noted that the context is bound to the pipeline and as such must not be accessed concurrently from different threads unless care is taken to properly synchronize such access. Since the context will in many cases be provided by an actor it is not recommended to share this context with code executing outside of the actor’s message handling.
Warning
A PipelineContext instance MUST NOT be used by two different pipelines since it contains mutable fields which are used during message processing.
Using Management Commands
Since pipeline stages do not have any reference to the pipeline or even to their neighbors they cannot directly effect the injection of commands or events outside of their normal processing. But sometimes things need to happen driven by a timer, for example. In this case the timer would need to cause sending tick messages to the whole pipeline, and those stages which wanted to receive them would act upon those. In order to keep the type signatures for events and commands useful, such external triggers are sent out-of-band, via a different channel—the management port. One example which makes use of this facility is the TickGenerator which comes included with akka-actor (this is a transcription of the Scala version which is actually included in the akka-actor JAR):
public interface HasActorContext extends PipelineContext {
public ActorContext getContext();
}
public class TickGenerator<Cmd, Evt> extends
PipelineStage<HasActorContext, Cmd, Cmd, Evt, Evt> {
public static interface Trigger {};
public static class Tick implements Trigger {
final FiniteDuration timestamp;
public Tick(FiniteDuration timestamp) {
super();
this.timestamp = timestamp;
}
public FiniteDuration getTimestamp() {
return timestamp;
}
}
private final FiniteDuration interval;
public TickGenerator(FiniteDuration interval) {
this.interval = interval;
}
@Override
public PipePair<Cmd, Cmd, Evt, Evt> apply(final HasActorContext ctx) {
return PipePairFactory.create(ctx,
new AbstractPipePair<Cmd, Cmd, Evt, Evt>() {
private final Trigger trigger = new Trigger() {
public String toString() {
return "Tick[" + ctx.getContext().self().path() + "]";
}
};
private void schedule() {
final ActorSystem system = ctx.getContext().system();
system.scheduler().scheduleOnce(interval,
ctx.getContext().self(), trigger, system.dispatcher(), null);
}
{
schedule();
}
@Override
public Iterable<Either<Evt, Cmd>> onCommand(Cmd cmd) {
return singleCommand(cmd);
}
@Override
public Iterable<Either<Evt, Cmd>> onEvent(Evt evt) {
return singleEvent(evt);
}
@Override
public Iterable<Either<Evt, Cmd>> onManagementCommand(Object cmd) {
if (cmd == trigger) {
ctx.getContext().self().tell(new Tick(Deadline.now().time()),
ActorRef.noSender());
schedule();
}
return Collections.emptyList();
}
});
}
}
This pipeline stage is to be used within an actor, and it will make use of this context in order to schedule the delivery of Tick messages; the actor is then supposed to feed these messages into the management port of the pipeline. An example could look like this:
public class Processor extends UntypedActor {
private class Context extends AbstractPipelineContext
implements HasByteOrder, HasActorContext {
@Override
public ActorContext getContext() {
return Processor.this.getContext();
}
@Override
public ByteOrder byteOrder() {
return java.nio.ByteOrder.BIG_ENDIAN;
}
}
final Context ctx = new Context();
final FiniteDuration interval = Duration.apply(1, TimeUnit.SECONDS);
final PipelineStage<Context, Message, ByteString, Message, ByteString> stages =
PipelineStage.sequence(
// Java 7 can infer these types, Java 6 cannot
PipelineStage.<Context, Message, Message, ByteString, Message, Message,
ByteString> sequence( //
new TickGenerator<Message, Message>(interval), //
new MessageStage()), //
new LengthFieldFrame(10000));
private final ActorRef evts;
private final ActorRef cmds;
final PipelineInjector<Message, ByteString> injector = PipelineFactory
.buildWithSink(ctx, stages, new PipelineSink<ByteString, Message>() {
@Override
public void onCommand(ByteString cmd) {
cmds.tell(cmd, getSelf());
}
@Override
public void onEvent(Message evt) {
evts.tell(evt, getSelf());
}
});
public Processor(ActorRef cmds, ActorRef evts) throws Exception {
this.cmds = cmds;
this.evts = evts;
}
// omitted ...
@Override
public void onReceive(Object obj) throws Exception {
if (obj instanceof Message) {
injector.injectCommand((Message) obj);
} else if (obj instanceof ByteString) {
injector.injectEvent((ByteString) obj);
} else if (obj instanceof TickGenerator.Trigger) {
injector.managementCommand(obj);
}
}
}
This actor extends our well-known pipeline with the tick generator and attaches the outputs to functions which send commands and events to actors for further processing. The pipeline stages will then all receive on Tick per second which can be used like so:
private FiniteDuration lastTick = Duration.Zero();
@Override
public Iterable<Either<Message, ByteString>> onManagementCommand(Object cmd) {
// omitted ...
if (cmd instanceof TickGenerator.Tick) {
final FiniteDuration timestamp = ((TickGenerator.Tick) cmd)
.getTimestamp();
System.out.println("time since last tick: "
+ timestamp.minus(lastTick));
lastTick = timestamp;
}
return Collections.emptyList();
}
Note
Management commands are delivered to all stages of a pipeline “effectively parallel”, like on a broadcast medium. No code will actually run concurrently since a pipeline is strictly single-threaded, but the order in which these commands are processed is not specified.
The intended purpose of management commands is for each stage to define its special command types and then listen only to those (where the aforementioned Tick message is a useful counter-example), exactly like sending packets on a wifi network where every station receives all traffic but reacts only to those messages which are destined for it.
If you need all stages to react upon something in their defined order, then this must be modeled either as a command or event, i.e. it will be part of the “business” type of the pipeline.
Contents


'Future is electric': Porsche sets out plans to battle Tesla in US
“By 2025 Porsche will have crossed a tipping point.”
by AFPMore than half the cars produced by Porsche will be electric by 2025, the German manufacturer's North American chief said on Tuesday as he set out plans to overtake market leader Tesla.
“The future is electric,” Klaus Zellmer told the Los Angeles Auto Show, adding that the brand's commitment to battery-powered vehicles is “huge.”
“By 2025 Porsche will have crossed a tipping point, actually building more than 50% of its annual volume ... with either plug-in hybrid technology or fully battery,” he said.
However, he added, the “combustion engine of course is not dead,” pointing to Porsche's popular 911 sports cars.
Porsche, a subsidiary of the Volkswagen group, unveiled its new battery-powered Taycan at Frankfurt's International Auto Show in September.
The brand's first 100% electric sports car, the Taycan is capable of going from 0 to 60 miles per hour in less than three seconds.
The luxury model is intended to rival Tesla, the California firm that dominates the global electric car market.
Tesla has an especially firm grip on the United States, which is Porsche's second-largest market. The German brand sold 57,000 cars in the US last year.
From 2021 Porsche intends to sell a fully electric version of its SUV, the Macan, which would compete directly against Tesla's Y model.
“The electric Macan will compete in many different segments — it's going to draw many people from different segments” just as Tesla did when it entered the market, Mr. Zellmer said.
“It's not a transition that is going to turn the world upside down within five years, it's probably 10 years” away, the North American CEO added.
Porsche is facing growing competition in China, its biggest single market, from Tesla.
Tesla last month said its new so-called Gigafactory in Shanghai had started production on a trial basis.
Mr. Zellmer said the growth of electric cars in China was being impeded by the lack of access to charging facilities in mega-cities where tens of millions live and work in high rise buildings.
“Charging your car for the night is a challenge. 90% of charging according to our market research actually happens at home or at work,” he said.


Water Elemental Attack Launch05
Water Elemental Attack Launch04
Water Elemental Attack Launch06
IntroResponse Kelthuzad00
Water Elemental Attack Launch03
Water Elemental Attack Launch02
Water Elemental Attack Launch01
Water Elemental Attack Impact01
Water Elemental Attack Impact02
Water Elemental Attack Impact03
IntroQuestion Alexstrasza00
Water Elemental Attack Impact06
Water Elemental Attack Impact04
Water Elemental Attack Impact05
IntroQuestion Kelthuzad00
IntroResponse Alexstrasza00


Update on code, links to relevant code added this week
There are three key components of our project.
- Server
- Webpage on the computer
- Magic Leap page
Server (app.js)
On the server we completed the following components:
- Finished testing the positioning and resizing on the backend for the cone and the ellipsoid.
- We fixed a lingering cylinder bug where the height wasn't adjustable if the cylinder was rotated. This required refactoring significant code and took a while to fix and ensure it is correct now.
- We tested to ensure the backend can update equations properly when interactions are done on the magic leap.
Webpage on the computer (index.html and index.js)
We made the following changes to the web interface:
- Added the cone lesson plan.
- For cone, we can plot it on different orientations. Before we did not make sure that the updates sent from the server updates the right variables based on the orientation. So with orientation, we also send the server the order of the variables and when the server sends us the update, we use the order of the variables to update the right values.
- Based on last week's feedback, tried better combinations of colors so the equations and values are more visible.
Magic Leap page (magicleap.html)
We made the following changes to the magic leap page:
- Added interactions for the cone. This means that the user can use sliders to increase the height and radius of the cone.
- We added more professional features to allow the user to see current state of the various variables like radius, height, and position so the user doesn't need to keep looking at the computer screen for updated values.
- Added interactions for the ellipsoid. This means that the user can use sliders to increase the radius on the x, y, and z axis. We also make sure to remove the radius slider used for the sphere. We also like the ellipsoid add the state to the magicleap page so they can see what the current radius and position are.
- We tested to ensure that our current code within magicleap.html supports the creation and deletion of ellipsoid and cone.
Demo
Below is the video of our current progress.
Plan for next week
Our plan for next week is to finish:
- Fix the problem where the ellipsoid is cutoff and move origin axis so its not covering the window.
- Test the backend and magic leap page.
- Prepare for the demo by creating the math quiz and the survey at the end of the demo.
- Add animations to indicate on the index page that the equation was updated on the magic leap
- Testing the magic leap page and index page
- Lesson plan for the ellpisoid.
What every member did this week and will do next week
Our team believes we work more efficiently in pairs. Therefore, we paired into the following pairs:
- Matthew and Simon
- Esteban and Tanuj
Since we are in pairs each person completed the work together. Matthew and Tanuj wrote the blog. Simon and Esteban provided content to the blog as well. Esteban did the voice over for the weekly demo video. Matthew wrote the Demo Plan document with the help of Tanuj, Simon, and Esteban. Tanuj filled out the assignes for the demo plan day setup.
The first team (Matthew and Simon) worked on the changes to the Magic leap page as described in the previous sections. The first team also made all the changes to indicated in the app.js section above. This next week, team 1 will implement the first three next week's tasks.
The second team (Esteban and Tanuj) worked on the changes to the index.html and index.js as described above and the parts of the server to ensure their index changes don't break anything on the server side. The second team will complete the last three tasks from the next week section above.
Our overall plan for next week is have a more production ready EasyMath app. This is why we will spend time rigiously testing our app.
Blocking Issues
We have no immediate blocking issues.


|Before you can login to your account, you need to active your account \ by clicking the link in the email we sent to your email address.|
|Please check your email Inbox to continue.|


"Saving Silverman"
Darren (Jason Biggs), Wayne (Steve Zahn), and J.D. (Jack Black) have been best friends since the fifth grade. Like the Three Musketeers, they've been together through thick and thin. But, when Darren meets an attractive, but cold-blooded and manipulative, psychiatrist, Judith (Amanda Peet), the long time friendship is placed in danger. It's up to Wayne and J.D. to rescue their best friend in "Saving Silverman."
"Silverman" has its heart in the right place, but the story, by newcomers Hank Nelken and Greg DePaul, is too lightweight to sustain the tale of the battle for Darren's soul. Based on their experience of a friend making a major marital mistake, the story is centered on the three, life long amigos. When Wayne introduces Darren to Judith, he doesn't realize that he has opened a Pandora's box of disaster for himself and J.D. Judith was once in a relationship where her boyfriend was the dominant figure until he died in a kick boxing match. Since then, she has sought a new mate - someone she can boss around and mold into her own vision. Enter Darren Silverman.
Once they realize the magnitude of their error in judgement, Wayne and J.D. try everything they can, including threats and bribery, to get Judith to free Darren. Nothing works until the duo come up with a plan - kidnap Judith and get Darren back together with the girl he called his one and only, pretty Sandy Perkus (Amanda Detmer). The only problem here is that Sandy is about to take her vows to become a nun. Things spiral out of control as Judith repeatedly attempts to escape while Wayne and J.D. play cupid. The boys even bring their idol, Neil Diamond, into the picture to help resolve things.
Thinking about it, this is a real mishmash of contrivance and coincidence that is held together solely by the comedic efforts of Steve Zahn and Jack Black. The pair is able to elicit the film's only laughs with their goofy antics and child-like behavior. They are relegated to providing slapstick guy humor and the two are more than equal to the task. Steve Zahn has been steadily honing his comedic acting skills and gives some complexity to Wayne, the "brains" of the gang. Jack Black has the big-guy moves of a Chris Farley, giving J.D. an amusing physical presence. The neat thing is that the two actors are able to get fresh laughs from stale material.
The rest of the cast doesn't fare as well, though. Jason Biggs is the straight man of the Musketeers and gets very little to do; though having watched his previous films ("American Pie" and "Loser") I'm not sure what attraction Biggs actually has. Amanda Peet is caustic as the manipulative Judith. There is no humanity at all to her character as she single-mindedly strives to recreate Darren into her mind's image. She's a monster that Wayne and J.D. must defeat to save their friend. Unfortunately, there is no dimension to her character. Amanda Detmer brings nothing (or gets nothing) as Darren's one and only. R. Lee Ermey, as the psychotic Coach, made a bad decision taking this role. Tune-meister Neil Diamond gives a good-natured cameo perf as the boys' idol and savior.
Production values are on par with the rest of the film - lackluster and non-involving. Director Dennis Dugan has a track record for broad comedy with films like "Big Daddy" and "Beverly Hills Ninja," but falls flat with "Saving Silverman."
The 2001 movie year has yet to provide us with a "good" film to sink our teeth into. At least, with "Saving Silverman," we get a couple of funny perfs from Zahn and Black. Too bad that the rest of the film lacks their level of humor. Kick boxing deaths and conflicted nuns are not the makings of a good comedy. I give it a C-.
For more Reeling reviews visit reelingreviews.com
<EMAIL_ADDRESS><EMAIL_ADDRESS>========== X-RAMR-ID: 28668 X-RT-AuthorID: 1488 X-RT-TitleID: 1104810 X-RT-RatingText: C-
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


|
UMI3D Unity SDK
2.5.b.221125
A UMI3D sdk implementation using Unity
|
Description of an hand pose. More...
Classes | |
| class | PhalanxData |
| Position and rotation for every phalanx. More... | |
Public Member Functions | |
| void | Add (string phalanx, SpatialDataInfo data) |
| Add a position/rotation couple for a phalanx to the list of phalanx position/rotation, if not already included. More... | |
| void | Set (string phalanx, SpatialDataInfo data) |
| Set a position/rotation couple for a phalanx to the list of phalanx position/rotation, if already included. More... | |
| void | SetRotation (string phalanx, Vector3 rotation) |
| Set a rotation for a phalanx to the list of phalanx position/rotation, if already included. More... | |
| SpatialDataInfo | Get (string phalanx) |
| Get a position/rotation info of a phalanx. More... | |
Public Attributes | |
| Vector3 | RightHandPosition = Vector3.zero |
| Position of the right hand reference point. More... | |
| Vector3 | RightHandEulerRotation = Vector3.zero |
| Rotation of the right hand reference point. More... | |
| Vector3 | LeftHandPosition = Vector3.zero |
| Position of the left hand reference point. More... | |
| Vector3 | LeftHandEulerRotation = Vector3.zero |
| Rotation of the right hand reference point. More... | |
| List< PhalanxData > | PhalangesData = new List<PhalanxData>() |
| List of phalanx data describing the position and rotation of fingers. More... | |
Description of an hand pose.
A hand pose description is composed of the position and rotation of hand and the position and rotation of every phalanx of the hand.
| void umi3d.edk.userCapture.HandDescription.Add | ( | string | phalanx, |
| SpatialDataInfo | data | ||
| ) |
Add a position/rotation couple for a phalanx to the list of phalanx position/rotation, if not already included.
| phalanx | |
| data |
| SpatialDataInfo umi3d.edk.userCapture.HandDescription.Get | ( | string | phalanx | ) |
Get a position/rotation info of a phalanx.
| phalanx |
| void umi3d.edk.userCapture.HandDescription.Set | ( | string | phalanx, |
| SpatialDataInfo | data | ||
| ) |
Set a position/rotation couple for a phalanx to the list of phalanx position/rotation, if already included.
| phalanx | |
| data |
| void umi3d.edk.userCapture.HandDescription.SetRotation | ( | string | phalanx, |
| Vector3 | rotation | ||
| ) |
Set a rotation for a phalanx to the list of phalanx position/rotation, if already included.
| phalanx | |
| rotation |
| Vector3 umi3d.edk.userCapture.HandDescription.LeftHandEulerRotation = Vector3.zero |
Rotation of the right hand reference point.
| Vector3 umi3d.edk.userCapture.HandDescription.LeftHandPosition = Vector3.zero |
Position of the left hand reference point.
| List<PhalanxData> umi3d.edk.userCapture.HandDescription.PhalangesData = new List<PhalanxData>() |
List of phalanx data describing the position and rotation of fingers.
Behaves like a dictionnary.
| Vector3 umi3d.edk.userCapture.HandDescription.RightHandEulerRotation = Vector3.zero |
Rotation of the right hand reference point.
| Vector3 umi3d.edk.userCapture.HandDescription.RightHandPosition = Vector3.zero |
Position of the right hand reference point.


Connected digital additive manufacturing
Edit 'Scope'
Scope
Make changes to the question 'Scope'. You can amend how this is presented to the applicant, and also the wording and guidance assessors are given for scoring this question.


Corona Worldwide
Latest Stats
Total Cases
Active Cases
Total Deaths
Todays Deaths
Total Recovered
Todays Recovered
Critial Condition
Total Population
Countries Affected


Figure 1: Hedstrom, P. (2005). Dissecting the Social: On the Principles of Analytical Sociology. Cambridge: Cambridge University Press. doi:10.1017/CBO9780511488801
"[the book discusses] some of the basic principles of analytical sociology and soughts to clarify what a mechanism-based explanatory strategy looks like" (p. 145).
Figure 2: Coleman's micro-Macro Graph
Three types of explanation.
Figure 3: D.B.O. Theory
Figure 4: Initial patterns of beliefs, desires and actions in a population of 2,500 virtual actors.
Figure 5: Unemployment levels and social interactions in low and high unemployment neighbourhoods in the Stockholm metropolitan area.


By Ross Smith
#include "rs-core/time.hpp"
In this documentation, the std::chrono::
prefix on the standard date and
time types is left out for brevity. For all functions here that accept or
return a broken down date, results are unspecified if the date is outside the
range of a time_t
(1970-2038 on 32-bit systems), or if the fields are set to
values that do not represent a valid date.
using
Dseconds
= duration<double>
using
Ddays
= duration<double, ratio<86400>>
using
Dyears
= duration<double, ratio<31557600>>
Floating point duration types.
using
ReliableClock
= [high_resolution_clock or steady_clock]
This is the highest resolution clock that can be trusted to be steady. It will
be high_resolution_clock
if high_resolution_clock::is_steady
is true,
otherwise steady_clock
.
enum class
Zone
Zone::
utc
Zone::
local
This is passed to some of the time and date functions to indicate whether a
broken down date is expressed in UTC or the local time zone. For all functions
that take a Zone
argument, behaviour is unspecified if the argument is not
one of these two values.
template <typename R, typename P> void
from_seconds
(double s, duration<R, P>& d) noexcept
template <typename R, typename P> double
to_seconds
(const duration<R, P>& d) noexcept
Convenience functions to convert between a duration
and a floating point
number of seconds.
system_clock::time_point
make_date
(int year, int month, int day, int hour = 0, int min = 0, double sec = 0, Zone z = Zone::utc) noexcept
Converts a broken down date into a time point. Behaviour if any of the date
arguments are invalid follows the same rules as mktime()
.
U8string
format_date
(system_clock::time_point tp, int prec = 0, Zone z = Zone::utc)
U8string
format_date
(system_clock::time_point tp, const U8string& format, Zone z = Zone::utc)
These convert a time point into a broken down date and format it. The first
version writes the date in ISO 8601 format ("yyyy-mm-dd hh:mm:ss"
). If
prec
is greater than zero, the specified number of decimal places will be
added to the seconds field.
The second version writes the date using the conventions of strftime()
. This
will return an empty string if anything goes wrong; there is no way to
distinguish between a conversion error and a legitimately empty result (this
is a limitation of strftime()
).
For reference, the portable subset of the strftime()
formatting codes are:
| Code | Description | Code | Description |
|---|---|---|---|
| Date elements | Weekday elements | ||
%Y |
Year number | %a |
Local weekday abbreviation |
%y |
Last 2 digits of the year (00-99 ) |
%w |
Sunday-based weekday number (0-6 ) |
%m |
Month number (00-12 ) |
%A |
Local weekday name |
%B |
Local month name | %U |
Sunday-based week number (00-53 ) |
%b |
Local month abbreviation | %W |
Monday-based week number (00-53 ) |
%d |
Day of the month (01-31 ) |
Other elements | |
| Time of day elements | %c |
Local standard date/time format | |
%H |
Hour on 24-hour clock (00-23 ) |
%x |
Local standard date format |
%I |
Hour on 12-hour clock (01-12 ) |
%X |
Local standard time format |
%p |
Local equivalent of a.m./p.m. | %j |
Day of the year (001-366 ) |
%M |
Minute (00-59 ) |
%Z |
Time zone name |
%S |
Second (00-60 ) |
%z |
Time zone offset |
template <typename R, typename P> U8string
format_time
(const duration<R, P>& time, int prec = 0)
Formats a time duration in days, hours, minutes, seconds, and (if prec>0
)
fractions of a second.
class
Stopwatch
explicit Stopwatch::
Stopwatch
(const U8string& name, int precision = 3) noexcept
explicit Stopwatch::
Stopwatch
(const char* name, int precision = 3) noexcept
Stopwatch::
~Stopwatch
() noexcept
Simple timer for debugging. The destructor will write (using logx()
) the
name and the elapsed time since construction. The note on exceptions for
logx()
above applies here too.
template <typename R, typename P> void
sleep_for
(duration<R, P> t) noexcept
void
sleep_for
(double t) noexcept
template <typename C, typename D> void
sleep_until
(time_point<C, D> t) noexcept
Suspend the current thread for the specified interval, supplied as a duration, a number of seconds, or an absolute time. Calling this with a duration less than or equal to zero will cause the thread to yield its time slice. Resolution is system dependent. Behaviour is undefined if the duration exceeds 31 days.
template <typename R, typename P> timespec
duration_to_timespec
(const duration<R, P>& d) noexcept
template <typename R, typename P> timeval
duration_to_timeval
(const duration<R, P>& d) noexcept
timespec
timepoint_to_timespec
(const system_clock::time_point& tp) noexcept
timeval
timepoint_to_timeval
(const system_clock::time_point& tp) noexcept
template <typename R, typename P> void
timespec_to_duration
(const timespec& ts, duration<R, P>& d) noexcept
system_clock::time_point
timespec_to_timepoint
(const timespec& ts) noexcept
template <typename R, typename P> void
timeval_to_duration
(const timeval& tv, duration<R, P>& d) noexcept
system_clock::time_point
timeval_to_timepoint
(const timeval& tv) noexcept
system_clock::time_point
filetime_to_timepoint
(const FILETIME& ft) noexcept
FILETIME
timepoint_to_filetime
(const system_clock::time_point& tp) noexcept
Conversion functions between C++ chrono types and system API types. Some of these return their result through a reference argument to avoid having to explicitly specify the duration type. Behaviour is undefined if the value being represented is out of range for either the source or destination type.
The Windows functions are only defined on Win32 builds; the Unix functions are always defined (since the relevant time structures are defined in the Windows API).
For reference, the system time types are:
#include <time.h>
struct
timespec
time_t timespec::
tv_sec
// seconds
long timespec::
tv_nsec
// nanoseconds
#include <sys/time.h>
struct
timeval
time_t timeval::
tv_sec
// seconds
suseconds_t timeval::
tv_usec
// microseconds
#include <windows.h>
struct
FILETIME
DWORD FILETIME::
dwLowDateTime
// low 32 bits
DWORD FILETIME::
dwHighDateTime
// high 32 bits