RateLimiter
Extends:
Direct Subclass:
Indirect Subclass:
Constructor Summary
| Public Constructor | ||
| public |
constructor(options: *) |
Member Summary
| Public Members | ||
| public set |
permitsPerSecond(permitsPerSecond: Number): * Updates the stable rate of this {@code RateLimiter}, that is, the {@code permitsPerSecond} argument provided in the factory method that constructed the {@code RateLimiter}. |
|
| public get |
|
|
| public get |
|
|
| public get |
|
Method Summary
| Public Methods | ||
| public |
Acquires a single permit from this {@code RateLimiter}. |
since 16.0 (present in 13.0 with {@code void} return type}) |
| public |
queryEarliestAvailable(nowMicros: Number): * Returns the earliest time that permits are available (with one caveat). |
|
| public |
Reserves the given number of permits from this {@code RateLimiter} for future use, returning the number of microseconds until the reservation can be consumed. |
|
| public |
reserveEarliestAvailable(permits: Number, nowMicros: Number): Number Reserves the requested number of permits and returns the time that those permits can be used (with one caveat). |
|
| public |
tryAcquire(permits: Number, timeout: Number, unit: TimeUnit): Promise Acquires the given number of permits from this {@code RateLimiter} if it can be obtained without exceeding the specified {@code timeout}, or returns {@code false} immediately (without waiting) if the permits would not have been granted before the timeout expired. |
Inherited Summary
| From class CoreObject | ||
| public static |
equals(foreignClass: *): * |
|
| public static |
Determines if a class definition is a subclass of CoreObject |
|
| public static |
isInstance(obj: * | CoreObject): boolean |
|
| public static |
isInstanceOrClass(obj: *): boolean |
|
| public static |
shouldBeClassOrInstance(instanceOrClass: CoreObject | Class | *, message: String): * |
|
| public static |
shouldBeInstance(obj: * | CoreObject, message: String): * | CoreObject |
|
| public static |
toClass(): Class<CoreObject> |
|
| public static |
|
|
| public get |
logger: winston.Logger | Logger: * |
|
| public |
|
|
| public |
set(key: string, value: *): CoreObject | * |
|
| public |
toClass(): Class<CoreObject> |
|
| public |
toJson(options: *): * |
|
| public |
|
Public Constructors
public constructor(options: *) source
Override:
CoreObject#constructorParams:
| Name | Type | Attribute | Description |
| options | * |
Public Members
public set permitsPerSecond(permitsPerSecond: Number): * source
Updates the stable rate of this {@code RateLimiter}, that is, the {@code permitsPerSecond} argument provided in the factory method that constructed the {@code RateLimiter}. Currently throttled threads will not be awakened as a result of this invocation, thus they do not observe the new rate; only subsequent requests will.
Note though that, since each request repays (by waiting, if necessary) the cost of the previous request, this means that the very next request after an invocation to {@code setRate} will not be affected by the new rate; it will pay the cost of the previous request, which is in terms of the previous rate.
The behavior of the {@code RateLimiter} is not modified in any other way, e.g. if the {@code RateLimiter} was configured with a warmup period of 20 seconds, it still has a warmup period of 20 seconds after this method invocation.
Throw:
* |
IllegalArgumentException if {@code permitsPerSecond} is negative or zero |
Public Methods
public acquire(permits: Number, timeout: Number, timeUnit: TimeUnit): Promise since 16.0 (present in 13.0 with {@code void} return type}) source
Acquires a single permit from this {@code RateLimiter}. Returns a Promise that will resolve or reject. The default maximum time to wait is 30 seconds.
This method is equivalent to {@code acquire(1)}.
public queryEarliestAvailable(nowMicros: Number): * source
Returns the earliest time that permits are available (with one caveat).
Params:
| Name | Type | Attribute | Description |
| nowMicros | Number |
Return:
| * | the time that permits are available, or, if permits are available immediately, an arbitrary past or present time |
public reserve(permits: Number): Number source
Reserves the given number of permits from this {@code RateLimiter} for future use, returning the number of microseconds until the reservation can be consumed.
Params:
| Name | Type | Attribute | Description |
| permits | Number |
|
public reserveEarliestAvailable(permits: Number, nowMicros: Number): Number source
Reserves the requested number of permits and returns the time that those permits can be used (with one caveat).
Return:
| Number | the time that the permits may be used, or, if the permits may be used immediately, an arbitrary past or present time |
public tryAcquire(permits: Number, timeout: Number, unit: TimeUnit): Promise source
Acquires the given number of permits from this {@code RateLimiter} if it can be obtained without exceeding the specified {@code timeout}, or returns {@code false} immediately (without waiting) if the permits would not have been granted before the timeout expired.
Throw:
* |
IllegalArgumentException if the requested number of permits is negative or zero |


McBurnie rescues point for brilliant Blades after crazy Man Utd comeback
Oli McBurnie’s 90th minute strike salvaged a point for Sheffield United after Manchester United had come from two down to lead 3-2.
David De Gea was drawn into a magnificent double save after ten minutes, first stretching full-length to deny a magnificent John Lundstrum volley, before parrying a close range header from David McGoldrick from the cross that followed.
John Fleck gave the Blades a deserved lead in the 19th minute as Lys Mousset easily outmuscled Phil Jones – handed his first Premier League start of the season – on the byline before crossing for John Lundstrum, whose shot was blocked before Fleck followed up to bundle home.
United created nothing in a first half totally dominated by the home team, who looked incredibly comfortable.
And Lys Mousset doubled Sheffield United’s lead shortly after half-time, firing brilliantly beyond a helpless De Gea, having been expertly played through by John Fleck, who picked up an assist to add to his earlier goal.
Brandon Williams gave the visitors hope with 20 minutes remaining after his fine half-volleyed strike nestled into the far corner.
Mason Greenwood – a second half substitute – then levelled the scores minutes later as he got on the end of a superb cross from Marcus Rashford.
It was Rashford who then completed an incredible turnaround for United as he converted Daniel James’ cross to give the visitors a 3-2 lead.
But it was Sheffield United who had the last laugh, as Oli McBurnie controlled and smashed home to earn the Blades a well deserved draw at Bramall Lane.


Frauke Paetsch, Armin Eberlein, Frank Maurer
An early survey of requirements engineering approaches and agile software approaches, contrasting the two.


|
Chatbot
|
This class represents our knowledge base. More...
#include <KB.h>
Public Member Functions | |
| void | tell (KB kb, vector< Sentence > s) |
| This function adds a new rule to the knowledge base. More... | |
| vector< Sentence > | ask (KB kb, vector< Sentence > s) |
| This function queries the knowledge base and presents the best course of action for the agent to undertake. More... | |
| bool | entails (KB kb, vector< Sentence > s) |
| This function checks if a new rule/sentence is logical accordance with the existant rules. More... | |
| void | forwardChain (KB kb, vector< Sentence > s) |
| This function is responsible for deducing new sentences/rules from already existing ones by using the forward chain algorithm. More... | |
| bool | backwardChain (KB kb, vector< Sentence > query) |
| This function is used in itself by the query mechanism in order to infer whether a certain course of action is valid of production following the rules. More... | |
| vector< Sentence > | train (vector< vector< Sentence >> examples) |
| This function is used to train the agent (by altering the knowledge base) based on different given hypothesis. More... | |
| int | nbRules (KB kb) |
| Calculates the number of rules in a knowledge base. More... | |
| int | nbFacts (KB kn) |
| Calculates the number of facts present in a knowledge base. More... | |
Private Attributes | |
| vector< Sentence > | facts |
| KBAnalyser | analyser |
| CNF | cnfclause |
| vector< Rule > | rules |
This class represents our knowledge base.
The knowledge base holds all the logical sentences and facts which can later be used to infer new facts, ask the database and train the aforementioned.
This function queries the knowledge base and presents the best course of action for the agent to undertake.
| kb | The knowledge base. |
| s | A question in the form of a logical sentence. |
This function is used in itself by the query mechanism in order to infer whether a certain course of action is valid of production following the rules.
| kb | The knowledge base |
| query | A question in the form of a logical sentence |
This function checks if a new rule/sentence is logical accordance with the existant rules.
| kb | The knowledge base. |
| s | A logical sentence. |
This function is responsible for deducing new sentences/rules from already existing ones by using the forward chain algorithm.
| kb | The knowledge base. |
| s | A logical sentence. |
| int KB::nbFacts | ( | KB | kn | ) |
Calculates the number of facts present in a knowledge base.
| kn | The knowledge base. |
| int KB::nbRules | ( | KB | kb | ) |
Calculates the number of rules in a knowledge base.
| kb | The knowledge base. |
This function adds a new rule to the knowledge base.
| kb | The knowledge base. |
| s | A rule in the form of a logical sentence. |
This function is used to train the agent (by altering the knowledge base) based on different given hypothesis.
| examples | A set of hypothesis. |
|
private |
The First Order Logic analyser used by the knowledge base.
|
private |
A collection of facts expressed in their conjunctive normal form.
|
private |
A collection of the facts contained in the knowledge base.
|
private |
A collection of rules used by the inference engine


On their sofas of spice and feathers, the concubines also slept fretfully. In those days the Earth was still flat, and people dreamed often of falling over edges.
Buy NowWorrying is like a rocking chair, it gives you something to do, but it gets you nowhere.
Buy NowA good laugh and a long sleep are the two best cures for anything. You miss 100% of the naps you don't take. I love sleep because it's like a time machine to breakfast.
Buy NowA typical song structure includes a verse, chorus, and bridge in the following arrangement: intro, verse — chorus — verse — chorus —bridge — chorus — outro. This is known as an ABABCB structure, where A is the verse, B is the chorus and C is the bridge.
A paragraph is a group of words put together to form a group that is usually longer than a sentence. Paragraphs are often made up of several sentences. There are usually between three and eight sentences. ... This topic sentence of the paragraph tells the reader what the paragraph will be about.


% if (_.size(reports) > 0) { %> <% _.each(reports, function(report) { %> <%= view.component("report", { "report": report }) %> <% }); %> <% } else { %>
Start tracking events to add reports to this dashboard.
Install the Google Chrome extension to track your web navigation or use the API to track personnalized events.


July, 2017 - May, 2022
Currently pursuing Integrated Masters of Technology in Computer Science [5 years course], at University of Hyderabad.
October, 2020 - March, 2021
June, 2020 - August, 2020
January, 2020 - October, 2020
December, 2019
1st July - 31st August, 2019
October 2019
June 2018
January 2018
Interested in Hiring me for your project? Drop me an email with the Project Requirements :)


