Hoxy是一个用Node编写的完全免费、开源的Http代理软件，类似Charles和Fiddler。 它有如下特点：
Here are a few ideas for things you could do.
Here are a few ideas for things you could do. 下面是一些想法你可能用到
These docs are for Hoxy 3.x. See the incantations section for code samples.
下面是Hoxy 3.x的文档。 查看示例请点击： 咒语 。
Hoxy functions as a normal proxy standing between the client and server. You intercept traffic during either the request or response phase, or both. The phase lifecycle section contains a more complete description, but here's a simplified illustration.
Hoxy是一个客户端和服务器之间的代理工具。 你可以拦截请求或者响应， 下面是一张简图，详细情况点击查看
time ==> ----------------------- server: 3 -------------/-\------- hoxy: 2 4 -----------/-----\----- client: 1 5
Hoxy需要Node 0.12.x以上版本，io.js 1.0以上版本。 下面是一个篡改请求的小例子
let hoxy = require('hoxy'); let proxy = hoxy.createServer().listen(8080); proxy.intercept('request', req => { req.headers['x-unicorns'] = 'unicorns'; // server will now see the "x-unicorns" header });
执行代码，配置代理地址为你的ip:8080
，服务器端收到的请求header中就包含了x-unicorns。
只要懂得Javascript和Http，你就可以随意的查看和修改网络数据。
可以从 npm 何 github 下载Hoxy. 已经在最近的node和io版本中测试通过.
$ npm install hoxy
var hoxy = require('hoxy');
var hoxy = require('hoxy');
The object returned from require('hoxy')
is just a namespace.
hoxy.createServer()
将生成一个代理服务器
通过参数生成代理，所有参数都是可选的.
var hoxy = require('hoxy'); var proxy = hoxy.createServer({ upstreamProxy: 'localhost:9090', reverse: 'http://example.com', certAuthority: { key, cert }, tls: { key, cert }, slow: { rate, latency, up, down } });
| 参数 | 详解 |
|---|---|
upstreamProxy |
[可选]。将当前代理将转发到其他代理地址。使用格式：host:port
|
reverse |
[可选].
本代理将作为指定服务器的反向代理。
If present, this proxy will run as a reverse proxy for the given server.
This allows you to point your client directly at the proxy, instead of configuring it in the client's proxy settings.
This value should take the form scheme://host:port .
|
certAuthority { key, cert } |
[可选]. 通过设置(密匙/证书)在你的客户端生成一个ssl证书.在这里查看如何生成密匙和证书 . 你需要设置客户端使用这个https代理。设置完成后，只要你访问网站，通过在内存中生成一个假密匙和证书，hoxy将能够像监听http一样监听https请求。 You'll then need to configure your client to use this proxy for https in addition to http. Once you've got all of that set up, Hoxy will generate fake keys/cert combos for every hostname you visit, caching them in memory for subsequent visits, thus allowing the proxy to handle https requests as cleartext. |
tls { key, cert } |
Optional.
只能组合后用于反向代理，使用后Hoxy将作为一个https服务器。
Passed as opts to https.createServer(opts, function) (参见 https文档).
|
slow { rate, latency, up, down } |
Optional.
上传 和 下载 是独立的.
然而，假如同时使用rate 和up ，他们当中较慢的将生效。rate 和 down 也是一样。
这些属性可以通过proxy.slow() 获取或者设置。
|
监听port
端口并返回自身（proxy实例）
var hoxy = require('hoxy'); var proxy = hoxy.createServer().listen(8080);
可以添加回调函数，当代理启动时调用。
var hoxy = require('hoxy'); var port = 8080; var proxy = hoxy.createServer().listen(port, function() { console.log('The proxy is listening on port ' + port + '.'); });
这个函数只是将所有参数都传递给Node的server.listen()
方法。
获取或者设置代理网络速度的选项。 如果有参数, 就是设置速度
proxy.slow({ rate, latency, up, down });
如果没有参数，就会返回当前速度设置。
var slowOpts = proxy.slow();
这是拦截和操作请求或响应数据的入口。 下面这个例子将拦截所有的请求。
proxy.intercept('request', req => console.log(req.url));
这个例子更详细，但功能和上面的相同。
proxy.intercept({ phase: 'request' }, function(req, resp, cycle) { console.log(req.url); });
传递给 intercept()
(同名interceptor)的回调函数接收三个参数(req, resp, cycle)
，他们是下面介绍的一些类的实例。
cycle
is also passed as context.
Thus:
proxy.intercept('request', function(req, resp, cycle) { console.log(this === cycle) // true });
Hoxy会按顺序执行所有内容，包括拦截器。 当执行同步代码时没有问题，但是当执行异步代码时，你必须返回一个Promise。Hoxy会等待Promise resolve完毕后后面的代码才会继续。 Hoxy internally runs everything sequentially in series, including interceptors. That happens naturally when your interceptor logic is synchronous. But if it's asynchronous, you must signal that by returning a promise. As long as you do that, Hoxy will wait until the promise resolves and things will flow serially.
proxy.intercept('request', function(req, resp, cycle) { // return a promise from the interceptor return getThingA().then(function(thingA) { return getThingB(thingA); }).then(function(thingB) { // do something with "thingB" }); });
Javascript的未来版本将可以使用功能async。 通过一些转换器现在就可以使用它。这些特性也可以在拦截器中使用。通过新的写法，逻辑操作和错误处理也更新清晰了。
proxy.intercept('request', async function(req, resp, cycle) { // this is an async function let thingA = await getThingA(); let thingB = await getThingB(thingA); // do something with "thingB" });
在当前版本的io.js， In current versions of io.js, generators can be used as a stand-in for async functions, but with the benefit of being natively-supported, spec-valid ES6 syntax. You must only yield promises from your generator. See co for more details.
proxy.intercept('request', function*(req, resp, cycle) { // this is a generator let thingA = yield getThingA(); let thingB = yield getThingB(thingA); // do something with "thingB" });
Note: Strictly speaking, Hoxy doesn't care whether your interceptor is an async function or a generator. It only cares what kind of thing the return value is:
Options affect how, or if, interceptors get called.
Here are a few examples.
The following will only intercept GET
requests to example.com
.
proxy.intercept({ phase: 'request', method: 'GET', hostname: 'example.com' }, function(req, resp, cycle) { console.log('request made to: '+req.url); });
The following only intercepts text/html
responses.
When it does, it exposes the response body as a readable/writable $
variable.
proxy.intercept({ phase: 'response', mimeType: 'text/html', as: '$' }, function(req, resp, cycle) { resp.$('title') .text('all your titles are belong to us'); });
The following only intercepts responses with a declared charset.
When it does, it exposes the response body as the string
variable.
proxy.intercept({ phase: 'response', contentType: /charset/i, as: 'string' }, function(req, resp, cycle) { console.log(resp.string); });
The following only intercepts responses from an /api/users
JSON endpoint.
When it does, it exposes the response body as the json
variable.
It uses a URL pattern to match the endpoint URL instead of a regex.
proxy.intercept({ phase: 'response', fullUrl: 'http://example.com/api/users/:id', mimeType: 'application/json', as: 'json' }, function(req, resp, cycle) { console.log(resp.json.email_address); });
| name | type | required | description |
|---|---|---|---|
phase |
string | yes |
Which phase to intercept.
See phase lifecycle for more info.
Accepted values:
|
as |
string | no |
Expose the request or response body (depending on the phase) as data of a certain type.
If there's an error parsing the body into this form, the intercept action is skipped and a warning is logged.
Hoxy normally streams request and response bodies through.
If as is present, hoxy buffers the request or response body into memory.
Accepted values:
'json' with mimeType:'application/json' .
|
| Filtering options (these are logically ANDed together) | |||
| name | type | required | description |
protocol |
string, regex, function | no | Match the request protocol. |
method |
string, regex, function | no | Match the all-uppercase HTTP request method. |
hostname |
string, regex, function | no | Match the host, not including :port. |
port |
number, string, regex, function | no | Match the port number. |
url |
string, regex, function | no |
Match the request URL.
Patterns like /foo/* are allowed.
See route-pattern.
|
fullUrl |
string, regex, function | no |
Match the full request URL including protocol and hostname.
Patterns like /foo/* are allowed.
See route-pattern.
|
contentType |
string, regex, function | no |
Match the full content-type header of the request or response (depending on the phase).
|
requestContentType |
string, regex, function | no |
Same as contentType but only matches request.
|
responseContentType |
string, regex, function | no |
Same as contentType but only matches response.
|
mimeType |
string, regex, function | no |
Match just the mime type portion of the content-type header of the request or response (depending on the phase). I.e., if the entire header is "text/html; charset=utf-8" , just match the "text/html" part.
|
requestMimeType |
string, regex, function | no |
Same as mimeType but only matches request.
|
responseMimeType |
string, regex, function | no |
Same as mimeType but only matches response.
|
Note: filtering options can be different types.
==
) match.
Deals with various logging events.
This first example listens for error
, warn
, and debug
logging events, and prints them to stderr
.
proxy.log('error warn debug');
Or, print logging events to various writable streams.
proxy.log('error warn debug', process.stderr); proxy.log('info', process.stdout);
Or, explicitly handle logging events.
proxy.log('error warn', function(event) { console.error(event.level + ': ' + event.message); if (event.error) console.error(event.error.stack); });
| name | description |
|---|---|
error |
When something bad happens that we wish wouldn't have happened. |
warn |
When something iffy happened that we can probably tolerate. |
info |
When something noteworthy happened that normal people care about. |
debug |
When something boring happened that developers care about. |
Stops proxy receiving requests. Finalizes and/or cleans up any resources the proxy uses internally.
proxy.close(function(err) { // optional callback if (err) { throw err; } console.log('The proxy is no longer accepting new connections.'); });
Represents a request.
An instance of this is passed as the first argument to every interceptor.
Altering its values changes what the server sees.
If you change the hostname
, it changes which server sees the request.
Protocol of the request.
Destination server hostname, sans port.
Destination server port.
All-caps HTTP method used. Lowercase values are converted to uppercase.
HTTP request header name/value JS object.
These are all-lowercase, e.g. accept-encoding
.
Root-relative request URL, including query string, like /foo/bar?baz=qux
An object representing querystring params in the URL.
For example if the URL is /foo/bar?baz=qux
, then this object will look like { baz: 'qux' }
.
Request body parsed as JSON.
This is only present if you intercept the request as:'json'
.
Changes made to this object will be seen by the server.
proxy.intercept({ phase: 'request', method: 'PUT', fulUrl: 'http://example.com/users/:id', as: 'json' }, function(req, resp, cycle) { req.json.prefs.subscriptions = 'all'; });
Request body parsed as form-url-encoded params.
This will be a key/value POJO.
This object will only present if you intercept the request as:'params'
.
Changes made to this object will be seen by the server.
proxy.intercept({ phase: 'request', method: 'POST', mimeType: 'application/x-www-form-urlencoded', as: 'params' }, function(req, resp, cycle) { console.log(req.params.email); });
Note, parameters from the URL querystring are not included in this object.
Request body string.
This is only present if you intercept the request as:'string'
.
Overwriting this will overwrite the request body sent to the server.
proxy.intercept({ phase: 'request', fulUrl: 'http://example.com/users/:id', as: 'string' }, function(req, resp, cycle) { console.log(req.string); });
Request body binary buffer.
This is only present if you intercept the request as:'buffer'
.
Changes made to this object will be seen by the server.
proxy.intercept({ phase: 'request', method: 'POST', fullUrl: 'http://example.com/images', as: 'buffer' }, function(req, resp, cycle) { // req.buffer contains uploaded image });
Simulates slowness during request phase. With this method you can set a minimum latency and/or maximum transfer rate. Since these are minimum/maximum, if your native connection is already slower than these values, this method will have no effect.
// Simulate upload speed of 10,000 bytes per second proxy.intercept('request', function(req, resp, cycle) { req.slow({rate:10000}); // bytes per second });
// Simulate a 500-1000ms delay on every request. proxy.intercept('request', function(req, resp, cycle) { req.slow({latency:randint(500, 1000)}); });
If url
is provided, sets the request's absolute protocol, hostname, port and url.
Otherwise it returns the absolute URL of this request.
This is mainly a convenience method.
// Log every request through the proxy. proxy.intercept('request', function(req, resp, cycle) { console.log(req.fullUrl()); });
Whatever request body gets sent to the server, tee()
pipes an identical copy to your writable stream.
Your stream is held in memory, and only gets written to if and when the request is sent to the server.
In other words, your stream sees whatever the server sees.
If the server sees nothing, your stream sees nothing.
You can tee()
as many times as you want.
proxy.intercept({ phase: 'request', method: /post|put/i, mimeType: 'application/json' }, function(req, resp, cycle) { req.tee(fs.createWriteStream('./uploaded.json')); });
Represents a response.
An instance of this is passed as the second argument to every interceptor.
This object is unpopulated during the request
and request-sent
phases.
Altering its values changes the response to the client.
HTTP status code being sent to the client.
HTTP response header name/value JS object.
Header names are all-lowercase, such as 'content-type'
.
Response body parsed as DOM.
This object is only present if you intercept the response as:'$'
.
This is a cheerio object, which provides a jQuery-like API.
Changes made to it will be seen by the client.
proxy.intercept({ phase: 'response', fullUrl: 'http://example.com/page.html', as: '$' }, function(req, resp, cycle) { // change the title of the page resp.$('title').text('Fake Title!'); });
Response body parsed as JSON.
This is only present if you intercept the response as:'json'
.
Changes to this object will be seen by the client.
proxy.intercept({ phase: 'response', method: 'GET', fullUrl: 'http://example.com/users/123', as: 'json' }, function(req, resp, cycle) { // arbitrarily manipulate the response json resp.json.foo = 'bar'; });
Response body string.
This is only present if you intercept the response as:'string'
.
Overwriting this will overwrite the response body sent to the client.
proxy.intercept({ phase: 'response', fullUrl: 'http://example.com/page.html', as: 'string' }, function(req, resp, cycle) { // print page to log console.log(resp.string); });
Response body binary buffer.
This is only present if you intercept the response as:'buffer'
.
Changes made to this object will be seen by the client.
proxy.intercept({ phase: 'response', fullUrl: 'http://example.com/image.jpg', as: 'buffer' }, function(req, resp, cycle) { // resp.buffer contains a jpg });
Simulates a slow response. With this method you can set a minimum latency and/or maximum transfer rate. Since these are minimum/maximum, if your native connection is already slower than these values, this method has no effect.
// Simulate download speed of 100,000 bytes per second proxy.intercept('response', function(req, resp, cycle) { resp.slow({rate:100000}); // bytes per second });
// Simulate a 500-1000ms delay on every response. proxy.intercept('response', function(req, resp, cycle) { resp.slow({latency:randint(500, 1000)}); });
Whatever response body gets sent to the client, tee()
pipes an identical copy to your writable stream.
Your stream is held in memory, and only gets written to when the response is sent to the client.
In other words, your stream sees whatever the client sees.
You can tee()
as many times as you want.
proxy.intercept({ phase: 'response', mimeType: 'image/gif' }, function(req, resp, cycle) { resp.tee(fs.createWriteStream('./image.gif')); });
Represents a whole request/response cycle.
A Cycle instance is this
in all interceptor calls, and the same instance is shared across an entire request/response cycle.
It's also passed as the third argument, in order to support arrow functions.
It provides a small number of methods not associated specifically to either the request or response.
Provisions responses from the local filesystem.
Generally, the reason you'd do this is to be able to edit those files locally and test them as if they were live on the remote server.
This action populates the response object; see response population for more info.
The completion of this action is asynchronous, so serve()
returns a promise.
Example.
proxy.intercept({ phase: 'request', fullUrl: 'http://example.com/main.js' }, function(req, resp, cycle) { return cycle.serve('/Users/gr123/test/main.js'); });
Or the more verbose-but-identical...
proxy.intercept({ phase: 'request', fullUrl: 'http://example.com/main.js' }, function(req, resp, cycle) { return cycle.serve({ path: '/Users/gr123/test/main.js' }); });
| name | type | required | description |
|---|---|---|---|
| path | string | no |
Which file to serve.
Defaults to the request URL.
Normally this would be used in mutual exclusion with docroot .
Strictly speaking, path is always rooted to docroot , which defaults to "/" .
|
| docroot | string | no |
Which local directory to serve out of.
Defaults to filesystem root "/" .
|
| strategy | string | no |
Mainly relevant when using the docroot option.
Describes the relationship between the local docroot and the remote one.
Strictly speaking, this controls what happens when the local docroot is missing a requested file.
Accepted values:
|
The returned promise resolves after the response has been populated. There are at least three use cases worth mentioning.
Use case #1: Serve a specific file. First:
$ curl http://example.com/js/main.js > main.js
...then:
proxy.intercept({ phase: 'request', fullUrl: 'http://example.com/js/main.js' }, function(req, resp, cycle) { return cycle.serve(__dirname + '/main.js'); });
Use case #2: Serve out of a local docroot. First:
$ mkdir js $ curl http://example.com/js/main.js > js/main.js $ curl http://example.com/js/some-lib.js > js/some-lib.js $ curl http://example.com/js/other-lib.js > js/other-lib.js ...
...then:
proxy.intercept({ phase: 'request', hostname: 'example.com', url: /^\/js\/.*/ }, function(req, resp, cycle) { return cycle.serve({ docroot: __dirname, strategy: 'overlay' }); });
Use case #3: Serve out of a local docroot. Similar to above, but automatically downloads the files for you, instead of having to curl them as in the above example. You control which files get downloaded locally by the filtering options you provide.
proxy.intercept({ phase: 'request', hostname: 'example.com', url: /^\/js\/.*/ }, function(req, resp, cycle) { return cycle.serve({ docroot: __dirname, strategy: 'mirror' }); });
Stores and retrieves data on a cycle instance. This is useful since the same instance is shared across all interceptors for a given request/response cycle, allowing you to share related data across disparate scopes. With two params this method behaves as a setter, with one param as a getter.
['request','request-sent','response','response-sent'] .forEach(function(phase) { proxy.intercept(phase, function(req, resp, cycle) { cycle.data(phase, Date.now()); }); }); proxy.intercept('response-sent', function(req, resp, cycle) { var reqReceived = cycle.data('request'); var reqSent = cycle.data('request-sent'); var respReceived = cycle.data('response'); var respSent = cycle.data('response-sent'); // now print some profiling data });
hoxy.createServer({ reverse: 'https://www.google.com', tls: { key: fs.readFileSync('path/to/my-server.key.pem), cert: fs.readFileSync('path/to/my-server.crt.pem') } }).listen(8080)
The tls
option is passed to the underlying Node HTTPS server.
Hoxy不是天上众神的专用魔术。 它有相当简单的架构并以可以预测的方式执行。 众神已经鼓励先知们写下了一下咒语，辅助训练后来的追随者。
Hoxy is not Magic Cargo From The Sky Gods™. It has a fairly simple core architecture, and works in a predictable way. In order to assist the training of acolytes, however, the Magic Sky Gods have inspired the prophets to write down these incantations in The Book Of Spells.
这个咒语让返回的数据转换成dom结构，然后修改标题，所有通过此代理访问的html标题都将是”Unicorns！". This incantation makes all titles say "Unicorns!" by manipulating the response as DOM.
proxy.intercept({ phase: 'response', mimeType: 'text/html', as: '$' }, function(req, resp) { resp.$('title').text('Unicorns!'); });
这段代码模拟一个缓慢的连接。 因为两个请求使用同一个连接 This spell simulates a slow connection. This is done at the proxy level since two simultaneous requests would share the same connection. Thus for example a limit of 100000 bps for two requests would result in a speed of 50000 bps for each.
hoxy.createServer({ slow: { rate: 100000 } }).listen(8080);
This spell simulates a slow website. It's as if just one website were slow, even if the rest of them run at normal speed.
proxy.intercept({ phase: 'response', hostname: 'www.google.com' }, function(req, resp) { resp.slow({ rate: 10000 }); });
One can invoke the deep magic of generator functions. Which are actually just functions that can pause while they're running. This is useful because async stuff can happen while things are paused. But you need to yield promises, which means using an adapter to turn callbacks into promises.
var adapt = require('ugly-adapter'); var fs = require('fs'); proxy.intercept({ phase: 'response', hostname: 'mysite.com', mimeType: 'text/html', as: '$' }, function*(req, resp) { var headerHtml = yield adapt(fs.readFile, 'path/to/header.html'); resp.$('#header').html(headerHtml); });
If one speaks the language of Babel, one can invoke the even deeper magic of async functions.
var adapt = require('ugly-adapter'); var fs = require('fs'); proxy.intercept({ phase: 'response', hostname: 'mysite.com', mimeType: 'text/html', as: '$' }, async function(req, resp) { var headerHtml = await adapt(fs.readFile, 'path/to/header.html'); resp.$('#header').html(headerHtml); });
There's an incantation for intercepting HTTPS traffic, too. But you have to burn some extra incense. First, create your very own self-signed Certificate Authority. (You should only ever need to do this once.)
# Create the key openssl genrsa -out ~/.ssh/my-private-root-ca.key.pem 2048 # Create the cert openssl req -x509 -new -nodes -key ~/.ssh/my-private-root-ca.key.pem -days 1024 -out ~/.ssh/my-private-root-ca.crt.pem -subj "/C=US/ST=Utah/L=Provo/O=ACME Signing Authority Inc/CN=example.com"
Next, add the above root cert to your list of trusted cert authorities. How to do this varies. For example, Firefox maintains its own trusted list, while Chrome uses the OS's list. For specific details, consult the Ninth Scroll of P'Ki (or search the web). Once that's done, launch Hoxy, passing in your trusted cert and its private key.
hoxy.createServer({ certAuthority: { key: fs.readFileSync('/Users/you/.ssh/my-private-root-ca.key.pem'), cert: fs.readFileSync('/Users/you/.ssh/my-private-root-ca.crt.pem') } }).listen(8080);
Finally, configure your client to proxy both HTTP and HTTPS through localhost:8080
.
Hoxy will use the fake cert authority to spoof certificates from any HTTPS sites it encounters, decrypting and intercepting them as cleartext using the existing intercept API.
See also: basic explanation of HTTPS proxying.
Suppose you want to intercept your own web traffic to reddit.com.
One option is to create a proxy, configure your client to use it, then visit reddit.com.
If client configuration isn't feasible, another option is to use a reverse proxy.
In this case you'd visit a url like http://localhost:8080/
which would basically mirror the content of reddit.com.
This is fairly easy to set up:
hoxy.createServer({ reverse: 'http://www.reddit.com' }).listen(8080);
Now you can visit http://localhost:8080/
and reddit will be there.
Strictly speaking, by visiting the proxy directly in your browser rather than configuring it as a proxy, you're depriving the proxy of the scheme ("http:") and host ("www.reddit.com") information in the URL.
The reverse
option provides those missing pieces of information, allowing you to visit the proxy directly.
Suppose you wanted to reverse proxy to an HTTPS site. In that case you'll likely want the URL in your browser to be HTTPS as well. For that, just provide a key and cert that your client trusts. The instructions above already show how to create your own self-signed root CA. Do that, then use it to create your server's key and cert:
# Create the key openssl genrsa -out ./my-server.key.pem 2048 # Create the certificate signing request openssl req -new -key ./my-server.key.pem -out ./my-server.csr.pem -subj "/C=US/ST=Utah/L=Provo/O=ACME Tech Inc/CN=localhost" # Create the cert openssl x509 -req -in ./my-server.csr.pem -CA ~/.ssh/my-private-root-ca.crt.pem -CAkey ~/.ssh/my-private-root-ca.key.pem -CAcreateserial -out ./my-server.crt.pem -days 500
Then, launch your server with a tls
option, like so:
hoxy.createServer({ reverse: 'https://www.google.com', tls: { key: fs.readFileSync('path/to/my-server.key.pem), cert: fs.readFileSync('path/to/my-server.crt.pem') } }).listen(8080);
The tls
option is passed to the underlying Node HTTPS server.
See also: basic explanation of HTTPS proxying.
| # | phase | description |
|---|---|---|
| 1 |
request
|
The proxy has received the request headers, but the request body (if there is one) hasn't started streaming in yet.
Or, if you've intercepted a request as:'json' (for example) then the request body will have been fully buffered into memory and be available as request.json (for example).
See intercepts for more info.
|
| 2 |
request-sent
|
The proxy has finished sending the entire request, including the request body if present, to the server.
Everything is read-only during this phase.
The main reason for its existence is to be able to measure the time it takes to upload the request by comparing it with the previous phase.
|
| 3 |
response
|
The proxy has received the response headers, but the response body hasn't started streaming in yet.
Or, if you've intercepted a response as:'$' (for example) then the response body will have been fully buffered into memory and be available as response.$ (for example).
See intercepts for more info.
|
| 4 |
response-sent
|
The proxy has finished sending the entire response, including the response body, to the client.
Everything is read-only during this phase.
The main reason for its existence is to be able to measure the time it takes to download the response by comparing it with the previous phase.
|
Intercept handlers are called in the order of their phase
.
Intercept handlers of the same phase
are called in the order they're declared.
request
and response
objects are either read-only or readable/writable, depending on phase
.
Attempts to write a read-only thing will fail silently, generating an error
log event.
| Readability / writability matrix | Object | ||
|---|---|---|---|
request |
response |
||
| Phase | request |
writable | writable |
request-sent |
read-only | read-only | |
response |
read-only | writable | |
response-sent |
read-only | read-only |
Hoxy normally populates responses by sending the request to the destination server during the normal request/response lifecycle.
Alternatively, if you modify any aspect of the response before this happens (i.e. during the request
phase) hoxy treats the entire response as populated, and skips the call to the destination server.
If you modify any aspect of the response after this happens (i.e. during the response
phase) it overwrites just that aspect of the response from the server.
proxy.intercept('request', function(req, resp, cycle) { response.string = 'Hello'; // The response is now populated so the // server call is skipped. Status code will // default to 200. });
proxy.intercept('request', function(req, resp, cycle) { response.statusCode = 200; // The response is now populated so the // server call is skipped. Response body // defaults to empty. });
proxy.intercept('response', function(req, resp, cycle) { response.string = 'Hello'; // The response was already populated, // we just overwrite its body. Status // code remains the same. });
proxy.intercept('response', function(req, resp, cycle) { response.statusCode = 666; // The response was already populated, // we just overwrote the status. I // wonder how the browser will react // to this unexpected turn of events. });
Changes to requests and responses are cumulative over the whole request/response cycle.
Among other things, this affects loading content as
a certain type, and filtering.
Change accumulation example.
proxy.intercept('request', function(req, resp, cycle) { req.headers['cache-control'] = undefined; }); proxy.intercept('request', function(req, resp, cycle) { console.log(req.headers['cache-control']); // undefined });
Change accumulation affects filtering.
proxy.intercept('request', function(req, resp, cycle) { req.hostname = 'example.com'; }); proxy.intercept({ phase: 'request', hostname: 'other.com' }, function(req, resp, cycle) { // never called! });
Change accumulation affecting as
parameters.
proxy.intercept({ phase: 'response', mimeType: 'application/json', as: 'json' }, function(req, resp, cycle) { ... }); proxy.intercept({ phase: 'response', mimeType: 'application/json' }, function(req, resp, cycle) { console.log(typeof resp.json); // 'object' }); proxy.intercept({ phase: 'response', mimeType: 'application/json', as: 'string' }, function(req, resp, cycle) { ... }); proxy.intercept({ phase: 'response', mimeType: 'application/json' }, function(req, resp, cycle) { console.log(typeof resp.json); // 'undefined' console.log(typeof resp.string); // 'string' });
How does HTTPS proxying work in Hoxy? First, let's review how HTTPS proxying works in general. Suppose you want to insert a proxy between yourself and the website https://example.com. There are two ways to do this: direct and reverse proxying.
To set up a direct HTTPS proxy, you'd launch a proxy on port 8080 and set your browser to do HTTPS proxying through localhost:8080
, then visit the site directly from your browser.
What happens here differs radically from HTTP proxying.
During HTTP proxying, the client sends this:
GET http://www.example.com/foo.html HTTP/1.1
In English this means go to example.com and get /foo.html for me. But during HTTPS proxying, the client sends this:
CONNECT example.com:443 HTTP/1.1
Which in English means connect me to example.com, I want to have a private conversation with them. Once the proxy establishes the pipe, the client TLS-handshakes the server on that connection. Then, it sends normal HTTP traffic over it like this:
GET /foo.html HTTP/1.1
...but it's encrypted, so the proxy can't see it. Anything might be happening on that connection, from the proxy's POV.
This is formally known as HTTP CONNECT tunneling. Since the proxy isn't privy to the conversation, there's no need for it to be an HTTPS server itself, even though "https://" appears in the browser's URL bar. Its job is just to shovel TCP packets back and forth, which happen to contain undecypherable TLS traffic.
A reverse HTTPS proxy is a different animal altogether. To set it up, you'd launch a proxy on port 8080. Since this is a reverse HTTPS proxy, you'll need a few more startup options:
CN=localhost
."https://example.com"
.The key and the cert in particular are necessary because a reverse proxy—from the client's POV—isn't a proxy at all, but an HTTPS webserver that speaks TLS. And because of the constraints of PKI, the client needs to trust the cert provided above. So one of two things needs to happen:
Either way you'll end up with a signed, trusted cert and your reverse proxy should work.
Hoxy follows these patterns, but with one major deviation having to do with direct proxying and HTTPS CONNECT tunneling. Instead of connecting the client to the remote server, Hoxy connects the client to its own private HTTPS server. This is a separate server instance from the proxy itself and solely exists to spoof TLS.
Normally, the client would immediately realize something fishy is going on. The spoofing server, being TLS, has provided a cert to the client that hasn't been signed by a client-trusted CA. Thus, to use Hoxy as an HTTPS direct proxy, you must create your own self-signed root CA, make your client trust it, then pass it to Hoxy as a startup option.
With this in mind, let's rewind to just before the client realizes something fishy is going on. Hoxy, having in its possession both the cert AND the private key of a client-trusted CA, will use it to generate spoofed keys and certs, signed by that CA, for each HTTPS domain the client visits. From the client's POV now, nothing fishy is going on. As far as it knows, its CONNECT requests are being honored by the proxy, and it's talking directly to the remote website in a private channel.
But in reality, the client is tunneling to an imposter server, its traffic is being decrypted and intercepted, then being re-encrypted and sent onward. Neither the client nor the server are the wiser.
You may have noticed there are two key/cert options that can be passed to Hoxy, with different names: tls
and certAuthority
.
It should now make sense why.
The former is for reverse proxying, and is just Node's config option for running an HTTPS webserver.
The latter is for direct proxying.
It's a meta-key/cert combo, used to spoof actual key/cert combos on the fly.
Incidentally, these two options are mutually exclusive.
It wouldn't make sense to use both at the same time.
To see some openssl commands and HTTPS proxy specimens, see the examples section.


To Sibling
assertions
mapping by formatting
Relative Link without fragment:
to_parent.html
Relative Link with fragment:
“Target of Anchor” in to_parent.html
mapping by OtherExtensionMap
Relative Link:
A.txt
Relative Image Link (A):
Target of Anchor
to_sibling


Encom Globe
by
@arscan
A tribute to the
boardroom scene
in Disney's
Tron: Legacy
. Built for reuse. Source on
Github
.
Add element by clicking map below
Drop Pin
Marker
Satellite
Configure Globe
Color Palette
Globe Scale
View Angle
Seconds per Rotation
Intro Duration (ms)
Max Pins
Max Markers
Satellite Altitude
Satellite Intensity
Load Dummy Data
Reload
CENTRAL SYSTEM DATA ...
LAUNCH ENCOM GLOBALIZATION
OIA | 012
TOUCHPOINT KEYBOARD ...
INTERACTION SEQUENCING
SYS | O12


WITNESS LIST Public Education Committee May 20, 2003-2:00P SB 13 For: Gustafson, Lindsay (TX Classroom Teachers Association) Shaddix, Julian (Texas Association of Secondary School Principals) Wall, Marjorie (Texas State Teachers Association) Whitsett, JoHannah (Association of Texas Professional Educators) SB 16 For: Borden, Sandi (Texas Elementary Principals & Supervisors Association) On: Padilla, Celeste (Governor's Mentoring Initiative & TxCUCS) Turner, Toni (Governor's Mentoring Initiative) SB 76 For: Borden, Sandi (Texas Elementary Principals & Supervisors Association) Calaway, James (Center for Houston's Future, affiliate of the Greater Houston Partnership) Dzick, George (Texas Business and Education Coalition) Litton, Todd (Preschool for ALL/GHCC/CHF) Sabo, Jason (Center for Public Policy Priorities) Against: Gerstenschlager, MerryLynn (Self and Texas Eagle Forum) Sullivan, Mike (TASB & Abilene ISD) On: Pewitt, Bill (Texas Licensed Child Care Association) SB 186 For: Gustafson, Lindsay (Texas Classroom Teachers Association) Shaddix, Julian (Texas Association of Secondary School Principals) SB 265 Against: Jephson, Melanie B. (Consortium of State Organizations for Teacher Education) Martin, Alejandra A. (Texas Association of School Personnel Administrators) On: Anderson, David (Texas Education Agency) Franz, Bill (State Board for Educator Certification) Levine, Ken (Sunset Commission) Wissolik, Erica (Sunset Commission) SB 265 Committee Substitute (Grusendorf) Against: Eaton, Holly (Texas Classroom Teachers Association) Raab, Ted Melina (Texas Federation of Teachers) Wall, Marjorie (Texas State Teachers Association) Whelan, Lauren (Association of Texas Professional Educators) SB 396 For: Burnett, Tom (Apple Computer) Jackson, Diane (Spring Branch ISD) Shaddix, Julian (Texas Association of Secondary School Principals) Wall, Marjorie (Texas State Teachers Association) Whitsett, JoHannah (Association of Texas Professional Educators) SB 448 For: Douglass, Cathy (Texas Association of School Boards) Sullivan, Mike (TASB & Abilene ISD) On: Anderson, David (Texas Education Agency) SB 578 For: Gustafson, Lindsay (Texas Classroom Teachers Assoc.) Shaddix, Julian (Texas Association of Secondary School Principals) SB 596 On: Hodgins, David (TASB/Council of School Attorney's) SB 618 On: Cox, Cathy (Texas State Comptroller) Wall, Marjorie (Texas State Teachers Association) SB 688 For: Collins, Robby (Dr. Mike Moses/Dallas ISD) SB 741 For: Floyd, Robert (Texas Music Educators Association) Gustafson, Lindsay (TX Classroom Teachers Association) Wall, Marjorie (Texas State Teachers Association) Whitsett, JoHannah (Association of Texas Professional Educators) SB 805 For: Gustafson, Lindsay (TX Classroom Teachers Association) SB 893 For: Gustafson, Lindsay (TX Classroom Teachers Association) Martin, Alejandra (Texas Association of School Personnel Administrators) Thompson, David (Texas Association of School Administrators) Wall, Marjorie (Texas State Teachers Association) SB 929 For: Pena, Martin (South Texas Association of Schools) On: Ressel, Betty (Texas Comptroller's Office) SB 933 For: Hartfield, Raymond (Round Rock ISD) Kress, Sandy (K-12) Packard, Ronald J. (K12) Vanourek, Gregg (K12 Inc.) Against: Boyle, Carolyn (Coalition for Public Schools) Davila de Silva, Aurelia (Self) Eckhart, Harley (Texas Elementary Principals & Supervisors Association) Gustafson, Lindsay (Texas Classroom Teachers Association) Martin, Alejandra (Self and Texas Association of School Personnel Administrators) Raab, Ted Melina (Texas Federation of Teachers) Sanchez, Joe (M.A.L.D.E.F.) Smoot, Samantha (Texas Freedom Network) Wall, Marjorie (TSTA) Whitsett, JoHannah (Association of Texas Professional Educators) Yanez-Correa, Ana (Texas LULAC) SB 1082 Against: Gerstenschlager, MerryLynn (Self and Texas Eagle Forum) On: Anderson, David (Texas Education Agency) Bass, James (Texas Dept of Transportation) SB 1109 For: Eckhart, Harley (Texas Elementary Principals & Supervisors Association) Gerstenschlager, MerryLynn (Texas Eagle Forum) Gustafson, Lindsay (TX Classroom Teachers Association) Martin, Alejandra (Texas Association of School Personnel Administrators) SB 1232 For: Gustafson, Lindsay (Texas Classroom Teachers Association) Whitsett, JoHannah (Association of Texas Professional Educators) Against: Martin, Alejandra (Texas Association of School Personnel Administrators) SB 1240 For: Grusendorf, Bill (Tx Association of Rural Schools) SB 1366 For: Shaddix, Julian (Texas Association of Secondary School Principals) On: Smisko, Ann (Texas Education Agency) SB 1373 For: Clemons, Robert (Rio Brazos Education Cooperative) Eckhart, Harley (Texas Elementary Principals & Supervisors Association) Harris, Stanley (Axtell Independent School District) Shaddix, Julian (Texas Association of Secondary School Principals) Soehnge, Karen (Texas Association of School Administrators) SB 1488 For: Martin, Alejandra (Texas Association of School Personnel Administrators) On: Anderson, David (Texas Education Agency) Douglass, Cathy (Texas Association of School Boards) Franz, Bill (State Board for Educator Certification) Gustafson, Lindsay (Texas Classroom Teachers Association) Otto, Kingsberry (TX Dept. of Protective & Regulatory Services) Soehnge, Karen (Texas Association of School Administrators) SB 1548 For: Eckhart, Harley (Texas Elementary Principals & Supervisors Association) Hodgins, David (TASA/TASB) SB 1624 For: Frost III, Tom (Self and Frost Bank) Against: Morris, Mark (JP Morgan Chase Bank)


Models¶
The models are classificators with operations like fit and predict. Only this two operations are need for add models to mlPyp.
- By default the supported frameworks are:
- tensorflow
- keras
- scikit-learn
- tflearn
but you can define more, see: Wrappers.
For example, we want to add a model called AdaBoost.
# SKLP is the wrapper for classificators with probabilistic
# predictions in scikit-learn
from ml.clf.extended.w_sklearn import SKLP
class AdaBoost(SKLP):
def prepare_model(self):
from sklearn.ensemble import AdaBoostClassifier
from sklearn.calibration import CalibratedClassifierCV
reg = CalibratedClassifierCV(
AdaBoostClassifier(n_estimators=25, learning_rate=1.0), method="sigmoid")
reg.fit(self.dataset.train_data, self.dataset.train_labels)
sig_clf = CalibratedClassifierCV(reg, method="sigmoid", cv="prefit")
sig_clf.fit(self.dataset.valid_data, self.dataset.valid_labels)
return sig_clf
Now we can use AdaBoost.
dataset = DataSetBuilder(name="cats_and_dogs_dataset")
classif = AdaBoost(
model_name="my_new_model",
dataset=dataset,
model_version="1",
group_name="cats_and_dogs")
classif.train(batch_size=128, num_steps=10)
#Automatically the train is saved and now can predict data.
Predict data is like
data = ...
classif = AdaBoost(
model_name="my_new_model",
model_version="1")
predictions = classif.predict(data)
If you want to add a TensorFlow model i.e a multilayer perceptron
# TFL is the wrapper for classificators in TensorFlow
from ml.clf.extended.w_tflearn import TFL
class MLP(TFL):
def __init__(self, *args, **kwargs):
if "layers" in kwargs:
self.layers = kwargs["layers"]
del kwargs["layers"]
else:
self.layers = [128, 64]
super(MLP, self).__init__(*args, **kwargs)
def prepare_model(self):
input_layer = tflearn.input_data(shape=[None, self.num_features])
layer_ = input_layer
for layer_size in self.layers:
dense = tflearn.fully_connected(layer_, layer_size, activation='tanh',
regularizer='L2', weight_decay=0.001)
layer_ = tflearn.dropout(dense, 0.5)
softmax = tflearn.fully_connected(layer_, self.num_labels, activation='softmax')
sgd = tflearn.SGD(learning_rate=0.1, lr_decay=0.96, decay_step=1000)
acc = tflearn.metrics.Accuracy()
net = tflearn.regression(softmax, optimizer=sgd, metric=acc,
loss='categorical_crossentropy')
return tflearn.DNN(net, tensorboard_verbose=3, max_checkpoints=10)
Prediction
data = ...
classif = MLP(
model_name="my_perceptron_model",
model_version="1")
predictions = classif.predict(data)
For more about it see Wrappers.


--- layout: default html-class: docs-page --- {% include item-doc-page.html items=site.specs item_type='specs' %}


Manager Explains Clash With Messi
by Kurt BuckerfieldAfter being involved in a heated argument with FC Barcelona superstar Lionel Messi on Saturday night, Mallorca manager Vicente Moreno has explained his war of words with the six-time Ballon d'Or winner, who went on to score a hat-trick against his side.
Click through the gallery above to see the incident between the manager and Messi.
It was another memorable night for the Catalan giants at the Camp Nou, where they thrashed newly-promoted side Mallorca 5-2, inspired by yet another terrific performance from Messi.
The Argentine struck three times for the Blaugrana, including two goals from outside the box, while Antoine Griezmann and Luis Suarez also got on the scoresheet with great finishes of their own.
When the score was 1-1, there seemed to be an off-the-ball issue between Mallorca's manager and Messi, who was caught from behind just in front of the opposition's technical area near the halfway line.
Earn Airtime & Data With Soccer Laduma's Social Media App - Download Now
With the 32-year-old appearing to ask the match official for a yellow card to be shown for the challenge, Moreno had some heated words with Messi for a few seconds.
While it is not clear what was said between the pair, Moreno explained after the game that the Barca captain must be treated the same as everybody else.
"There are some players who are in a bubble and you can't reason with them," he said, according to Marca.
"He's a different player in some respects, and then in other ways he is a person just like any other and has to be treated as such.
"The referee was telling him it wasn't a foul and he didn't see it that way.
"There's no need to place more importance on it than that."
Zlatan Takes Another Swipe At Ronaldo
Messi's hat-trick ensured he has broken Cristiano Ronaldo's record of LaLiga trebles, and he is also now the leading goalscorer in the league this season, with 12 goals in 10 games so far.


To get a list of the most recently submitted search strings, please try
To get the image URLs, alt text and page urls for a set of images relating to a given search string, please try


{{team?.games_count}}
{{team?.won}}
{{team?.ratio | number : '1.2-2'}}
{{team?.lost}}
{{team?.draw}}
{{player[1]}}
{{player[3] | slice :0:3}}{{game.venue_name}}
{{game.venue_size}} {{game.venue_type}} {{game.venue_localization}}
{{game.team_1_name}}
{{game.team_1_category}}
{{game.team_2_name}}
{{game.team_2_category}}


| DOSE: |
20 mg |
oral |
2C-T-2 |
(powder / crystals) |
My interest in 2ct2 sparked along time ago when certain reports ascertained that this compound touched on the spiritual aspect of the psychedelic experience. I have had a number of experiences with other phenethylamines. 2ct2 has always been around, but I just never had a moment to try it. I had taken time out on a Sunday a while ago to try it at 10mg with a +1.5 at best. However I just felt that on this certain Friday night I had to go and try it at 20mg. 4 others, including my princess P, would join in the experience.
It was a cold night in the hills, P and I were at a L and M's house. I had planned to not have anything in the evening, but given the semi short duration and eagerness to enter an altered state led us each to ingest 20mg, with E only ingesting 10mg.
EXPERIENCE
Ingestion at 1:30 am
0:00+ Earlier in the evening I had 1,4b that was now fading. Everyone is of good humour and high spirits.
0:30+ Mild body aches. No nausea suprisingly. Very strong neck tension.
0:45+ Emotions clearing up after 1,4 has worn off completely, anxiety and dark corners evident. Time needed for introspection. I feel being around peopl is not doing my thoughts good. Reluctantly however I need to pull away from my group into my own space... I head off to my car.
1:00+ Time in the car was wonderful, lost if jumping visual patterns and symbols. Colours are not as green/yellow as 2ct7 and not as neon coloured as 2C-I and 2C-B. Music helps calm me down and reflect on the situation. No revelations came, but it cleared up my thoughts and relaxed my body. It was good to know I can still relax when I need to.
1:15+ Back inside now. Everyone has strong physical discomfort, with E and I spewing. My neck is still uncomfortable, but its making its way for a strong dizzy intoxication. Doesn't feel too toxic, only body tension seems evident.
2:00+ Body discomfort has cleared up for everyone. Conversation is flowing wonderfully. Many discussions about shared experience and cosmic conciousness has been had. An interesting revelation has been reached about shared conciousness. Definetly a full blown +3. No car driving...
3:00+ Fun continous jumping from converstation to discussions about the music video clips that are on TV. The paintings in the house add a wonderful touch to the emotional state.
3:30+ A difficult moment in reflecting on the human state of suffering... Which is not helped by the very evident and sensitive emotions. This is compounded by S's need to get home. I had driven her here and was too intoxicated to drive her back. I felt very guilty about this. But a solution was reached and she would drive my car home. The sensitive emotions allowed me to realise a deep love for S as a friend. A feeling I was not even aware I had... 2ct2 helped bring out the unconcious emotions towards certain people. Some positive, some negative.
4:00+ Euphoric and relaxed as the substance begins to release its grip. Dropping slowly.
6:00+ Tapering off, last two hours where wonderful, laughter was abundant. N has to leave with E. They feel they are right to drive... It seems I would be too.
8:00+ Falling asleep, its time to head off as the sun is rising. I have a busy day, I get home and fall asleep immediately.
P's experience.
---------------------------------------------------------------
It's amazing that writing about the experience brings all the feelings flooding back to me...
========================================
The evening began as calmly and as relaxed as the rest of the night was to become. A few of us had gone out for coffee and then headed around to a friends house for a few drinks and to watch movies. It was a few hours until the possibility of partaking in an experience with 2ct2 was discussed. As usual, I had done my fair share of readings and discussions so had a good understanding of what I was about to partake in. Being new
to experiences such as these, understanding the effects of a substance before ingestion is important, and for me, is a part of the experience as a whole.
The first effects that I could consciously feel were felt approximately an hour after ingestion. There was a slight, growing feeling of nausea deep within my stomach, a feeling that was felt within the entire group of people involved in the experience, although for some was felt much more strongly than it was by me. The nausea stayed for quite a long period of
time but became entwined and overtaken by an orgasmic feeling orginating from the same area in my stomach. Shortly after, I became aware that although I knew exactly what was happening around me, I was not conciously involved in it. While I was quite aware of who was sitting around me talking and was aware of the tv and the music that was playing, I was completely involved in my own thoughts. At this stage, the edges of my vision became slightly blurry and it was like looking down a short glass tunnel into my life. I was very calm and relaxed, simply sitting on the couch, reflecting on life and occasionally glancing at items around the room such as the vivid colours of a painting and the gentle sway of those colours and other items surrounding it.
I felt like I was drifting, drifting through the room, stopping ccasionally to hear what people were talking about, and then drifting on, again concerned with only my own thoughts until those thoughts came to a conclusion or something else would bring me back to glancing around the room or observing, once again, the people and conversations surrounding me.
These effects lasted for many hours, as time went on, the feelings grew more subtile, and eventually I would drift in and out of this state and reality, until finally, slowly, the experience ended as subtily as it had begun.
========================================
CONCLUSION
In general I find this substance novel in its own right when compared to 2ct7/2cb and 2ci. It definitely touches in areas specific to its own right, but I would be hard pressed to discriminate it from any of them really. The taxation on the body did seem worthwhile, but I wouldn't do it again soon. To as fun and easy as 2cb. Even though 2cb does have its dark corners...
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


| Name |
Role
ADMINISTRATORHas rights to all features and pages.
RESTRICTED ADMINHas rights to all features and pages, exempting admins, child accounts, integration and security.
REPORTING ADMINHas rights to all features and pages, exempting settings (only CSV upload), child accounts, integration, security + can not change any content in workflows.
RESTRICTED CONTENT ADMINHas rights to all features and pages, exempting settings (only CSV upload), child accounts, integration, security, can not change any content in workflows + can not see forms-related data.
INITIATORCan only launch people into workflows manually and through 'Upload CSV' in settings. |
Visible workflow data | Status |
|---|---|---|---|
|
{{row.name}} (You)
|
Administrator
Administrator
Administrator
Restricted Admin
Initiator
Restricted Content
Admin
Reporting Admin
(SSO)
|
{{dfilter.name}}
{{dfilter.qry}} |
Active
Inactive
|


This file will be located somewhere within your "cesium" folder.
Choose File
File Selected: None
Load/Run
arcGIS Aerial arcGIS Light Gray arcGIS Ocean arcGIS Roadmap arcGIS Shaded Relief arcGIS Topo CartoDB Dark Matter CartoDB Dark Matter no Labels CartoDB Positron CartoDB Positron no Labels CartoDB Voyager Labels Under Open Street Map OpenTopoMap Stamen Toner Stamen Toner Background Stamen Toner Lite Stamen Terrain Stamen Terrain Background
veroviz.org


Actor Wendell Pierce tells audience to go to pub after theatre ceiling collapse
Actor Wendell Pierce told theatregoers he was “so sorry” after part of a ceiling collapsed during a West End performance.
The Piccadilly Theatre in Denman Street in central London was evacuated and emergency services called shortly before 8pm on Wednesday after part of the ceiling crashed down into the auditorium during a performance of Death Of A Salesman.
Suits star Pierce, who was playing the part of Willy Loman in Arthur Miller’s play, emerged from the theatre to apologise to audience members.
“I would like to thank you all for safely evacuating,” he said. “We apologise and we’re glad that no-one’s hurt, and I ask you all to come back and see our production.
“We’re so honoured that you came tonight, we’re so sorry that unfortunately this happened.”
Around 1,100 people were evacuated from the building, London Fire Brigade said.
Pierce, known for his role in HBO drama The Wire and as Meghan Markle’s on-screen father in Suits, encouraged audience members to go to the pub and to return to see the show another day.
“We promise you in return we will make this a memorable evening of theatre no matter what,” he said.
“So, as of now, turn to your loved ones and friends to your left and right and say ‘Which pub are we going to?’ and let’s go there and have a memorable night in anticipation of coming back.
“I want to thank you from the bottom of my heart and all the cast want to say thank you for coming out and try to find time in the next eight weeks to return, and we promise we will give you the performance of a lifetime.”
Four people were taken to hospital, according to the London Ambulance Service.
Ed Zanders, who was in the audience and captured Pierce’s speech on camera, said: “It was about 20 minutes into the play, and first there was a low rumble of background noise which quickly escalated into loud screaming.
“I initially thought it was part of the show, but then people in the rows in front of me started to get up and run for the doors.”
Mr Zanders, a 25-year-old musician from London, praised front-of-house staff and added: “Wendell Pierce was very genuine, and wanted us all to come back again in the next eight weeks – which I fully intend to do.”


Hello my name is {{ person.name + person.surname }}
Hello my age is {{ person.age }}
Hello my birthday is {{ person.Birth }}


May 7th, 2016
Win $800 to $1500
Early deadline to register(5v5)
March 7th, 2016 - $250
Final deadline to register(5v5)
April 7th, 2016 - $300
Join our Facebook page isoccerTraining Tournament
If you have more questions
For updates and more details email isoccertraining@gmail.com


QAlgo.
Home
About
(current)
This website is maintained by
amannirala13
and
Platinocc
Copyright © 2020 Aman Nirala


The navbar is a wrapper that positions branding, navigation, and other elements in a concise header.
{{navbar}}
*uri's are purposely left undefined for demo purposes
The Navbar consists of five componenets:
hc-navbar
- the main wrapper componenthc-navbar-link
- the main navigation linkshc-navbar-icon
- icons and buttons displayed on the right sidehc-app-switcher
- include app switcher functionality, if this element is not present, the catalyst flame
will revert to navigating to the home page when clicked
hc-navbar-menu
- the responsive menu triggered when the navbar is used on smaller screensTo include the app switcher, do the following:
<hc-app-switcher></hc-app-switcher>
{{moduleSetup}}
To fix the navigation bar to top of the screen, such that it stays put when your scroll, set the
fixedTop
property to true. You'll need to also add the following to your body style sheet:
{{fixedTopNavbar}}
Unlike some responsive menus that automatically pull content from the navbar into them, we intentially left ours
configurable so that developers can determine what should or shouldn't be included on smaller screens. Use the
appSwitcher
property to set whether the "View all applications" button is included at the bottom of the menu.
hc-list
components should be used for the menu options with <hr>
separators in between. See
the demo code at the top of this page for an example of how to define a responsive menu for hc-navbar.
| Navbar Component | ||
|---|---|---|
| user | Type: String | Current user |
| appIcon | Type: String | Path to svg of app logo |
| homeUri | Type: String | RouterLink uri to home page |
| fixedTop | Type: Boolean | Statically positions the navbar to the top of the page (See Fixed Top section above) |
| Navbar Link Component | ||
|---|---|---|
| linkText | Type: String | The text to display |
| active | Type: boolean | (optional) forces active state (default = null) |
| uri | Type: String | RouterLink uri |
| exact | Type: Boolean | Sets the RouterLinkActive options to match the url exactly to set active state. (default = false) |
| Navbar Menu Component | ||
|---|---|---|
| appSwitcher | Type: Boolean | Whether to display the "View all applications" button at the bottom of the menu (default = true) |


{% extends "layout.html" %} {% block content %}
Here you can use AEGIS explore GO structures and gene annotations to learn more about them. The focus-and-context graph can help you navigate through a large graph and retrieve fine-grained details. For more details about the navigation procedure, you can watch our video demonstrations. You also have the option to upload a file of GO terms to initiate the exploration among the panels below.
Here you can upload lists of GO terms to initiate the construction of the focus and context graphs for navigation. At least one uploaded file is required for focus or context anchors. Thus, there are three scenarios:
The required format is a .txt or .csv file with one GO ID (e.g., GO:0008150) per line. Once you specify the file and click on the "upload" button, the file format and GO term IDs will be checked against the GO IDs under the specific ontology.


{% extends 'base.html' %} {% block content %} Welcome to {{category}} Post a Pitch Pitches {% for pitch in pitches %} {{pitch.pitch_username}} {{pitch.description}} Posted on {{pitch.time.strftime('%d/%m/%Y %X')}} {% endfor %} {% endblock %}
{{pitch.description}}
Posted on {{pitch.time.strftime('%d/%m/%Y %X')}}


Next Chapter | Previous Chapter | Contents | Index
This chapter attempts to cover some of the common issues involved when writing 32-bit code, to run under Win32 or Unix, or to be linked with C code generated by a Unix-style C compiler such as DJGPP. It covers how to write assembly code to interface with 32-bit C routines, and how to write position-independent code for shared libraries.
Almost all 32-bit code, and in particular all code running under
,
or any of
the PC Unix variants, runs in flat memory model. This means that
the segment registers and paging have already been set up to give you the
same 32-bit 4Gb address space no matter what segment you work relative to,
and that you should ignore all segment registers completely. When writing
flat-model application code, you never need to use a segment override or
modify any segment register, and the code-section addresses you pass to
and
live in
the same address space as the data-section addresses you access your
variables by and the stack-section addresses you access local variables and
procedure parameters by. Every address is 32 bits long and contains only an
offset part.
A lot of the discussion in section 8.4, about interfacing to 16-bit C programs, still applies when working in 32 bits. The absence of memory models or segmentation worries simplifies things a lot.
Most 32-bit C compilers share the convention used by 16-bit compilers,
that the names of all global symbols (functions or data) they define are
formed by prefixing an underscore to the name as it appears in the C
program. However, not all of them do: the
specification states that C symbols do not have a leading
underscore on their assembly-language names.
The older Linux
C compiler, all
compilers,
,
and
and
,
all use the leading underscore; for these compilers, the macros
and
, as
given in section 8.4.1, will
still work. For
, though, the leading
underscore should not be used.
See also section 2.1.27.
The C calling convention in 32-bit programs is as follows. In the following description, the words caller and callee are used to denote the function doing the calling and the function which gets called.
CALL
instruction to pass control to the callee.
ESP
in
EBP
so as to be able to use
EBP
as a base pointer to find its parameters on
the stack. However, the caller was probably doing this too, so part of the
calling convention states that EBP
must be
preserved by any C function. Hence the callee, if it is going to set up
EBP
as a frame pointer, must push the previous
value first.
EBP
. The doubleword at
[EBP]
holds the previous value of
EBP
as it was pushed; the next doubleword, at
[EBP+4]
, holds the return address, pushed
implicitly by CALL
. The parameters start after
that, at [EBP+8]
. The leftmost parameter of the
function, since it was pushed last, is accessible at this offset from
EBP
; the others follow, at successively greater
offsets. Thus, in a function such as printf
which
takes a variable number of parameters, the pushing of the parameters in
reverse order means that the function knows where to find its first
parameter, which tells it the number and type of the remaining ones.
ESP
further, so as to allocate space on the stack for local variables, which
will then be accessible at negative offsets from
EBP
.
AL
, AX
or
EAX
depending on the size of the value.
Floating-point results are typically returned in
ST0
.
ESP
from EBP
if it had
allocated local stack space, then pops the previous value of
EBP
, and returns via
RET
(equivalently,
RETN
).
ESP
to remove them (instead of
executing a number of slow POP
instructions).
Thus, if a function is accidentally called with the wrong number of
parameters due to a prototype mismatch, the stack will still be returned to
a sensible state since the caller, which knows how many parameters
it pushed, does the removing.
There is an alternative calling convention used by Win32 programs for
Windows API calls, and also for functions called by the Windows
API such as window procedures: they follow what Microsoft calls the
convention. This is slightly closer to
the Pascal convention, in that the callee clears the stack by passing a
parameter to the
instruction. However, the
parameters are still pushed in right-to-left order.
Thus, you would define a function in C style in the following way:
global _myfunc _myfunc: push ebp mov ebp,esp sub esp,0x40 ; 64 bytes of local stack space mov ebx,[ebp+8] ; first parameter to function ; some more code leave ; mov esp,ebp / pop ebp ret
At the other end of the process, to call a C function from your assembly code, you would do something like this:
extern _printf ; and then, further down... push dword [myint] ; one of my integer variables push dword mystring ; pointer into my data segment call _printf add esp,byte 8 ; `byte' saves space ; then those data items... segment _DATA myint dd 1234 mystring db 'This number -> %d <- should be 1234',10,0
This piece of code is the assembly equivalent of the C code
int myint = 1234; printf("This number -> %d <- should be 1234\n", myint);
To get at the contents of C variables, or to declare variables which C
can access, you need only declare the names as
or
.
(Again, the names require leading underscores, as stated in
section 9.1.1.) Thus, a C variable declared as
can be accessed from assembler as
extern _i mov eax,[_i]
And to declare your own integer variable which C programs can access as
, you do this (making sure you are
assembling in the
segment, if necessary):
global _j _j dd 0
To access a C array, you need to know the size of the components of the
array. For example,
variables are four bytes
long, so if a C program declares an array as
, you can access
by coding
. (The byte offset 12 is obtained
by multiplying the desired array index, 3, by the size of the array
element, 4.) The sizes of the C base types in 32-bit compilers are: 1 for
, 2 for
, 4
for
,
and
, and 8 for
. Pointers, being 32-bit addresses, are
also 4 bytes long.
To access a C data structure, you need to know the offset from the base
of the structure to the field you are interested in. You can either do this
by converting the C structure definition into a NASM structure definition
(using
), or by calculating the one offset
and using just that.
To do either of these, you should read your C compiler's manual to find
out how it organizes data structures. NASM gives no special alignment to
structure members in its own
macro, so you
have to specify alignment yourself if the C compiler generates it.
Typically, you might find that a structure like
struct { char c; int i; } foo;
might be eight bytes long rather than five, since the
field would be aligned to a four-byte
boundary. However, this sort of feature is sometimes a configurable option
in the C compiler, either using command-line options or
lines, so you have to find out how your
own compiler does it.
c32.mac
: Helper Macros for the 32-bit C InterfaceIncluded in the NASM archives, in the
directory, is a file
of macros. It
defines three macros:
,
and
. These
are intended to be used for C-style procedure definitions, and they
automate a lot of the work involved in keeping track of the calling
convention.
An example of an assembly function using the macro set is given here:
proc _proc32 %$i arg %$j arg mov eax,[ebp + %$i] mov ebx,[ebp + %$j] add eax,[ebx] endproc
This defines
to be a procedure taking
two arguments, the first (
) an integer and the
second (
) a pointer to an integer. It returns
.
Note that the
macro has an
as the first line of its expansion, and since
the label before the macro call gets prepended to the first line of the
expanded macro, the
works, defining
to be an offset from
. A context-local variable is used, local to
the context pushed by the
macro and popped
by the
macro, so that the same argument
name can be used in later procedures. Of course, you don't have to
do that.
can take an optional parameter, giving the
size of the argument. If no size is given, 4 is assumed, since it is likely
that many function parameters will be of type
or pointers.
replaced the older
object file format under Linux because it
contains support for position-independent code (PIC), which makes writing
shared libraries much easier. NASM supports the
position-independent code features, so you
can write Linux
shared libraries in NASM.
NetBSD, and its close cousins FreeBSD and OpenBSD, take a different
approach by hacking PIC support into the
format. NASM supports this as the
output
format, so you can write BSD shared libraries in NASM too.
The operating system loads a PIC shared library by memory-mapping the library file at an arbitrarily chosen point in the address space of the running process. The contents of the library's code section must therefore not depend on where it is loaded in memory.
Therefore, you cannot get at your variables by writing code like this:
mov eax,[myvar] ; WRONG
Instead, the linker provides an area of memory called the global
offset table, or GOT; the GOT is situated at a constant distance from
your library's code, so if you can find out where your library is loaded
(which is typically done using a
and
combination), you can obtain the address of
the GOT, and you can then load the addresses of your variables out of
linker-generated entries in the GOT.
The data section of a PIC shared library does not have these restrictions: since the data section is writable, it has to be copied into memory anyway rather than just paged in from the library file, so as long as it's being copied it can be relocated too. So you can put ordinary types of relocation in the data section without too much worry (but see section 9.2.4 for a caveat).
Each code module in your shared library should define the GOT as an external symbol:
extern _GLOBAL_OFFSET_TABLE_ ; in ELF extern __GLOBAL_OFFSET_TABLE_ ; in BSD a.out
At the beginning of any function in your shared library which plans to access your data or BSS sections, you must first calculate the address of the GOT. This is typically done by writing the function in this form:
func: push ebp mov ebp,esp push ebx call .get_GOT .get_GOT: pop ebx add ebx,_GLOBAL_OFFSET_TABLE_+$$-.get_GOT wrt ..gotpc ; the function body comes here mov ebx,[ebp-4] mov esp,ebp pop ebp ret
(For BSD, again, the symbol
requires a second leading
underscore.)
The first two lines of this function are simply the standard C prologue
to set up a stack frame, and the last three lines are standard C function
epilogue. The third line, and the fourth to last line, save and restore the
register, because PIC shared libraries use
this register to store the address of the GOT.
The interesting bit is the
instruction
and the following two lines. The
and
combination obtains the address of the label
, without having to know in advance where
the program was loaded (since the
instruction is encoded relative to the current position). The
instruction makes use of one of the special
PIC relocation types: GOTPC relocation. With the
qualifier specified, the symbol
referenced (here
, the
special symbol assigned to the GOT) is given as an offset from the
beginning of the section. (Actually,
encodes
it as the offset from the operand field of the
instruction, but NASM simplifies this
deliberately, so you do things the same way for both
and
.) So the
instruction then adds the beginning of the section, to get the
real address of the GOT, and subtracts the value of
which it knows is in
. Therefore, by the time that instruction has
finished,
contains the address of the GOT.
If you didn't follow that, don't worry: it's never necessary to obtain the address of the GOT by any other means, so you can put those three instructions into a macro and safely ignore them:
%macro get_GOT 0 call %%getgot %%getgot: pop ebx add ebx,_GLOBAL_OFFSET_TABLE_+$$-%%getgot wrt ..gotpc %endmacro
Having got the GOT, you can then use it to obtain the addresses of your
data items. Most variables will reside in the sections you have declared;
they can be accessed using the
special
type. The way this works is like this:
lea eax,[ebx+myvar wrt ..gotoff]
The expression
is
calculated, when the shared library is linked, to be the offset to the
local variable
from the beginning of the
GOT. Therefore, adding it to
as above will
place the real address of
in
.
If you declare variables as
without
specifying a size for them, they are shared between code modules in the
library, but do not get exported from the library to the program that
loaded it. They will still be in your ordinary data and BSS sections, so
you can access them in the same way as local variables, using the above
mechanism.
Note that due to a peculiarity of the way BSD
format handles this relocation type, there
must be at least one non-local symbol in the same section as the address
you're trying to access.
If your library needs to get at an external variable (external to the
library, not just to one of the modules within it), you must use
the
type to get at it. The
type, instead of giving you the offset from
the GOT base to the variable, gives you the offset from the GOT base to a
GOT entry containing the address of the variable. The linker will
set up this GOT entry when it builds the library, and the dynamic linker
will place the correct address in it at load time. So to obtain the address
of an external variable
in
, you would code
mov eax,[ebx+extvar wrt ..got]
This loads the address of
out of an
entry in the GOT. The linker, when it builds the shared library, collects
together every relocation of type
, and
builds the GOT so as to ensure it has every necessary entry present.
Common variables must also be accessed in this way.
If you want to export symbols to the user of the library, you have to declare whether they are functions or data, and if they are data, you have to give the size of the data item. This is because the dynamic linker has to build procedure linkage table entries for any exported functions, and also moves exported data items away from the library's data section in which they were declared.
So to export a function to users of the library, you must use
global func:function ; declare it as a function func: push ebp ; etc.
And to export a data item such as an array, you would have to code
global array:data array.end-array ; give the size too array: resd 128 .end:
Be careful: If you export a variable to the library user, by declaring
it as
and supplying a size, the variable
will end up living in the data section of the main program, rather than in
your library's data section, where you declared it. So you will have to
access your own global variable with the
mechanism rather than
, as if it were
external (which, effectively, it has become).
Equally, if you need to store the address of an exported global in one of your data sections, you can't do it by means of the standard sort of code:
dataptr: dd global_data_item ; WRONG
NASM will interpret this code as an ordinary relocation, in which
is merely an offset from the
beginning of the
section (or whatever); so
this reference will end up pointing at your data section instead of at the
exported global which resides elsewhere.
Instead of the above code, then, you must write
dataptr: dd global_data_item wrt ..sym
which makes use of the special
type
to instruct NASM to search the symbol table
for a particular symbol at that address, rather than just relocating by
section base.
Either method will work for functions: referring to one of your functions by means of
funcptr: dd my_function
will give the user the address of the code you wrote, whereas
funcptr: dd my_function wrt ..sym
will give the address of the procedure linkage table for the function, which is where the calling program will believe the function lives. Either address is a valid way to call the function.
Calling procedures outside your shared library has to be done by means of a procedure linkage table, or PLT. The PLT is placed at a known offset from where the library is loaded, so the library code can make calls to the PLT in a position-independent way. Within the PLT there is code to jump to offsets contained in the GOT, so function calls to other shared libraries or to routines in the main program can be transparently passed off to their real destinations.
To call an external routine, you must use another special PIC relocation
type,
. This is much easier than the
GOT-based ones: you simply replace calls such as
with the PLT-relative version
.
Having written some code modules and assembled them to
files, you then generate your shared library
with a command such as
ld -shared -o library.so module1.o module2.o # for ELF ld -Bshareable -o library.so module1.o module2.o # for BSD
For ELF, if your shared library is going to reside in system directories
such as
or
, it is usually worth using the
flag to the linker, to store the final
library file name, with a version number, into the library:
ld -shared -soname library.so.1 -o library.so.1.2 *.o
You would then copy
into the
library directory, and create
as a
symbolic link to it.


Introduction
Microsoft Azure is huge and changes fast! I’m impressed by the services and capabilities offered in Azure and by how quickly Microsoft releases new services and features. It can be overwhelming. There is so much out there — and the list continues to grow — it is sometimes hard to know which services to use for a given scenario.
I create Azure solutions for my customers, and I have a method that I use to help me pick the right services. This method helps me narrow down the services to choose from and pick the right ones for my solution. It helps me decide how to implement high-level requirements such as “Running my application in Azure” or “Storing data for my application in Azure.”
Of course, these are just examples. There are many other categories to address when I’m architecting an Azure solution.
A look at the process
Let me show you the process that I use for “Running my application in Azure.”
First, I try to answer several high-level questions, which in this case would be:
- 1. How much control do I need?
- 2. Where do I need my app to run?
- 3. What usage model do I need?
- 4. Which funcationality do I need?
Once I’ve answered these questions, I’ve narrowed down the services from which to choose. And then, I look deeper into the services to see which one best matches the requirements of my application, including functionality as well as availability, performance, and costs.
Let’s go through the first part of the process where I answer the high-level questions about the category.
Question 1: How much control do I need?
In considering how much control I need, I try to figure out the degree of control I need over the operating system, load balancers, infrastructure, application scaling, and so on. This decides the category of services that I will be selecting from.
On the control side of the spectrum is infrastructure-as-a-service (IaaS) category, which includes services like Azure Virtual Machines and Azure Container Instances. These give a lot of control over the operating system and the infrastructure that runs your application. But with control comes great responsibility. For instance, if you control the operating system, you are responsible to update it and make sure that it is secure.
Figure 1. How much control do I need?
Further up the stack are services that fall into the platform-as-a-service (PaaS) category, which contains services like Azure App Service Web Apps. In PaaS, you don’t have control over the operating system that your application runs on, nor are you responsible for it.
The next abstraction level is what I will here call logic as a service (LaaS), also known as serverless. This category contains services like Azure Functions and Azure Logic Apps. Here, Azure takes care of the underlying infrastructure for you, including scaling your app. Logic as a service gives little control over the infrastructure that your application runs on, which means that you are only responsible for creating the application itself and configuring its application settings, like connection strings to databases.
The highest level of abstraction is software as a service (SaaS), which offers the least amount of control and the most amount of time that you can focus on working on business value. An example of Azure SaaS is Azure Cognitive Services, which are APIs that you just call from your application. Somebody else owns their application code and infrastructure; you just consume them.
Once I know how much control I need, I can pick the category of services in Azure and narrow down my choice.
Question 2: Where do I need my app to run?
The second question stemming from “Running my application in Azure” is: Where do I need my application to run?
Figure 2. Where do I need my app to run?
You might think that the answer would be: I need to run my application in Azure. But the answer may not be that simple. For example, maybe I do want parts of my application to run in the Azure public cloud but I want to run other parts in Azure Government or the Azure China cloud or even on-premises using Azure Stack.
Or it could be that I want to be able run my application in Azure and on-premises (if rules and regulations change), on my local development computer, or even in public clouds from other vendors.
This question boils down to how vendor-agnostic I’d like to be and where to store my data.
Once I’ve answered this question, I can narrow down the choice of Azure services even further.
Question 3: What usage model do I need?
How my app will be used guides me to the answer to the third and final question: what usage model do I need?
Figure 3. What usage model do I need?
Some applications are in use all the time, like a website. If that is the case for my application, I need to look for services that run on what I call the classic model. This means that they are always running and that you pay for them all month.
Other applications are only in use occasionally, like a background job that runs once every hour, or an API that handles order cancellations (called a few times a day). If my application runs occasionally, I need to select a service from the logic-as-a-service (or serverless) category. These services only run when you need them, and you only pay for them when they run.
After I’ve answered the high-level questions for this category, I can narrow down the services that I can choose from to just a couple or even one.
Question 4: Which functionality do I need?
In this step: We match service functionality to my application requirements
Now, I need to figure out which service fulfills the most requirements for my application. I do so by looking at the functionality that I need, the availability that the service offers in its service level agreement, the performance that it provides, and what it costs.
Finally, this leads me to the service that I want to use to run my application. Often, I use multiple services to run my application, because it consists of many pieces, like a user interface and APIs. So, it might turn out that I run my web application in an Azure App Service Web App and my APIs in Azure Functions.
Example :
So, let’s just try this out.I have an app, and I trust Azure to scale for me.I don’t want to do that myself, My app needs to run in Azure and on-premises as well.As my app only needs to run once every hour, so not all the time.
My Need to run App.
- I trust Azure to scale for me
- My app needs to run in Azure and on-premises as well
- My app only needs to run once every hour
So let’s see.
Figure:Option for running Apps on Azure
So, for example, I’m thinking,well, I could just put it into VM,it could be fine, but then I’m paying 24/7 all the time.
But My app need are it doesn’t have to be always on.
I have to remote it to desktop,I have to access or SSH into it and upgrade it.I have to maintain the security.
But My app need are Azure to Scale it.
So, probably not a VM.
Exacty, So, services in the category into infrastructure as a service category,those are not the services that I want in this case.
Also services in the platform as a service category those also need scaling instructions, let’s say.Azure doesn’t do that automatically for me.Yes I can obviously have automatic scaling in a web app,but still I need to think about that and I need to configure it myself.And I don’t want that for this app.
And even I could do Kubernetes and have that scale, but it will be running all the time.
So, I end up in the last category and that is I call it logic Azure service or serverless,and that could be functions or logic apps for instance. So that’s one category that we’ve drilled down to.
So, that ends up in me being able to work a lot on the business value,and not so much having to worry about the plumbing and infrastructure of a VM for instance.
So, the next thing is,I want to Stay Vendor Agnostic. That’s what I said because it needs to run in Azure but also on premises.
So, I don’t want to opt in for Azure completely.it needs to run anywhere.In that case, I can choose from these services
including Azure functions because,Azure functions run on the Azure functions run-time.I can run that anywhere basically.
I can take Azure functions as a docker container that I can build from and I could put that on anywhere, on a container locally On-premise Or on my own laptop.Wherever. So, that’s still an options in this case.
Then the next one is I only want to run it occasionally.So not all the time.That’s the serverless,those are Azure Batch,Logic apps and Azure functions.
So, I’m kind of drilling down to Azure functions in this case.For this particular app needs.
Then I will compare all the features of the Azure services to the requirements that I have.I’m not going to drill down into that right now,but I just wanted to show you that I do that in different tables like these.
And I don’t just build a big table,where I just put in all of the Azure services,but just tables that compare one category to another.
For instance, these are all the services for container options and VMs,
Below are the comparision Chart for quick reference
and these are all the services for background tasks, will be the one that I need.
And these are all the services for running your application in Azure.
So, that’s my process for choosing how to run an application in Azure.And now the next part is,how do I store my data in Azure?
Storing Data in Azure
The process that I use for “Storing Data in Azure.”
How do I do that? Again the same thing.I have a couple of big picture questions that asks to narrow down to services.
- What will I use the data for?
- What type of data am I going to store?
- Which functionality do I need?
Once I’ve answered these questions, I’ve narrowed down the services from which to choose. And then, I look deeper into the services to see which one best matches the requirements of my application, including functionality as well as availability, performance, and costs.
Question 1: What will I use the data for?
So, what will I use the data for? Is it for my application?
So actually for my application,where I have a data stored on my website for instance that stores customer records or something,that’s also called Online Transactional Processing.
The other usage that you can imagine is for data analytics, we do reporting.And that’s called Online Analytical Processing.
So that’s the first divide that we do.
Question 2: What type of data am I going to store?
There are lots of data types.One is Relational Data,another one is Unstructured Data.There are semi-structure data and all that stuff but we’re just going to stick to these for clarity and simplicity.
In unstructured Data you have different types: Document Data,key Value Data, and Graph Data as well.
And then we’re going to try it out,Here is my application data need
-
My app is an online reservation system.
-
My app needs to store and retrieve document data.
So that last sentence actually says it all.
For this example, we’re going to focus on the store and retrieve document data in the application.
So, this is again an example of all of the services that are out there right now in Azure for storing data.
These are things like Azure Sequel Database,Azure storage but also Azure sequel data warehouse.
So the first thing that we’re going to do,is divide this into two categories of data usage.
So Online Transactional Processing, so the data storage that I actually use for my application, and Online Analytical Processing data storage that I use for reporting.
So, in our case, it falls into the first category,because I want to store and retrieve data for my online reservation system that is online constantly.
And then the second one is, what type of data?
So again, these services are relational data,
and these services I can store unstructured or document data and all the other sub types of that.
and then these services as a Sequel data warehouse and data lakes store. I can do data analytics,so I can store big chunks of data and use things like Power BI or Hadoop Clusters actually crunched that data.
And then after that, I would go into these tables,just like I did for the running the applications,and to see if the requirements match the functionality of the services.
And again, I compare services in different categories like for OLAP and OLTP in this case.
So that’s my process basically.
So, these were just a couple of services in the Azure space, just for running your application and for storing data.
Obviously, there are lot of more services out there for securing your application and for doing IoT and all that stuff.


new Teeth(log, sensor, buzzer, screen, mailer, metrics)
Creates a new Teeth object to manage the countdown timer
Parameters:
| Name | Type | Description |
|---|---|---|
log |
Logger | object for logging output |
sensor |
Sensors | object for listening to hardware sensors |
buzzer |
Buzzer | object for controlling the sounds |
screen |
Screen | object for display on the RGB LCD screen |
mailer |
Mailer | object for sending email |
metrics |
Metrics | object for sending data to cloud |


Buttons are coded with standard HTML anchor and input elements, then enhanced by jQuery Mobile to make them more attractive and useable on a mobile device. Use anchor links (a
elements) to mark up navigation buttons, and input
or button
elements for form submission.
View the data- attribute reference to see all the possible attributes for buttons including adding icons or displaying them inline or grouped.
In the main content block of a page, you can style any anchor link as a button by adding the data-role="button"
attribute. The framework will enhance the link with markup and classes to style the link as a button. For example, this markup:
Link button
Produces this link-based button:
Link buttonNote: Links styled like buttons have all the same visual options as true form-based buttons below, but there are a few important differences. Link-based buttons aren't part of the button
plugin and only just use the underlying buttonMarkup
plugin to generate the button styles so the form button methods (enable, disable, refresh) aren't supported. If you need to disable a link-based button (or any element), it's possible to apply the disabled class ui-disabled yourself with JavaScript to achieve the same effect.
For a more compact version that is useful in toolbars and tight spaces, add the data-mini="true"
attribute to the button to create a mini version.
Link button
This will produce a search input that a not as tall as the standard version and has a smaller text size.
Link buttonFor ease of styling, the framework automatically converts any button
or input
element with a type
of submit
, reset
, button
, or image
into a custom styled button — there is no need to add the data-role="button"
attribute. However, if needed, you can directly call the button plugin on any selector, just like any jQuery plugin:
$('[type='submit']').button();
To preserve events bound to the original button
or input
, the framework hides the original element by making it transparent and positioning it over the new button markup. When a user clicks on the the custom-styled button, they're actually clicking on the original element. To prevent a form button from being converted into an enhanced button, add the data-role="none"
attribute and hte native control will be rendered.
Button based button:
Input type="button" based button:
Input type="submit" based button:
Input type="reset" based button:
Input type="image" based button: