Introduction
Welcome to the Waw-Recipe API! You can use our API to access Waw-Recipe endpoints, which can get information on various users and recipes in our database.
You can view code example in the dark area to the right.
HTTP Request url must be prepended with base url
BASE URL = https://waw-recipe.herokuapp.com/api/v1
Authentication
To authorize,
add `authorization` to your request header.
Its value must be a valid signed JWT token.
Waw-Recipe uses JWT to authenticate a user. The JWT token must be signed by the application and it has an expiry time of 24hours.
Waw-Recipe expects that the token is included in every request like:
authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
Login
Request body
{
"email"<EMAIL_ADDRESS>"password": "password"
}
Response body (application/json)
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9....",
"user": {
"id": 1,
"firstName": "firstName",
"lastName": "lastName",
"email"<EMAIL_ADDRESS>"username": "username",
"age": 18,
"sex": "female",
"facebookOauthID": "",
"googleOauthID": ""
},
"message": "Login successful"
}
This endpoint logs a user into the application. The token should be included in subsequent request header.
HTTP Request
POST /login
HTTP Response
200 OK
Users
Create a user
Request body
{
"username": "username",
"email"<EMAIL_ADDRESS>"firstName" : "firstName",
"lastName": "lastName",
"age":18,
"sex":"female",
"password": "password",
"confirmPassword": "password"
}
Response body (application/json)
{
"userPayload": {
"user": {
"id": 1,
"firstName": "firstName",
"lastName": "lastName",
"email"<EMAIL_ADDRESS>"username": "username",
"age": 18,
"sex": "female"
},
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
},
"message": "Your account has been created successfully"
}
This endpoint creates a user record.
HTTP Request
POST /signup
HTTP Response
201 Created
Edit a user
Request body
{
"username": "newUsername",
}
Response body (application/json)
{
"message": "Your profile has been updated successfully"
}
This endpoint edits a user record.
HTTP Request
PUT /users/:userId
HTTP Response
200 OK
URL Parameters
| Parameter | Description |
|---|---|
| userId | The ID of the user |
Send reset password
Request body
{
"email"<EMAIL_ADDRESS>}
Response body (application/json)
{
"message": "A password reset link has been sent to<EMAIL_ADDRESS>may take upto 5 mins for the mail to arrive."
}
This endpoint sends a reset password link to the user associated with the provided email address
HTTP Request
POST /users/reset_password
HTTP Response
200 OK
Validate reset link
Request body
{}
Response body (application/json)
{
"message": "Password successfully changed. Please login to your account."
}
This endpoint validates the reset link after the user has click on the reset password link and redirects user to change password
HTTP Request
POST /auth/reset-password/
HTTP Response
200 OK
Query Parameters
| Parameter | Default | Description |
|---|---|---|
| token | undefined | The reset token sent to user email |
Change password
Request body
{
"oldPassword": "old password",
"newPassword": "new password",
"confirmPassword": "new password"
}
Response body (application/json)
{
"message": "Your password has been changed succesfully"
}
This endpoint is for authenticated users to change their password
HTTP Request
PUT /users/:userId
HTTP Response
200 OK
URL Parameters
| Parameter | Description |
|---|---|
| userId | The ID of the user |
Get all users
Request body
{ }
Response body (application/json)
{
"users": [
{
"id": 1,
"firstName": "firstName",
"lastName": "lastName",
"email"<EMAIL_ADDRESS>"username": "username",
"age": "24",
"sex": "female",
"facebookOauthID": "",
"googleOauthID": "",
"resetPasswordToken": null,
"resetPasswordExpires": null,
"profilePhotoUrl": null,
"createdAt": "2018-06-22T12:25:33.076Z",
"updatedAt": "2018-06-22T12:30:00.434Z",
"Recipes": []
},
...
]
}
This endpoint gets all users
HTTP Request
GET /users
HTTP Response
200 OK
Get a single user
Request body
{ }
Response body (application/json)
{
"user": {
"id": 1,
"firstName": "firstName",
"lastName": "lastName",
"email"<EMAIL_ADDRESS>"username": "username",
"age": "24",
"sex": "female",
"facebookOauthID": "",
"googleOauthID": "",
"resetPasswordToken": null,
"resetPasswordExpires": null,
"profilePhotoUrl": null,
"createdAt": "2018-06-22T12:25:33.076Z",
"updatedAt": "2018-06-22T12:30:00.434Z",
"Recipes": []
}
}
This endpoint gets a single user
HTTP Request
GET /users/:userId
HTTP Response
200 OK
URL Parameters
| Parameter | Description |
|---|---|
| userId | The ID of the user |
Recipes
Create a recipe
Request body
{
"userId": 1,
"name": "name of recipe",
"description": "describe recipe",
"photoUrl"<EMAIL_ADDRESS>}
Response body (application/json)
{
"recipe": {
"id": 1,
"userId": 1,
"name": "name of recipe",
"description": "describe recipe",
"photoUrl"<EMAIL_ADDRESS>"updatedAt": "2018-06-23T00:43:06.356Z",
"createdAt": "2018-06-23T00:43:06.356Z",
"favorites": null
},
"message": "name of recipe added successfully"
}
This endpoint creates a new recipe
HTTP Request
POST /recipes
HTTP Response
201 Created
Edit a recipe
Request body
{
"upVotes": 1,
}
Response body (application/json)
{
"recipe": {
"id": 1,
"userId": 1,
"name": "name of recipe",
"description": "describe recipe",
"favorites": null,
"photoUrl"<EMAIL_ADDRESS>"createdAt": "2018-06-23T00:43:06.356Z",
"updatedAt": "2018-06-23T00:43:06.356Z",
"reviews": [],
"upVotes": "1",
"downVotes": "0",
"likes": "0",
"dislikes": "0"
}
}
This endpoint updates a recipe. This also applies to upVoting
and downVoting
a recipe
HTTP Request
PUT /recipes/:userId/:recipeId
HTTP Response
200 OK
URL Parameters
| Parameter | Description |
|---|---|
| userId | The ID of the user |
| recipeId | The ID of the recipe |
Save a recipe
Request body
{ }
Response body (application/json)
{
"message": "Recipe saved"
}
This endpoint saves a recipe.
HTTP Request
POST /recipes/save/:userId/:recipeId
HTTP Response
201 Created
URL Parameters
| Parameter | Description |
|---|---|
| userId | The ID of the user |
| recipeId | The ID of the recipe |
Unsave a user recipe
Request body
{ }
Response body (application/json)
{
"message": "Recipe removed"
}
This endpoint unsaves a recipe.
HTTP Request
DELETE /recipes/unsave/:userId/:recipeId
HTTP Response
200 OK
URL Parameters
| Parameter | Description |
|---|---|
| userId | The ID of the user |
| recipeId | The ID of the recipe |
Get a user saved recipes
Request body
{ }
Response body (application/json)
{
"savedRecipe": [
{
"id": 1,
"userId": 1,
"name": "FirstRecipe",
"description": "Describe your recipe in details",
"favorites": null,
"photoUrl": null,
"createdAt": "2018-06-09T03:19:04.848Z",
"updatedAt": "2018-06-09T03:19:04.848Z",
"SavedRecipe": {
"id": 1,
"userId": 1,
"recipeId": 1,
"createdAt": "2018-06-25T16:33:59.846Z",
"updatedAt": "2018-06-25T16:33:59.846Z"
}
},
...
]
}
This endpoint gets list of recipes saved by user.
HTTP Request
GET /recipes/saved/:userId
HTTP Response
200 OK
URL Parameters
| Parameter | Description |
|---|---|
| userId | The ID of the user |
Get all recipes
Request body
{ }
Response body (application/json)
{
"recipes": [
{
"id": 1,
"userId": 1,
"name": "name of recipe",
"description": "describe recipe",
"photoUrl"<EMAIL_ADDRESS>"createdAt": "2018-06-09T03:19:04.848Z",
"updatedAt": "2018-06-09T03:19:04.848Z",
"upVotes": "0",
"downVotes": "0",
"likes": "0",
"dislikes": "0",
"Reviews": []
},
...
]
}
This endpoint gets all recipes
HTTP Request
GET /recipes
HTTP Response
200 OK
Sort Recipe
Request body
{ }
Response body (application/json)
{
"recipes": [
{
"id": 1,
"userId": 1,
"name": "name of recipe",
"description": "describe recipe",
"favorites": null,
"photoUrl": null,
"createdAt": "2018-06-09T03:19:04.898Z",
"updatedAt": "2018-06-09T03:19:04.898Z",
"upVotes": "1",
"downVotes": "0",
"likes": "0",
"dislikes": "0",
},
...
]
}
This endpoint gets all recipes
HTTP Request
GET /recipes
HTTP Response
200 OK
Query Parameters
| Parameter | Default | Description |
|---|---|---|
| sort | undefined | A choosen property of recipe to be used in sorting |
| order | undefined | The order of recipes required asc or desc |
Get a single recipe
Request body
{ }
Response body (application/json)
{
"recipe": {
"id": 1,
"userId": 1,
"name": "name of recipe",
"description": "describe recipe",
"favorites": null,
"photoUrl"<EMAIL_ADDRESS>"createdAt": "2018-06-23T00:43:06.356Z",
"updatedAt": "2018-06-23T00:43:06.356Z",
"upVotes": "1",
"downVotes": "0",
"likes": "0",
"dislikes": "0",
"Reviews": []
}
}
This endpoint gets a single recipe
HTTP Request
GET /recipes/:recipeId
HTTP Response
200 OK
URL Parameters
| Parameter | Description |
|---|---|
| recipeId | The ID of the recipe |
Delete a recipe
Request body
{ }
Response body (application/json)
{
"message": "Recipe deleted successfully"
}
This endpoint deletes a recipe
HTTP Request
DELETE /recipes/:userId/:recipeId
HTTP Response
200 OK
URL Parameters
| Parameter | Description |
|---|---|
| userId | The ID of the user |
| recipeId | The ID of the recipe |
Recipe Review(s)
Review a recipe
Request body
{
"userId": 1,
"recipeId": 2,
"parentId": 2,
"description": "Review description",
"imageURL"<EMAIL_ADDRESS>}
Response body (application/json)
{
"review": {
"id":1
"userId": 1,
"recipeId": 2,
"parentId": 2,
"description": "Review description",
"imageURL"<EMAIL_ADDRESS>},
"message": "You have just reviewed item"
}
This endpoint adds review(s) to recipe
HTTP Request
POST /recipes/:recipeId/reviews
HTTP Response
201 Created
URL Parameters
| Parameter | Description |
|---|---|
| recipeId | The ID of the recipe |
Edit a review
Request body
{
"description": "Edit review description",
"imageURL"<EMAIL_ADDRESS>}
Response body (application/json)
{
"updatedReview": {
"id":1
"userId": 1,
"recipeId": 2,
"parentId": 2,
"description": "Edit review description",
"imageURL"<EMAIL_ADDRESS>},
"message": "Your review have been updated successfully"
}
This endpoint edits a review
HTTP Request
PUT /recipes/:userId/reviews/:reviewId
HTTP Response
200 OK
URL Parameters
| Parameter | Description |
|---|---|
| userId | The ID of the user |
| reviewId | The ID of the review |
Delete a review
Request body
{ }
Response body (application/json)
{
"message": "Review deleted successfully"
}
This endpoint deletes a review
HTTP Request
DELETE /recipes/:userId/reviews/:reviewId
HTTP Response
200 OK
URL Parameters
| Parameter | Description |
|---|---|
| userId | The ID of the user |
| reviewId | The ID of the review |
Errors
The Waw-Recipe API uses the following error codes:
| Error Code | Meaning |
|---|---|
| 400 | Bad Request -- Your request is invalid. |
| 401 | Unauthorized -- Your API key is wrong. |
| 403 | Forbidden -- Request not allowed for recipe creator. |
| 404 | Not Found -- The specified kitten could not be found. |
| 409 | Conflict -- The same request not allowed for the same user. |
| 500 | Internal Server Error -- We had a problem with our server. Try again later. later. |