Gatsby and Sanity.io
June 15th 2021 by Alex Bartley Nees
I recently finished making a website for my brother’s new art gallery in Wellington. A major requirement for the website was that he needed to be able to update everything himself without touching the code or asking me for help. This was because he would have a new art exhibition each month and needed to be easily able to add it to the website. I had never made a website with this functionality before, but I felt up to the challenge.
After doing some research online, I decided to use Sanity Studio as a headless CMS to update the content on the website. A headless CMS is a back-end only content management system. A headless CMS was ideal because I could use it with my front-end of choice, in this case, Gatsby, a static site generator based on React. Getting started with Sanity was easy because they provide a command-line interface tool that makes it easy to start and deploy a project. A great thing about Sanity is that everything is easily customisable because it is built on React. All the content in Sanity is defined by “schemas” which are javascript objects and arrays. In this case, I set up the schemas to add new exhibitions with as many artists and artworks as my brother needed. I simply used a boolean to define whether the exhibition was either the current or upcoming exhibition, or if it should be placed in the archive. Once the schema is set up you simply need to type “sanity deploy” in the terminal and follow the instructions to deploy it to the web.
Example of Sanity Studio schema
Example exhibition in Sanity Studio
With Sanity Studio and the schemas set up, I next set about getting the data into Gatsby and displaying it on the page. Gatsby is a static site generator built on React. It’s static because you can run a build command and it fetches all the data and outputs a bunch of HTML, CSS and Javascript files but because it is based on React it can also have lots of dynamic functionality. I went with Gatsby for this site because the website was mainly static, with a new exhibition only being added once a month and Gatsby has the speed of React and single-page web apps while having the advantages of search engine optimisation. With React, it can be harder to optimise for search engines because all of the javascript has to be run on the client-side before the search engine can know what is on the page. Gatsby is server-side rendered which makes the content immediately available to search engine crawlers. This made it a great choice for this website.
Gatsby uses GraphQL to access data. GraphQL uses queries to get the particular data you need. The first step was to run “sanity deploy graphQL” to make the schema available to GraphQl to query. The next step was to write the queries to access the data from the Sanity Studio. In Gatsby, you can have one query per component. Gatsby makes it really easy to write queries by having a tool called “GraphiQL” which lets you see the structure of your data in your browser and easily run queries which you can then copy into Gatsby.
Query in Gatsby
Once GraphQL gets the data into Gatsby, it was simply a matter of using javascript object and array methods to display the data on the page! See the end result here! → Envy 6011


insert
append
solid
no fill
remove
don't remove
listener on svg
listener on rect
pointer-events AUTO; on circles
pointer-events: NONE; on circles
pointer-events NONE; on rect
pointer-events: ALL; on rect


JUST CABS
ride with freedom
Bill TO
Name : users details
Address : users pickup location
Email : user phone number
Phone : user phone number
INVOICE
Cost breakdown
Price
1.Distance charge
$100
2.Cab rent
$50
3.service charge
$50
SUBTOTAL:
GST:
TOTAL:
Thank you very much, we really appreciate your buissness.


Introduction to CSS:
As always you use your HTML file to arrange the content, but all of the presentation (fonts, colors, background, borders, text formatting, link effects & so on…) are accomplished within CSS (Cascading Style Sheet) which allows you to separate your web sites HTML content from it's style.
There's a few different ways to add CSS. You can call an external stylesheet
<link href="http://fonts.googleapis.com/css?family=Actor:regular" rel="stylesheet" type="text/css">

or as a style attribute for html elements.

hello world

Selecting elements:
Most elements in CSS can be styled from their...
<tag> name
div {
color: green;
}
.class name
div.im_a_classname {
color: green;
}
#ID
div#im_a_id {
color: green;
}
attribute name a[title]
input[type=text] {
color: green;
}
attribute value
a[href="http://mmd.sourceforge.net/"]
and by using pseudo selectors
input[type=text]:focus.
Here are some examples of pseudo selectors
a:link, a:visited, div:hover, div:active {
color: green;
}
Notice I separated each selector with a comma to target another selector. This is how you would apply the same style to multiple elements.
a:link
This selector styles anchors that have not been clicked yet.
a:visited
This selector styles anchors that have already been clicked, hence "visited".
:hover
This selector styles an element when hovered over.
:active
This selector styles an element when it's activated (being clicked on or otherwise activated).
:nth-child(2)
This selector styles an the secend element of it's selector.
input[type=text]:not(.numbers)
This is a
negation selector. This selector will style all your input text elements, but will not style one with the class numbers.
*
This is a universal selector which matches any element.
div img
Here's how you would style direct descendants of an element.
ul > li
We're using the > selector in this case to style the children of an unordered list (the ul element)
If you're looking for a more advanced tutorial please checkout this article on The 30 CSS Selectors you Must Memorize.
If you're looking for an online playground for testing and sharing HTML, CSS and JavaScript code snippets you may want to checkout Codepen.


Scope
Namespace: FSharp.Compiler.SourceCodeServices
Parent Module: Structure
Attributes:
[<RequireQualifiedAccess>]
Tag to identify the construct that can be stored alongside its associated ranges
Union Cases
| Union Case | Description |
ArrayOrList
Signature:
|
|
Attribute
Signature:
|
|
Comment
Signature:
|
|
CompExpr
Signature:
|
|
CompExprInternal
Signature:
|
|
Do
Signature:
|
|
ElseInIfThenElse
Signature:
|
|
EnumCase
Signature:
|
|
FinallyInTryFinally
Signature:
|
|
For
Signature:
|
|
HashDirective
Signature:
|
|
IfThenElse
Signature:
|
|
Interface
Signature:
|
|
Lambda
Signature:
|
|
LetOrUse
Signature:
|
|
LetOrUseBang
Signature:
|
|
Match
Signature:
|
|
MatchBang
Signature:
|
|
MatchClause
Signature:
|
|
MatchLambda
Signature:
|
|
Member
Signature:
|
|
Module
Signature:
|
|
Namespace
Signature:
|
|
New
Signature:
|
|
ObjExpr
Signature:
|
|
Open
Signature:
|
|
Quote
Signature:
|
|
Record
Signature:
|
|
RecordDefn
Signature:
|
|
RecordField
Signature:
|
|
SpecialFunc
Signature:
|
|
ThenInIfThenElse
Signature:
|
|
TryFinally
Signature:
|
|
TryInTryFinally
Signature:
|
|
TryInTryWith
Signature:
|
|
TryWith
Signature:
|
|
Tuple
Signature:
|
|
Type
Signature:
|
|
TypeExtension
Signature:
|
|
UnionCase
Signature:
|
|
UnionDefn
Signature:
|
|
Val
Signature:
|
|
While
Signature:
|
|
WithInTryWith
Signature:
|
|
XmlDocComment
Signature:
|
|
YieldOrReturn
Signature:
|
|
YieldOrReturnBang
Signature:
|