We monetize services!
- seize cutting-edge experiences
- morph sexy deliverables
- drive mission-critical vortals
- leverage cross-media infrastructures
- synthesize synergistic networks
- morph efficient web services
- generate innovative e-commerce
- grow ubiquitous communities


Hi, I'm Edward. My major is Computer Science and I am a third year transfer student at UCSD. I came from San Francisco and my hobbies include cooking and playing basketball. I tutor for CSE 8A, 12 and 15L. The classes I am currently taking are CSE 120, CSE 112 and CSE 170 and I plan to graduate in Fall 2016.


ResourceBroker adaptors
This page shows the capabilities of the adaptors that implement the JavaGAT ResourceBroker object. The table below shows the status of the adaptor, which can be 'done', 'w.i.p' (work in progress) or 'untested' (coding is done, needs testing). Furthermore you can see the implementation level (the percentage of implemented methods), and you can see the details of which methods are actually implemented. There is also a per method overview (which adaptors implement a certain method)
| name |
status |
implemented |
| LocalResourceBrokerAdaptor |
done |
60 % [details] |
| GlobusResourceBrokerAdaptor |
done |
60 % [details] |
| WSGT4newResourceBrokerAdaptor |
done |
60 % [details] |
| SshTrileadResourceBrokerAdaptor |
done |
60 % [details] |
| CommandlineSshResourceBrokerAdaptor |
done |
20 % [details] |
| GT42ResourceBrokerAdaptor |
done |
60 % [details] |
| GliteResourceBrokerAdaptor |
done |
40 % [details] |
| GridSAMResourceBrokerAdaptor |
done |
20 % [details] |
| KoalaResourceBrokerAdaptor |
done |
20 % [details] |
| LocalQResourceBrokerAdaptor |
done |
20 % [details] |
| SgeResourceBrokerAdaptor |
done |
20 % [details] |
| SshPbsResourceBrokerAdaptor |
done |
20 % [details] |
| SshSgeResourceBrokerAdaptor |
done |
20 % [details] |
| UnicoreResourceBrokerAdaptor |
done |
20 % [details] |
| ZorillaResourceBrokerAdaptor |
done |
20 % [details] |
Adaptor description: The Local ResourceBroker Adaptor implements the ResourceBroker using the Java ProcessBuilder facility.
| implemented |
not implemented |
| endMultiJob |
- |
| - |
findResources |
| beginMultiJob |
- |
| submitJob |
- |
| - |
reserveResource |
Adaptor description: The Globus ResourceBroker Adaptor implements the ResourceBroker object for Globus (non-ws).
| implemented |
not implemented |
| endMultiJob |
- |
| - |
findResources |
| beginMultiJob |
- |
| submitJob |
- |
| - |
reserveResource |
Adaptor description: The WSGT4new ResourceBroker Adaptor implements the ResourceBroker object for Globus-4.0 WS.
| implemented |
not implemented |
| endMultiJob |
- |
| - |
findResources |
| beginMultiJob |
- |
| submitJob |
- |
| - |
reserveResource |
Adaptor description: The SshTrilead ResourceBroker Adaptor implements the ResourceBroker object using the trilead ssh library. Trilead ssh is an open source full java ssh library. The ssh trilead ResourceBroker adaptor can only submit to single machines, however if you invoke a command like 'qsub' on a headnode, it might result in an application running on multiple machines. Connections with a remote ssh server can be made by using the username + password, username + keyfile, or with only a username, depending on the client and server settings.
| implemented |
not implemented |
| endMultiJob |
- |
| - |
findResources |
| beginMultiJob |
- |
| submitJob |
- |
| - |
reserveResource |
Adaptor description: The CommandlineSsh ResourceBroker Adaptor implements the ResourceBroker object using ssh commands.
| implemented |
not implemented |
| - |
endMultiJob |
| - |
findResources |
| - |
beginMultiJob |
| submitJob |
- |
| - |
reserveResource |
Adaptor description: The GT42 ResourceBroker Adaptor implements the ResourceBroker object on Globus 4.2 WS.
| implemented |
not implemented |
| endMultiJob |
- |
| - |
findResources |
| beginMultiJob |
- |
| submitJob |
- |
| - |
reserveResource |
Adaptor description: The Glite Resourcebroker Adaptor implements the ResourceBroker for gLite WMS job submission.
| implemented |
not implemented |
| - |
endMultiJob |
| findResources |
- |
| - |
beginMultiJob |
| submitJob |
- |
| - |
reserveResource |
Adaptor description: The Gridsam ResourceBroker Adaptor implements the ResourceBroker object on Gridsam.
| implemented |
not implemented |
| - |
endMultiJob |
| - |
findResources |
| - |
beginMultiJob |
| submitJob |
- |
| - |
reserveResource |
Adaptor description: The Koala ResourceBroker Adaptor implements the ResourceBroker object on the Koala distributed scheduler.
| implemented |
not implemented |
| - |
endMultiJob |
| - |
findResources |
| - |
beginMultiJob |
| submitJob |
- |
| - |
reserveResource |
Adaptor description: The LocalQ ResourceBroker Adaptor implements the ResourceBroker object using the Java ProcessBuilder facility, but in contrast with the Local ResourceBroker Adaptor, this one has a job queue and can run a number of jobs simultaneously, see the localq.max.concurrent.jobs preference.
| implemented |
not implemented |
| - |
endMultiJob |
| - |
findResources |
| - |
beginMultiJob |
| submitJob |
- |
| - |
reserveResource |
Adaptor description: This ResourceBroker uses the DRMAA interface to speak to the Sun Grid Engine. It can only be used on a machine, that has SGE installed. There might be link problems using this adaptor, because the adaptor depends on the SGE installation. In particular, the drmaa.jar that's included in the source (adaptors/Sge/external/drmaa.jar) should be compatible with the $SGE_ROOT/lib/$ARCH/libdrmaa.so, which means that they should be compiled for the same java version (also the 32/64 bit should be equal). Furthermore, this adaptor only works if it's executed using the same java version as the one used for compiling drmaa.jar. A small note about the arguments of the executable: the SGE adaptor automatically puts quotes around each argument.
| implemented |
not implemented |
| - |
endMultiJob |
| - |
findResources |
| - |
beginMultiJob |
| submitJob |
- |
| - |
reserveResource |
Adaptor description: not available
| implemented |
not implemented |
| - |
endMultiJob |
| - |
findResources |
| - |
beginMultiJob |
| submitJob |
- |
| - |
reserveResource |
Adaptor description: not available
| implemented |
not implemented |
| - |
endMultiJob |
| - |
findResources |
| - |
beginMultiJob |
| submitJob |
- |
| - |
reserveResource |
Adaptor description: The Unicore ResourceBroker Adaptor implements the ResourceBroker object on Unicore 6.
| implemented |
not implemented |
| - |
endMultiJob |
| - |
findResources |
| - |
beginMultiJob |
| submitJob |
- |
| - |
reserveResource |
Adaptor description: The Zorilla ResourceBroker Adaptor implements the ResourceBroker object on the Zorilla P2P system.
| implemented |
not implemented |
| - |
endMultiJob |
| - |
findResources |
| - |
beginMultiJob |
| submitJob |
- |
| - |
reserveResource |
Per Method Overview
|
Local |
Globu |
WSGT4 |
SshTr |
Comma |
GT42R |
Glite |
GridS |
Koala |
Local |
SgeRe |
SshPb |
SshSg |
Unico |
Zoril |
| endMultiJob |
V |
V |
V |
V |
X |
V |
X |
X |
X |
X |
X |
X |
X |
X |
X |
| beginMultiJob |
V |
V |
V |
V |
X |
V |
X |
X |
X |
X |
X |
X |
X |
X |
X |
| findResources |
X |
X |
X |
X |
X |
X |
V |
X |
X |
X |
X |
X |
X |
X |
X |
| submitJob |
V |
V |
V |
V |
V |
V |
V |
V |
V |
V |
V |
V |
V |
V |
V |
| reserveResource |
X |
X |
X |
X |
X |
X |
X |
X |
X |
X |
X |
X |
X |
X |
X |
| total |
60 % |
60 % |
60 % |
60 % |
20 % |
60 % |
40 % |
20 % |
20 % |
20 % |
20 % |
20 % |
20 % |
20 % |
20 % |