{title:'juneau-rest-client', updated:'8.2.0', flags:'todo'}
juneau-rest-client-{@property juneauVersion}.jar
org.apache.juneau.rest.client_{@property juneauVersion}.jar
Built upon the feature-rich Apache HttpClient library, the Juneau RestClient API adds support for fluent-style REST calls and the ability to perform marshalling of POJOs to and from HTTP parts.
Breaking apart the fluent call, we can see the classes being used:
RestClient.Builder
It additionally provides support for creating remote proxy interfaces using REST as the transport medium.
The classes are closely tied to Apache HttpClient, yet provide lots of additional functionality:
Instances of this class are built using the {@del oajr.client2.RestClient.Builder} class which can be constructed using the {@del oajr.client2.RestClient#create() RestClient.create()} method as shown above.
Clients are typically created with a root URI so that relative URIs can be used when making requests. This is done using the {@del oajr.client2.RestClient.Builder#rootUri(Object)} method.
The {@del oajr.client2.RestClient} class creates {@del oajr.client2.RestRequest} objects using the following methods:
The {@del oajr.client2.RestRequest} class creates {@del oajr.client2.RestResponse} objects using the following methods:
The distinction between the two methods is that {@del oajr.client2.RestRequest#complete() complete()} automatically consumes the response body and {@del oajr.client2.RestRequest#run() run()} does not. Note that you must consume response bodies in order for HTTP connections to be freed up for reuse! The {@link java.io.InputStream InputStreams} returned by the {@del oajr.client2.RestResponseBody} object are auto-closing once they are exhausted, so it is often not necessary to explicitly close them.
The following examples show the distinction between the two calls:


The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.


We wish to thank our benefactors for their generous support
Dr Kevin Arlett
Carol Dall’Osto
Ray Gartrell
Bruce Gibson and Dorothy Gibson-Wilde O.A.M.
Dr Kerry Gillespie
Peter Honeycombe
Judy Hunter O.A.M.
Ewen Jones MP
David and Janine Kippin
Simon and Lorraine McConnell
Senator Ian McDonald
Janice Mayes
Terry O’Toole
Bronia and Neil Renison
Andrew Ryder
Nita Vasilescu
Desley Wheeler
Graham Wheeler
The North Queensland Ensembles Inc is a tax deductible fund listed on the Register of
Cultural Organisations under Subdivision 30-B of the Income tax Assessment Act 1997.
Donations of $2.00 or more are tax deductible.
Help us continue to provide quality entertainment for the Townsville community by supporting
the orchestra.
With a philanthropic gift of $200 or more (we leave that up to you) you can become an Orchestra
Benefactor and be placed on our Benefactor roll for twelve months. This roll will be published in
each concert program and on our website for twelve months. As a benefactor you will also receive two
complimentary tickets to our next concert, be placed on the mailing list for our newsletter and will
be a guest at our annual Season’s Launch function.
Donations are tax deductible.
For more information contact Simon McConnell 0418 776961<EMAIL_ADDRESS>Please complete the details below and press Submit, or download the form to complete manually.
Cheques are to be made payable to North Queensland Ensembles Inc. Direct Debit to
BSB 034-222 Account No. 173922.
OR


---
layout: post
title: CFML on a stick
tags: []
status: publish
type: post
published: true
meta: {}
---
In the last couple of posts I made passing references to using a USB Flash drive for development. My dad just got back from a trip to the US and brought me back a little present: a 1 Gig usb drive. It is absolutely awesome, as soon as I got home I loaded Eclipse onto it and fired it up and it just worked (no surprises there as quite a few others had already achieved that feat). Next I put my current development files on there and I just pointed Eclipse to the new work space and after a restart - mobile development here we come!!
Then I wanted to see how far I could take this: so I downloaded XAMPP (XAMPP is based on the popular LAMP [Linux, Apache, Mysql and PHP] and includes a bunch of other tools) and extracted the contents of the package to my USB drive. Switching to the command prompt I navigated to XAMPP folder and started Apache using the included apache_start.bat file, opened a browser and went to http://localhost/ and there you go Apache and PHP working of the USB key (note: make sure you don't have any other Apache instances running).
But could I get CFMX or BlueDragon to run off of this configuration as well?
First off I selected Resin as my application server and proceeded to set up resin to talk to Apache. I ran the setup.exe file and specified the path to my Apache folder, i.e. E:\xampp\apache and restarted Apache. But that failed, for some reason resin assumed that I was running apache-1.3.x so I edited Apache's httpd.conf file to this:
[code]LoadModule caucho_module "E:/resin-3.0.12/win32/apache-2.0/mod_caucho.dll"
#AddModule mod_caucho.c
...
ResinConfigServer localhost 6802
CauchoStatus yes
AddHandler caucho-request jsp
[/code]
Once done I restarted Apache and it started up no problem. Now to test the connection between Apache and resin, simply locate resin.conf (in my case I found it at E:\resin-3.0.12\conf\) and right at the end you should see an entry like the following one:
[code]
[/code]
Change it to this, which tells resin to use Apache's default document directory.
[code]
[/code]
All this information can be found here, including steps to test your set up by creating a test.jsp file. Then I started resin using (where "E" is the drive letter of my usb drive):
[code]E:\resin-3.0.12\httpd[/code]
And browsed as per the instructions to http://localhost/test.jsp and it worked just like that.
Since I was on a roll, I decided to try out BlueDragon, so I downloaded the J2EE version and extracted the files and copied the BlueDragon62.war file to E:\resin-3.0.12\webapps and restarted resin so that BlueDragon could be deployed. A little bit of patience is required here as it starting the Application server can take a wee while (this becomes the norm regardless of whether BlueDragon has been deployed, obviously this is a limitation of running it off the USB stick). Here is that output from the server start up:
[code]E:\resin-3.0.12>httpd
Resin-3.0.12 (built Wed, 23 Feb 2005 10:29:38 PST)
Copyright(c) 1998-2004 Caucho Technology. All rights reserved.
Using Resin(R) Open Source under the GNU Public License (GPL).
See http://www.caucho.com for information on Resin Professional,
including caching, clustering, JNI acceleration, and OpenSSL integration.
Starting Resin on Wed, 13 Apr 2005 14:57:38 +0100 (BST)
[14:57:54.562] http listening to *:8080
[14:57:54.562] ServletServer[] starting
[14:57:57.625] Host[] starting
[14:58:17.484] In-place class redefinition (HotSwap) is not available. In-place
class reloading during development requires a compatible JDK and -Xdebug.
[14:58:24.343] Application[http://localhost:8080/BlueDragon62] starting
[14:58:44.921] cfmServlet: init
[15:02:06.984] cfcServlet: init
[15:06:42.312] Application[http://localhost:8080/resin-doc] starting
[15:06:51.562] Application[http://localhost:8080] starting
[15:06:56.125] hmux listening to <IP_ADDRESS>:6802[/code]
You know that everything is running once you see hmux listening to <IP_ADDRESS>:6802. You can now test your deployment by browsing to: http://localhost/BlueDragon62/, which should display the BlueDragon CFML test page. If you want to locate the admin section of BD browse here: http://localhost/BlueDragon62/bluedragon/admin/index.cfm


|
This section explains how to get started with Pebble moblog.
Minimum Requirements
- J2ME MIDP 1.0 compatible device
Installation
Copy the pebble-moblog.jar file from the pebble-moblog directory of the distribution to your device. Typically, this is done using a serial cable, infrared or Bluetooth.
On receiving the JAR file, and depending on your device, moblog will be installed automatically.
|


Contents
I Created This Website With Z and F Layouts And I have Hosted The Webpage on Azure and The Link is available on GITHUB.


Does Mint or Metro make better use of the T-Mobile network?
More data
Metro by T-Mobile
Bulk savings
Mint Mobile
Metro by T-Mobile is a great option for someone that needs a lot of data. If you find yourself using more than 12GB of data and are unwilling to change your habits, Metro is the only option. Discounts for bringing more lines help narrow the price gap as well.
From $30/mo. at Metro by T-Mobile
Pros
- Larger data packages
- No overage charge
- Multi-line discount
- Unlimited talk and text
Cons
- Phones only sold in store
- More expensive
- No international roaming
Mint Mobile is a great value for many people. Most people will find the data packages to be more than enough. Buying in bulk can also be convenient if you want to get service for a family member or child without adding them to your plan.
Pros
- Save in bulk
- Free calls to Mexico and Canada
- No overage charge
- Unlimited talk and text
- international roaming options
Cons
- No larger data packages
- No multi-line discounts
- No stores for support
- Minimum of three months
Both networks run on the same T-Mobile network so you can expect very similar levels of performance so it really comes down to price and features. For only one line, Mint Mobile is undoubtedly cheaper. However, the key features that keep Metro by T-Mobile out front are the savings for multiple lines, that you don't have to buy in bulk, and that on the 10GB plan, music streaming doesn't use your data.
Buying in bulk saves money
There really is no getting around how much money you can save with Mint if you are willing to buy six or more months ahead. If you only need service on one line, Mint stays ahead, although Metro by T-Mobile makes a comeback with its discounts for multiple lines. You also get the peace of mind that comes with not worrying about how much data you're using on music streaming. Your data is less likely to slow down at the end of the month, which is important to a heavy user.
| Metro by T-Mobile | Mint Mobile | |
|---|---|---|
| Network | T-Mobile | T-Mobile |
| Minimum period | 1 months | 3 month |
| Maximum period | 1 months | 12 months |
| International service | calling: addon roaming: none |
calling: addon roaming: addon |
| Smallest plan | 2GB | 3GB |
| Largest plan | unlimited | 12GB |
The main differences really come down to how much data you need and your term of service. For most people, Mint Mobile's 3GB, 8GB, and 12GB packages will provide plenty of data, but if you're a heavy user that streams a lot on the go, bumping up to Metro's 10GB or unlimited plans will be worth the money.
Mint's plans
Since you buy Mint Mobile service at three or more months at a time, your cost will be higher right at first. Even so, the cost per month will be lower than most other cell providers. The more time you are willing to buy at a once, the more you stand to save. Just be sure to take advantage of the seven-day money back guarantee in case you find that Mint Mobile doesn't meet your needs.
| Duration | Small (3GB) | Medium (8GB) | Large (12GB) |
|---|---|---|---|
| 3 months | $15/mo. ($45 total) | $20/mo.($60 total) | $25/mo. ($65 total) |
| 6 months | $18/mo. ($108 total) | $24/mo.($144 total) | $35/mo. ($210 total) |
| 12 months | $15/mo. ($180 total) | $20/mo. ($240 total) | $25/mo. ($300 total) |
You can add more high-speed data at a rate of $10 for 1GB or $20 for 3GB if you need run out. You can also upgrade to the next plan up if you feel you'll need more every month in the middle of your billing cycle.
Metro by T-Mobile's plans
Metro's plans are more traditional in design. You can save money by adding more lines to your account where each additional line costs less than the previous up to five lines. The 2GB plan is the most bare bones and doesn't offer any extras like hotspot. You also can't add international calling features. Most smartphone users will want to step up to a plan with a larger data package.
Both of the unlimited plans get you a ton of data on your phone but the addition of Amazon Prime alongside 10GB of additional hotspot data on the $60 plan can make it a better deal for people with another device such as a tablet. If you already have Amazon Prime, the difference in cost pays for itself easily.
| High-speed data | 2GB | 10GB | Unlimited | Unlimited |
|---|---|---|---|---|
| Line 1 | $30/mo. | $40/mo. | $50/mo. | $60/mo. |
| Lines 2-5 | NA | $70, $100, $130, $160 | $80, $110, $140, $170 | $90, $120, $120, $150 |
| International addons | NA | Available | Available | Available |
| Extras | NA | Music Unlimited | 5GB Hotspot 100GB Google One |
15GB Hotspot 100GB Google One Amazon Prime |
International service
If you're calling outside of the country both Mint Mobile and Metro by T-Mobile have you covered. Conveniently, Mint Mobile offers free calling to Mexico and Canada and supports calling to 160 other countries paid by the minute. The rates vary by country and you'll need to add money to your Mint account before calling, but it's nice to have the option available.
Source: Android Central
Metro by T-Mobile loses the edge here but there are still options. You can add a package to get these features. Mexico and Canada calling can be added for $5 each but you'll need to check other countries individually to see which plan you'll need.
If you're traveling, Mint Mobile has some options for you while Metro by T-Mobile requires you to get service from one of its partners, which is a bit less convenient.
Mint Mobile has reduced rates for Mexico and Canada at $.02 per text, $.06 per minute, and $.06 per MB. The other supported countries are more expensive at $.05 per text, $.25 per minute, and $.20 per MB. If you're traveling for an extended period of time it may be worth it to grab a travel SIM card when you get there.
Coverage
Both Metro by T-Mobile and Mint Mobile use the T-Mobile network. By and large you can expect the same level of performance from the two but it is possible for there to be slight speed differences based on deprioritization.
If you are going to use the T-Mobile network at all, it's a good idea to have a phone that supports T-Mobile's band 71, which has better coverage range than their older LTE bands.
Be sure to check your coverage on Mint Mobile's or Metro by T-Mobile's coverage maps.
Phones
Source: Android Central
Both of these carriers can accept GSM unlocked phones. If you want to buy a phone from Metro by T-Mobile you will need to go into a store to make your purchase. Mint Mobile, on the other hand, is happy to sell you one from its website since it doesn't have any storefronts.
Both carriers have a good selection of phones from the new Samsung Galaxy phones and Google Pixel phones to the newest iPhones. There are also plenty of options for mid and low end devices which are a great way to save some money on a secondary line or if you don't think an expensive phone is a worthwhile investment.
If you choose to go with a BYOD device, be sure to check compatibility for both Mint Mobile and Metro by T-Mobile before making the switch.
Make your choice
As people use more and more data all the time, Metro by T-Mobile's larger data plans are a better value, especially when you consider the multi-line savings. There's no doubt that Mint Mobile is a cheaper option that still provides access to the robust T-Mobile network. All things considered, Metro by T-Mobile provides a more flexible experience and the unlimited options allow your plan to keep up with your usage.
More data
Metro by T-Mobile
Tons of data for heavy users
Metro by T-Mobile's unlimited plans are great for heavy users that don't want to worry about data usage. Discounts with more lines can help you save.
Bulk savings
Mint Mobile
Bulk pricing for everyone
Mint Mobile offers enough data for most users alongside some amazing prices. If you are willing to buy the whole year you can save some serious cash.
We may earn a commission for purchases using our links. Learn more.


Match Play. Red trails 2-3 to 7. Should Red redouble? If redoubled, should White take?
pips Red=88 White=59
(CorrectAnswer= 0/0, ErrorScore= 0)
For money with a fully active cube redoubling here would be a double blunder but at this score the cube is virtually dead. Red is the favourite, and four points get him to Crawford with his opponent on an even number. Even better a gammon (6%) wins him the match.
Not redoubling here is a 1.5 blunder. If you did not redouble this position you need to do a little work on your match play doubling technique.
Not redoubling here is a 1.5 blunder. If you did not redouble this position you need to do a little work on your match play doubling technique.
Cube analysis 2-ply cubeless equity +0.182 (Money: +0.157) 0.554 0.059 0.001 - 0.446 0.010 0.000 Cubeful equities: 1. No double +0.319 2. Double, pass +1.000 (+0.681) 3. Double, take +0.303 (-0.015) Proper cube action: No redouble, take (2.2%)


RED CORNER
A Film Review by James Berardinelli
RATING: * OUT OF ****
United States, 1997 U.S. Release Date: 10/31/97 (wide) Running Length: 2:04 MPAA Classification: R (Violence, nudity, sex, mild profanity) Theatrical Aspect Ratio: 1.85:1
Cast: Richard Gere, Bai Ling, Bradley Whitford, Byron Mann Director: Jon Avnet Producers: Jon Avnet and Jordan Kerner Screenplay: Robert King, Ron Koslow Cinematography: Karl Walter Lindenlaub Music: Thomas Newman U.S. Distributor: MGM
The relentless preachiness engaged in by RED CORNER is the sort of approach that makes fire-and-brimstone sermons seem subtle. If this was the film's only weakness, it might be forgivable, but director Jon Avnet's latest effort is an all-around stinker. Pull almost any word out of a negative pool of adjectives and you'll have an accurate description of RED CORNER: dumb, boring, painful, laughable, idiotic, moronic, inane, bad, etc. Occasional scenes are almost salvaged by the effective performance of little-known actress Bai Ling, but, ultimately, her solid portrayal of a Chinese defense attorney gets lost amidst so much tripe. RED CORNER is easily one of the year's worst big-budget motion pictures.
Red China is apparently very upset with Richard Gere. Not only is he an outspoken supporter of the exiled Dalai Lama, but, to add insult to injury, he has now starred in a movie that is openly critical of the Chinese legal system. American movie-goers suckered into seeing RED CORNER should be equally outraged. Gere's lackluster performance is one of the reasons why the film is close to unwatchable. He vacillates between scenery-chewing and wooden displays that would make Steven Seagal proud, and his delivery of Robert King and Ron Koslow's ripe dialogue is often so overwrought that it's impossible to stifle a snicker. Truthfully, the Chinese have little to worry about -- no one could possibly take this film seriously.
Gere plays American businessman Jack Moore, who's in Beijing to wrap up a major deal with China's Ministry of Radio, Film, and Television. Moore's American-based company is offering a slate of "pornographic, violent, and superstitious" Western fare, and, thanks to the support of the progressive-minded son (Byron Mann) of the Minister, they have the inside track. Then, one night, Moore brings a Chinese girl back to his hotel room for some champagne and sex.  Worse still, it turns out that the dead girl is the daughter of a high-ranking Red Army general. Since American lawyers are not permitted to practice in China, Moore is forced to make due with Yuelin (Bai Ling), his court-appointed attorney. Her advice: plead guilty, since the legal code reads "leniency for those who confess; severity for those who resist." But, despite being mistreated by his jailers and ignored by the American embassy, Moore is determined to prove his innocence.
In the past, with movies like FRIED GREEN TOMATOES, director Jon Avnet has successfully navigated the tricky line between drama and manipulation. Here, he fails utterly. There isn't a dramatic moment in RED CORNER that rings true -- not Moore's sad family history, his "courageous" moral stance in defense of Yuelin, nor the predictably over-the-top climactic court sequences. For good measure, there's also one of the silliest foot chases in recent memory, with a handcuffed Moore leaping from rooftop to rooftop while half the Beijing police force inexplicably fails to catch up to him.
The heroes in RED CORNER are few and far between. Aside from the lone good American (Moore) and the one good Chinese citizen (Yuelin), it's hard to find someone who isn't duplicitous, self-serving, or downright evil. Cartoon characterizations abound, and it isn't just the Chinese who suffer; every Westerner in RED CORNER has hidden motives, and no one except Yuelin is willing to risk their neck or career to stand up for an innocent man.
From time-to-time, RED CORNER falls into the "so bad it's enjoyable" category, but the movie is much too long to be more than fitfully engaging for connoisseurs of awful films. Those hoping for an intelligent expose of the Chinese legal system will likewise be disappointed -- the movie's political agenda is obvious, but not effectively presented. This is yet another example of the white outsider struggling against oppression and injustice (Avnet has already used this approach once, in 1992's THE POWER OF ONE). Maybe somewhere, buried deep under layers of dross, there's the kernel of an interesting story in RED CORNER. But what reaches the screen is so irredeemable that it deserves to be consigned to the darkest, most obscure shelves of the local video store.
Copyright 1997 James Berardinelli
- James Berardinelli e-mail<EMAIL_ADDRESS>Now with more than 1300 reviews... The ReelViews web site: http://movie-reviews.colossus.net/
"For me, the cinema is not a slice of life, but a piece of cake."
- Alfred Hitchcock
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


Script loading with RequireJS allows you to benefit from the same functionnalities as import in the Java language. It allows you to define properly dependencies between scripts, and offers an easy way to load them lazily at runtime.
index.html:
<script data-main="app" src="lib/jquery.js" type="text/javascript"></script>
app.js:
define([ 'lib/resthub', 'routes', 'home' ], function() {
...
});
The function in app.js will be executed only when the lib/resthub.js, route.js and home.js scripts will be loaded. (Require.js automatically adds the .js extension). No order is defined between these dependencies, but it could be the case.
If you need to use dependencies’ return values in your function, just add arguments :
home.js:
define([ 'lib/controller', 'lib/resthub' ], function( Controller ) {
Controller.extend('HomeController', {
...
});
});
The Controller argument will get the return of the lib/controller.js’s inner function. Resthub main lib doesn’t return anything, so we put it at the end of the dependency lib, and don’t have to match it to any variable.
In order to avoid caching issues when, for example, you update your JS or HTML files, you should use the urlArgs RequireJS attribute. You could filter the ${buildNumber} with you build tool (Maven, Ant, Gradle) at each build.
index.html:
<script src="lib/jquery.js" type="text/javascript" charset="utf-8" ></script>
<script type="text/javascript">
require({urlArgs: "kazanversion=${buildNumber}"}, ['app']);
</script>
After filtering:
<script src="lib/jquery.js" type="text/javascript" charset="utf-8" ></script>
<script type="text/javascript">
require({urlArgs: "kazanversion=763625256262-07082011"}, ['app']);
</script>
See the RequireJS doc for more informations.


Studying deep learning and learning TensorFlow by taking online courses, attending workshops, and collaborating on projects
Learning full stack web development with node.js and express
Learning Android development in Java
January 2018
August 2018
High Energy Astroparticle Physics
Research Assistant for Dr. Otte Nepomuk's Astroparticle Physics Lab
Characterized ASICs for preamplification and shaping of signals from photomultipliers
Wrote a manual on the operation and configuration of the ASIC firmware for others in the research collaboration
January 2018
August 2018
Center for Relativistic Astrophysics
Undergraduate Researcher for LIGO/VIRGO collaboration, under Dr. Laura Cadonati
Worked on software pipeline to clean gravitational wave detector time series data from noise caused by earthquakes
Worked with parameter estimation software to model 'Glitches,' signals from an unknown source which would give false positives
employment
April 2017
Present
Employee - Outdoor Recreation Georgia Tech (ORGT)
As a part of Campus Recreation at Gerogia Tech, ORGT provides students with life changing outdoor expriences, from climbing to the base camp of Everest to leading white water kayaking trips in Chile. As an employee, I work to organize and lead trips, maintain gear and serve customers
activities
December 2016
April 2017
Stamps Scholars National Convention
Coordinator
Organized and ran consulting competitions for over 400 scholars. Over the course of a weekend, students designed action plans for Atlanta based charaties
May 2018
Present
Summer Program - University of Oxford
Student
Studied psychology, linguistics, and medicine throughout the summer in England
education
Georgia Institute of Technology
BS Applied Physics, Stamps President's Scholar, General GPA: 3.87


Up: Synchronization Calls
Next: Miscellaneous Clarifications
Previous: Lock
The assert argument in the calls
MPI_WIN_POST, MPI_WIN_START, MPI_WIN_FENCE
and MPI_WIN_LOCK is used to provide assertions on the context of the
call that may be used to optimize performance. The assert argument does not change program
semantics if it provides correct information on the program ---
it is erroneous to provides incorrect information.
Users may always provide
assert = 0 to indicate a general case, where no guarantees are made.
Advice to users.
Many implementations may not take advantage of the information in assert; some of the information is relevant only for noncoherent, shared memory machines. Users should consult their implementation manual
to
find which information is useful on each system. On the other hand,
applications that provide correct
assertions whenever applicable are portable and will
take advantage of assertion specific optimizations, whenever available.
( End of advice to users.)
Advice
to implementors.
Implementations can always ignore the assert argument.
Implementors should
document which assert values are significant on their implementation.
( End of advice to implementors.)
assert is the bit-vector OR of zero or more of the following
integer constants:
MPI_MODE_NOCHECK, MPI_MODE_NOSTORE,
MPI_MODE_NOPUT,
MPI_MODE_NOPRECEDE and MPI_MODE_NOSUCCEED.
The significant options are listed below, for each call.
Advice to users.
C/C++ users can use bit vector or (
) to combine these constants;
Fortran 90 users
can use the bit-vector IOR intrinsic.
Fortran 77 users can use (nonportably)
bit
vector IOR on systems that support it. Alternatively, Fortran users can
portably use integer addition to OR the constants (each constant should
appear at most once in the addition!).
( End of advice to users.)
-
-
MPI_WIN_START:
-
-
MPI_MODE_NOCHECK
--- the matching calls to MPI_WIN_POST
have
already completed on all target processes when the call to
MPI_WIN_START is made.
The nocheck option can be
specified in a start call if and only if it is specified in each
matching post call.
This is similar to the optimization
of ``ready-send'' that may save a handshake when the handshake is
implicit in the code.
(However, ready-send is matched by a regular receive, whereas
both start and post must specify the nocheck option.)
-
-
MPI_WIN_POST:
-
-
MPI_MODE_NOCHECK
--- the matching calls to MPI_WIN_START
have not yet occurred
on any origin processes when the call to
MPI_WIN_POST is made.
The nocheck option can be specified by a post call if and only if it
is specified by each matching start call.
-
-
MPI_MODE_NOSTORE
--- the local window was not updated by
local
stores (or local get or receive calls) since
last synchronization. This may avoid the need for cache synchronization at
the
post call.
-
-
MPI_MODE_NOPUT
--- the local window will not be updated by
put or accumulate
calls after the post call, until the ensuing (wait) synchronization.
This may avoid the need for cache synchronization at the wait call.
-
-
MPI_WIN_FENCE:
-
-
MPI_MODE_NOSTORE
--- the local window was not updated by
local stores (or local get or receive calls) since last synchronization.
-
-
MPI_MODE_NOPUT
--- the local window will not be updated
by put or accumulate calls after
the fence call, until the ensuing (fence) synchronization.
-
-
MPI_MODE_NOPRECEDE
--- the fence does not complete any
sequence of locally issued RMA calls. If this assertion is given by
any process in the window group, then it must be given by all
processes in the group.
-
{ MPI_MODE_NOSUCCEED}
-
--- the fence does not start any sequence
of locally issued RMA calls. If the assertion is given by any process
in the window group, then it must be given by all processes in the group.
-
-
MPI_WIN_LOCK:
-
-
MPI_MODE_NOCHECK
--- no other process holds, or will attempt
to acquire a
conflicting lock, while the caller holds the window lock. This is useful
when
mutual exclusion is achieved by other means, but the coherence operations
that
may be attached to the lock and unlock calls are still required.
Advice to users.
Note that the nostore and noprecede flags provide
information on what happened before
the call; the noput and nosucceed
flags provide information on what will happen
after the call.
( End of advice to users.)
Up: Synchronization Calls
Next: Miscellaneous Clarifications
Previous: Lock
Return to MPI-2.1 Standard Index
Return to MPI Forum Home Page
MPI-2.0 of July 1, 2008
HTML Generated on July 6, 2008


Gateway
BOT
30-May-19 03:09 AM
[telegram] <Regnar> Its saying what do you want this wallet to be called? "Main" or w.e.
[telegram] <yorklab> That sounds like desktop "Lite Mode"
[telegram] <yorklab> If it's too weak then enter a longer name.
[telegram] <yorklab> I don't think spaces are allowed.
[telegram] <Regnar> Yes. So Agama lite mode uses seeds, when you restore, you are putting in the seed of a wallet you already have. Agama will then say "I'm going to save this seed and encrypt it with a password and wallet name, what do you want the wallet name and password to be?" (re @CRYPTOCHAOS: When i restore?)
[telegram] <CRYPTOCHAOS> No for my already in use pin
[telegram] <CRYPTOCHAOS> So I reset my pin?
[telegram] <Regnar> In agama desktop?
[telegram] <CRYPTOCHAOS> Yes
[telegram] <CRYPTOCHAOS> Ive only used phone
[telegram] <Regnar> It is different then the pin in your agama phone
[telegram] <CRYPTOCHAOS> Just downloaded windows 64but
[telegram] <Regnar> You are giving it a brand new name and password
[telegram] <Jaime_Meneguele> I used 24 words in desktop with space.
[telegram] <CRYPTOCHAOS> Ok so i set a new desktop pin?
[telegram] <CRYPTOCHAOS> Ok thank you let me try
[telegram] <Regnar> Yes, but a password, not a short number. (re @CRYPTOCHAOS: Ok so i set a new desktop pin?)
[telegram] <Jaime_Meneguele> In lite mode. And everything is ok. (re @Jaime_Meneguele: I used 24 words in desktop with space.)
(edited)
[telegram] <yorklab> That sounds like the seed, not the PIN. (re @Jaime_Meneguele: I used 24 words in desktop with space.)
[telegram] <CRYPTOCHAOS> THANK YOU SO MUCH MAN I WAS FREAKING
[telegram] <CRYPTOCHAOS> Im in.
[telegram] <yorklab> Glad it's OK
[telegram] <CRYPTOCHAOS> Didnt realize had to create new password
[telegram] <CRYPTOCHAOS> Thought it would need the one i already made , thank god for my keys
[telegram] <yorklab> Yes, if you have your seed you can always get access.
[telegram] <CRYPTOCHAOS> If I lost my id I couldnt get my money till I went and bought a new one this way i have those words can transfer 10 million with a phone call ??!!  They can be used in any lite wallet to access your funds. The pin and passwords you see on Agama are like locks on your phone to prevent someone from opening the apps. They don't do anything except lock your app. So a pin from mobile doesn't do anything for the desktop wallet and vice versa, but the seed, because it's your keys, will give you access
[telegram] <CRYPTOCHAOS> When you think about it dont even have to transact could just give cz my keys and bam 50 mil untraceable
[telegram] <Regnar> (re @CRYPTOCHAOS: Im in.)
[telegram] <CRYPTOCHAOS> Thanks again was freaking
[telegram] <yorklab> Wait until Mobile DEX comes out, everything will be done on the phone.
(edited)
[telegram] <CRYPTOCHAOS> /
[telegram] <Jaime_Meneguele> Did everything go well?
[telegram] <Regnar> Really glad we could help man! (re @CRYPTOCHAOS: Thanks again was freaking)
[telegram] <CRYPTOCHAOS> You guys rock thats why im so heavy , very surprising noone really knows they already kicking ass in a 200 bill maket nm their dex 2 coming out all decentral exchanges will be the future atomic swaps
[telegram] <Regnar> just remember, store your seed somewhere safe, don't leave it screenshot on your phone or something (people do it) those are your keys and whoever has those owns your coins.
The pin, password, and wallet name have nothing to do with the blockchain or your funds. They are only to lock the app so someone who steals your phone can't gain access.
Think about your phone lockscreen passcode. That protects the contents in your phone. Those pin/password protect the contents in your wallet (your seed).


Top ten top tens
By Clarissa Wong
With Northwestern’s new and improved U.S. News ranking, it’s hard not to feel proud that you go to a Top 10 school. Of course, academic ranking certainly merits recognition, but Northwestern excels in more than just education. Here’s a list of the best (and worst) our school has to offer.
1. WORST LOOKING GUYS
According to the incredibly trustworthy College Confidential, you’re more likely to swipe left than right on Tinder when searching for hot guys within a 5-mile radius. If you’re really committed to finding the perfect 10, you’re better off making the trek to Loyola or DePaul.
2. BEST (MOST DIFFICULT) CHEM DEPARTMENT
If there’s one thing that unites every college in the U.S. it’s pre-med kids who whine about their rigorous course load. Northwestern is especially notorious for its challenging STEM classes, particularly in the chemistry department. When conversing with pre-med students, avoid the following trigger words: orgo, physio, GPA and MCAT.
3. BEST VALUE COLLEGE IN THE CHICAGO AREA
Good news — your $75k tuition isn’t going to waste! According to Niche, out of 38 schools in the Chicago area, Northwestern is worth the most for its price tag. Though you’ve probably experienced your fair share of quarter-life crises, sobbed about the absence of ice rinks and contemplated dropping out to flip burgers instead, you can rest easy knowing that your money is well spent.
4. BEST STUDENT VOTER TURNOUT
Despite the relatively low voter turnout in the 18-24 age range, Northwestern students are doing their civic duty. Let’s keep it up – maybe by 2020, we’ll no longer have a president who sends angry tweets for a living.
5. MOST LIKELY TO BECOME ROYALTY
Meghan Markle is the first American to marry into the British royal family. Her alma mater? Northwestern, of course. It won’t be long before Prince George will be looking for a fianceé, so now that Markle has impressed the British public and even the Queen herself, who knows? Maybe the next bride- to-be will also be a Wildcat.
6. BEST COLLEGE FOR COMM MAJORS
Northwestern’s impressive alumni list includes Hollywood big shots like Stephen Colbert, Julia Louis-Dreyfus and David Schwimmer. According to Niche, we’re ranked the no. 1 school for communications and the no. 3 school for performing arts. Who would have guessed that Ross from “Friends” received the best college education out of the group?
7. BEST SCHOOL PRIDE
There are football games, and then there are Big 10 football games, and then there are Northwestern vs. Notre Dame games. Anyone who’s ever been to a home game has witnessed the sea of purple pride and heard the Fight Song enough times to know it by heart. Even if the extent of your sports knowledge doesn’t go past Wii bowling, be sure to attend at least one game during your time here.
8. BEST DRUNK FOOD
Anyone who’s ever been to Fran’s past 1 a.m. knows that grilled cheese and waffle fries are objectively the best foods to eat while in a less-than-sober state. With unparalleled customer service and a menu that lives up to its hype, Fran’s never disappoints. Still, it’s a shame that Cheesie’s is no longer with us. RIP.
9. BEST SPORTS COMPLEX
Accessible to all! Budget-crisis friendly! Put to good use! These are things that the Ryan Fieldhouse is definitely not, but it doesn’t matter because our very own Morty Schapiro claims that it’s the best sports complex of its kind. Even though you can’t get into the building, you sure can admire its swanky facade from the outskirts. Then, knowing that you’ll never have the physical ability to qualify as a student- athlete, you can sadly walk to SPAC and bench press while listening to The Fray.
10. BEST COLLEGE MUSIC FESTIVAL
With Dillo Day artists like Chance the Rapper, Kendrick Lamar and the iconic Smash Mouth, it’s no surprise that Northwestern’s annual student-run music festival is one of the biggest and best among colleges in the U.S. Disclaimer: no real armadillos have ever been spotted on Northwestern’s campus.


{% extends 'main/layout.html' %} {% block title %}Logged out{% endblock %} {% block content %} Logged out You have successfully logged out. {% endblock %}
You have successfully logged out.


Instead, in order to be able to automatically compute the maximum stack size,
the maximum number of local variables and the stack map frames,
each visitXxxInsn
method does the following:
code
byte vectorif (compute == COMPUTE_ALL_FRAMES || compute == COMPUTE_INSERTED_FRAMES)
compute == COMPUTE_MAX_STACK_AND_LOCAL
currentBasicBlock
The maximum stack size or the stack map frames are actually computed
in the computeMaxStackAndLocal
and computeAllFrames
methods,
by using the control flow graph constructed in the visitXxxInsn
methods.
The toByteArray
method in ClassWriter
puts together all the pieces constructed in the various writer classes
in order to get the full byte representation of the class.
This is done in two steps:
getSize
method
(this method can add items to the constant pool, which modifies its size;
this is why the constant pool size is added only at the very end).
putXxx
method on each piece (e.g. putFieldInfo
on each FieldWriter
).


Data Science Interests
Experience:
Researcher May 2020 → Sep. 2021
University of Maryland, College Park (Part-Time)
- Investigated deep learning models for time-series under Professors Soheil Feizi and Hector Bravo (now of Genentech), and PhD student Aya Ismail.
- Trained neural networks (DeepAR, LSTMs, Transformers, TCNs) on university servers with SLURM, and presented results at meetings. Written in Python with PyTorch.
- Extended recent work providing provable guarantees on neural network convergence by exploring the data augmentation of time-series via spherical harmonics expansion.
Personal Projects:
PyTorch Implementation of DeepAR Jan. 2021
- Implemented Amazon Research’s DeepAR neural network in PyTorch using their 2020 paper.
- Trained this autoencoder for regression tasks on time-series.
Synthetic Time-series Generator Jun. 2020
- Generated 75,000 synthetic datasets in CSV format for an ongoing research paper on recurrent neural networks
- Wrote framework supporting the creation of AR, ARMA, ARMAX, and non-linear stochastic processes
- Written in C++17, with Catch2, and Boost Math and Multiprecision
Data Science Courses:
CMSC422
Introduction to Machine Learning
CMSC426
Computer Vision
CMSC498L
Introduction to Deep Learning


Learn how to build iPhone and iPad apps from scratch
Learn how to write the code that downloads and displays messages, photos, and videos that timeout after a few seconds. Then create the code that deletes them from the back-end to make them "self destruct"
Learn what Parse.com offers as a "backend-as-a-service" platform. Explore the user account manangement APIs provided by Parse.com and write the code to create and save a new user in Parse.com data store.
We'll teach you how to upload images, video files, and messages to Parse.com's cloud servers. Then learn how to retrieve the data by setting custom queries that download and display them in the app.
We'll will create an app that will allow users to send photo or video messages to others that will be deleted once viewed
The Book provides an extensive library of training exercise that will give you a wide range of in-demand technology skills that will help you create iOS apps.
© 2014 Randal L Kamradt Sr


I am Evan Hardek and right now I am a student in The Ohio State University Coding Boot Camp. My first experience with coding was in high school. But earning this certificate is my first step in formalizing the skills I need to enter the industry as a web developer.
I graduated from high school in 2016. I’ve taken a few classes from a local community college. But, for the most part, I have worked full time in a warehouse. It’s your basic warehouse job filling, packing and shipping customer orders.
But -- what’s not so basic -- are the things that I’ve learned about myself and the business world. I’ve figured out the ins and outs of working with a wide range of people with different backgrounds and motivations. I’ve honed my skills for attention to detail and production of quality work. And, I’ve learned that I want more than a good job. I want a meaningful career and know I can find that as a web developer.
When I’m not at work, I freely admit to being a nerd who's always looking for new music or horror movie to watch. I’m most at peace when I’m hiking, spending time near water, or hanging with friends, family and my cat Sylvester.


Gateway
BOT
22-Jun-18 09:44 PM
[telegram] <bitcoinfiat> KMD erection on Trex
[telegram] <Stunt> ? (re @bitcoinfiat: KMD erection on Trex)
[telegram] <Millowisck> wtf that spike
[telegram] <bitcoinfiat> Pump
[telegram] <Evitor> Why pump? Who pump?
[telegram] <greedy_jack> You mean erection of the size of a Trex's? (re @bitcoinfiat: KMD erection on Trex)
[telegram] <Evitor> I want to buy cheaper
[telegram] <bitcoinfiat> Dafuck. I was just about topping my hold at 26k sat
[telegram] <greedy_jack> I wish that comes soon lol
[telegram] <cryptofish1337> Wtf
[telegram] <TomKron> wait for the dump
[telegram] <Millowisck> nah, some alts are holding prety well
[telegram] <bitcoinfiat> yep. likes of KMD, ARK, PIVX (re @Millowisck: nah, some alts are holding prety well)
[telegram] <Millowisck> Nano xO
[telegram] <bitcoinfiat> Shit (re @Millowisck: Nano xO)
[telegram] <Millowisck> why?
[telegram] <Millowisck> KMD :D
[telegram] <Millowisck> saudi king is buying
[telegram] <cryptofish1337> Mayve some autominers switched to kmd
[telegram] <cryptofish1337> Cause it broke 6k
[telegram] <bitcoinfiat> Donald Turmp is Using All The USD into KMD
1KMD = 1000$ tonight
[telegram] <Millowisck> KMD best performer
[telegram] <Millowisck> right now
[telegram] <Millowisck> I'm glad that was my first alt
[telegram] <yorklab> Well someone is buying up kmd.
[telegram] <Millowisck> future is clear now
[telegram] <Michael> Very happy with price of KMD thru this. Wonderful accomplishment team. Tough market. That's exciting.
[telegram] <cryptofish1337> Not sure
[telegram] <bitcoinfiat> And I was just loading up my bittrex with btc to buy at 26k sat
[telegram] <bitcoinfiat> suddenly saw the spike. I knew KMD will breakout at that point
[telegram] <bitcoinfiat> Same with what I think of PIVX and Ark soon
[telegram] <webworker01> buy some kmd on hyperdex :)
[telegram] <Michael> My only coin that's doing well. Should've bought more!
[telegram] <bitcoinfiat> with this spike? Nope... (re @webworker01: buy some kmd on hyperdex :))
[telegram] <DeBaas> wow, glad i bought more today before the pump :)
[telegram] <webworker01> bounce off line
[telegram] <bitcoinfiat> 10B added to kmd mcap
[telegram] <yorklab> A lot of these projects that are going to be launched on Komodo are going to need KMD for various reasons in the future. Who knows maybe their stocking up while it's cheap.
(edited)
[telegram] <DeBaas> I always feel KMD could be besides ETH or even overtake it in the years to come
[telegram] <webworker01> buy or sell on hyperdex then :) (re @bitcoinfiat: with this spike? Nope...)
[telegram] <Andreas> Only 850
[telegram] <Andreas> Too bad
[telegram] <bitcoinfiat>
[telegram] <Millowisck> but but
[telegram] <Millowisck> bears looks really tired right now


Apache Beam established as a new top-level project
Today, the Apache Software Foundation announced that Apache Beam has successfully graduated from incubation, becoming a new Top-Level Project at the foundation and signifying that its “community and products have been well-governed under the foundation’s meritocratic process and principles”.
Graduation is an exciting milestone for Apache Beam. Becoming a top-level project is a recognition of the amazing growth of the Apache Beam community, both in terms of size and diversity. It is fantastic to see ever-increasing participation on our development and user mailing lists, in pull requests, and at conferences and meetups. Contributions of additional runners and IO connectors further show the significant interest from other projects and organizations in being part of our growing community.
Although graduation is a statement about community, our technical progress has also been impressive. We started with code donations from several companies that were tailored with a specific vendor and scenario in mind and had fragile component boundaries. The whole community worked extremely hard over the past year to refactor the codebase and documentation into a truly vendor-neutral and extensible framework. We have established an impressive engineering system and processes that promote test-driven development. This concerted focus on quality and execution excellence enabled us to publish four releases, each significantly better than the previous.
Going forward, we will continue to extend the core abstractions to distill additional complex data processing patterns into intuitive APIs, and, at the same time, enhance the ability to interconnect additional storage/messaging systems and execution engines. Together, we are excited to push forward the state of the art in distributed data processing.
This is also an opportunity to thank those who helped and supported us reaching this milestone. None of this would be possible without the Apache Software Foundation and its amazing volunteers who have wholeheartedly welcomed us into the family. In particular, we’d like to thank the Apache Incubator community for their guidance producing releases and following processes. We are especially thankful to the Apache Infra team for their assistance establishing Beam’s engineering system, particularly in the areas of testing infrastructure and development productivity.
On behalf of the whole Apache Beam community, thank you to our incubation mentors Ted Dunning, Venkatesh Seetharam, and, previously, Bertrand Delacretaz and Jim Jagielski, for teaching us the Apache Way and guiding us through incubation. In particular, special thanks goes to our incubation champion and mentor Jean-Baptiste Onofré, whose extraordinary help, day after day, was instrumental in getting us here, and who continues as an active code contributor and a member of the project management committee.
Please consider joining us, whether as a user or a contributor, as we work towards our first release with API stability. If you’d like to try out Apache Beam today, check out the latest 0.4.0 release. We welcome contribution and participation from anyone through our mailing lists, issue tracker, pull requests, and events.


3. Trigonometric Identities
4. Applications to Geometry
5. Parametrization & Trigonometric Coordinate Systems
6. Basics of Complex Numbers
7. Trigonometry & Complex Numbers
8. Geometry of Complex Numbers
9. Vectors in Two Dimensions
10. Matrices in Two Dimensions
11. Vectors & Matrices in Three Dimensions, Part I
12. Vectors & Matrices in Three Dimensions, Part II
13. Vector Geometry


![](https://raw.githubusercontent.com/soobrosa/soobrosa.github.io/master/images/1*K1LfSTrkhGnfvPefMnavMg.jpeg)
Raspberry Pi Foundation. [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)
# One Million Events Tracked in a Minute on a Raspberry Pi 3
On PI day this year I started to set up the Commodore 64 of our age, the latest Raspberry PI to see how it rolls our new cloud service agnostic event tracker, [Hamustro](https://github.com/microsoftarchive/hamustro).
## Preparing the RPI3
I burned some time to realize things you just better don’t want to do as of the time of the installation:
* install Ubuntu (both the [Snappy](https://developer.ubuntu.com/en/snappy/start/raspberry-pi-2/) and the [Mate](https://ubuntu-mate.org/raspberry-pi/) images failed to boot),
* start a VNC Server automatically (update: this [setup](https://github.com/amzn/alexa-avs-raspberry-pi#23-install-vnc-server) works and on OSX you have to use [VNC Viewer](http://www.realvnc.com/download/vnc/latest/) to connect),
* SSH in via Wifi.
## Get an OS
To get a working set up I put the [Noobs Lite](https://www.raspberrypi.org/downloads/noobs/) with the [SD Card Formatter](https://www.sdcard.org/downloads/formatter_4/) on my OSX and after booting up the RPI I installed a *Raspbian* from the internet. If your install is successful you should be able to login remotely to the RPI.
```
$ ssh pi@RASPBERRY_IP
pi@RASPBERRY_IP's password: raspberry
```
## Set up phoning home
I used a monitor, a keyboard and a mouse for the setup process, but as I wanted to get rid of them I configured the PI that it always mails me the IP of the RPI if it changes — so I can SSH in.
```
$ sudo apt-get install ssmtp
$ sudo apt-get install mailutils
$ sudo nano /etc/ssmtp/ssmtp.conf
```
Easiest if you set up Gmail as an SMTP provider — if you have two factor authentication switched on you should set up an [App Password](https://support.google.com/accounts/answer/185833?hl=en) for this connection.
```
# this should go into the ssmtp.conf
root=postmaster
mailhub=smtp.gmail.com:587
hostname=raspberrypi
<EMAIL_ADDRESS>AuthPass=TheGmailPassword
FromLineOverride=YES
UseSTARTTLS=YES
```
Test the setup with sending an email to yourself.
```
$ echo “talks.” | mail -s “Raspie”<EMAIL_ADDRESS>```
Let’s hook the IP check into *cron*. This script checks whether anything changed in the networking setup.
```
$ sudo nano /home/pi/check_ip.sh
#!/bin/bash
diff <(/sbin/ifconfig | grep inet) <(cat ~/last_ifconfig)
/sbin/ifconfig | grep inet > ~/last_ifconfig
```
Let’s run this check every minute.
```
$ crontab -e
<EMAIL_ADDRESS>*/1 * * * * /home/pi/check_ip.sh
```
If your `locale` behaves you can fix it like [this](http://www.jaredwolff.com/blog/raspberry-pi-setting-your-locale/).
## Set up Hamustro
This collector meant to be a highly available RESTful web service that receives events from client devices and secures them agnostic of cloud targets. It has been tested on X64 Ubuntu and OSX and this is the first time we try to get in running on an ARM architecture.
```
$ git clone https://github.com/wunderlist/hamustro.git
$ cd hamustro
```
Hamustro is implemented in Go and utilizes Protobuf. The original documentation and install scripts cover Ubuntu and OSX, but not ARM, so we have to fake the following lines manually.
```
# sudo make install/go && source ~/.profile
# sudo make install/protobuf
```
## Set up Go
First let’s try to [skip compiling Go from source](http://dave.cheney.net/unofficial-arm-tarballs) to save some time.
```
$ wget http://dave.cheney.net/paste/go1.5.3.linux-arm.tar.gz
$ sudo tar -C /usr/local -xzf go1.5.3.linux-arm.tar.gz
$ mkdir -p /usr/local/gopath
$ sudo chmod 777 /usr/local/gopath
$ sudo nano /etc/profile
# add this line
export PATH=$PATH:/usr/local/go/bin
```
## Set up Protobuf
Hamustro can handle both Protobuf and JSON messages, but let’s opt for the first one as it is faster to write and read and is leaner on the amount of data transmitted by each client. Used the [Tensorflow](https://github.com/samjabrahams/tensorflow-on-raspberry-pi/blob/master/GUIDE.md#2-build-protobuf) tutorial here.
```
$ sudo apt-get update
$ sudo apt-get install autoconf automake libtool maven
# if you do get a 'Segmentation fault' like me just
# sudo dpkg — configure -a
# and try the install again
$ git clone https://github.com/google/protobuf.git
$ cd protobuf
$ ./autogen.sh
$ ./configure --prefix=/usr
$ make -j 4
$ sudo make install
$ cd java
$ mvn package
```
## The Real McCoy
Now we can resume to the original Hamustro install docs.
```
$ make install/pkg
$ make install/symlink
```
We won’t install the latter items as we plan to run the stress test form an other machine. Let’s set up a data store that will receive our test messages in the stress test and start the server. We’ve chosen the Azure Blob Storage — it’s performance is on a par with AWS S3. Worker size is the number of CPUs plus one. Buffer size determines when the workers flush their buffer.
```
$ nano config/config.json
{
"dialect": “abs”,
"logfile": “”,
"max_worker_size": 5,
"max_queue_size": 100,
"buffer_size": 5000,
"spread_buffer_size": true,
"shared_secret": "SECRET",
"abs": {
"account": “ACCOUNT",
"access_key": "KEY",
"container": "CONTAINER",
"blob_path": "hamustro/{date}/",
"file_format": "csv"
}
}
$ export HAMUSTRO_CONFIG="config/config.json"
$ export HAMUSTRO_HOST="localhost"
$ export HAMUSTRO_PORT="8080"
$ make server
```
Maybe now it’s better to [save this image](https://www.raspberrypi.org/documentation/linux/filesystem/backup.md) ;)
## Time for stress test!
I ran the stress test from a separate Ubuntu VM on my OSX where I also installed Hamustro. Let’s prepare some test files containing multiple events for Protobuf and run the attack.
```
$ cd hamustro
$ make tests/protobuf/n
```
The test ran for 1 minute and the RPI3 managed to collect and put into Azure Blob Store 70.063 requests containing multiple messages in a minute (1165.81 req/sec). These requests contained 912.500 events. With a 5k buffer size the memory usage was below 30%, although the workers maxed out the CPU. You can find below more benchmarks on different queue sizes. The 75k buffer size maxes out the 1 Gb memory of the RPI.
```
|BUFFER| REQ/MIN| REQ/SEC | FILES | TOTAL |
| SIZE | | | | EVENTS |
----------------------------------------------
| 5k | 70,063 | 1165.81 | 182,5 | 912,500 |
| 10k | 78,642 | 1308.78 | 104,5 | 1,045,000 |
| 15k | 82,893 | 1379.98 | 72,5 | 1,087,500 |
| 50k | 92,255 | 1535.04 | 24,5 | 1,225,000 |
| 75k | 97,779 | 1627.05 | 17,5 | 1,312,500 |
```
To give these numbers a perspective this means that the total client tracking needs of Wunderlist as of March 2016 could be taken over by a single RPI3.
(P.S. Take these benchmarks with a pinch of salt as network connection can severely damage the throughput — in this case the RPI ran on my desk, had a direct cable connection to my OSX and the whole setup reached the corporate network.)
Thanks to [Bence](https://medium.com/@bfaludi) for his help with the setup and providing feedback on legibility.


Pizza
Prep Time : 41-50 minutes
Cook time : 26-30 minutes
Serve : 4
Level Of Cooking : Moderate
Taste : Mild
Ingredients :
- Whole wheat flour (atta) FOR BASE 1 1/2 cups
- Tomatoes cut into thick strips 2 medium
- Soya flour 2 tablespoons
- Active dry yeast 1 1/2 teaspoons
- Sugar 1 teaspoon
- Salt 1 teaspoon
- Olive oil 1 tablespoon
- Wheat bran 2 tablespoons
FOR SAUCE
- Olive oil 2 tablespoons
- Onion chopped 1 small
- Garlic chopped 4-5 cloves
- Tomatoes finely chopped 4 medium
- Fresh basil leaves torn a few
- Salt to taste
- Whole dry red chillies crushed 1 teaspoon
FOR TOPPING
- Onion sliced 1 medium
- Button mushrooms sliced 10-12
- Green capsicum cut into thick strips 1 medium
- Low fat Mozzarella cheese grated 1/2 cup
- Olive oil 1 teaspoon
- Dry oregano 1/4 teaspoon
Direction :
* Mix yeast with sugar and one teaspoon warm water and set aside until frothy.
* Add frothy yeast to a mixture of whole wheat flour and soy flour.
* Add salt, olive oil and wheat bran.
* Add water and knead into a soft dough. Leave the dough covered with a damp cloth in a warm place
for about forty five minutes or until dough is about double in volume.
* Divide pizza dough into four, roll out each portion into medium thick eight-inch
discs. Prick with a fork all over. Preheat oven to 220°C.
* For sauce, heat olive oil in a pan, add chopped onion and garlic, stir-fry
briefly and add chopped tomatoes.
* Add one cup of water and bring it to a boil.
* Stir in basil leaves, salt and crushed dried red chillies.
* Simmer for about five minutes on medium heat or till it reaches a thick dropping consistency.
* Spread prepared pizza sauce on rolled pizza base, top it with sliced onion,
sliced mushrooms, tomato and green capsicum strips.
* Finally sprinkle grated low-fat mozzarella cheese to evenly cover the pizza top.
Brush with olive oil.
* Place it on greased ovenproof tray and bake in the preheated oven at 220°C for
about twenty minutes or until the pizza base is crisp and the cheese melts and
starts bubbling.
* Remove from oven, sprinkle with dried oregano, cut into six or eight pieces and
serve hot.
Nutrition Info
Calories : 1602
Carbohydrates : 233.6
Protein : 66.8
Fat : 43.6
Other : Iron- 22.4mg


Uakari
Type:
Mammal.
Size:
38cm - 57cm.
Color:
Red, White, Black, Brown.
Life Span:
16 - 22 years.
Main Prey:
Fruits, Leaves, Insects.
Predators:
Hawks, Snakes, Humans.


First, go to the menu page. Then, find the item you want to order. You can look at different items like salads and appetizers by clicking on the categories listed. When you find the item you want to order, click on its add to cart button. Next, click on the cart button in the upper right corner. You can review your order and change the amount of each item you want to order. Once you're ready to checkout, click on the checkout button on that pop up. The checkout will prompt you fill in your first name, last name, email, order specifications (if you have any), and form of payment. Once you have filled out all that info, click the place order button. You will be taken to an order confirmation page will give you a time estimate of when your order will be ready and your order number.
When you place an order, we will give you a time estimate of when it will be ready. Around that time, head to Jack McGee's Pub, which is located on the bottom floor of Smith Union. Go to the cashier and tell them your name, order, and order number. They will charge you for your order and then give you your food.
Call the pub at<PHONE_NUMBER> and tell them your name, order, and order number. Then, tell them what you want your order to be updated to. Note: when you pick up your completed order, you will pay for the price of this updated order (not the wrong order you placed on ePub).


| PostgreSQL 9.5.19 Documentation | |||
|---|---|---|---|
| Prev | Up | Chapter 35. Extending SQL | Next |
Aggregate functions in PostgreSQL are defined in terms of state values and state transition functions. That is, an aggregate operates using a state value that is updated as each successive input row is processed. To define a new aggregate function, one selects a data type for the state value, an initial value for the state, and a state transition function. The state transition function takes the previous state value and the aggregate's input value(s) for the current row, and returns a new state value. A final function can also be specified, in case the desired result of the aggregate is different from the data that needs to be kept in the running state value. The final function takes the last state value and returns whatever is wanted as the aggregate result. In principle, the transition and final functions are just ordinary functions that could also be used outside the context of the aggregate. (In practice, it's often helpful for performance reasons to create specialized transition functions that can only work when called as part of an aggregate.)
Thus, in addition to the argument and result data types seen by a user of the aggregate, there is an internal state-value data type that might be different from both the argument and result types.
If we define an aggregate that does not use a final function,
we have an aggregate that computes a running function of
the column values from each row. sum
is an
example of this kind of aggregate. sum
starts at
zero and always adds the current row's value to
its running total. For example, if we want to make a sum
aggregate to work on a data type for complex numbers,
we only need the addition function for that data type.
The aggregate definition would be:
CREATE AGGREGATE sum (complex) ( sfunc = complex_add, stype = complex, initcond = '(0,0)' );
which we might use like this:
SELECT sum(a) FROM test_complex; sum ----------- (34,53.9)
(Notice that we are relying on function overloading: there is more than
one aggregate named sum
, but
PostgreSQL can figure out which kind
of sum applies to a column of type complex.)
The above definition of sum
will return zero
(the initial state value) if there are no nonnull input values.
Perhaps we want to return null in that case instead — the SQL standard
expects sum
to behave that way. We can do this simply by
omitting the initcond phrase, so that the initial state
value is null. Ordinarily this would mean that the sfunc
would need to check for a null state-value input. But for
sum
and some other simple aggregates like
max
and min
,
it is sufficient to insert the first nonnull input value into
the state variable and then start applying the transition function
at the second nonnull input value. PostgreSQL
will do that automatically if the initial state value is null and
the transition function is marked "strict" (i.e., not to be called
for null inputs).
Another bit of default behavior for a "strict" transition function is that the previous state value is retained unchanged whenever a null input value is encountered. Thus, null values are ignored. If you need some other behavior for null inputs, do not declare your transition function as strict; instead code it to test for null inputs and do whatever is needed.
avg
(average) is a more complex example of an aggregate.
It requires
two pieces of running state: the sum of the inputs and the count
of the number of inputs. The final result is obtained by dividing
these quantities. Average is typically implemented by using an
array as the state value. For example,
the built-in implementation of avg(float8)
looks like:
CREATE AGGREGATE avg (float8) ( sfunc = float8_accum, stype = float8[], finalfunc = float8_avg, initcond = '{0,0,0}' );
Note:
float8_accum
requires a three-element array, not just two elements, because it accumulates the sum of squares as well as the sum and count of the inputs. This is so that it can be used for some other aggregates as well asavg
.
Aggregate function calls in SQL allow DISTINCT and ORDER BY options that control which rows are fed to the aggregate's transition function and in what order. These options are implemented behind the scenes and are not the concern of the aggregate's support functions.
For further details see the CREATE AGGREGATE command.
Aggregate functions can optionally support moving-aggregate
mode, which allows substantially faster execution of aggregate
functions within windows with moving frame starting points.
(See Section 3.5
and Section 4.2.8 for information about use of
aggregate functions as window functions.)
The basic idea is that in addition to a normal "forward"
transition function, the aggregate provides an inverse
transition function, which allows rows to be removed from the
aggregate's running state value when they exit the window frame.
For example a sum
aggregate, which uses addition as the
forward transition function, would use subtraction as the inverse
transition function. Without an inverse transition function, the window
function mechanism must recalculate the aggregate from scratch each time
the frame starting point moves, resulting in run time proportional to the
number of input rows times the average frame length. With an inverse
transition function, the run time is only proportional to the number of
input rows.
The inverse transition function is passed the current state value and the aggregate input value(s) for the earliest row included in the current state. It must reconstruct what the state value would have been if the given input row had never been aggregated, but only the rows following it. This sometimes requires that the forward transition function keep more state than is needed for plain aggregation mode. Therefore, the moving-aggregate mode uses a completely separate implementation from the plain mode: it has its own state data type, its own forward transition function, and its own final function if needed. These can be the same as the plain mode's data type and functions, if there is no need for extra state.
As an example, we could extend the sum
aggregate given above
to support moving-aggregate mode like this:
CREATE AGGREGATE sum (complex) ( sfunc = complex_add, stype = complex, initcond = '(0,0)', msfunc = complex_add, minvfunc = complex_sub, mstype = complex, minitcond = '(0,0)' );
The parameters whose names begin with m define the moving-aggregate implementation. Except for the inverse transition function minvfunc, they correspond to the plain-aggregate parameters without m.
The forward transition function for moving-aggregate mode is not allowed to return null as the new state value. If the inverse transition function returns null, this is taken as an indication that the inverse function cannot reverse the state calculation for this particular input, and so the aggregate calculation will be redone from scratch for the current frame starting position. This convention allows moving-aggregate mode to be used in situations where there are some infrequent cases that are impractical to reverse out of the running state value. The inverse transition function can "punt" on these cases, and yet still come out ahead so long as it can work for most cases. As an example, an aggregate working with floating-point numbers might choose to punt when a NaN (not a number) input has to be removed from the running state value.
When writing moving-aggregate support functions, it is important to be
sure that the inverse transition function can reconstruct the correct
state value exactly. Otherwise there might be user-visible differences
in results depending on whether the moving-aggregate mode is used.
An example of an aggregate for which adding an inverse transition
function seems easy at first, yet where this requirement cannot be met
is sum
over float4 or float8 inputs. A
naive declaration of sum(float8)
could be
CREATE AGGREGATE unsafe_sum (float8) ( stype = float8, sfunc = float8pl, mstype = float8, msfunc = float8pl, minvfunc = float8mi );
This aggregate, however, can give wildly different results than it would have without the inverse transition function. For example, consider
SELECT unsafe_sum(x) OVER (ORDER BY n ROWS BETWEEN CURRENT ROW AND 1 FOLLOWING) FROM (VALUES (1, 1.0e20::float8), (2, 1.0::float8)) AS v (n,x);
This query returns 0 as its second result, rather than the expected answer of 1. The cause is the limited precision of floating-point values: adding 1 to 1e20 results in 1e20 again, and so subtracting 1e20 from that yields 0, not 1. Note that this is a limitation of floating-point arithmetic in general, not a limitation of PostgreSQL.
Aggregate functions can use polymorphic state transition functions or final functions, so that the same functions can be used to implement multiple aggregates. See Section 35.2.5 for an explanation of polymorphic functions. Going a step further, the aggregate function itself can be specified with polymorphic input type(s) and state type, allowing a single aggregate definition to serve for multiple input data types. Here is an example of a polymorphic aggregate:
CREATE AGGREGATE array_accum (anyelement) ( sfunc = array_append, stype = anyarray, initcond = '{}' );
Here, the actual state type for any given aggregate call is the array type
having the actual input type as elements. The behavior of the aggregate
is to concatenate all the inputs into an array of that type.
(Note: the built-in aggregate array_agg
provides similar
functionality, with better performance than this definition would have.)
Here's the output using two different actual data types as arguments:
SELECT attrelid::regclass, array_accum(attname) FROM pg_attribute WHERE attnum > 0 AND attrelid = 'pg_tablespace'::regclass GROUP BY attrelid; attrelid | array_accum ---------------+--------------------------------------- pg_tablespace | {spcname,spcowner,spcacl,spcoptions} (1 row) SELECT attrelid::regclass, array_accum(atttypid::regtype) FROM pg_attribute WHERE attnum > 0 AND attrelid = 'pg_tablespace'::regclass GROUP BY attrelid; attrelid | array_accum ---------------+--------------------------- pg_tablespace | {name,oid,aclitem[],text[]} (1 row)
Ordinarily, an aggregate function with a polymorphic result type has a
polymorphic state type, as in the above example. This is necessary
because otherwise the final function cannot be declared sensibly: it
would need to have a polymorphic result type but no polymorphic argument
type, which CREATE FUNCTION will reject on the grounds that
the result type cannot be deduced from a call. But sometimes it is
inconvenient to use a polymorphic state type. The most common case is
where the aggregate support functions are to be written in C and the
state type should be declared as internal because there is
no SQL-level equivalent for it. To address this case, it is possible to
declare the final function as taking extra "dummy" arguments
that match the input arguments of the aggregate. Such dummy arguments
are always passed as null values since no specific value is available when the
final function is called. Their only use is to allow a polymorphic
final function's result type to be connected to the aggregate's input
type(s). For example, the definition of the built-in
aggregate array_agg
is equivalent to
CREATE FUNCTION array_agg_transfn(internal, anynonarray) RETURNS internal ...; CREATE FUNCTION array_agg_finalfn(internal, anynonarray) RETURNS anyarray ...; CREATE AGGREGATE array_agg (anynonarray) ( sfunc = array_agg_transfn, stype = internal, finalfunc = array_agg_finalfn, finalfunc_extra );
Here, the finalfunc_extra option specifies that the final
function receives, in addition to the state value, extra dummy
argument(s) corresponding to the aggregate's input argument(s).
The extra anynonarray argument allows the declaration
of array_agg_finalfn
to be valid.
An aggregate function can be made to accept a varying number of arguments by declaring its last argument as a VARIADIC array, in much the same fashion as for regular functions; see Section 35.4.5. The aggregate's transition function(s) must have the same array type as their last argument. The transition function(s) typically would also be marked VARIADIC, but this is not strictly required.
Note: Variadic aggregates are easily misused in connection with the ORDER BY option (see Section 4.2.7), since the parser cannot tell whether the wrong number of actual arguments have been given in such a combination. Keep in mind that everything to the right of ORDER BY is a sort key, not an argument to the aggregate. For example, in
SELECT myaggregate(a ORDER BY a, b, c) FROM ...the parser will see this as a single aggregate function argument and three sort keys. However, the user might have intended
SELECT myaggregate(a, b, c ORDER BY a) FROM ...If myaggregate is variadic, both these calls could be perfectly valid.
For the same reason, it's wise to think twice before creating aggregate functions with the same names and different numbers of regular arguments.
The aggregates we have been describing so far are "normal"
aggregates. PostgreSQL also
supports ordered-set aggregates, which differ from
normal aggregates in two key ways. First, in addition to ordinary
aggregated arguments that are evaluated once per input row, an
ordered-set aggregate can have "direct" arguments that are
evaluated only once per aggregation operation. Second, the syntax
for the ordinary aggregated arguments specifies a sort ordering
for them explicitly. An ordered-set aggregate is usually
used to implement a computation that depends on a specific row
ordering, for instance rank or percentile, so that the sort ordering
is a required aspect of any call. For example, the built-in
definition of percentile_disc
is equivalent to:
CREATE FUNCTION ordered_set_transition(internal, anyelement) RETURNS internal ...; CREATE FUNCTION percentile_disc_final(internal, float8, anyelement) RETURNS anyelement ...; CREATE AGGREGATE percentile_disc (float8 ORDER BY anyelement) ( sfunc = ordered_set_transition, stype = internal, finalfunc = percentile_disc_final, finalfunc_extra );
This aggregate takes a float8 direct argument (the percentile fraction) and an aggregated input that can be of any sortable data type. It could be used to obtain a median household income like this:
SELECT percentile_disc(0.5) WITHIN GROUP (ORDER BY income) FROM households; percentile_disc ----------------- 50489
Here, 0.5 is a direct argument; it would make no sense for the percentile fraction to be a value varying across rows.
Unlike the case for normal aggregates, the sorting of input rows for an ordered-set aggregate is not done behind the scenes, but is the responsibility of the aggregate's support functions. The typical implementation approach is to keep a reference to a "tuplesort" object in the aggregate's state value, feed the incoming rows into that object, and then complete the sorting and read out the data in the final function. This design allows the final function to perform special operations such as injecting additional "hypothetical" rows into the data to be sorted. While normal aggregates can often be implemented with support functions written in PL/pgSQL or another PL language, ordered-set aggregates generally have to be written in C, since their state values aren't definable as any SQL data type. (In the above example, notice that the state value is declared as type internal — this is typical.)
The state transition function for an ordered-set aggregate receives the current state value plus the aggregated input values for each row, and returns the updated state value. This is the same definition as for normal aggregates, but note that the direct arguments (if any) are not provided. The final function receives the last state value, the values of the direct arguments if any, and (if finalfunc_extra is specified) null values corresponding to the aggregated input(s). As with normal aggregates, finalfunc_extra is only really useful if the aggregate is polymorphic; then the extra dummy argument(s) are needed to connect the final function's result type to the aggregate's input type(s).
Currently, ordered-set aggregates cannot be used as window functions, and therefore there is no need for them to support moving-aggregate mode.
A function written in C can detect that it is being called as an
aggregate transition or final function by calling
AggCheckCallContext
, for example:
if (AggCheckCallContext(fcinfo, NULL))
One reason for checking this is that when it is true for a transition
function, the first input
must be a temporary state value and can therefore safely be modified
in-place rather than allocating a new copy.
See int8inc()
for an example.
(This is the only
case where it is safe for a function to modify a pass-by-reference input.
In particular, final functions for normal aggregates must not
modify their inputs in any case, because in some cases they will be
re-executed on the same final state value.)
The second argument of AggCheckCallContext
can be used to
retrieve the memory context in which aggregate state values are being kept.
This is useful for transition functions that wish to use "expanded"
objects (see Section 35.11.1) as their state values.
On first call, the transition function should return an expanded object
whose memory context is a child of the aggregate state context, and then
keep returning the same expanded object on subsequent calls. See
array_append()
for an example. (array_append()
is not the transition function of any built-in aggregate, but it is written
to behave efficiently when used as transition function of a custom
aggregate.)
Another support routine available to aggregate functions written in C
is AggGetAggref
, which returns the Aggref
parse node that defines the aggregate call. This is mainly useful
for ordered-set aggregates, which can inspect the substructure of
the Aggref node to find out what sort ordering they are
supposed to implement. Examples can be found
in orderedsetaggs.c in the PostgreSQL
source code.