##[Latest Releases](https://sourceforge.net/projects/ranger/files/) ##[Changes](version_history.html) GGPLAY


Eire Ford
541-870-9895
<EMAIL_ADDRESS>github.com/eireford
linkedin/in/eireford
Skills
Software Engineering, Cloud Architect, Automation, CI/CD, Linux, SQL, Java, Javascript, PHP, Kotlin
Recent studies in Machine Learning, Data Engineering and Python.
Experience
Software Development Engineer
DF Studio, Remote (4/2018 - 12/18)
- Developed unit, functional, integration, and performance tests in Kotlin
- Developed Selenium WebDriver tests for acceptance, regression and cross-browser testing.
- Researched, developed, and tested remediations for web application security findings including patching
legacy code with OWASP Enterprise Security API
- Deployed Jenkins pipeline for testing, staging and rapid prototyping.
Analyst Programmer II
University of Oregon, Eugene, OR (4/12 - 6/16)
- Instigated/Developed/Implemented pilot project to transition core service from onsite proprietary
software to cloud-hosted open source.
- Architected a highly available Learning Management Platform on AWS using LAMP.
- Developed multi-tenant PAAS using Cloud Formation, WordPress, Moodle, Mahara, and Laravel.
- Developed SSO middleware and a RESTful API using Lumen.
- Integrated/Optimized custom front-end with Grunt, Bootstrap, and JQuery.
- Ensured best practices and compliance with FERPA and HIPAA.
Software Development Engineer in Test
Palo Alto Software, Eugene, OR (11/10 - 3/12)
- Wrote plans, test cases for functional, performance and regression testing.
- Developed tests using TestNG, Selenium WebDriver, and Selenium Grid.
- Tracked issues and managed releases via JIRA and Git.
Senior Systems Implementation Engineer
Lumigent Technologies, Inc., Acton, MA (10/05 - 11/08)
- Managed projects, defined requirements, architected systems, developed solutions using Java on Unix.
- Mentored support staff, wrote documentation, and trained technical and non-technical customers.
- Implemented systems for monitoring and auditing Oracle and MSSQL DBMS for SOX and HIPAA
compliance for Financial/Healthcare Institutions.
- Administered enterprise systems and applications, managed configurations, changes, performed
migrations, integrations, coordinated updates and releases.
- Managed technical escalations, provided onsite incident response and forensics.
Certifications
- Data Engineering with GCP, Coursera
- Deep Learning Specialization, DeepLearning.ai, Coursera
Coursework
- University of Oregon, Computer & Information Sciences, 61 credit hours
- University of Colorado, Computer Science, 41 credit hours


## donald knuth ### The Computer Journal
summary
knuth presents his idea about literate programming: essentially, writing some piece of source which then can render as both TEX
file for documentation and .PAS
(for example) as source code, so as to make sure that ideas are always expressed at the higher (highest?) level. his conception of literate programming, is thus focusing on the literary as writing in english(-like) linguo, rather than writing literarily in programming linguo. literary programming closer to poetics than to aesthetics
moving from structured programming to literate programming.
paradigm shift to explaining to humans what we want the computer to do.
“programming is a very personal activity”, “i’m able to write programs as they should be written” (emphasis on should!)
he states that Pascal
, because of the wide educational support it has received, is not his favorite language, but is everyone second-language, so it’s easy to express ideas in it.
so far he’s been only describing this new tool he’s been working on, and perhaps it would be worth to examine the code there to see to what extent that code is somehow beautiful?
what is interesting, though, is that it cares about the meta-writing, the (operational) description of the program, linking both source and documentation, but thus hiding the source (by having it generated from the .web
file / cf. p8). the only “low-level” agency the user has is to change some bits of formatting.
which means his literary understanding is aimed towards stories, narratives, arcs, etc. rather than specific beautiul sentences.
here too, he says that not being able to declare variables close to where they are supposed to be used is an annoying feature of pascal
.
he concludes with the assessment of the economic advantadges and disadvantadges of such a system. funny that, in the end, the economics prime in relationship to the literary
“It’s harder to fool myself when I’m writing a WEB program, because I am in “expository mode” (analogous to classroom lecturing)”
he’s dreaming about a literary journal of source code WEB
files
george forsythe, 1966 “a good algorithm is a piece of scholarship, and its source code should be a published article”
“I had no idea how to take a piece of real software, with all the compromises necessary to make it useful to a large class of people on a wide variety of systems, and to open it up to public scrutiny”
there is thus always compromise when writing code. compromise in what?


|
BoL Doxy Test
1.0
|
Class used for Writing and Reading game packets. More...
Public Member Functions | |
| LoLPacket (__in BYTE bHeader) | |
| Default LoL Packet constructor. More... | |
| void | Block () |
| Blocks the packet. More... | |
| void | Hide () |
| Hide the packet from subsequent callbacks. More... | |
| void | skip (__in int iOffset) |
| Add the offset to the reading pointer. More... | |
| void | getRemaining () |
| Get the count of remaining bytes. More... | |
| void | setPos (__in int iPos) |
| Set the position of the reading pointer. More... | |
| void | Encode1 (__in BYTE bValue) |
| Writes 1 byte to the packet as int. More... | |
| void | Encode2 (__in WORD wValue) |
| Writes 2 byte to the packet as int. More... | |
| void | Encode4 (__in DWORD dwValue) |
| Writes 4 byte to the packet as int. More... | |
| void | EncodeF (__in float fValue) |
| Writes 4 byte to the packet as float. More... | |
| void | EncodeStr (__in string bValue) |
| Writes a null terminator string to the packet. More... | |
| BYTE | Decode1 () |
| Reads 1 byte from the packet as int. More... | |
| WORD | Decode2 () |
| Reads 2 byte from the packet as int. More... | |
| DWORD | Decode4 () |
| Reads 4 byte from the packet as int. More... | |
| float | DecodeF () |
| Reads 4 byte from the packet as float. More... | |
| string | DecodeStr () |
| Reads a null terminator string from the packet. More... | |
| void | Replace1 (__in BYTE bValue, __in_opt int iPos=0) |
| Replaces 1 byte to the packet as int. More... | |
| void | Replace2 (__in WORD wValue, __in_opt int iPos=0) |
| Replaces 2 byte to the packet as int. More... | |
| void | Replace4 (__in DWORD dwValue, __in_opt int iPos=0) |
| Replaces 4 byte to the packet as int. More... | |
| void | ReplaceF (__in float fValue, __in_opt int iPos=0) |
| Replaces 4 byte to the packet as float. More... | |
| void | ReplaceStr (__in string bValue, __in_opt int iPos=0) |
| Replaces a null terminator string to the packet. More... | |
Public Attributes | |
| BYTE | header |
| The header of the packet. More... | |
| bool | bBlock |
| Boolean if the packet should be blocked. More... | |
| int | size |
| Size of the Packet. More... | |
| int | pos |
| Position of the reading pointer. More... | |
| int | dwArg1 |
| First Packet Argument. More... | |
| int | dwArg2 |
| Second Packet Argument. More... | |
Class used for Writing and Reading game packets.
| LoLPacket::LoLPacket | ( | __in BYTE | bHeader | ) |
Default LoL Packet constructor.
| void LoLPacket::Block | ( | ) |
Blocks the packet.
| BYTE LoLPacket::Decode1 | ( | ) |
Reads 1 byte from the packet as int.
| WORD LoLPacket::Decode2 | ( | ) |
Reads 2 byte from the packet as int.
| DWORD LoLPacket::Decode4 | ( | ) |
Reads 4 byte from the packet as int.
| float LoLPacket::DecodeF | ( | ) |
Reads 4 byte from the packet as float.
| string LoLPacket::DecodeStr | ( | ) |
Reads a null terminator string from the packet.
| void LoLPacket::Encode1 | ( | __in BYTE | bValue | ) |
Writes 1 byte to the packet as int.
| void LoLPacket::Encode2 | ( | __in WORD | wValue | ) |
Writes 2 byte to the packet as int.
| void LoLPacket::Encode4 | ( | __in DWORD | dwValue | ) |
Writes 4 byte to the packet as int.
| void LoLPacket::EncodeF | ( | __in float | fValue | ) |
Writes 4 byte to the packet as float.
| void LoLPacket::EncodeStr | ( | __in string | bValue | ) |
Writes a null terminator string to the packet.
| void LoLPacket::getRemaining | ( | ) |
Get the count of remaining bytes.
| void LoLPacket::Hide | ( | ) |
Hide the packet from subsequent callbacks.
| void LoLPacket::Replace1 | ( | __in BYTE | bValue, |
| __in_opt int | iPos = 0 |
||
| ) |
Replaces 1 byte to the packet as int.
| void LoLPacket::Replace2 | ( | __in WORD | wValue, |
| __in_opt int | iPos = 0 |
||
| ) |
Replaces 2 byte to the packet as int.
| void LoLPacket::Replace4 | ( | __in DWORD | dwValue, |
| __in_opt int | iPos = 0 |
||
| ) |
Replaces 4 byte to the packet as int.
| void LoLPacket::ReplaceF | ( | __in float | fValue, |
| __in_opt int | iPos = 0 |
||
| ) |
Replaces 4 byte to the packet as float.
| void LoLPacket::ReplaceStr | ( | __in string | bValue, |
| __in_opt int | iPos = 0 |
||
| ) |
Replaces a null terminator string to the packet.
| void LoLPacket::setPos | ( | __in int | iPos | ) |
Set the position of the reading pointer.
| void LoLPacket::skip | ( | __in int | iOffset | ) |
Add the offset to the reading pointer.
| bool LoLPacket::bBlock |
Boolean if the packet should be blocked.
| int LoLPacket::dwArg1 |
First Packet Argument.
| int LoLPacket::dwArg2 |
Second Packet Argument.
| BYTE LoLPacket::header |
The header of the packet.
| int LoLPacket::pos |
Position of the reading pointer.
| int LoLPacket::size |
Size of the Packet.


| Interface | Description |
|---|---|
| CNativeEnum |
Specialized variant of
INumberEnum that refers to a
C enum using the native size. |
| DominoClientDescendant |
Indicates that an object is a descenant of a
DominoClient and can retrieve
its ancestor. |
| INumberEnum<T extends Number> |
This interface describes an enum that is backed by a C-style numeric value enum.
|
| NotesConstants | |
| ViewFormatConstants |
| Class | Description |
|---|---|
| JNXThread |
Thread subclass that runs with a thread initialized and terminated via
DominoProcess.initializeThread() and DominoProcess.terminateThread() . |
| Loop |
Helper method to control a forEach loop, e.g.
|
| Pair<V1,V2> |
Container class for a generic pair of two values
|
| Ref<T> |
A class to hold a reference to another object, for use with inner classes.
|
| SplitterOutputStream |
OutputStream implementation that delegates all calls to
two destination OutputStream s. |
| Enum | Description |
|---|---|
| JNXServiceFinder |
Utility class to coordinate service loading for JNX.
|
| NotesConstants.AgentCheck | |
| NotesConstants.DESIGN_COMPONENT_ATTR | |
| NotesConstants.DesignUpdateReset | |
| NotesConstants.EmptyFieldMeans | |
| NotesConstants.EProvidingAuthor | |
| NotesConstants.EUsePABsAdminServer | |
| NotesConstants.QUEP_LISTTYPE | |
| NotesConstants.TypeOfLookup | |
| NotesConstants.TypeOfProcessing | |
| StructureSupport |
Copyright © 2019–2021 HCL. All rights reserved.


Delete ${stripeAccount.id}
Delete ${stripeAccount.id}
The Stripe account will be deleted immediately and cannot be recovered.
| ID |
Type |
Status |
${stripeAccount.id} |
${stripeAccount.business_type} |
|
Success! The Stripe account has been deleted.
Error! An error ocurred deleting the Stripe account.


Tags including a city are probably an indication of a vintage item
This can mean a brand just redesigned their label or it is from a specialty line, but sometimes when you recognize the name but not the label, it might be from another era!
Since 1971, the Federal Trade Commission has required manufacturers to add labels explaining how to care for the item, if it has a label explaining how to care for the garment, it its probably from after 1971
1980s
Common fabrics used in the 80's include Spandex, Velvet, and Velour
The edges of these seams were either left untouched or turned into French Seams
Zig Zag pattern most commonly found on 1950's clothes
1960s+ when sewing machines became widely available
RN numbers can be found on the tags on your garment. These numbers are unique to businesses who sell/manufacture clothes. This was issued by the FTC in 1959.
Calculate The Oldest Your Garment Can BeChina, India, Thailand, Bangladesh, Vietnam, Indonesia, Guatemala, Mexico, Sri Lanka are all countries where contemporary clothing is mass manufactured today
These items were considered contemporary at the time


%include file="header_inc_v2.html" />
POSX - ClockIn User Report V2
-- Select User --
%for u in clockin_users:
${u['user_name']|h}
%endfor
From:
To:
Day
Count
FirstInTime
LastOutTime
Total
Normal
OverTime
InTime
OutTime
HRS
Memo
User:
-- Select User --
%for u in clockin_users:
${u['user_name']|h}
%endfor
From:
To:
Memo:
Status:
Enable
Disable


Why address reuse is discouraged:
Reduced security: An unused address is protected by ECDSA AND several SHA-256 and RIPEMD-160 operations, but only ECDSA after being used because the public key must be revealed during spending. This has been shown to open up several possible attacks in the past.[1]
Reduced privacy: All participants who you give the address to know it is yours obviously. They can use this information to analyze incoming and outgoing transactions to identify other addresses you own and who you are interacting with, not to mention how much bitcoin you have. This can be serious for businesses in competition or in situations where a payment might might put someone into harms way (politically unpopular donations or as a means for extortion, etc).


--- layout: archive title: Zulip Chat Archive permalink: /stream/113488-general/topic/rewriting.20and.20type.20class.20inference.html ---
Mario said (regarding whether variables should be implicit or explicit in an iff statement)
The rule is that if it's an iff then it should be implicit if it appears on both sides of the iff. That is, iffs are treated as a pair of implications, and are implicit if they would be implicit in both one-directional versions
But what about the following session? I only use mathlib to get a topological group; I don't know how far into the hierarchy one needs to go in order to see this phenomenon:
import topology.algebra.uniform_group lemma silly {G : Type} [group G] [topological_space G] [topological_group G] : nonempty G ↔ nonempty G := iff.rfl example {G : Type} [group G] [topological_space G] [topological_group G]: nonempty G := begin --rw silly, -- fails --rw @silly, -- fails -- rw @silly _, -- fails /- All fail with this error: invalid rewrite tactic, failed to synthesize type class instance -/ -- rw @silly _ _ _, -- fails /- invalid rewrite tactic, failed to synthesize type class instance state: 4 goals G : Type, _inst_1 : group G, _inst_2 : topological_space G, _inst_3 : topological_group G ⊢ nonempty G G : Type, _inst_1 : group G, _inst_2 : topological_space G, _inst_3 : topological_group G ⊢ Type G : Type, _inst_1 : group G, _inst_2 : topological_space G, _inst_3 : topological_group G ⊢ group ?m_1 G : Type, _inst_1 : group G, _inst_2 : topological_space G, _inst_3 : topological_group G ⊢ topological_space ?m_1 -/ rw @silly _ _ _ _, -- works but now we have four goals e.g. ⊢ group G repeat {sorry} end -- explicit G version lemma silly2 (G : Type) [group G] [topological_space G] [topological_group G] : nonempty G ↔ nonempty G := iff.rfl example {G : Type} [group G] [topological_space G] [topological_group G]: nonempty G := begin rw silly2 _, /- 4 goals G : Type, _inst_1 : group G, _inst_2 : topological_space G, _inst_3 : topological_group G ⊢ nonempty G G : Type, _inst_1 : group G, _inst_2 : topological_space G, _inst_3 : topological_group G ⊢ group G G : Type, _inst_1 : group G, _inst_2 : topological_space G, _inst_3 : topological_group G ⊢ topological_space G G : Type, _inst_1 : group G, _inst_2 : topological_space G, _inst_3 : topological_group G ⊢ topological_group G -/ repeat {sorry} end example {G : Type} [group G] [topological_space G] [topological_group G]: nonempty G := begin rw silly2 G, -- works -- only one goal. sorry end
Is this evidence that G should be explicit in silly
?
I think it's evidence that something is wrong with rw
: it should just work in all cases. Why doesn't it automatically deal with those side goals? I've seen behavior like this before, and I would love to know what's going on.
Could it have something to do with the fact that nonempty
is itself a class?
mathlib-free version:
class foo (G : Type) class bar (G : Type) [foo G] lemma silly {G : Type} [foo G] [bar G] : nonempty G ↔ nonempty G := iff.rfl example (G : Type) [foo G] [bar G] : nonempty G := begin -- rw silly, -- fails -- rw @silly G, -- fails rw @silly G _, -- works sorry end lemma silly2 (G : Type) [foo G] [bar G] : nonempty G ↔ nonempty G := iff.rfl example (G : Type) [foo G] [bar G] : nonempty G := begin -- rw silly2, -- fails -- rw @silly2 G, -- fails rw silly2 G, -- works -- perhaps different elaboration strat to the previous line? sorry end
The issue isn't that nonempty
is a class. Maybe it's a bug in rw
? I've also seen it before, but catching out a student; it's now catching me out though.
class foo (G : Type) class bar (G : Type) [foo G] def P : Type → Prop := sorry def Q : Type → Prop := sorry lemma silly {G : Type} [foo G] [bar G] : P G ↔ Q G := iff.rfl -- rofl example (G : Type) [foo G] [bar G] : P G := begin -- rw silly, -- fails -- rw @silly G, -- fails rw @silly G _, -- works sorry end lemma silly2 (G : Type) [foo G] [bar G] : P G ↔ Q G := iff.rfl example (G : Type) [foo G] [bar G] : P G := begin -- rw silly2, -- fails -- rw @silly2 G, -- fails rw silly2 G, -- works -- perhaps different elaboration strat to the previous line? sorry end
Maybe related: in the first example, apply silly.mp
succeeds but creates side goals for foo G
and bar G
, while refine silly.mp _
works correctly
I am rather surprised that rw @silly2 G
fails at the end but rw silly2 G
works. I know that the @
can cause some stuff to be elaborated differently but that fact is not in the context of a rewrite. It would be great if this were a bug in rw
, because I like Mario's rule; perhaps there needs to be an exception for when iterated typeclasses are involved though?
If silly
only depends on foo G
and not bar G
then rw silly
works in the first example but apply silly.mp
still creates a side goal foo G
Also if bar G
doesn't depend on foo G
then rw silly
succeeds. That seems to suggest that rw
might be trying to solve the goals in the wrong order?
Yes, if bar
doesn't depend on foo
then everything seems to work exactly as one might expect it to.
Side issue: debugging is hard because in contrast to the usual situation where you can see exactly which instance Lean failed to infer, here we just get this generic message failed to synthesize type class instance
. Is there any way of looking at the trace of a rewrite like there is for simp
?
I would have just written apply silly.1
in most of these cases
I also feel that the problem is that rw
does type-class inference in the wrong order. If you provide underscores, then type-class inference will fire for those arguments before rewrite does anything.
Mario I'm sure you would have noticed that you don't even have to apply silly
that's fair
I would have just written
apply silly.1
in most of these cases
Yes, that's what we did to work around it, but I figured it was worth getting to the bottom of.
the rule that I gave is optimized for using .1
and .2
to apply bidirectional theorems
Does it work if you use =
instead of <->
?
One could imagine a big chain of rewrites though, where you don't want to stop and apply something.
Does it work if you use
=
instead of<->
?
Nope:
class foo (G : Type) class bar (G : Type) [foo G] def P : Type → Prop := λ _, true def Q : Type → Prop := λ _, true lemma silly {G : Type} [foo G] [bar G] : P G = Q G := rfl example (G : Type) [foo G] [bar G] : P G := begin rw silly, /- invalid rewrite tactic, failed to synthesize type class instance state: G : Type, _inst_1 : foo G, _inst_2 : bar G ⊢ P G -/ end
don't forget to use refine silly.1 _
to avoid the apply bug :)
I think I can explain all behavior except rw @silly _ _
:
class foo (G : Type) class bar (G : Type) [foo G] constant P : Type → Prop constant Q : Type → Prop lemma silly {G : Type} [foo G] [bar G] : P G ↔ Q G := sorry example (G : Type) [foo G] [bar G] : P G := begin -- rw @silly, -- fails: rw infers arguments in wrong order? -- rw @silly G, -- fails: rw infers arguments in wrong order? -- rw @silly G _, -- succeeds: `foo` is inferred before rw is called -- rw @silly G _ _, -- succeeds: `foo` and `bar` are inferred before rw is called -- rw @silly _, -- fails: rw infers arguments in wrong order? -- rw @silly _ _, -- fails? -- rw @silly _ _ _, -- works, but generates too many new goals: couldn't infer type-class arguments before rw -- rw silly, -- presumably same as `rw @silly` because names are treated differently than expressions -- rw id silly, -- same as `rw @silly _ _ _` -- refine silly.mpr _, -- preferred solution end
Oh rw @silly _ _
probably fails for the same reason: it tries to synthesize bar G
when foo G
has not been synthesized yet.
rw @silly _ _
is failing to synthesize bar G
because when it tries it's bar ?m_1
right?
what is the error rw infers arguments in wrong order
?
that is my human-written reason that rw fails.
invalid rewrite tactic, failed to synthesize type class instance state: G : Type, _inst_1 : foo G, _inst_2 : bar G ⊢ P G
I know, but what exactly is happening by your estimation
I think that type class inference fails on foo ?m_1
before it has decided that ?m_1=G
but this is just a guess and I don't know how to find out if I'm right.
my estimation is that rw
tries to infer @bar G ?m
and fails before inferring ?m : foo G
.
it shouldn't do that
Aah floris' suggestion is more refined than mine.
I think Kevin's guess is wrong because it doesn't happen if bar
is not involved
it shouldn't do that
Agreed, but does it do that?
what's the error message?
I think Kevin's guess is wrong because it doesn't happen if
bar
is not involved
My guess can't be right because if it were right then we would have noticed this much much earlier
what's the error message?
Still the one I quoted.
it shouldn't do that
Agreed, but does it do that?
This you can test with set_option trace.class_instances true
, the first output is
[class_instances] class-instance resolution trace [class_instances] (0) ?x_0 : @bar G ?m__fresh.293.7708 := _inst_2 failed is_def_eq
It's the "rubbish" version of the failed to synthesize type class instance error, when it doesn't tell you the type of the instance it failed to syntheize
In fact, that's the only relevant output because rw
just gives up when that fails
ah, synth_instances()
works in reverse order
Also if bar
doesn't depend on foo
, then you can see in the trace it solves bar
first and then foo
that's what gets called in rewrite_core()
after the pattern matches (so G is unified) with the list of instance metavariables that were inserted in order to fill the pis in the equation
You should never be solving the instances in reverse order -- things wouldn't even typecheck if I fed them to Lean in reverse order when I was defining the function.
https://github.com/leanprover-community/lean/blob/master/src/library/tactic/apply_tactic.cpp#L96-L97
I don't know if it's an optimization or what
It certainly looks like a conscious decision though doesn't it ;-)
if only Leo were active right now...
don't even think about it.
I'm going to go to bed before I snap and just ask him :-/
Looks like that code was added in this commit: https://github.com/leanprover-community/lean/commit/f7fe2a775c1492184278931dc223648b95d9ce64#diff-cd4a348ea2537f9e3471d8c015145d5eR80-R91
I couldn't find any issue that corresponded to the commit message though.
It was effectively moved from elsewhere in that commit though, so you'd have look farther back
I'll just change it to forwards and find out what breaks
It's been there since the beginning: https://github.com/leanprover-community/lean/commit/61a845c0050c7617ce9df7e2071883d1c24f3a27
Well, the core library built successfully at least
do Kevin's tests work?
Yes
PR?
though apply
still generates side conditions
I think that's something else
Can you build mathlib? :rolling_on_the_floor_laughing:
Can you build mathlib? :rolling_on_the_floor_laughing:
in progress
I was hoping the apply
thing was related just because the code was in tactic_apply.cpp
, but it wasn't really consistent with the fact that it also occurred with only one class involved
Could you give a simple example of the apply behavior?
is "replace rw silly
with apply silly.1
in Kevin's examples" good enough?
and you get subgoals |- foo G, |- bar G?
Yep, with the main goal nonempty G
first
Actually, hang on
Ah, never mind. I thought I saw something else going on, but it was due to other stuff in the same file (the second example).
The order of the new goals is also the same (nonempty G
then foo G
then bar G
) with both standard Lean and my modified version.
I get no typeclass instance trace corresponding to a proof of foo G
or foo ?m_1
PR?
https://github.com/leanprover-community/lean/pull/67
but of course it's potentially breaking compatibility
if mathlib builds, I think this should be safe
it's apparently rarely exercised but I don't see how this will cause any new errors
It looks like the problem isn't with apply:
lemma silly {G : Type} [foo G] : Q G → P G := sorry example (G : Type) [foo G] : P G := begin -- apply silly, --works -- apply @silly, --works -- apply (@silly _), --works apply (@silly _ _), --leaves |- foo G end
Mathlib did build
I think the issue is that i_to_expr_for_apply
gets called with the pexpr (@silly _ _)
first, and no expected type, which generates the subgoal for |- ?m : Type
and for |- foo ?m
, then apply_core
is called with the resulting expr, which unifies ?m := G
and leaves the |- foo G
goal
apply
itself knows how to handle this when it does its own metavariable instantiations: it delays them until after unification
but these metavariables are created before apply_core
is called so it doesn't know about them
So you changed two things: silly
has only foo
and not bar
, and it's no longer a biconditional.
the biconditional was confusing matters, and the foo/bar thing was exercising the wrong bug
you get the same result with silly.2
with the earlier version if you fix the synth_instances
bug
The same result as apply (@silly _ _)
you mean?
yes
OK, right
because synth.2
is elaborated first to (synth ?m ?m').2
with the ?m'
subgoal added, then apply
is called
I don't see an obvious way to fix this besides passing the new goals to apply_core
so it can include them in the accounting, or maybe trying to infer them again after calling apply_core
it's not easy to find out if they are pending instance resolution though
because that depends on the binder on the application that generated them
you can approximate it by looking at the type and seeing if it's a class, but this will have the wrong behavior for {_ : nonempty A}
binders
I think I see, apply
is going to do the work of guessing how many _
s to insert (hopefully correctly), so before that we don't know how to infer metavariables in the given expression from the target type
Mario, I'll make you explain all this to me next time we meet. I am guessing is that this might explain the trouble I had when I tried unbundling things in the algebraic hierarchy. IIRC, I wanted to do things like foo {α : Type} [has_mul α] [commutative (@mul α)]
and was having similar problems.
(deleted)
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


Class for instanciating 3D model and using gltf file routine (with tiny gltf library).
More...
#include <Model.hpp>
|
| | Model (const std::string &gltfFilePath) |
| | Parameterized constructor. More...
|
| |
|
| ~Model ()=default |
| | Default destructor.
|
| |
|
bool | loadGltfFile (tinygltf::Model &model) |
| | Loads the GLTF file which describes the 3D model.
|
| |
| const Collider & | collider () const |
| | Gets the collider of the model as a const reference. More...
|
| |
| Collider & | collider () |
| | Gets the collider of the model. More...
|
| |
| std::vector< GLuint > | createTextureObjects (const tinygltf::Model &model) const |
| | Computes a vector of texture objects. Each texture object is filled with an image and sampling parameters from the corresponding texture of the glTF file. More...
|
| |
| std::vector< GLuint > | createBufferObjects (const tinygltf::Model &model) |
| | Computes the vector of buffer objects from the 3D model and returns it. More...
|
| |
| std::vector< GLuint > | createVertexArrayObjects (const tinygltf::Model &model, const std::vector< GLuint > &bufferObjects, std::vector< VertexArrayObject::VaoRange > &meshToVertexArrays) |
| | Takes the 3D model and the vector of buffer objects previously created, creates an array of vertex array objects and returns it. It then fills the input vector meshIndexToVaoRange with the range of VAOs for each mesh. More...
|
| |
|
void | createDefaultTexture () |
| | Create the default texture to apply in case there are no other textures.
|
| |
| void | render (Shader *shader) |
| | Renders the model to the screen/window. More...
|
| |
Class for instanciating 3D model and using gltf file routine (with tiny gltf library).
◆ Model()
| engine::Model::Model |
( |
const std::string & |
gltfFilePath | ) |
|
|
explicit |
Parameterized constructor.
- Parameters
-
| gltfFilePath | : The path to the GLTF file. |
◆ collider() [1/2]
Gets the collider of the model.
- Returns
- The collider of the model.
◆ collider() [2/2]
| const Collider& engine::Model::collider |
( |
| ) |
const |
|
inline |
Gets the collider of the model as a const reference.
- Returns
- The collider of the model as a const reference.
◆ createBufferObjects()
| std::vector<GLuint> engine::Model::createBufferObjects |
( |
const tinygltf::Model & |
model | ) |
|
Computes the vector of buffer objects from the 3D model and returns it.
- Parameters
-
- Returns
- A vector of buffer objects.
-
A vector containing each vertex buffer objects.
◆ createTextureObjects()
| std::vector<GLuint> engine::Model::createTextureObjects |
( |
const tinygltf::Model & |
model | ) |
const |
Computes a vector of texture objects. Each texture object is filled with an image and sampling parameters from the corresponding texture of the glTF file.
- Parameters
-
- Returns
- A vector of texture objects.
-
A vector containing each texture objects.
◆ createVertexArrayObjects()
| std::vector<GLuint> engine::Model::createVertexArrayObjects |
( |
const tinygltf::Model & |
model, |
|
|
const std::vector< GLuint > & |
bufferObjects, |
|
|
std::vector< VertexArrayObject::VaoRange > & |
meshToVertexArrays |
|
) |
| |
Takes the 3D model and the vector of buffer objects previously created, creates an array of vertex array objects and returns it. It then fills the input vector meshIndexToVaoRange with the range of VAOs for each mesh.
- Parameters
-
| model | : The 3D model. |
| bufferObjects | : The vector of buffer objects obtained from the model. |
| meshToVertexArrays | : The vector containing the range of VAOs for each mesh. |
- Returns
- A vector containing each vertex array objects.
◆ render()
| void engine::Model::render |
( |
Shader * |
shader | ) |
|
Renders the model to the screen/window.
- Parameters
-
| shader | : The shaders associated to the model and to its entity. |
The documentation for this class was generated from the following file:
- /home/vincent/Documents/Github/contemplative-game/engine/include/engine/Model.hpp


@import java.util.UUID @import domain.messaging.Message @import domain.{Assessment, AssessmentClientNetworkActivity, SittingMetadata, tabula} @import tags._ @import warwick.sso.{UniversityID, Usercode} @import services.TimingInfoService @( assessment: Assessment, sittingMetadata: Seq[SittingMetadata], invigilators: Seq[(Usercode, String)], students: Map[UniversityID, tabula.SitsProfile], department: Option[tabula.Department], studentsWithQueries: Seq[UniversityID], queriesFromStudents: Seq[Message], totalAnnouncements: Int, invigilatorActivities: Map[Usercode, AssessmentClientNetworkActivity], latestStudentActivities: Map[UUID, AssessmentClientNetworkActivity], timingInfo: TimingInfoService, )(implicit request: RequestHeader, messagesProvider: MessagesProvider, context: RequestContext) @adminLayout(s"Invigilation for assessment ${assessment.moduleCode}", headTitle = s"${assessment.moduleCode} invigilation", extraClasses = Seq("connect-ws", "allAnnouncementsAndQueries")) {


We redefine cats!
- reintermediate cutting-edge action-items
- orchestrate customized e-business
- incentivize interactive e-business
- morph rich partnerships
- mesh cross-media applications
- evolve visionary vortals
- cultivate wireless interfaces
- disintermediate user-centric metrics
- architect efficient e-business
- transform best-of-breed mindshare
- extend visionary metrics
- repurpose B2C bandwidth
- iterate customized solutions
- engineer dot-com solutions
- maximize web-enabled experiences


My Project
Main Page
Classes
Files
File List
File Members
src
utils
Typedefs
fd.h File Reference
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Typedefs
typedef int
nn_fd
Typedef Documentation
typedef int
nn_fd
Generated by
1.8.11


v0.1.4 Error: If you are seeing this message, you did something wrong. This skapp should be running inside an invisible iframe and should not be accessed directly as a standalone skapp.


stealth manager
`Prev `__
S
`Next `__
--------------
**stealth manager**: n.
[Corporate DP] A manager that appears out of nowhere, promises
undeliverable software to unknown end users, and vanishes before the
programming staff realizes what has happened. See `*smoke and
mirrors* `__.
--------------
+--------------------------+----------------------------+----------------------------------+
| `Prev `__ | `Up <../S.html>`__ | `Next `__ |
+--------------------------+----------------------------+----------------------------------+
| state | `Home <../index.html>`__ | steam-powered |
+--------------------------+----------------------------+----------------------------------+


Quark v1.0.2 API Reference
Modules
For convenience, many of the most common combinators are available here and given firendlier names
The classic BCKW combinators.
A similar idea to SKI
, but with different primitives
Function composition is taking two functions, and joining them together to create a new function. For example
Currying breaks up a function into a series of unary functions that apply their arguments to some inner n-ary function. This is a convenient way to achieve a general and flexble partial application on any curried function
Fixed point combinators generalize the idea of a recursive function. This can be used to great effect, simplifying many definitions
Provide curried functions, that can also be partially bound without dot notation. Partially applying a function will always return a fully-curried function
The classic SKI system
combinators. s
and k
alone can be used to express any algorithm,
though generally not efficiently


Face Mask detector
A software using CNN to detect if a person is wearing a mask or not
Get started now


Q: When was Team 3189 founded?
A: We began competing in
FIRST
Q: What does 3189 even mean?
In the
FIRST
Q: Is this BattleBots?
Sorry, but no. FRC focuses more on the STEM (Science, Technology, Engineering and Math) part of robot construction.
Q: This sounds awesome! What are the requirements to join?
To join the Circuit Breakers, you must be a student at any of EDUHSD's high schools. Additionally, you must be able to attend meetings regularly which are held at the EDUHSD Virtual Academy.
Q: I don't have any previous robotics knowledge, can I still join?
Of course! We have plenty of positions on the team that don't relate to the actual construction of robots. Additionally, we can train anyone for any entry-level position on the team.


Home
Portfolio
Blog
Contact
About
Home
Portfolio
Blog
Rayhan Zamzamy
Contact
About
Now
Blog
Visualization of my mind
Almost in Indonesian
Any question, idea, or job opportunities?
Please
contact me
.


Sensex rises 42 points; bank, auto stocks shine
by PTIMarket benchmark BSE Sensex rose over 42 points on Monday to close at 40,487.43, driven by buying in select banks and auto counters.
After opening on a weak note, the 30-share BSE Sensex stabilised in afternoon trade and settled with gains of 42.28 points or 0.10 per cent at 40,487.43. The index swung between a high of 40,645.63 and a low of 40,336.56 during the day.
The 50-scrip NSE Nifty closed 16 points or 0.13 per cent higher at 11,937.50.
Among the Sensex stocks, HDFC emerged as the top gainer, rising by 2.06 per cent, followed by Axis Bank, Maruti, Reliance, Power Grid and Tata Steel.
On the other hand, TCS, HCL Tech, L&T, IndusInd Bank, Tech Mahindra, SBI and ITC lost up to 2.93 per cent.
Sectorally, BSE Energy index rose the most by 1.06 per cent, followed by oil & gas and auto.
BSE IT and realty indices led the losers' chart.
Brent futures, the global oil benchmark, fell 0.81 per cent to USD 63.87 per barrel.
Asian stocks were mixed as investors turned more cautious over US-China trade deal uncertainty amid strong US jobs data and weak Chinese export numbers.


New England Patriots' Robert Kraft heard blasting Trump in 2017 NFL meeting, audio reveals
by Ryan GaydosNew England Patriots team owner Robert Kraft blasted President Trump in a meeting at the height of the national anthem kneeling controversy in October 2017, uncovered audio revealed.
Kraft, who is a longtime friend of Trump’s, took a stand against the president’s rhetoric against players who were kneeling during the national anthem to protest racial injustice in the U.S., according to audio obtained by TMZ Sports on Friday.
FLASHBACK: NFL OWNERS ARE 'F-----G TERRIFIED' OF TRUMP, REPORT SAYS
“I must tell you, I think these dialogues are great,” Kraft said. “But, the elephant in the room now in my opinion, is this kneeling, which every player has a right to do if they feel it's right.
“The problem we have is, we have a president that will use that as fodder to do his mission that I don’t feel is in the best interest of the matter. It's divisive and it's horrible.
Kraft apparently said that no matter what the players did, about half of the country will side with Trump anyway.
COWBOYS’ DAK PRESCOTT EARNING BIGGER BUCKS WITH EVERY START
“I just hope one of the things that can come out of here is that we find a way to be unified. And, be able to carry through and follow through,” he said.
The meeting at which Kraft was heard speaking in took place in New York City during the middle of the 2017 season. According to the New York Times, about 30 people were at the meeting that included owners, players and league executives. Commissioner Roger Goodell reportedly had even made a point to say “let’s make sure that we keep this confidential.”
CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM
The New York Times report confirms Kraft’s quote about Trump in the audio.


Economist · Data Analyst · Competition Policy Expert
Competition Policy Expert at Spectron Desarrollo. Data Analyst and Competition Analyst at Ockham Economic Consulting. Business and Financial Analyst at Signium Desarrollo. Data Analyst and Policy Analyst at El Colegio de México (Colmex).
Investigation, (theoretical and data-based) analysis, determination and solution proposal in special procedures: barriers to competition, essential facilities, and market competition conditions.
Theoretical analysis, econometric modelling, and resolution on competition issues including mergers, abusive practices, concessions & permits (ports and energy sector), and opinions (auctions and novel regulations).
Data analyst at DTS y Asociados. Analysis and elaboration of methodological gender-focused papers. Econometric analysis of the ENIGH and ENOE (INEGI surveys).
Contributions to the project 'International Cooperation in the aftermath of Financial Crises 1870-1980s'. Data analysis of novel databases and international historical news archives. Design of the econometric analysis of the determinants in the sovereign risk behavior.
Pharmacoeconomic evaluations. Support access attempts, through different economic evaluation tools, to include medicines to the "Cuadro Básico de Medicamentos". Design and development of Markov cost-effectiveness models.
Analysis for relevant information and international experience and data on specific areas. Search, management and analysis of public databases. Analysis for a better regulation in the Telecom sector.
Apart from being an economist and data analyst, I really enjoy learning new things different to my academic background. I've been learning about cryptocurrencies, fintech, new technologies, medicine, telecomm, and a large etc.
I spend large amounts of my free time exploring the latest technology advancements. It's a good time to be alive!
Oh, yeah, and I also like taking pictures.


-
One-Click Unsubscribe
unroll.me
Awesome. I just used Unroll.Me to unsubscribe from my unwanted email subscriptions!
-
Bienvenue sur Facebook. Connectez-vous, inscrivez-vous ou découvrez !
www.facebook.com
Facebook est un réseau social qui vous relie à des amis, des collègues de travail, des camarades de classe ou d’autres personnes qui ont quelque ...

-
I burned through my inbox with Mailbox for Mac
www.theverge.com
Email, right guys? Some love it. Some hate it. Some are trying to replace it. But the fact is, we all use it. And since early 2013, Mailbox has been ...
-
Twitter / Recherche - #worldcup
twitter.com
Le meilleur des derniers Tweets à propos de #worldcup. Lisez ce que les gens disent et rejoignez la conversation.
-
Temple Run 2
itunes.apple.com
Get Temple Run 2 on the App Store. See screenshots and ratings, and read customer reviews.
-
Google Maps
itunes.apple.com
Get Google Maps on the App Store. See screenshots and ratings, and read customer reviews.
-
You're invited to join App.net for free
join.app.net
App.net is your passport to great applications. Use your account to access a network of amazing social apps.


This chapter describes the Java API for JSON Processing (JSR 353). JSON is a data exchange format widely used in web services and other connected applications. JSR 353 provides an API to parse, transform, and query JSON data using the object model or the streaming model.
The following topics are addressed here:
JSON is a text-based data exchange format derived from JavaScript that is used in web services and other connected applications. The following sections provide an introduction to JSON syntax, an overview of JSON uses, and a description of the most common approaches to generate and parse JSON.
JSON defines only two data structures: objects and arrays. An object is a set of name-value pairs, and an array is a list of values. JSON defines seven value types: string, number, object, array, true, false, and null.
The following example shows JSON data for a sample object that contains name-value pairs. The value for the name "phoneNumbers"
is an array whose elements are two objects.
{ "firstName": "Duke", "lastName": "Java", "age": 18, "streetAddress": "100 Internet Dr", "city": "JavaTown", "state": "JA", "postalCode": "12345", "phoneNumbers": [ { "Mobile": "111-111-1111" }, { "Home": "222-222-2222" } ] }
JSON has the following syntax.
Objects are enclosed in braces ({}
), their name-value pairs are separated by a comma (,
), and the name and value in a pair are separated by a colon (:
). Names in an object are strings, whereas values may be of any of the seven value types, including another object or an array.
Arrays are enclosed in brackets ([]
), and their values are separated by a comma (,
). Each value in an array may be of a different type, including another array or an object.
When objects and arrays contain other objects or arrays, the data has a tree-like structure.
JSON is often used as a common format to serialize and deserialize data in applications that communicate with each other over the Internet. These applications are created using different programming languages and run in very different environments. JSON is suited to this scenario because it is an open standard, it is easy to read and write, and it is more compact than other representations.
RESTful web services use JSON extensively as the format for the data inside requests and responses. The HTTP header used to indicate that the content of a request or a response is JSON data is
Content-Type: application/json
JSON representations are usually more compact than XML representations because JSON does not have closing tags. Unlike XML, JSON does not have a widely accepted schema for defining and validating the structure of JSON data.
For generating and parsing JSON data, there are two programming models, which are similar to those used for XML documents.
The object model creates a tree that represents the JSON data in memory. The tree can then be navigated, analyzed, or modified. This approach is the most flexible and allows for processing that requires access to the complete contents of the tree. However, it is often slower than the streaming model and requires more memory. The object model generates JSON output by navigating the entire tree at once.
The streaming model uses an event-based parser that reads JSON data one element at a time. The parser generates events and stops for processing when an object or an array begins or ends, when it finds a key, or when it finds a value. Each element can be processed or discarded by the application code, and then the parser proceeds to the next event. This approach is adequate for local processing, in which the processing of an element does not require information from the rest of the data. The streaming model generates JSON output to a given stream by making a function call with one element at a time.
There are many JSON generators and parsers available for different programming languages and environments. JSON Processing in the Java EE Platform describes the functionality provided by the Java API for JSON Processing (JSR 353).
Java EE includes support for JSR 353, which provides an API to parse, transform, and query JSON data using the object model or the streaming model described in Generating and Parsing JSON Data. The Java API for JSON Processing contains the following packages.
The javax.json
package contains a reader interface, a writer interface, and a model builder interface for the object model. This package also contains other utility classes and Java types for JSON elements. Table 19-1 lists the main classes and interfaces in this package.
The javax.json.stream
package contains a parser interface and a generator interface for the streaming model. Table 19-2 lists the main classes and interfaces in this package.
Table 19-1 Main Classes and Interfaces in javax.json
| Class or Interface | Description |
|---|---|
|
|
Contains static methods to create instances of JSON parsers, builders, and generators. This class also contains methods to create parser, builder, and generator factory objects. |
|
|
Reads JSON data from a stream and creates an object model in memory. |
|
|
Create an object model or an array model in memory by adding elements from application code. |
|
|
Writes an object model from memory to a stream. |
|
|
Represents an element (such as an object, an array, or a value) in JSON data. |
|
|
Represents an object or an array in JSON data. This interface is a subtype of |
|
|
Represent an object or an array in JSON data. These two interfaces are subtypes of |
|
|
Represent data types for elements in JSON data. These two interfaces are subtypes of |
|
|
Indicates that a problem occurred during JSON processing. |
This section describes four use cases of the object model API: creating an object model from JSON data, creating an object model from application code, navigating an object model, and writing an object model to a stream.
The following code demonstrates how to create an object model from JSON data in a text file:
import java.io.FileReader; import javax.json.Json; import javax.json.JsonReader; import javax.json.JsonStructure; ... JsonReader reader = Json.createReader(new FileReader("jsondata.txt")); JsonStructure jsonst = reader.read();
The object reference jsonst
can be either of type JsonObject
or of type JsonArray
, depending on the contents of the file. JsonObject
and JsonArray
are subtypes of JsonStructure
. This reference represents the top of the tree and can be used to navigate the tree or to write it to a stream as JSON data.
The following code demonstrates how to create an object model from application code:
import javax.json.Json; import javax.json.JsonObject; ... JsonObject model = Json.createObjectBuilder() .add("firstName", "Duke") .add("lastName", "Java") .add("age", 18) .add("streetAddress", "100 Internet Dr") .add("city", "JavaTown") .add("state", "JA") .add("postalCode", "12345") .add("phoneNumbers", Json.createArrayBuilder() .add(Json.createObjectBuilder() .add("type", "mobile") .add("number", "111-111-1111")) .add(Json.createObjectBuilder() .add("type", "home") .add("number", "222-222-2222"))) .build();
The object reference model
represents the top of the tree, which is created by nesting calls to the add
methods and built by calling the build
method. The JsonObjectBuilder
class contains the following add
methods:
JsonObjectBuilder add(String name, BigDecimal value) JsonObjectBuilder add(String name, BigInteger value) JsonObjectBuilder add(String name, boolean value) JsonObjectBuilder add(String name, double value) JsonObjectBuilder add(String name, int value) JsonObjectBuilder add(String name, JsonArrayBuilder builder) JsonObjectBuilder add(String name, JsonObjectBuilder builder) JsonObjectBuilder add(String name, JsonValue value) JsonObjectBuilder add(String name, long value) JsonObjectBuilder add(String name, String value) JsonObjectBuilder addNull(String name)
The JsonArrayBuilder
class contains similar add
methods that do not have a name (key) parameter. You can nest arrays and objects by passing a new JsonArrayBuilder
object or a new JsonObjectBuilder
object to the corresponding add
method, as shown in this example.
The resulting tree represents the JSON data from JSON Syntax.
The following code demonstrates a simple approach to navigating an object model:
import javax.json.JsonValue; import javax.json.JsonObject; import javax.json.JsonArray; import javax.json.JsonNumber; import javax.json.JsonString; ... public static void navigateTree(JsonValue tree, String key) { if (key != null) System.out.print("Key " + key + ": "); switch(tree.getValueType()) { case OBJECT: System.out.println("OBJECT"); JsonObject object = (JsonObject) tree; for (String name : object.keySet()) navigateTree(object.get(name), name); break; case ARRAY: System.out.println("ARRAY"); JsonArray array = (JsonArray) tree; for (JsonValue val : array) navigateTree(val, null); break; case STRING: JsonString st = (JsonString) tree; System.out.println("STRING " + st.getString()); break; case NUMBER: JsonNumber num = (JsonNumber) tree; System.out.println("NUMBER " + num.toString()); break; case TRUE: case FALSE: case NULL: System.out.println(tree.getValueType().toString()); break; } }
The method navigateTree
can be used with the models built in Creating an Object Model from JSON Data and Creating an Object Model from Application Code as follows:
navigateTree(model, null);
The navigateTree
method takes two arguments: a JSON element and a key. The key is used only to help print the key-value pairs inside objects. Elements in a tree are represented by the JsonValue
type. If the element is an object or an array, a new call to this method is made for every element contained in the object or array. If the element is a value, it is printed to the standard output.
The JsonValue.getValueType
method identifies the element as an object, an array, or a value. For objects, the JsonObject.keySet
method returns a set of strings that contains the keys in the object, and the JsonObject.get(String name)
method returns the value of the element whose key is name
. For arrays, JsonArray
implements the List<JsonValue>
interface. You can use enhanced for
loops with the Set<String>
instance returned by JsonObject.keySet
and with instances of JsonArray
, as shown in this example.
The navigateTree
method for the model built in Creating an Object Model from Application Code produces the following output:
OBJECT Key firstName: STRING Duke Key lastName: STRING Java Key age: NUMBER 18 Key streetAddress: STRING 100 Internet Dr Key city: STRING JavaTown Key state: STRING JA Key postalCode: STRING 12345 Key phoneNumbers: ARRAY OBJECT Key type: STRING mobile Key number: STRING<PHONE_NUMBER> OBJECT Key type: STRING home Key number: STRING<PHONE_NUMBER>
The object models created in Creating an Object Model from JSON Data and Creating an Object Model from Application Code can be written to a stream using the JsonWriter
class as follows:
import java.io.StringWriter; import javax.json.JsonWriter; ... StringWriter stWriter = new StringWriter(); JsonWriter jsonWriter = Json.createWriter(stWriter); jsonWriter.writeObject(model); jsonWriter.close(); String jsonData = stWriter.toString(); System.out.println(jsonData);
The Json.createWriter
method takes an output stream as a parameter. The JsonWriter.writeObject
method writes the object to the stream. The JsonWriter.close
method closes the underlying output stream.
The following example uses try
-with-resources to close the JSON writer automatically:
StringWriter stWriter = new StringWriter(); try (JsonWriter jsonWriter = Json.createWriter(stWriter)) { jsonWriter.writeObject(model); } String jsonData = stWriter.toString(); System.out.println(jsonData);
This section describes two use cases of the streaming API:
Reading JSON data using a parser
Writing JSON data using a generator
The streaming API is the most efficient approach for parsing JSON text. The following code demonstrates how to create a JsonParser
object and how to parse JSON data using events:
import javax.json.Json; import javax.json.stream.JsonParser; ... JsonParser parser = Json.createParser(new StringReader(jsonData)); while (parser.hasNext()) { JsonParser.Event event = parser.next(); switch(event) { case START_ARRAY: case END_ARRAY: case START_OBJECT: case END_OBJECT: case VALUE_FALSE: case VALUE_NULL: case VALUE_TRUE: System.out.println(event.toString()); break; case KEY_NAME: System.out.print(event.toString() + " " + parser.getString() + " - "); break; case VALUE_STRING: case VALUE_NUMBER: System.out.println(event.toString() + " " + parser.getString()); break; } }
This example consists of three steps.
Obtain a parser instance by calling the Json.createParser
static method.
Iterate over the parser events with the JsonParser.hasNext
and the JsonParser.next
methods.
Perform local processing for each element.
The example shows the ten possible event types from the parser. The parser's next
method advances it to the next event. For the event types KEY_NAME
, VALUE_STRING
, and VALUE_NUMBER
, you can obtain the content of the element by calling the method JsonParser.getString
. For VALUE_NUMBER
events, you can also use the following methods:
JsonParser.isIntegralNumber
JsonParser.getInt
JsonParser.getLong
JsonParser.getBigDecimal
See the Java EE 7 API reference for the javax.json.stream.JsonParser
interface for more information.
The output of this example is the following:
START_OBJECT KEY_NAME firstName - VALUE_STRING Duke KEY_NAME lastName - VALUE_STRING Java KEY_NAME age - VALUE_NUMBER 18 KEY_NAME streetAddress - VALUE_STRING 100 Internet Dr KEY_NAME city - VALUE_STRING JavaTown KEY_NAME state - VALUE_STRING JA KEY_NAME postalCode - VALUE_STRING 12345 KEY_NAME phoneNumbers - START_ARRAY START_OBJECT KEY_NAME type - VALUE_STRING mobile KEY_NAME number - VALUE_STRING<PHONE_NUMBER> END_OBJECT START_OBJECT KEY_NAME type - VALUE_STRING home KEY_NAME number - VALUE_STRING<PHONE_NUMBER> END_OBJECT END_ARRAY END_OBJECT
The following code demonstrates how to write JSON data to a file using the streaming API:
FileWriter writer = new FileWriter("test.txt"); JsonGenerator gen = Json.createGenerator(writer); gen.writeStartObject() .write("firstName", "Duke") .write("lastName", "Java") .write("age", 18) .write("streetAddress", "100 Internet Dr") .write("city", "JavaTown") .write("state", "JA") .write("postalCode", "12345") .writeStartArray("phoneNumbers") .writeStartObject() .write("type", "mobile") .write("number", "111-111-1111") .writeEnd() .writeStartObject() .write("type", "home") .write("number", "222-222-2222") .writeEnd() .writeEnd() .writeEnd(); gen.close();
This example obtains a JSON generator by calling the Json.createGenerator
static method, which takes a writer or an output stream as a parameter. The example writes JSON data to the test.txt
file by nesting calls to the write
, writeStartArray
, writeStartObject
, and writeEnd
methods. The JsonGenerator.close
method closes the underlying writer or output stream.
This section explains how the Java API for JSON Processing is related to other Java EE packages that provide JSON support for RESTful web services. See Chapter 29, "Building RESTful Web Services with JAX-RS," for more information on RESTful web services.
Jersey, the reference implementation for JAX-RS (JSR 311) included in GlassFish Server, provides support for binding JSON data from RESTful resource methods to Java objects using JAXB, as described in Using JAX-RS with JAXB in Chapter 31, "JAX-RS: Advanced Topics and an Example". However, JSON support is not part of JAX-RS (JSR 311) or JAXB (JSR 222), so that procedure may not work for Java EE implementations other than GlassFish Server.
The Java API for JSON Processing (JSR 353) does not explicitly support JSON binding in Java. A future JSR (JSON Binding) that is similar to JAXB for XML is under consideration for a future release of Java EE.
You can still use the Java API for JSON Processing with JAX-RS resource methods. For more information, see the sample code for JSON Processing included with the Java EE 7 SDK.
This section describes how to build and run the jsonpmodel
example application. This example is a web application that demonstrates how to create an object model from form data, how to parse JSON data, and how write JSON data using the object model API.
The jsonpmodel
example application is in the tut-install/examples/web/jsonp/jsonpmodel
directory.
The jsonpmodel
example application contains the following files.
Three JavaServer Faces pages.
The index.xhtml
page contains a form to collect information.
The modelcreated.xhtml
page contains a text area that displays JSON data.
The parsejson.xhtml
page contains a table that shows the elements of the object model.
The ObjectModelBean.java
managed bean, which is a session-scoped managed bean that stores the data from the form and directs the navigation between the Facelets pages. This file also contains code that uses the JSON object model API.
The code used in ObjectModelBean.java
to create an object model from the data in the form is similar to the example in Creating an Object Model from Application Code. The code to write JSON output from the model is similar to the example in Writing an Object Model to a Stream. The code to navigate the object model tree is similar to the example in Navigating an Object Model.
This section describes how to run the jsonpmodel
example application using NetBeans IDE and from the command line.
Make sure that GlassFish Server has been started (see Starting and Stopping GlassFish Server).
From the File menu, choose Open Project.
In the Open Project dialog box, navigate to:
tut-install/examples/web/jsonp
Select the jsonpmodel
folder.
Click Open Project.
In the Projects tab, right-click the jsonpmodel
project and select Run.
This command builds and packages the application into a WAR file (jsonpmodel.war
) located in the target
directory, deploys it to the server, and opens a web browser window with the following URL:
http://localhost:8080/jsonpmodel/
Edit the data on the page and click Create a JSON Object to submit the form. The following page shows a JSON object that contains the data from the form.
Click Parse JSON. The following page contains a table that lists the nodes of the object model tree.
Make sure that GlassFish Server has been started (see Starting and Stopping GlassFish Server).
In a terminal window, go to:
tut-install/examples/web/jsonp/jsonpmodel
Enter the following command to deploy the application:
mvn install
Open a web browser window and enter the following address:
http://localhost:8080/jsonpmodel/
Edit the data on the page and click Create a JSON Object to submit the form. The following page shows a JSON object that contains the data from the form.
Click Parse JSON. The following page contains a table that lists the nodes of the object model tree.
This section describes how to build and run the jsonpstreaming
example application. This example is a web application that demonstrates how to create JSON data from form data, how to parse JSON data, and how to write JSON output using the streaming API.
The jsonpstreaming
example application is in the tut-install/examples/web/jsonp/jsonpstreaming
directory.
The jsonpstreaming
example application contains the following files.
Three JavaServer Faces pages.
The index.xhtml
page contains a form to collect information.
The filewritten.xhtml
page contains a text area that displays JSON data.
The parsed.xhtml
page contains a table that lists the events from the parser.
The StreamingBean.java
managed bean, a session-scoped managed bean that stores the data from the form and directs the navigation between the Facelets pages. This file also contains code that uses the JSON streaming API.
The code used in StreamingBean.java
to write JSON data to a file is similar to the example in Writing JSON Data Using a Generator. The code to parse JSON data from a file is similar to the example in Reading JSON Data Using a Parser.
This section describes how to run the jsonpstreaming
example application using NetBeans IDE and from the command line.
Make sure that GlassFish Server has been started (see Starting and Stopping GlassFish Server).
From the File menu, choose Open Project.
In the Open Project dialog box, navigate to:
tut-install/examples/web/jsonp
Select the jsonpstreaming
folder.
Click Open Project.
In the Projects tab, right-click the jsonpstreaming
project and select Run.
This command builds and packages the application into a WAR file (jsonpstreaming.war
) located in the target
directory, deploys it to the server, and opens a web browser window with the following URL:
http://localhost:8080/jsonpstreaming/
Edit the data on the page and click Write a JSON Object to a File to submit the form and write a JSON object to a text file. The following page shows the contents of the text file.
Click Parse JSON from File. The following page contains a table that lists the parser events for the JSON data in the text file.
Make sure that GlassFish Server has been started (see Starting and Stopping GlassFish Server).
In a terminal window, go to:
tut-install/examples/web/jsonp/jsonpstreaming/
Enter the following command to deploy the application:
mvn install
Open a web browser window and enter the following URL:
http://localhost:8080/jsonpstreaming/
Edit the data on the page and click Write a JSON Object to a File to submit the form and write a JSON object to a text file. The following page shows the contents of the text file.
Click Parse JSON from File. The following page contains a table that lists the parser events for the JSON data in the text file.


This is the Cookie Policy for AfricaCorona, accessible from africacorona.com
What Are Cookies
As is common practice with almost all professional websites this site uses cookies, which are tiny files that are downloaded to your computer, to improve your experience. This page describes what information they gather, how we use it and why we sometimes need to store these cookies. We will also share how you can prevent these cookies from being stored however this may downgrade or 'break' certain elements of the sites functionality.
For more general information on cookies, please read "What Are Cookies".
How We Use Cookies
We use cookies for a variety of reasons detailed below. Unfortunately in most cases there are no industry standard options for disabling cookies without completely disabling the functionality and features they add to this site. It is recommended that you leave on all cookies if you are not sure whether you need them or not in case they are used to provide a service that you use.
Disabling Cookies
You can prevent the setting of cookies by adjusting the settings on your browser (see your browser Help for how to do this). Be aware that disabling cookies will affect the functionality of this and many other websites that you visit. Disabling cookies will usually result in also disabling certain functionality and features of the this site. Therefore it is recommended that you do not disable cookies.
Third Party Cookies
We use cookies provided by trusted third parties. The following section details which third party cookies you might encounter through this site.
This site uses Google Analytics which is one of the most widespread and trusted analytics solution on the web for helping us to understand how you use the site and ways that we can improve your experience. These cookies may track things such as how long you spend on the site and the pages that you visit so we can continue to produce engaging content.
For more information on Google Analytics cookies, see the official Google Analytics page.
More Information
Hopefully that has clarified things for you and as was previously mentioned if there is something that you aren't sure whether you need or not it's usually safer to leave cookies enabled in case it does interact with one of the features you use on our site. This Cookies Policy was created with the help of the Cookies Policy Template Generator and the Privacy Policy Template Generator.
However if you are still looking for more information then you can contact us through one of our preferred contact methods: