Justin Lee
Member of Technical Staff @ mongodb.com
http://antwerkz.com /
@evanchooly
Also known as Inversion of Control
though some make a finer distinction
Normally you give the class what it needs
You have to know how to construct the class
And all of its dependencies
which probably have their own dependencies
that have dependencies
that have dependencies
that have dependencies
We can inject our dependencies!
Right. But what does that even mean?
Well, it can mean a few things
In short, the dependencies are declared explicitly
somehow
and the dependencies are given to the class
XML (Spring)
Annotations (Guice and CDI)
We're gonna focus on guice
obviously
Injection framework developed at Google
by Bob Lee (@crazybob)
(No relation)
Variety of annotations
Extensible
Light weight (ish)
Field
Constructor
Method
@Assisted
@Named
@com.google.inject.Inject
( @javax.inject.Inject -- CDI )
public class Needy {
@Inject
private MailService mailer;
@Inject
private Invoice invoice;
...
}
public class Needy {
@Inject
private MailService mailer;
@Inject(optional = true)
private Invoice invoice;
...
}
public class Needy {
private MailService mailer;
private Invoicer invoicer;
@Inject
public Needy(MailService mailer, Invoicer invoicer) {
this.mailer = mailer;
this.invoice = invoice;
}
...
}
public class TwitterAnalyzer {
private String apiKey;
@Inject
public setApiKey(
@Named("twitterKey") String apiKey) {
this.apiKey = apiKey;
}
...
}
public class GuiceModule extends AbstractModule {
@Override
protected void configure() {
bind(BlahBlah.class).to( BlahBlahImpl.class );
}
@Provides
@Singleton
public MailService create() {
return new MailService("mail.example.com", 1500,
"myusername", "mypassword");
}
}
public static void main(String[] args) {
Injector injector = Guice.createInjector(new GuiceModule());
Needy needy = injector.getInstance(Needy.class);
needy.whatever();
}
This all sounds great
but big deal
Why?
Sometimes you need more than one instance
Thread handlers
Multiple connections
@Inject Provider<YourType> provider;
public class Processor {
@Inject
private Provider<Transformer> provider;
...
public execute(CustomerData data) {
provider.get().process(data);
}
}
Loading external class definitions
SPI
public class Processor {
@Inject
private Injector injector;
...
public execute(CustomerData data) {
injector.getInstance(Transformer.class).process(data);
}
}
Assisted Injections
Hybrids between injection and traditional factories
Factory interface
Let's borrow an example from Cedric
http://beust.com/weblog/2012/08/21/advanced-dependency-injection-with-guice/
public class Person {
// Fields omitted
public Person(String name, Address address, GeoService gs) {
this.name = name;
this.address = address;
this.geoService = gs;
}
public boolean livesNear(Person otherPerson) {
return geoService.isNear(address, otherPerson.getAddress(),
2 /* miles */);
}
}
public interface PersonFactory {
Person create(String name, Address address);
}
------
@Inject
public Person(@Assisted String name,
@Assisted Address address, GeoService geoService) {
this.name = name;
this.address = address;
this.geoService = geoService;
}
public class MyModule extends AbstractModule {
@Override
protected void configure() {
install(new FactoryModuleBuilder()
.build(PersonFactory.class));
}
}
---------
private PersonFactory personFactory;
// ...
Person p = personFactory.create("Bob",
new Address("1 Ocean st"));
smelly
statics are unnecessary in a DI world
Can not dynamically vary by environment
A good intermediate step
https://code.google.com/p/google-guice/wiki/AvoidStaticState
public class MyModule extends AbstractModule {
@Override
protected void configure() {
binder().requestStaticInjection(MyUtil.class);
}
}
public class MyUtil {
@Inject
private static MailService service;
public static void alert() {
service.sendAlert();
}
}
...
MyUtil.alert();
Biggest win for DI
Vary by deployment environment
dev, staging, production
unit testing
integration testing
(continuous integration)
Different modules
@Guice(modules = {ModuleA.class, ModuleB.class})
public class BaseTest {
@Inject
private Foo;
}
public class ModuleA {
@Provides
public Foo foo() {
}
}
Centralize construction
Minimize impact of code changes
Easy substitution of implementations
Environmental based configurations
Testing
Justin Lee
Member of Technical Staff @ mongodb.com
http://antwerkz.com /
@evanchooly
http://github.com/evanchooly


Pregnancy Update: 32 Weeks
I mentioned in my post on Wednesday that I needed to write a pregnancy update so I figured since no one reads blogs on Fridays (or at least I normally don’t haha) today would be the perfect time to do so. I’ve been so relaxed about this pregnancy and so busy with everything else that I haven’t really done anything to keep track of this pregnancy, and I feel horrible about it. Pregnancy is such a special time and it’s so nice having the posts from my first pregnancy to look back on. I really wish I had been more diligent about tracking this pregnancy but hey, life happens.
Anyway, I ended up snapping a few belly pics before my class tonight so I figured they would suffice for a pregnancy update. Finally. No fancy weekly tripod pics like my first pregnancy though, oops!
So here I am in all of my big buddha belly glory.
And for the fun pregnancy survey:
How far along? 32 weeks. Holy balls! 8 weeks left till baby ‘A’ makes her appearance!
How big is baby? At my last ultrasound 2 weeks ago the tech informed me that baby girl is measuring exactly at 3 1/2 pounds and I’m measuring a week ahead. So baby is big. Just like her momma 😉
How I’m feeling? Huge. I’m still lifting weights, running, and doing yoga but not everyday like I did with Caleb. It’s more like every other day with this one and as a result, I’m feeling and looking it. I’ve gotten bigger with this pregnancy and it shows. My belly is rounder, I’ve gained weight all over, and I hurt all over.
To sum up how I’m feeling, we have to register for a PO box in Germany and I was telling the hunk that we should probably register one for my belly since it basically requires it’s own zip code. That is how ginormous I feel.
Weight? Huge. I don’t know how much I’ve gained, my scale is still broken and I haven’t had the heart to fix it yet. At my last appointment I was at 29lbs and it’s been a few weeks since. Let’s hope I don’t gain too much more within this homestretch, I’ll be happy if I keep the weight gain under 40lbs.
How I’m changing? Have I mentioned how huge I am? That’s one way I’m changing. I’m also getting nervous to have two under two, and I’m nervous about breastfeeding a newborn while keeping a toddler entertained. I also worry about how our kids will adjust to the time difference when we move overseas. So I guess the other way that I’m changing is that I’m going from relaxed about this whole pregnancy to suddenly becoming a worrywart.
What I miss? Being able to really push myself in workouts. I also miss jump roping, box jumps, doing certain twists and arm balances in yoga, raw oysters, and margaritas. I could really go for an ice cold margarita on the rocks right now. MMMMm…
Symptoms?  Occasionally I also experience the joys of nausea and indigestion. So much fun, y’all!
Cravings? Chocolate, cheese, wine and margaritas (sad face), bagels with chive and onion cream cheese, and pineapple.
Food Aversions? None. I will eat anything and everything at this point. And apparently it shows.
Highlights this week? Well besides the standard Caleb lighting up my every day with his gorgeous smile and my husband giving me foot rubs, today happened to include another highlight of my week. I attended a volunteer recognition ceremony for my husband’s division and as I shook the general’s hand, he stopped me and said “congrats on the baby, you look great!”. After feeling like a hippopotamus on steroids for the past few weeks, hearing how genuine he sounded actually felt really nice. It’s the little things, right?
Finally, after the ceremony ended one of the photographers asked to take a picture our little family and we got this gem of a picture out of it:
It is so rare to get the three of us in a picture (I’m thinking we need to take family pictures before we become a family of four soon) and I love how this picture turned out. My husband is rockin’ a tan that shows how hard he’s been working lately, Caleb is actually looking at the camera, AND you can see my chin!
This one is definitely going in the family album 🙂
Have an amazing weekend folks, we’re off to DC/NoVA to spend some time with the fam and stuff our faces silly with delicious food.


From Facebook ads all the way to Google, Youtube and Instagram ads, I know how to top-quality leads, to your ads!
With my development knowledge I can create quite nice apps, websites and other online (and-offline) assets!
Making boring sentences interesting, since... well. a while ago.
Full-Stack Developer
I have vast experience in all aspects of Online Marketing including Search, Social Media (both paid and organic), Display, Email Marketing, Technology development, Business Development, and strategic planning.


Camping List
Home
Camper's Toolkit
About Us
Camping Spots
Below you fill find your
list
of provided items as well some items we
recommend
, based on your planned
trip
!
The items you have:
The items you should consider:


SevenApp is an incredibly eye catching and fully responsive Bootstrap 3 Template for any upcoming project. Template comes with developer friendly and easy to customizable code. It works on all main web browsers "IE8+", tablets and phones.
We hope you will enjoy using SevenApp template’s easy to navigate, user-friendly and catchy layout and yet developer friendly code. Our best wishes for your project or your customer :).
Copy Rights
- Author : Scoopthemes
- Twitter : @ScoopThemes
- Facebook : fb.com/scoopthemes
- Support<EMAIL_ADDRESS>Main Structure
SevenApp landing page structures as header
, slider
, section
, footer
and copyrights
very google friendly html.
Beginning of the Page
In order to detect Internet Explorer browser version a specific class implemented to following code at the beginning of all HTML pages
<!doctype html>
Page Head
Page head contains Title, Metadata, Favicon and CSS.
 <meta charset="UTF-8"> <title>SevenApp - Home</title> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <link rel="shortcut icon" href="favicon.ico"> <link rel="stylesheet" href="css/bootstrap.min.css"> <link rel="stylesheet" href="css/animate.css"> <link rel="stylesheet" href="css/font-awesome.min.css"> <link rel="stylesheet" href="css/owl.carousel.css"> <link rel="stylesheet" href="css/owl.theme.css"> <link rel="stylesheet" href="css/styles.css">
Header
header
tag contains both the nav
navbar and .slider-container
container class for the slider.

 ... ...

 ... ...

Sections
Each section are in section
tag with an id for the nav scrolling, inside it .section-heading
class and contents.
.scrollpoint
class is for animation on scrolling it's toggeling when the section in the view.
.sp-effect1
, .sp-effect2
, .sp-effect3
, .sp-effect4
, .sp-effect5
and .sp-effect6
classes is for adding animation classes each has it's own effect.
.divider
is the seperatot between the h1
and h4
sub title.

.Title

sub title goes here

Theme Configuration
SevenApp Template includes Three predefined theme colors. You can easily change the theme for your favorite colors using sass Css.
Using sass
SevenApp Template uses sass css processor, you can find the sass files in ../sass
. We will take you step by step to know the structure well.
The head for sass will look like this :
 <link rel="stylesheet/sass" href="sass/styles.scss">
To Change colors open styles.scss
you can find it in /sass/styles.sass
, below how code looks like, see the $brand-primary:
change #de5749
to your light color. and it will calculate the light and the dark of this color
Compile the styles.scss
file and you will get a ready css file with your favorite color.
Sass mixins
@import url(http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700); //Colors $brand-primary : #de5749; // this is the primary color for your template $brand-primary-light : lighten($brand-primary, 20%); // the lighter color for your primary color $brand-primary-dark : darken($brand-primary, 20%); // the darker color for your primary color $brand-success: #5cb85c; // success color $brand-info: #5bc0de; // info color $brand-warning: #f0ad4e; // warning color $brand-danger: #d9534f; // danger color $brand-other: #25a7b4; // brand other color //Grays $gray-darker: lighten(#000, 13.5%); // #222 $gray-dark: lighten(#000, 20%); // #333 $gray: lighten(#000, 33.5%); // #555 $gray-light: lighten(#000, 60%); // #999 $gray-lighter: lighten(#000, 93.5%); // #eee //Basic Colors $white-color : #FFFFFF; // hex of the white $black-color: #000000; // hex of the black //font family $font-stack : 'Open Sans', Tahoma, Arial; //Mixins //Primary Color Gradient @include primaryGrad(gradDegree , gradStart, gradEnd ); //Gray Color Gradient @mixin grayGrad(gradDeg , gradStart, gradEnd); //Border Radius @mixin border-radius(radius); //Box Shadow @mixin box-shadow(shadow ); //like 0px 1px 3px rgba(0,0,0,.5) //Text Shadow @mixin text-shadow(text Shadow ); //like 0px 1px 3px rgba(0,0,0,.5) //Transition @mixin transition( transition value ); //Transparent @mixin transparent(color, alpha);
If you don't know how to compile sass use very easy koala app for windows, mac or linux.
Stylesheets
SevenApp comes with three different colors trying to meet your needs, ../css/styles.css
, ../css/styles2.css
and ../css/styles3.css
in the html you will find it in the head seaction :
You can change it to your .css
file favorite theme.
<link rel="stylesheet" href="css/styles.css">
If you want to use any of the predefined colors keep it as is :).
Javascript Intialization
Core javascript initialization implemented in ../js/script.js
thorugh appMaster
object as shown below. This approach enables an easy modular implementation to initialize jquery plugins and other application logics.
You can call any of the available functions by objects for example : appMaster.smoothScroll();
, or even add your own.
var appMaster = { preLoader: function(){ // page preloader }, navSpy: function(){ // navspy for nav menu }, smoothScroll: function() { // Smooth Scrolling animates the whole web page to the section clicked }, scollToTop: function(){ // scoll to top script }, headerSlider: function(){ // slider in the header }, owlCarousel: function(){ // owl carousel for screen previews }, maps: function(){ // Google maps styling }, animateScript: function() { // this animates the elements on scrolloing using waypoint plugin } };
Fonts
SevenApp Template uses Open Sans font for headings from Google Web Fonts. You are able to choose more than 600+ fonts from Google Web Fonts. The font imported in the theme css file ../css/styles.css
In sass project you will find it in styles.scss
file you can find it in ../sass/styles.scss
.
// Font Importing @import url(http://fonts.googleapis.com/css?family=Lato:300,400,700,900);
Credits
| Name | Description | URL |
|---|---|---|
| Twitter Bootstrap | Sleek, intuitive, and powerful front-end framework for faster and easier web development. | http://twitter.github.io/bootstrap |
| jQuery | jQuery is a fast, small, and feature-rich JavaScript library. | http://jquery.com |
| Font Awesome | Font Awesome The iconic font designed for Bootstrap | http://fortawesome.github.io/Font-Awesome |
| owlCarousel | Touch enabled jQuery plugin that lets you create beautiful responsive carousel slider. | http://www.owlgraphic.com/owlcarousel/ |
| Waypoint | Waypoints is a jQuery plugin that makes it easy to execute a function whenever you scroll to an element. | https://github.com/imakewebthings/jquery-waypoints |
| Mockups | All the mockups included from freebbble.com. | http://freebbble.com/ |
Mockup Download Links
As promissed here are the link to download mockups download from here.
Thank You For Purchasing Our Template, We Wish For You The Best Of Luck With Your Client, Cheers :). ScoopThemes Team.


What's the place you folks call home?
BRISBANE! Hang loose!
The big apple.
Eu sou um Carocas.
Greetings from the western cape!
北京


template<class POSE>
class gtsam::IMUFactor< POSE >
Class that represents integrating IMU measurements over time for dynamic systems Templated to allow for different key types, but variables all assumed to be PoseRTV.
|
| | IMUFactor (const Vector3 &accel, const Vector3 &gyro, double dt, const Key &key1, const Key &key2, const SharedNoiseModel &model) |
| | time between measurements More...
|
| |
|
| IMUFactor (const Vector6 &imu_vector, double dt, const Key &key1, const Key &key2, const SharedNoiseModel &model) |
| | Full IMU vector specification.
|
| |
| virtual gtsam::NonlinearFactor::shared_ptr | clone () const |
| |
|
virtual bool | equals (const NonlinearFactor &e, double tol=1e-9) const |
| | Check if two factors are equal.
|
| |
|
void | print (const std::string &s="", const gtsam::KeyFormatter &formatter=gtsam::DefaultKeyFormatter) const |
| | Print.
|
| |
|
const Vector3 & | gyro () const |
| |
|
const Vector3 & | accel () const |
| |
|
Vector6 | z () const |
| |
|
virtual Vector | evaluateError (const PoseRTV &x1, const PoseRTV &x2, boost::optional< Matrix & > H1=boost::none, boost::optional< Matrix & > H2=boost::none) const |
| | Error evaluation with optional derivatives - calculates z - h(x1,x2)
|
| |
|
virtual Vector | evaluateError (const Pose3 &x1, const Pose3 &x2, boost::optional< Matrix & > H1=boost::none, boost::optional< Matrix & > H2=boost::none) const |
| | dummy version that fails for non-dynamic poses
|
| |
|
| NoiseModelFactor2 () |
| | Default Constructor for I/O.
|
| |
| | NoiseModelFactor2 (const SharedNoiseModel &noiseModel, Key j1, Key j2) |
| | Constructor. More...
|
| |
|
Key | key1 () const |
| | methods to retrieve both keys
|
| |
|
Key | key2 () const |
| |
| virtual Vector | unwhitenedError (const Values &x, boost::optional< std::vector< Matrix > & > H=boost::none) const |
| | Calls the 2-key specific version of evaluateError, which is pure virtual so must be implemented in the derived class. More...
|
| |
| virtual Vector | evaluateError (const X1 &, const X2 &, boost::optional< Matrix & > H1=boost::none, boost::optional< Matrix & > H2=boost::none) const=0 |
| | Override this method to finish implementing a binary factor. More...
|
| |


KYC OBLIGATIONS
EXIT X
Quick Facts
Quiz
Are you sure you wish to exit this quiz?
Your answers will not be recorded if you leave the quiz now.
What must you do in relation to a politically exposed person who is Australian and has a high ML/TF risk?


The goal of this assignment is to test your prototype with people and learn from that experience. To get the kinks out of your application, first test it with a couple of people.
Watch at least two different people use your interactive prototype. These do not have to be planned out ahead of time, but try to get people who are somewhat similar to the real people who will be using your application.
Just like when you conducted the Heuristic Evaluations, each team member will have its own role during testing. One person will be the facilitator, one will be in charge of taking notes/photos/video/etc. Any team member who is not currently in one of those two roles should observe and take notes. This time your user will not be writing down the problems they find for you. It's your job to learn what the people testing your prototype are thinking; the feedback they provide you will be invaluable for your next iteration. Your goal is to find ways to improve your interface. Look for breakdowns and pain points in your interface and try to understand what the problems are and how you might fix them.
When possible, modify/update your prototype before running the next participant. Keep the task consistent between participants: use the same script, follow the same protocol, answer questions in the same way. This is a fast study, not a formal one. Still, any study requires a bit of planning: write down what you are going to ask people to do and not vary that between users. Submit your plan, task description, and signed consent form for each participant. Here is a consent form that you can modify to use for your study. Immediately after each test, do a quick debrief with your team and write down any reactions or thoughts that came up. You will most likely forget them, so it's important to write them down right after the test.
Submit a photo or sketch of each participant testing your prototype. As with the needfinding assignment, these photos and captions should show breakdowns and design opportunities. How you compose your photo will depend on the app/task. If the key thing is that it happens in a particular location (say in a grocery store), make sure to show the context. If the key issue is what's on screen, take an over-the-shoulder shot of the person interacting.
After testing, take some time with your team to reflect on your findings. Go through all the notes and other recordings. Try to be objective; don't write problems off. Discuss as a team and try and define some general patterns in people's behavior. When you identify some interesting points, talk deeply about them - ask each other questions, recreate the different tests, analyze the decisions people made, other paths they could have taken, and so on. Let your insights guide redesigns for your next prototype iteration. The end product of your discussion should be a list of changes that you will implement. Make this list detailed and understandable to people outside of your team. Of all the bugs that you have identified, fix the bugs that are either small and easy to fix or too severe to ignore. Make sure that you do this before moving on to the next step of this assignment.
Select one interface element of your prototype and redesign that part. You will then implement the redesign of this component, so keep this in mind when considering the scale and difficulty of your redesign. This is not a huge redesign of your prototype. Select something small and manageable in scope. Designers often go through many many different versions of prototypes before their final design, so try to get familiar with the process (given our time constraints for the course).
Next week, you will use the Web to gather usage data about your application by launching an A/B test online. Refer to the lecture notes regarding controlled web experiments (e.g. A/B testing, control groups, etc.). Think about what you are asking, and how to prepare a study to answer it. Try to think of A/B tests that will give you information that this week's user testing didn't (or couldn't). Next week, when you launch your A/B test online, the alternative redesign you implemented this week will be the 'B' of your A/B test. You will need to have access to both versions of this component to run your online tests - don't write over your old code!
Here are two student examples from last year. Keep in mind that last year, students had to submit paper prototypes of their redesign in addition to the implemented version.
| Category | Nope | Adequacy | Proficiency | Mastery |
|---|---|---|---|---|
| In-person Test 4 points |
0: No user study was performed. | 1: Photos of only one participant, the study was poorly planned, or study materials were not included. | 3: Photos of two or more participants. The study captured some information, but is incomplete. The captions don't reflect the breakdown shown in the photos or the photos don't demonstrate a breakdown. | 4: Photos of two or more participants. Study materials (photos w/captions, plan, consent forms) are complete and reveal some very useful information. The photos and the captions show clear breakdowns. |
| Planned Changes based on Test 2 points |
0: No changes listed or irrelevant changes. | 1: The student presented several possible changes derived from the user testing data, although not all of the changes were useful or some important changes were overlooked. | 2: The student suggested several possible changes based on the user testing, all of which were important and directly addressed the problems identified in user testing. | |
| Alternative Design 3 points |
0: No redesign or irrelevant redesign. | 1: The redesign doesn't address an issue found in testing and seems unlikely to satisfy a real user need. | 2: The redesign addresses an issue found in testing, but seems unlikely to satisfy a real user need. | 3: The redesign addresses an issue found in testing to satisfy a real user need. |
| Description of Planned Online Test 2 points |
0: No description submitted, or the online test is not well thought out. | 1: The online test is designed to produce some useful data, however, it may not be motivated by real usability issues. | 2: The online test is clearly motivated or innovative in a way that will provide rich and interesting data. | |
| Updated Development Plan 2 points |
0: No updates or only minor changes to plan. | 1: Plan is mostly updated, but is lacking some detail or deadlines seem unreasonable. | 2: Plan is detailed and reflect progress, new tasks, and any changes to previous tasks. | |
Outside the Box 1 point. Up to 5% of submissions. |
The alternative redesign is more than a structure change. It directly highlights a different UI overall, and gives a different user experience that competes well with the current version (such that you are almost unsure about which UI would actually perform better) |


Getting Started
Pistache
is a web framework written in Modern C++ that focuses on performance and provides an elegant
and asynchronous API.
Requirements
git is needed to retrieve the sources. Compiling the sources will require
CMake to generate Makefile and a recent version of g++
(at least 4.7).
Also, Pistache
does not support Windows yet.
Installing Pistache
A request for official Debian sponsorship of our package was submitted on 23 April, 2019. You can follow its progress here. In the mean time you can try our Ubuntu packages.To use our Ubuntu PPA for stable packages, run the following:
$ sudo add-apt-repository ppa:kip/pistache
$ sudo apt update
$ sudo apt install libpistache-dev
To use our Ubuntu PPA for unstable packages, run the following:
$ sudo add-apt-repository ppa:kip/pistache-unstable
$ sudo apt update
$ sudo apt install libpistache-dev
Using with pkg-config
If you would like to automatically have your project's build environment use the appropriate compiler and linker build flags necessary to use Pistache, pkg-config can greatly simplify things. The `libpistache-dev` package includes a pkg-config manifest.
To use with the GNU Autotools, as an example, include the following snippet in your project's `configure.ac`:
# Pistache...
PKG_CHECK_MODULES(
[libpistache], [libpistache >= 0.0], [],
[AC_MSG_ERROR([libpistache >= 0.0 missing...])])
YOURPROJECT_CXXFLAGS="$YOURPROJECT_CXXFLAGS $libpistache_CFLAGS"
YOURPROJECT_LIBS="$YOURPROJECT_LIBS $libpistache_LIBS"
Building Pistache
To download the latest available source, clone the repository over github.
git clone https://github.com/oktal/pistache.git
Then, init the submodules:
git submodule update --init
Now, compile the sources:
Optionally, you can also run the tests:
Be patient, async_test
can take some time before completing.
And that’s it, now you can start playing with your newly installed Pistache
framework.
Serving requests
Include
First, let’s start by including the right header
Hello World
Requests received by Pistache
are handled with an Http::Handler
.
Let’s start by defining a simple HelloHandler
:
Handlers must inherit the Http::Handler
class and at least define the onRequest
member function.
They must also define a clone()
member function. Simple handlers can use the special HTTP_PROTOTYPE
macro, passing in the name of the class. The macro will take care of defining the clone()
member function
for you.
Final touch
After defining the handler, the server can now be started:
For simplicity, you can also use the special listenAndServe
function that will automatically create an
endpoint and instantiate your handler:
Note that by default, listenAndServe
will only use 1 thread. You can tweak that by passing an Options
argument
to the function:
And that’s it, now you can fire up your favorite curl request and observe the final result:
Complete code for this example can be found on Github: examples/hello_server.cc


ridercz/Altairis.Services.PwnedPasswordsValidator ASP.NET Identity Password Validator against Pwned Passwords by Troy Hunt - ridercz/Altairis.Services.PwnedPasswordsValidator
Consider ignoring SuppressIldasmAttribute in ILDASM · Issue #13341 · dotnet/runtime The SuppressIldasmAttribute instructs the ildasm tool to prevent working on assemblies or modules that have this attribute over here. I'd like to ask re-considering if this is necessary still a...
Performance Matters - The latest software performance news straight to your inbox | Product Hunt The Performance Matters weekly newsletter brings a short, value-packed curation of the best software performance industry news from around the web.
Joe Rogan Experience #1342 - John Carmack John Carmack is a computer programmer, video game developer and engineer. He co-founded id Software and was the lead programmer of its video games Commander Keen, Wolfenstein 3D, Doom, Quake, Rage and their sequels. Currently he is the CTO at Oculus.
Web-to-App Communication: App Protocols Note: This post is part of a series about Web-to-App Communication techniques. Just over eight years ago, I wrote my last blog post about App Protocols, a class of URL schemes that typically1 open …
Why .NET Core for building Cloud Native Apps? Links:- .NET- What is .NET- .NET Core Roadmap- Configuration for .NET Core- Microservices with .NET- TechEmpower Benchmarks [01:33] - Scott talks about the vision of a new .NET[02:55] - Shayne asks wh
Dynamic controller routing in ASP.NET Core 3.0 | StrathWeb. A free flowing web tech monologue. One of the great extensibility points in the routing feature of the older versions of the ASP.NET MVC and ASP.NET Core MVC frameworks was the ability to pick up any route and dynamically point it at a given controller/action.
GC.AllocateUninitializedArray should tighten its logic around when to return zeroed arrays · Issue #13292 · dotnet/runtime In dotnet/coreclr#24504, the ArrayPool<T>-derived types were changed to use GC.AllocateUninitializedArray<T>(...) under the covers as a performance optimization. The AllocateUninitializ...
Popmotion | JavaScript animation libraries for delightful interfaces Popmotion makes simple and powerful JavaScript animation libraries for HTML, SVG, React and React Native.
Firefox and Chrome will remove GUI indicator for Extended Validation certificates (Bulletproof TLS Newsletter Issue #56) Bulletproof TLS Newsletter #56
Ctrl+F (and possible other actions) should not close the temporary tab you activated it in - Developer Community Developer Community for Visual Studio Product family
We are what we do Find Meetups so you can do more of what matters to you. Or create your own group and meet people near you who share your interests.
LOVE, TRASH DOVES. TRIGGER WARNINGS. Online threats/harassment & stalking, fascists/neo-nazis, parental illness/death, brief mention of suicidal ideation…
Using KeyVault References to Read Key Vault Secrets - Petri How to use Key Vault References in Azure App Services for the most flexible and secure approach to reading sensitive configuration settings.
Anti-aliased Alpha Test: The Esoteric Alpha To Coverage Aliasing is the bane of VR. We have several tools we use to try to remove, or at least reduce aliasing in real time graphics today. Tools…
90949 – [9 Regression] null pointer check removed Description Jonathan Wakely 2019-06-20 10:14:14 UTC
IBM Gives Away PowerPC; Goes Open Source “With great power comes great responsibility.” – Uncle Ben Remember PowerPC? Nah, me neither. But now it can be yours. For free. Srsly. IBM has released the Power Architecture instruction set to t…
Tracking unmaintained crates · Issue #134 · RustSec/advisory-db I was recently complaining on how core ecosystem crates like term are unmaintained. Someone responded with an interesting idea: have RustSec track this information and expose it through cargo-audit...
Totally unsupported hacks - Add Windows Terminal to the Win+X Shortcut menu - Scott Hanselman You shouldn't do this and if you choose to do this you may hurt yourself or one of your beloved pets. You have been ...
Code Camp NYC — Welcome to the online headquarters of Code Camp NYC Welcome to the online headquarters of Code Camp NYC


Before Change
if B.ndimension() != 3:
raise RuntimeError("The filters must be simply a complex array!")
if type(A) is not type(B):
raise RuntimeError("A and B should be same type!")
After Change
"dimension of size 1 or 2 to indicate it is real "
"or complex, respectively")
if not iscomplex(B) and not isreal(B):
raise TypeError("The filter must be complex or real, indicated by a "
"last dimension of size 2 or 1, respectively")
if A.size()[-3:-1] != B.size()[-3:-1]:
raise RuntimeError("The filters are not compatible for multiplication!")
if A.dtype is not B.dtype:
raise RuntimeError("A and B must be of the same dtype")
if A.device != B.device:
raise RuntimeError("A and B must be on the same device")
if isreal(B):
if inplace:
return A.mul_(B)


Contacts
{{::(ct.name || ct.email.slice(0,8)+'..')}}
You don't have any contacts yet.
{{user.username}}
{{user.name}} {{::user.sirname}}
{{::user.email}}
{{::user.phone}}
{{ui.balance}} BTC
SEND
DEPOSIT
Getting new address...
{{::newAddress}}
Show QR
Copy
Coin Feed
You don't have any transactions yet.
{{::tx.text}}
{{::tx.message}}
{{::tx.note}}
A new wallet!
You have no transaction yet.
{{txmsg}}
{{newAddress}}
{{modals['receive']}}
Getting new address
START A COLLECTIVE
To begin collecting bitcoins for a campaign or a common event
What is the headline?
Description
{{res.name? res.name : res.email}}
Would you like to convey a message along?
Check your gears before sending bitcoins. Are you sure?
Successfully sent
{{send.error}}
{{::txDetails.label}}
{{::txDetails.date}}
{{::msg.tx.confirmed}}
{{::msg.tx.id}}
Display
{{::txDetails.txid}}
{{::msg.tx.amount}}
{{::txDetails.amount}} BTC
Sender
{{::txDetails.sender}}
Receiver
{{::txDetails.receiver}}
Text Attached
Display
{{::txDetails.message}}


The SDK for accessing all 9000+ airport codes and airport data from Air-port-codes API data feed. Use the Air-port-codes service to help you quickly build an auto-complete form for your website or application.
npm install air-port-codes-node
Need a PHP version? Here you go.
Consult the documentation for the appropriate config settings to use.
Also, you can view the Ionic Angular example code and live demo showing the API in practice.
import { autocomplete } from 'air-port-codes-node';
const apca = autocomplete({
key : 'xxxxxxxxxxx',
secret : 'xxxxxxxxxxxxxxx', // Your API Secret Key: use this if you are not connecting from a web server
limit : 15
});
Typically a key press would be used in an autocomplete form to make a new api request like this.
let term = 'new yo';
apca.request(term);
Then simply listen for the response
// SUCCESS we found some airports
apca.onSuccess = (data) => {
console.log('data', data)
};
// FAIL no airports found
apca.onError = (data) => {
console.log('onError', data.message);
};
Other Air-port-codes API endpoints can easily be accessed as well.
// The easiest way to build an airport autocomplete field
import { autocomplete } from 'air-port-codes-node';
// Finds a list of airports matching search term
import { multi } from 'air-port-codes-node';
// Finds a single airport matching an airport IATA code
import { single } from 'air-port-codes-node';
Retrieves all countries and their ISO (2 character alpha)values
import { countries } from 'air-port-codes-node';
// Retrieves all districts (states/provinces) of any country in the world
import { states } from 'air-port-codes-node';
You can also use an alias in your import to make using the library simpler to understand
import { autocomplete as apcAutoComplete } from 'air-port-codes-node';
const apca = apcAutoComplete({
key : 'xxxxxxxxxxx',
secret : 'xxxxxxxxxxxxxxx',
limit : 15
});
MIT license | (c) 2016 AIR-PORT-CODES | Air-port-codes.com/legal/terms-of-use


Toggle navigation
Project name
Ad
Edit
Msg
Delete
Email
Export
Import
Seed
App Settings
Test Mail
Gm
Camp Home
Notifications
edit b
Create Camp
Playa
Select Character
S
Select Camp
Msg
Create T
view
My Account
Select Camp
Select Camp
My Account
Login
Log out
Campaign:


Hang out with your besties while you see the Great Barrier Reef! For 7 years in a row, we have been rated the number one tour company for enjoyable excursions to the Great Barrier Reef by the International Travel Cooperative.
Our is the biggest scuba yacht in Cairns! Come on out for a dive in the morning, spend the afternoon sunning out on our deck, then meet us later on our ocean-side veranda for drinks, dancing and fun!
Please see below for our Package List including Certifications, Locations and services; Dates of Tours.
Make your reservation as soon as you can. Though we do have a waiting list, spaces usually run out after the new year.
Choose from one of our three packages:
Check out our yacht!
Our friendly Staff
The gorgeous coral
The Great Barrier Reef from above.


--- layout: page title: "404: Page not found" permalink: 404.html ---
😕 Make sure you have the right URL. Otherwise, this page no longer exists.


EDS Project
The first two photos are the product of our group design. We were asked to design an object that includes: Target Sensor Circuits, Counter & Display Circuit, Motion Control Circuit, Forward/Reverse Circuit, a Student board that design by us and Arduino Programme. During the design, we faced lots of challenges, like: how to make the axe to hit the switches, how to connect all the parts together. Luckily, we found out ways to slove all the problems. If you want to know more details, you can DM me on my Instagram!


Types (structs, unions and typedefs)¶
-
nghttp2_session
¶ The primary structure to hold the resources needed for a HTTP/2 session. The details of this structure are intentionally hidden from the public API.
-
nghttp2_info
¶ This struct is what
nghttp2_version()
returns. It holds information about the particular nghttp2 version.-
int
age
¶ Age of this struct. This instance of nghttp2 sets it to
NGHTTP2_VERSION_AGE
but a future version may bump it and add more struct fields at the bottom
-
int
version_num
¶ the
NGHTTP2_VERSION_NUM
number (since age ==1)
-
const char *
version_str
¶ points to the
NGHTTP2_VERSION
string (since age ==1)
-
const char *
proto_str
¶ points to the
NGHTTP2_PROTO_VERSION_ID
string this instance implements (since age ==1)
-
int
-
nghttp2_vec
¶ The object representing single contiguous buffer.
-
uint8_t *
base
¶ The pointer to the buffer.
-
size_t
len
¶ The length of the buffer.
-
uint8_t *
-
nghttp2_rcbuf
¶ The object representing reference counted buffer. The details of this structure are intentionally hidden from the public API.
-
nghttp2_nv
¶ The name/value pair, which mainly used to represent header fields.
-
uint8_t *
name
¶ The name byte string. If this struct is presented from library (e.g.,
nghttp2_on_frame_recv_callback
), name is guaranteed to be NULL-terminated. For some callbacks (nghttp2_before_frame_send_callback
,nghttp2_on_frame_send_callback
, andnghttp2_on_frame_not_send_callback
), it may not be NULL-terminated if header field is passed from application with the flagNGHTTP2_NV_FLAG_NO_COPY_NAME
). When application is constructing this struct, name is not required to be NULL-terminated.
-
uint8_t *
value
¶ The value byte string. If this struct is presented from library (e.g.,
nghttp2_on_frame_recv_callback
), value is guaranteed to be NULL-terminated. For some callbacks (nghttp2_before_frame_send_callback
,nghttp2_on_frame_send_callback
, andnghttp2_on_frame_not_send_callback
), it may not be NULL-terminated if header field is passed from application with the flagNGHTTP2_NV_FLAG_NO_COPY_VALUE
). When application is constructing this struct, value is not required to be NULL-terminated.
-
size_t
namelen
¶ The length of the name, excluding terminating NULL.
-
size_t
valuelen
¶ The length of the value, excluding terminating NULL.
-
uint8_t
flags
¶ Bitwise OR of one or more of
nghttp2_nv_flag
.
-
uint8_t *
-
nghttp2_frame_hd
¶ The frame header.
-
size_t
length
¶ The length field of this frame, excluding frame header.
-
int32_t
stream_id
¶ The stream identifier (aka, stream ID)
-
uint8_t
type
¶ The type of this frame. See
nghttp2_frame_type()
.
-
uint8_t
flags
¶ The flags.
-
uint8_t
reserved
¶ Reserved bit in frame header. Currently, this is always set to 0 and application should not expect something useful in here.
-
size_t
-
nghttp2_data_source
¶ This union represents the some kind of data source passed to
nghttp2_data_source_read_callback
.-
int
fd
¶ The integer field, suitable for a file descriptor.
-
void *
ptr
¶ The pointer to an arbitrary object.
-
int
-
typedef ssize_t
(*nghttp2_data_source_read_callback)
(nghttp2_session *session, int32_t stream_id, uint8_t *buf, size_t length, uint32_t *data_flags, nghttp2_data_source *source, void *user_data)¶ Callback function invoked when the library wants to read data from the source. The read data is sent in the stream stream_id. The implementation of this function must read at most length bytes of data from source (or possibly other places) and store them in buf and return number of data stored in buf. If EOF is reached, set
NGHTTP2_DATA_FLAG_EOF
flag in *data_flags.Sometime it is desirable to avoid copying data into buf and let application to send data directly. To achieve this, set
NGHTTP2_DATA_FLAG_NO_COPY
to *data_flags (and possibly other flags, just like when we do copy), and return the number of bytes to send without copying data into buf. The library, seeingNGHTTP2_DATA_FLAG_NO_COPY
, will invokenghttp2_send_data_callback
. The application must send complete DATA frame in that callback.If this callback is set by
nghttp2_submit_request()
,nghttp2_submit_response()
ornghttp2_submit_headers()
andnghttp2_submit_data()
with flag parameterNGHTTP2_FLAG_END_STREAM
set, andNGHTTP2_DATA_FLAG_EOF
flag is set to *data_flags, DATA frame will have END_STREAM flag set. Usually, this is expected behaviour and all are fine. One exception is send trailer fields. You cannot send trailer fields after sending frame with END_STREAM set. To avoid this problem, one can setNGHTTP2_DATA_FLAG_NO_END_STREAM
along withNGHTTP2_DATA_FLAG_EOF
to signal the library not to set END_STREAM in DATA frame. Then application can usenghttp2_submit_trailer()
to send trailer fields.nghttp2_submit_trailer()
can be called inside this callback.If the application wants to postpone DATA frames (e.g., asynchronous I/O, or reading data blocks for long time), it is achieved by returning
NGHTTP2_ERR_DEFERRED
without reading any data in this invocation. The library removes DATA frame from the outgoing queue temporarily. To move back deferred DATA frame to outgoing queue, callnghttp2_session_resume_data()
.By default, length is limited to 16KiB at maximum. If peer allows larger frames, application can enlarge transmission buffer size. See
nghttp2_data_source_read_length_callback
for more details.If the application just wants to return from
nghttp2_session_send()
ornghttp2_session_mem_send()
without sending anything, returnNGHTTP2_ERR_PAUSE
.In case of error, there are 2 choices. Returning
NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE
will close the stream by issuing RST_STREAM withNGHTTP2_INTERNAL_ERROR
. If a different error code is desirable, usenghttp2_submit_rst_stream()
with a desired error code and then returnNGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE
. ReturningNGHTTP2_ERR_CALLBACK_FAILURE
will signal the entire session failure.
-
nghttp2_data_provider
¶ This struct represents the data source and the way to read a chunk of data from it.
-
nghttp2_data_source
source
¶ The data source.
-
nghttp2_data_source_read_callback
read_callback
¶ The callback function to read a chunk of data from the source.
-
nghttp2_data_source
-
nghttp2_data
¶ The DATA frame. The received data is delivered via
nghttp2_on_data_chunk_recv_callback
.-
size_t
padlen
¶ The length of the padding in this frame. This includes PAD_HIGH and PAD_LOW.
-
size_t
-
nghttp2_priority_spec
¶ The structure to specify stream dependency.
-
int32_t
stream_id
¶ The stream ID of the stream to depend on. Specifying 0 makes stream not depend any other stream.
-
int32_t
weight
¶ The weight of this dependency.
-
uint8_t
exclusive
¶ nonzero means exclusive dependency
-
int32_t
-
nghttp2_headers
¶ The HEADERS frame. It has the following members:
-
nghttp2_frame_hd
hd
¶ The frame header.
-
size_t
padlen
¶ The length of the padding in this frame. This includes PAD_HIGH and PAD_LOW.
-
nghttp2_priority_spec
pri_spec
¶ The priority specification
-
nghttp2_nv *
nva
¶ The name/value pairs.
-
size_t
nvlen
¶ The number of name/value pairs in nva.
-
nghttp2_headers_category
cat
¶ The category of this HEADERS frame.
-
nghttp2_frame_hd
-
nghttp2_priority
¶ The PRIORITY frame. It has the following members:
-
nghttp2_frame_hd
hd
¶ The frame header.
-
nghttp2_priority_spec
pri_spec
¶ The priority specification.
-
nghttp2_frame_hd
-
nghttp2_rst_stream
¶ The RST_STREAM frame. It has the following members:
-
nghttp2_frame_hd
hd
¶ The frame header.
-
uint32_t
error_code
¶ The error code. See
nghttp2_error_code
.
-
nghttp2_frame_hd
-
nghttp2_settings_entry
¶ The SETTINGS ID/Value pair. It has the following members:
-
int32_t
settings_id
¶ The SETTINGS ID. See
nghttp2_settings_id
.
-
uint32_t
value
¶ The value of this entry.
-
int32_t
-
nghttp2_settings
¶ The SETTINGS frame. It has the following members:
-
nghttp2_frame_hd
hd
¶ The frame header.
-
size_t
niv
¶ The number of SETTINGS ID/Value pairs in iv.
-
nghttp2_settings_entry *
iv
¶ The pointer to the array of SETTINGS ID/Value pair.
-
nghttp2_frame_hd
-
nghttp2_push_promise
¶ The PUSH_PROMISE frame. It has the following members:
-
nghttp2_frame_hd
hd
¶ The frame header.
-
size_t
padlen
¶ The length of the padding in this frame. This includes PAD_HIGH and PAD_LOW.
-
nghttp2_nv *
nva
¶ The name/value pairs.
-
size_t
nvlen
¶ The number of name/value pairs in nva.
-
int32_t
promised_stream_id
¶ The promised stream ID
-
uint8_t
reserved
¶ Reserved bit. Currently this is always set to 0 and application should not expect something useful in here.
-
nghttp2_frame_hd
-
nghttp2_ping
¶ The PING frame. It has the following members:
-
nghttp2_frame_hd
hd
¶ The frame header.
-
uint8_t opaque_data[8]
The opaque data
-
nghttp2_frame_hd
-
nghttp2_goaway
¶ The GOAWAY frame. It has the following members:
-
nghttp2_frame_hd
hd
¶ The frame header.
-
int32_t
last_stream_id
¶ The last stream stream ID.
-
uint32_t
error_code
¶ The error code. See
nghttp2_error_code
.
-
uint8_t *
opaque_data
¶ The additional debug data
-
size_t
opaque_data_len
¶ The length of opaque_data member.
-
uint8_t
reserved
¶ Reserved bit. Currently this is always set to 0 and application should not expect something useful in here.
-
nghttp2_frame_hd
-
nghttp2_window_update
¶ The WINDOW_UPDATE frame. It has the following members:
-
nghttp2_frame_hd
hd
¶ The frame header.
-
int32_t
window_size_increment
¶ The window size increment.
-
uint8_t
reserved
¶ Reserved bit. Currently this is always set to 0 and application should not expect something useful in here.
-
nghttp2_frame_hd
-
nghttp2_extension
¶ The extension frame. It has following members:
-
nghttp2_frame_hd
hd
¶ The frame header.
-
void *
payload
¶ The pointer to extension payload. The exact pointer type is determined by hd.type.
Currently, no extension is supported. This is a place holder for the future extensions.
-
nghttp2_frame_hd
-
nghttp2_frame
¶ This union includes all frames to pass them to various function calls as nghttp2_frame type. The CONTINUATION frame is omitted from here because the library deals with it internally.
-
nghttp2_frame_hd
hd
¶ The frame header, which is convenient to inspect frame header.
-
nghttp2_data
data
¶ The DATA frame.
-
nghttp2_headers
headers
¶ The HEADERS frame.
-
nghttp2_priority
priority
¶ The PRIORITY frame.
-
nghttp2_rst_stream
rst_stream
¶ The RST_STREAM frame.
-
nghttp2_settings
settings
¶ The SETTINGS frame.
-
nghttp2_push_promise
push_promise
¶ The PUSH_PROMISE frame.
-
nghttp2_ping
ping
¶ The PING frame.
-
nghttp2_goaway
goaway
¶ The GOAWAY frame.
-
nghttp2_window_update
window_update
¶ The WINDOW_UPDATE frame.
-
nghttp2_extension
ext
¶ The extension frame.
-
nghttp2_frame_hd
-
typedef ssize_t
(*nghttp2_send_callback)
(nghttp2_session *session, const uint8_t *data, size_t length, int flags, void *user_data)¶ Callback function invoked when session wants to send data to the remote peer. The implementation of this function must send at most length bytes of data stored in data. The flags is currently not used and always 0. It must return the number of bytes sent if it succeeds. If it cannot send any single byte without blocking, it must return
NGHTTP2_ERR_WOULDBLOCK
. For other errors, it must returnNGHTTP2_ERR_CALLBACK_FAILURE
. The user_data pointer is the third argument passed in to the call tonghttp2_session_client_new()
ornghttp2_session_server_new()
.This callback is required if the application uses
nghttp2_session_send()
to send data to the remote endpoint. If the application uses solelynghttp2_session_mem_send()
instead, this callback function is unnecessary.To set this callback to
nghttp2_session_callbacks
, usenghttp2_session_callbacks_set_send_callback()
.Note
The length may be very small. If that is the case, and application disables Nagle algorithm (
TCP_NODELAY
), then just writing data to the network stack leads to very small packet, and it is very inefficient. An application should be responsible to buffer up small chunks of data as necessary to avoid this situation.
-
typedef int
(*nghttp2_send_data_callback)
(nghttp2_session *session, nghttp2_frame *frame, const uint8_t *framehd, size_t length, nghttp2_data_source *source, void *user_data)¶ Callback function invoked when
NGHTTP2_DATA_FLAG_NO_COPY
is used innghttp2_data_source_read_callback
to send complete DATA frame.The frame is a DATA frame to send. The framehd is the serialized frame header (9 bytes). The length is the length of application data to send (this does not include padding). The source is the same pointer passed to
nghttp2_data_source_read_callback
.The application first must send frame header framehd of length 9 bytes. If
frame->data.padlen > 0
, send 1 byte of valueframe->data.padlen - 1
. Then send exactly length bytes of application data. Finally, ifframe->data.padlen > 1
, sendframe->data.padlen - 1
bytes of zero as padding.The application has to send complete DATA frame in this callback. If all data were written successfully, return 0.
If it cannot send any data at all, just return
NGHTTP2_ERR_WOULDBLOCK
; the library will call this callback with the same parameters later (It is recommended to send complete DATA frame at once in this function to deal with error; if partial frame data has already sent, it is impossible to send another data in that state, and all we can do is tear down connection). When data is fully processed, but application wants to makenghttp2_session_mem_send()
ornghttp2_session_send()
return immediately without processing next frames, returnNGHTTP2_ERR_PAUSE
. If application decided to reset this stream, returnNGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE
, then the library will send RST_STREAM with INTERNAL_ERROR as error code. The application can also returnNGHTTP2_ERR_CALLBACK_FAILURE
, which will result in connection closure. Returning any other value is treated asNGHTTP2_ERR_CALLBACK_FAILURE
is returned.
-
typedef ssize_t
(*nghttp2_recv_callback)
(nghttp2_session *session, uint8_t *buf, size_t length, int flags, void *user_data)¶ Callback function invoked when session wants to receive data from the remote peer. The implementation of this function must read at most length bytes of data and store it in buf. The flags is currently not used and always 0. It must return the number of bytes written in buf if it succeeds. If it cannot read any single byte without blocking, it must return
NGHTTP2_ERR_WOULDBLOCK
. If it gets EOF before it reads any single byte, it must returnNGHTTP2_ERR_EOF
. For other errors, it must returnNGHTTP2_ERR_CALLBACK_FAILURE
. Returning 0 is treated asNGHTTP2_ERR_WOULDBLOCK
. The user_data pointer is the third argument passed in to the call tonghttp2_session_client_new()
ornghttp2_session_server_new()
.This callback is required if the application uses
nghttp2_session_recv()
to receive data from the remote endpoint. If the application uses solelynghttp2_session_mem_recv()
instead, this callback function is unnecessary.To set this callback to
nghttp2_session_callbacks
, usenghttp2_session_callbacks_set_recv_callback()
.
-
typedef int
(*nghttp2_on_frame_recv_callback)
(nghttp2_session *session, const nghttp2_frame *frame, void *user_data)¶ Callback function invoked by
nghttp2_session_recv()
andnghttp2_session_mem_recv()
when a frame is received. The user_data pointer is the third argument passed in to the call tonghttp2_session_client_new()
ornghttp2_session_server_new()
.If frame is HEADERS or PUSH_PROMISE, the
nva
andnvlen
member of their data structure are alwaysNULL
and 0 respectively. The header name/value pairs are emitted vianghttp2_on_header_callback
.For HEADERS, PUSH_PROMISE and DATA frames, this callback may be called after stream is closed (see
nghttp2_on_stream_close_callback
). The application should check that stream is still alive using its own stream management ornghttp2_session_get_stream_user_data()
.Only HEADERS and DATA frame can signal the end of incoming data. If
frame->hd.flags & NGHTTP2_FLAG_END_STREAM
is nonzero, the frame is the last frame from the remote peer in this stream.This callback won't be called for CONTINUATION frames. HEADERS/PUSH_PROMISE + CONTINUATIONs are treated as single frame.
The implementation of this function must return 0 if it succeeds. If nonzero value is returned, it is treated as fatal error and
nghttp2_session_recv()
andnghttp2_session_mem_recv()
functions immediately returnNGHTTP2_ERR_CALLBACK_FAILURE
.To set this callback to
nghttp2_session_callbacks
, usenghttp2_session_callbacks_set_on_frame_recv_callback()
.
-
typedef int
(*nghttp2_on_invalid_frame_recv_callback)
(nghttp2_session *session, const nghttp2_frame *frame, int lib_error_code, void *user_data)¶ Callback function invoked by
nghttp2_session_recv()
andnghttp2_session_mem_recv()
when an invalid non-DATA frame is received. The error is indicated by the lib_error_code, which is one of the values defined innghttp2_error
. When this callback function is invoked, the library automatically submits either RST_STREAM or GOAWAY frame. The user_data pointer is the third argument passed in to the call tonghttp2_session_client_new()
ornghttp2_session_server_new()
.If frame is HEADERS or PUSH_PROMISE, the
nva
andnvlen
member of their data structure are alwaysNULL
and 0 respectively.The implementation of this function must return 0 if it succeeds. If nonzero is returned, it is treated as fatal error and
nghttp2_session_recv()
andnghttp2_session_mem_recv()
functions immediately returnNGHTTP2_ERR_CALLBACK_FAILURE
.To set this callback to
nghttp2_session_callbacks
, usenghttp2_session_callbacks_set_on_invalid_frame_recv_callback()
.
-
typedef int
(*nghttp2_on_data_chunk_recv_callback)
(nghttp2_session *session, uint8_t flags, int32_t stream_id, const uint8_t *data, size_t len, void *user_data)¶ Callback function invoked when a chunk of data in DATA frame is received. The stream_id is the stream ID this DATA frame belongs to. The flags is the flags of DATA frame which this data chunk is contained.
(flags & NGHTTP2_FLAG_END_STREAM) != 0
does not necessarily mean this chunk of data is the last one in the stream. You should usenghttp2_on_frame_recv_callback
to know all data frames are received. The user_data pointer is the third argument passed in to the call tonghttp2_session_client_new()
ornghttp2_session_server_new()
.If the application uses
nghttp2_session_mem_recv()
, it can returnNGHTTP2_ERR_PAUSE
to makenghttp2_session_mem_recv()
return without processing further input bytes. The memory by pointed by the data is retained untilnghttp2_session_mem_recv()
ornghttp2_session_recv()
is called. The application must retain the input bytes which was used to produce the data parameter, because it may refer to the memory region included in the input bytes.The implementation of this function must return 0 if it succeeds. If nonzero is returned, it is treated as fatal error, and
nghttp2_session_recv()
andnghttp2_session_mem_recv()
functions immediately returnNGHTTP2_ERR_CALLBACK_FAILURE
.To set this callback to
nghttp2_session_callbacks
, usenghttp2_session_callbacks_set_on_data_chunk_recv_callback()
.
-
typedef int
(*nghttp2_before_frame_send_callback)
(nghttp2_session *session, const nghttp2_frame *frame, void *user_data)¶ Callback function invoked just before the non-DATA frame frame is sent. The user_data pointer is the third argument passed in to the call to
nghttp2_session_client_new()
ornghttp2_session_server_new()
.The implementation of this function must return 0 if it succeeds. It can also return
NGHTTP2_ERR_CANCEL
to cancel the transmission of the given frame.If there is a fatal error while executing this callback, the implementation should return
NGHTTP2_ERR_CALLBACK_FAILURE
, which makesnghttp2_session_send()
andnghttp2_session_mem_send()
functions immediately returnNGHTTP2_ERR_CALLBACK_FAILURE
.If the other value is returned, it is treated as if
NGHTTP2_ERR_CALLBACK_FAILURE
is returned. But the implementation should not rely on this since the library may define new return value to extend its capability.To set this callback to
nghttp2_session_callbacks
, usenghttp2_session_callbacks_set_before_frame_send_callback()
.
-
typedef int
(*nghttp2_on_frame_send_callback)
(nghttp2_session *session, const nghttp2_frame *frame, void *user_data)¶ Callback function invoked after the frame frame is sent. The user_data pointer is the third argument passed in to the call to
nghttp2_session_client_new()
ornghttp2_session_server_new()
.The implementation of this function must return 0 if it succeeds. If nonzero is returned, it is treated as fatal error and
nghttp2_session_send()
andnghttp2_session_mem_send()
functions immediately returnNGHTTP2_ERR_CALLBACK_FAILURE
.To set this callback to
nghttp2_session_callbacks
, usenghttp2_session_callbacks_set_on_frame_send_callback()
.
-
typedef int
(*nghttp2_on_frame_not_send_callback)
(nghttp2_session *session, const nghttp2_frame *frame, int lib_error_code, void *user_data)¶ Callback function invoked after the non-DATA frame frame is not sent because of the error. The error is indicated by the lib_error_code, which is one of the values defined in
nghttp2_error
. The user_data pointer is the third argument passed in to the call tonghttp2_session_client_new()
ornghttp2_session_server_new()
.The implementation of this function must return 0 if it succeeds. If nonzero is returned, it is treated as fatal error and
nghttp2_session_send()
andnghttp2_session_mem_send()
functions immediately returnNGHTTP2_ERR_CALLBACK_FAILURE
.nghttp2_session_get_stream_user_data()
can be used to get associated data.To set this callback to
nghttp2_session_callbacks
, usenghttp2_session_callbacks_set_on_frame_not_send_callback()
.
-
typedef int
(*nghttp2_on_stream_close_callback)
(nghttp2_session *session, int32_t stream_id, uint32_t error_code, void *user_data)¶ Callback function invoked when the stream stream_id is closed. The reason of closure is indicated by the error_code. The error_code is usually one of
nghttp2_error_code
, but that is not guaranteed. The stream_user_data, which was specified innghttp2_submit_request()
ornghttp2_submit_headers()
, is still available in this function. The user_data pointer is the third argument passed in to the call tonghttp2_session_client_new()
ornghttp2_session_server_new()
.This function is also called for a stream in reserved state.
The implementation of this function must return 0 if it succeeds. If nonzero is returned, it is treated as fatal error and
nghttp2_session_recv()
,nghttp2_session_mem_recv()
,nghttp2_session_send()
, andnghttp2_session_mem_send()
functions immediately returnNGHTTP2_ERR_CALLBACK_FAILURE
.To set this callback to
nghttp2_session_callbacks
, usenghttp2_session_callbacks_set_on_stream_close_callback()
.
-
typedef int
(*nghttp2_on_begin_headers_callback)
(nghttp2_session *session, const nghttp2_frame *frame, void *user_data)¶ Callback function invoked when the reception of header block in HEADERS or PUSH_PROMISE is started. Each header name/value pair will be emitted by
nghttp2_on_header_callback
.The
frame->hd.flags
may not haveNGHTTP2_FLAG_END_HEADERS
flag set, which indicates that one or more CONTINUATION frames are involved. But the application does not need to care about that because the header name/value pairs are emitted transparently regardless of CONTINUATION frames.The server applications probably create an object to store information about new stream if
frame->hd.type == NGHTTP2_HEADERS
andframe->headers.cat == NGHTTP2_HCAT_REQUEST
. If session is configured as server side,frame->headers.cat
is eitherNGHTTP2_HCAT_REQUEST
containing request headers orNGHTTP2_HCAT_HEADERS
containing trailer fields and never get PUSH_PROMISE in this callback.For the client applications,
frame->hd.type
is eitherNGHTTP2_HEADERS
orNGHTTP2_PUSH_PROMISE
. In case ofNGHTTP2_HEADERS
,frame->headers.cat == NGHTTP2_HCAT_RESPONSE
means that it is the first response headers, but it may be non-final response which is indicated by 1xx status code. In this case, there may be zero or more HEADERS frame withframe->headers.cat == NGHTTP2_HCAT_HEADERS
which has non-final response code and finally client gets exactly one HEADERS frame withframe->headers.cat == NGHTTP2_HCAT_HEADERS
containing final response headers (non-1xx status code). The trailer fields also hasframe->headers.cat == NGHTTP2_HCAT_HEADERS
which does not contain any status code.Returning
NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE
will close the stream (promised stream if frame is PUSH_PROMISE) by issuing RST_STREAM withNGHTTP2_INTERNAL_ERROR
. In this case,nghttp2_on_header_callback
andnghttp2_on_frame_recv_callback
will not be invoked. If a different error code is desirable, usenghttp2_submit_rst_stream()
with a desired error code and then returnNGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE
. Again, useframe->push_promise.promised_stream_id
as stream_id parameter innghttp2_submit_rst_stream()
if frame is PUSH_PROMISE.The implementation of this function must return 0 if it succeeds. It can return
NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE
to reset the stream (promised stream if frame is PUSH_PROMISE). For critical errors, it must returnNGHTTP2_ERR_CALLBACK_FAILURE
. If the other value is returned, it is treated as ifNGHTTP2_ERR_CALLBACK_FAILURE
is returned. IfNGHTTP2_ERR_CALLBACK_FAILURE
is returned,nghttp2_session_mem_recv()
function will immediately returnNGHTTP2_ERR_CALLBACK_FAILURE
.To set this callback to
nghttp2_session_callbacks
, usenghttp2_session_callbacks_set_on_begin_headers_callback()
.
-
typedef int
(*nghttp2_on_header_callback)
(nghttp2_session *session, const nghttp2_frame *frame, const uint8_t *name, size_t namelen, const uint8_t *value, size_t valuelen, uint8_t flags, void *user_data)¶ Callback function invoked when a header name/value pair is received for the frame. The name of length namelen is header name. The value of length valuelen is header value. The flags is bitwise OR of one or more of
nghttp2_nv_flag
.If
NGHTTP2_NV_FLAG_NO_INDEX
is set in flags, the receiver must not index this name/value pair when forwarding it to the next hop. More specifically, "Literal Header Field never Indexed" representation must be used in HPACK encoding.When this callback is invoked,
frame->hd.type
is eitherNGHTTP2_HEADERS
orNGHTTP2_PUSH_PROMISE
. After all header name/value pairs are processed with this callback, and no error has been detected,nghttp2_on_frame_recv_callback
will be invoked. If there is an error in decompression,nghttp2_on_frame_recv_callback
for the frame will not be invoked.Both name and value are guaranteed to be NULL-terminated. The namelen and valuelen do not include terminal NULL. If
nghttp2_option_set_no_http_messaging()
is used with nonzero value, NULL character may be included in name or value before terminating NULL.Please note that unless
nghttp2_option_set_no_http_messaging()
is used, nghttp2 library does perform validation against the name and the value usingnghttp2_check_header_name()
andnghttp2_check_header_value()
. In addition to this, nghttp2 performs validation based on HTTP Messaging rule, which is briefly explained in HTTP Messaging section.If the application uses
nghttp2_session_mem_recv()
, it can returnNGHTTP2_ERR_PAUSE
to makenghttp2_session_mem_recv()
return without processing further input bytes. The memory pointed by frame, name and value parameters are retained untilnghttp2_session_mem_recv()
ornghttp2_session_recv()
is called. The application must retain the input bytes which was used to produce these parameters, because it may refer to the memory region included in the input bytes.Returning
NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE
will close the stream (promised stream if frame is PUSH_PROMISE) by issuing RST_STREAM withNGHTTP2_INTERNAL_ERROR
. In this case,nghttp2_on_header_callback
andnghttp2_on_frame_recv_callback
will not be invoked. If a different error code is desirable, usenghttp2_submit_rst_stream()
with a desired error code and then returnNGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE
. Again, useframe->push_promise.promised_stream_id
as stream_id parameter innghttp2_submit_rst_stream()
if frame is PUSH_PROMISE.The implementation of this function must return 0 if it succeeds. It may return
NGHTTP2_ERR_PAUSE
orNGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE
. For other critical failures, it must returnNGHTTP2_ERR_CALLBACK_FAILURE
. If the other nonzero value is returned, it is treated asNGHTTP2_ERR_CALLBACK_FAILURE
. IfNGHTTP2_ERR_CALLBACK_FAILURE
is returned,nghttp2_session_recv()
andnghttp2_session_mem_recv()
functions immediately returnNGHTTP2_ERR_CALLBACK_FAILURE
.To set this callback to
nghttp2_session_callbacks
, usenghttp2_session_callbacks_set_on_header_callback()
.Warning
Application should properly limit the total buffer size to store incoming header fields. Without it, peer may send large number of header fields or large header fields to cause out of memory in local endpoint. Due to how HPACK works, peer can do this effectively without using much memory on their own.
-
typedef int
(*nghttp2_on_header_callback2)
(nghttp2_session *session, const nghttp2_frame *frame, nghttp2_rcbuf *name, nghttp2_rcbuf *value, uint8_t flags, void *user_data)¶ Callback function invoked when a header name/value pair is received for the frame. The name is header name. The value is header value. The flags is bitwise OR of one or more of
nghttp2_nv_flag
.This callback behaves like
nghttp2_on_header_callback
, except that name and value are stored in reference counted buffer. If application wishes to keep these references without copying them, usenghttp2_rcbuf_incref()
to increment their reference count. It is the application's responsibility to callnghttp2_rcbuf_decref()
if they callednghttp2_rcbuf_incref()
so as not to leak memory. If the session is created bynghttp2_session_server_new3()
ornghttp2_session_client_new3()
, the function to free memory is the one belongs to the mem parameter. As long as this free function alives, name and value can live after session was destroyed.
-
typedef int
(*nghttp2_on_invalid_header_callback)
(nghttp2_session *session, const nghttp2_frame *frame, const uint8_t *name, size_t namelen, const uint8_t *value, size_t valuelen, uint8_t flags, void *user_data)¶ Callback function invoked when a invalid header name/value pair is received for the frame.
The parameter and behaviour are similar to
nghttp2_on_header_callback
. The difference is that this callback is only invoked when a invalid header name/value pair is received which is silently ignored if this callback is not set. Only invalid regular header field are passed to this callback. In other words, invalid pseudo header field is not passed to this callback. Also header fields which includes upper cased latter are also treated as error without passing them to this callback.This callback is only considered if HTTP messaging validation is turned on (which is on by default, see
nghttp2_option_set_no_http_messaging()
).With this callback, application inspects the incoming invalid field, and it also can reset stream from this callback by returning
NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE
. By default, the error code isNGHTTP2_INTERNAL_ERROR
. To change the error code, callnghttp2_submit_rst_stream()
with the error code of choice in addition to returningNGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE
.
-
typedef int
(*nghttp2_on_invalid_header_callback2)
(nghttp2_session *session, const nghttp2_frame *frame, nghttp2_rcbuf *name, nghttp2_rcbuf *value, uint8_t flags, void *user_data)¶ Callback function invoked when a invalid header name/value pair is received for the frame.
The parameter and behaviour are similar to
nghttp2_on_header_callback2
. The difference is that this callback is only invoked when a invalid header name/value pair is received which is silently ignored if this callback is not set. Only invalid regular header field are passed to this callback. In other words, invalid pseudo header field is not passed to this callback. Also header fields which includes upper cased latter are also treated as error without passing them to this callback.This callback is only considered if HTTP messaging validation is turned on (which is on by default, see
nghttp2_option_set_no_http_messaging()
).With this callback, application inspects the incoming invalid field, and it also can reset stream from this callback by returning
NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE
. By default, the error code isNGHTTP2_INTERNAL_ERROR
. To change the error code, callnghttp2_submit_rst_stream()
with the error code of choice in addition to returningNGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE
.
-
typedef ssize_t
(*nghttp2_select_padding_callback)
(nghttp2_session *session, const nghttp2_frame *frame, size_t max_payloadlen, void *user_data)¶ Callback function invoked when the library asks application how many padding bytes are required for the transmission of the frame. The application must choose the total length of payload including padded bytes in range [frame->hd.length, max_payloadlen], inclusive. Choosing number not in this range will be treated as
NGHTTP2_ERR_CALLBACK_FAILURE
. Returningframe->hd.length
means no padding is added. ReturningNGHTTP2_ERR_CALLBACK_FAILURE
will makenghttp2_session_send()
andnghttp2_session_mem_send()
functions immediately returnNGHTTP2_ERR_CALLBACK_FAILURE
.To set this callback to
nghttp2_session_callbacks
, usenghttp2_session_callbacks_set_select_padding_callback()
.
-
typedef ssize_t
(*nghttp2_data_source_read_length_callback)
(nghttp2_session *session, uint8_t frame_type, int32_t stream_id, int32_t session_remote_window_size, int32_t stream_remote_window_size, uint32_t remote_max_frame_size, void *user_data)¶ Callback function invoked when library wants to get max length of data to send data to the remote peer. The implementation of this function should return a value in the following range. [1, min(session_remote_window_size, stream_remote_window_size, remote_max_frame_size)]. If a value greater than this range is returned than the max allow value will be used. Returning a value smaller than this range is treated as
NGHTTP2_ERR_CALLBACK_FAILURE
. The frame_type is provided for future extensibility and identifies the type of frame (seenghttp2_frame_type
) for which to get the length for. Currently supported frame types are:NGHTTP2_DATA
.This callback can be used to control the length in bytes for which
nghttp2_data_source_read_callback
is allowed to send to the remote endpoint. This callback is optional. ReturningNGHTTP2_ERR_CALLBACK_FAILURE
will signal the entire session failure.To set this callback to
nghttp2_session_callbacks
, usenghttp2_session_callbacks_set_data_source_read_length_callback()
.
-
typedef int
(*nghttp2_on_begin_frame_callback)
(nghttp2_session *session, const nghttp2_frame_hd *hd, void *user_data)¶ Callback function invoked when a frame header is received. The hd points to received frame header.
Unlike
nghttp2_on_frame_recv_callback
, this callback will also be called when frame header of CONTINUATION frame is received.If both
nghttp2_on_begin_frame_callback
andnghttp2_on_begin_headers_callback
are set and HEADERS or PUSH_PROMISE is received,nghttp2_on_begin_frame_callback
will be called first.The implementation of this function must return 0 if it succeeds. If nonzero value is returned, it is treated as fatal error and
nghttp2_session_recv()
andnghttp2_session_mem_recv()
functions immediately returnNGHTTP2_ERR_CALLBACK_FAILURE
.To set this callback to
nghttp2_session_callbacks
, usenghttp2_session_callbacks_set_on_begin_frame_callback()
.
-
typedef int
(*nghttp2_on_extension_chunk_recv_callback)
(nghttp2_session *session, const nghttp2_frame_hd *hd, const uint8_t *data, size_t len, void *user_data)¶ Callback function invoked when chunk of extension frame payload is received. The hd points to frame header. The received chunk is data of length len.
The implementation of this function must return 0 if it succeeds.
To abort processing this extension frame, return
NGHTTP2_ERR_CANCEL
.If fatal error occurred, application should return
NGHTTP2_ERR_CALLBACK_FAILURE
. In this case,nghttp2_session_recv()
andnghttp2_session_mem_recv()
functions immediately returnNGHTTP2_ERR_CALLBACK_FAILURE
. If the other values are returned, currently they are treated asNGHTTP2_ERR_CALLBACK_FAILURE
.
-
typedef int
(*nghttp2_unpack_extension_callback)
(nghttp2_session *session, void **payload, const nghttp2_frame_hd *hd, void *user_data)¶ Callback function invoked when library asks the application to unpack extension payload from its wire format. The extension payload has been passed to the application using
nghttp2_on_extension_chunk_recv_callback
. The frame header is already unpacked by the library and provided as hd.To receive extension frames, the application must tell desired extension frame type to the library using
nghttp2_option_set_user_recv_extension_type()
.The implementation of this function may store the pointer to the created object as a result of unpacking in *payload, and returns 0. The pointer stored in *payload is opaque to the library, and the library does not own its pointer. *payload is initialized as
NULL
. The *payload is available asframe->ext.payload
innghttp2_on_frame_recv_callback
. Therefore if application can free that memory insidenghttp2_on_frame_recv_callback
callback. Of course, application has a liberty not ot use *payload, and do its own mechanism to process extension frames.To abort processing this extension frame, return
NGHTTP2_ERR_CANCEL
.If fatal error occurred, application should return
NGHTTP2_ERR_CALLBACK_FAILURE
. In this case,nghttp2_session_recv()
andnghttp2_session_mem_recv()
functions immediately returnNGHTTP2_ERR_CALLBACK_FAILURE
. If the other values are returned, currently they are treated asNGHTTP2_ERR_CALLBACK_FAILURE
.
-
typedef ssize_t
(*nghttp2_pack_extension_callback)
(nghttp2_session *session, uint8_t *buf, size_t len, const nghttp2_frame *frame, void *user_data)¶ Callback function invoked when library asks the application to pack extension payload in its wire format. The frame header will be packed by library. Application must pack payload only.
frame->ext.payload
is the object passed tonghttp2_submit_extension()
as payload parameter. Application must pack extension payload to the buf of its capacity len bytes. The len is at least 16KiB.The implementation of this function should return the number of bytes written into buf when it succeeds.
To abort processing this extension frame, return
NGHTTP2_ERR_CANCEL
, andnghttp2_on_frame_not_send_callback
will be invoked.If fatal error occurred, application should return
NGHTTP2_ERR_CALLBACK_FAILURE
. In this case,nghttp2_session_send()
andnghttp2_session_mem_send()
functions immediately returnNGHTTP2_ERR_CALLBACK_FAILURE
. If the other values are returned, currently they are treated asNGHTTP2_ERR_CALLBACK_FAILURE
. If the return value is strictly larger than len, it is treated asNGHTTP2_ERR_CALLBACK_FAILURE
.
-
typedef int
(*nghttp2_error_callback)
(nghttp2_session *session, const char *msg, size_t len, void *user_data)¶ Callback function invoked when library provides the error message intended for human consumption. This callback is solely for debugging purpose. The msg is typically NULL-terminated string of length len. len does not include the sentinel NULL character.
The format of error message may change between nghttp2 library versions. The application should not depend on the particular format.
Normally, application should return 0 from this callback. If fatal error occurred while doing something in this callback, application should return
NGHTTP2_ERR_CALLBACK_FAILURE
. In this case, library will return immediately with return valueNGHTTP2_ERR_CALLBACK_FAILURE
. Currently, if nonzero value is returned from this callback, they are treated asNGHTTP2_ERR_CALLBACK_FAILURE
, but application should not rely on this details.
-
nghttp2_session_callbacks
¶ Callback functions for
nghttp2_session
. The details of this structure are intentionally hidden from the public API.
-
typedef void *
(*nghttp2_malloc)
(size_t size, void *mem_user_data)¶ Custom memory allocator to replace malloc(). The mem_user_data is the mem_user_data member of
nghttp2_mem
structure.
-
typedef void
(*nghttp2_free)
(void *ptr, void *mem_user_data)¶ Custom memory allocator to replace free(). The mem_user_data is the mem_user_data member of
nghttp2_mem
structure.
-
typedef void *
(*nghttp2_calloc)
(size_t nmemb, size_t size, void *mem_user_data)¶ Custom memory allocator to replace calloc(). The mem_user_data is the mem_user_data member of
nghttp2_mem
structure.
-
typedef void *
(*nghttp2_realloc)
(void *ptr, size_t size, void *mem_user_data)¶ Custom memory allocator to replace realloc(). The mem_user_data is the mem_user_data member of
nghttp2_mem
structure.
-
nghttp2_mem
¶ Custom memory allocator functions and user defined pointer. The mem_user_data member is passed to each allocator function. This can be used, for example, to achieve per-session memory pool.
In the following example code,
my_malloc
,my_free
,my_calloc
andmy_realloc
are the replacement of the standard allocatorsmalloc
,free
,calloc
andrealloc
respectively:void *my_malloc_cb(size_t size, void *mem_user_data) { return my_malloc(size); } void my_free_cb(void *ptr, void *mem_user_data) { my_free(ptr); } void *my_calloc_cb(size_t nmemb, size_t size, void *mem_user_data) { return my_calloc(nmemb, size); } void *my_realloc_cb(void *ptr, size_t size, void *mem_user_data) { return my_realloc(ptr, size); } void session_new() { nghttp2_session *session; nghttp2_session_callbacks *callbacks; nghttp2_mem mem = {NULL, my_malloc_cb, my_free_cb, my_calloc_cb, my_realloc_cb}; ... nghttp2_session_client_new3(&session, callbacks, NULL, NULL, &mem); ... }
-
void *
mem_user_data
¶ An arbitrary user supplied data. This is passed to each allocator function.
-
nghttp2_malloc
malloc
¶ Custom allocator function to replace malloc().
-
nghttp2_free
free
¶ Custom allocator function to replace free().
-
nghttp2_calloc
calloc
¶ Custom allocator function to replace calloc().
-
nghttp2_realloc
realloc
¶ Custom allocator function to replace realloc().
-
void *
-
nghttp2_option
¶ Configuration options for
nghttp2_session
. The details of this structure are intentionally hidden from the public API.
-
nghttp2_ext_altsvc
¶ The payload of ALTSVC frame. ALTSVC frame is a non-critical extension to HTTP/2. If this frame is received, and
nghttp2_option_set_user_recv_extension_type()
is not set, andnghttp2_option_set_builtin_recv_extension_type()
is set forNGHTTP2_ALTSVC
,nghttp2_extension.payload
will point to this struct.It has the following members:
-
uint8_t *
origin
¶ The pointer to origin which this alternative service is associated with. This is not necessarily NULL-terminated.
-
size_t
origin_len
¶ The length of the origin.
-
uint8_t *
field_value
¶ The pointer to Alt-Svc field value contained in ALTSVC frame. This is not necessarily NULL-terminated.
-
size_t
field_value_len
¶ The length of the field_value.
-
uint8_t *
-
nghttp2_hd_deflater
¶ HPACK deflater object.
-
nghttp2_hd_inflater
¶ HPACK inflater object.
-
nghttp2_stream
¶ The structure to represent HTTP/2 stream. The details of this structure are intentionally hidden from the public API.
-
typedef void
(*nghttp2_debug_vprintf_callback)
(const char *format, va_list args)¶ Callback function invoked when the library outputs debug logging. The function is called with arguments suitable for
vfprintf(3)
The debug output is only enabled if the library is built with
DEBUGBUILD
macro defined.


The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:
The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.
The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:
The following is a list of runtime dependencies for this project. These dependencies are required to run the application:
| GroupId | ArtifactId | Version | Type | Licenses |
|---|---|---|---|---|
| com.fasterxml.jackson.core | jackson-annotations | 2.13.0 | jar | The Apache Software License, Version 2.0 |
| com.fasterxml.jackson.core | jackson-databind | 2.13.0 | jar | The Apache Software License, Version 2.0 |
| com.jayway.jsonpath | json-path | 2.6.0 | jar | The Apache Software License, Version 2.0 |
| net.minidev | accessors-smart | 2.4.7 | jar | The Apache Software License, Version 2.0 |
| net.minidev | json-smart | 2.4.7 | jar | The Apache Software License, Version 2.0 |
| org.metafacture | metafacture-commons | 5.3.0 | jar | The Apache License, Version 2.0 |
| org.metafacture | metafacture-flowcontrol | 5.3.0 | jar | The Apache License, Version 2.0 |
| org.metafacture | metafacture-javaintegration | 5.3.0 | jar | The Apache License, Version 2.0 |
| org.metafacture | metafacture-mangling | 5.3.0 | jar | The Apache License, Version 2.0 |
| org.ow2.asm | asm | 9.1 | jar | BSD-3-Clause |
Apache License, 2.0: jersey-container-servlet, jersey-container-servlet-core, jersey-core-client, jersey-core-common, jersey-core-server, jersey-inject-hk2
The Apache License, Version 2.0: EF2SO, Metafacture Commons, Metafacture Flowcontrol, Metafacture Framework, Metafacture JSON, Metafacture Java Integration, Metafacture Mangling, Metafacture Strings, Metamorph, Metamorph API
jQuery license: jersey-container-servlet, jersey-container-servlet-core, jersey-core-client, jersey-inject-hk2
BSD-3-Clause: asm
MIT License: SLF4J API Module
Public Domain: jersey-container-servlet, jersey-container-servlet-core, jersey-core-client, jersey-core-common, jersey-inject-hk2
GPL2 w/ CPE: HK2 API module, HK2 Implementation Utilities, Jakarta Annotations API, OSGi resource locator, ServiceLocator Default Implementation, aopalliance version 1.0 repackaged as a module, jersey-container-servlet, jersey-container-servlet-core, jersey-core-client, jersey-inject-hk2
GNU Lesser General Public License: Logback Classic Module, Logback Core Module
W3C license: jersey-container-servlet, jersey-container-servlet-core, jersey-core-client, jersey-inject-hk2
EDL 1.0: Jakarta Activation API jar, jersey-container-servlet, jersey-container-servlet-core, jersey-core-client, jersey-inject-hk2
Apache License 2.0: Jakarta Bean Validation API, Javassist
Modified BSD: jersey-container-servlet, jersey-container-servlet-core, jersey-core-client, jersey-core-server, jersey-inject-hk2
The MIT License: jvmbrotli, jvmbrotli-win32-x86-amd64
LGPL 2.1: Javassist
EPL 2.0: HK2 API module, HK2 Implementation Utilities, Jakarta Annotations API, OSGi resource locator, ServiceLocator Default Implementation, aopalliance version 1.0 repackaged as a module, jersey-container-servlet, jersey-container-servlet-core, jersey-core-client, jersey-core-common, jersey-core-server, jersey-inject-hk2
GPL-2.0-with-classpath-exception: jakarta.ws.rs-api
MIT license: jersey-container-servlet, jersey-container-servlet-core, jersey-core-client, jersey-inject-hk2
MPL 1.1: Javassist
BSD 2-Clause: jersey-container-servlet, jersey-container-servlet-core, jersey-core-client, jersey-inject-hk2
EPL-2.0: jakarta.ws.rs-api
The Apache Software License, Version 2.0: ASM based accessors helper used by json-smart, JSON Small and Fast Parser, Jackson-annotations, Jackson-core, Jakarta Dependency Injection, jackson-databind, jvmbrotli, jvmbrotli-win32-x86-amd64, project ':json-path'
Eclipse Public License - v 1.0: Logback Classic Module, Logback Core Module
The GNU General Public License (GPL), Version 2, With Classpath Exception: jersey-core-common, jersey-core-server
| Filename | Size | Entries | Classes | Packages | Java Version | Debug Information |
|---|---|---|---|---|---|---|
| logback-classic-1.2.7.jar | 292 kB | 235 | 176 | 27 | 1.6 | Yes |
| logback-core-1.2.7.jar | 473 kB | 419 | 373 | 36 | 1.6 | Yes |
| jackson-annotations-2.13.0.jar | 75.7 kB | 84 | 72 | 2 | - | Yes |
| jackson-core-2.13.0.jar | 374.6 kB | 156 | 128 | 13 | - | Yes |
| jackson-databind-2.13.0.jar | 1.5 MB | 745 | 707 | 23 | - | Yes |
| json-path-2.6.0.jar | 238.6 kB | 199 | 182 | 12 | 1.8 | Yes |
| jvmbrotli-0.2.0.jar | 29.4 kB | 32 | 19 | 3 | 1.8 | Yes |
| jvmbrotli-win32-x86-amd64-0.2.0.jar | 1.7 MB | 10 | 0 | 0 | - | No |
| jakarta.activation-api-2.0.1.jar | 47.8 kB | 43 | 32 | 2 | - | Yes |
| jakarta.annotation-api-2.0.0.jar | 25.4 kB | 29 | 16 | 4 | - | Yes |
| jakarta.inject-api-2.0.0.jar | 10.1 kB | 17 | 6 | 1 | 1.5 | No |
| jakarta.validation-api-3.0.0.jar | 92.7 kB | 160 | 143 | 9 | 1.8 | Yes |
| jakarta.ws.rs-api-3.0.0.jar | 138.8 kB | 153 | 136 | 7 | - | Yes |
| accessors-smart-2.4.7.jar | 29.5 kB | 24 | 13 | 2 | 1.8 | Yes |
| json-smart-2.4.7.jar | 119.2 kB | 107 | 93 | 5 | 1.8 | Yes |
| hk2-api-3.0.1.jar | 201.5 kB | 198 | 177 | 7 | 1.8 | Yes |
| hk2-locator-3.0.1.jar | 203.5 kB | 117 | 99 | 3 | 1.8 | Yes |
| hk2-utils-3.0.1.jar | 131.6 kB | 102 | 80 | 7 | 1.8 | Yes |
| osgi-resource-locator-1.0.3.jar | 19.5 kB | 23 | 12 | 1 | 1.6 | Yes |
| aopalliance-repackaged-3.0.1.jar | 27.1 kB | 41 | 26 | 4 | 1.8 | Yes |
| jersey-container-servlet-3.0.3.jar | 32.4 kB | 29 | 8 | 3 | 1.8 | Yes |
| jersey-container-servlet-core-3.0.3.jar | 73.5 kB | 61 | 44 | 4 | 1.8 | Yes |
| jersey-client-3.0.3.jar | 261.2 kB | 193 | 162 | 10 | 1.8 | Yes |
| jersey-common-3.0.3.jar | 1.2 MB | 925 | 869 | 23 | - | Yes |
| jersey-server-3.0.3.jar | 949.8 kB | 666 | 607 | 27 | 1.8 | Yes |
| jersey-hk2-3.0.3.jar | 78.4 kB | 68 | 46 | 1 | 1.8 | Yes |
| javassist-3.25.0-GA.jar | 780.3 kB | 449 | 425 | 17 | 1.7 | Yes |
| metafacture-commons-5.3.0.jar | 40.7 kB | 32 | 24 | 4 | 1.8 | Yes |
| metafacture-flowcontrol-5.3.0.jar | 17.1 kB | 18 | 12 | 1 | 1.8 | Yes |
| metafacture-framework-5.3.0.jar | 20.3 kB | 39 | 31 | 4 | 1.8 | Yes |
| metafacture-javaintegration-5.3.0.jar | 44.3 kB | 43 | 36 | 2 | 1.8 | Yes |
| metafacture-json-5.3.0.jar | 9.8 kB | 10 | 4 | 1 | 1.8 | Yes |
| metafacture-mangling-5.3.0.jar | 16 kB | 17 | 11 | 1 | 1.8 | Yes |
| metafacture-strings-5.3.0.jar | 14.9 kB | 17 | 11 | 1 | 1.8 | Yes |
| metamorph-5.3.0.jar | 121.1 kB | 113 | 96 | 5 | 1.8 | Yes |
| metamorph-api-5.3.0.jar | 14.7 kB | 30 | 23 | 2 | 1.8 | Yes |
| asm-9.1.jar | 121.8 kB | 44 | 38 | 3 | - | Yes |
| slf4j-api-1.7.32.jar | 41.5 kB | 46 | 34 | 4 | 1.5 | Yes |
| Total | Size | Entries | Classes | Packages | Java Version | Debug Information |
| 38 | 9.6 MB | 5694 | 4971 | 281 | 1.8 | 36 |
| compile: 28 | compile: 7.4 MB | compile: 4381 | compile: 3783 | compile: 226 | - | compile: 26 |
| runtime: 10 | runtime: 2.2 MB | runtime: 1313 | runtime: 1188 | runtime: 55 | - | runtime: 10 |


LFC potential XI v Crystal Palace if Salah & Robbo are injured
by Jordan ChamberlainMo Salah and Andy Robertson are currently back at Melwood getting treatment on their respective injuries ahead of Crystal Palace v Liverpool.
The Echo said both are a ‘doubt’ yesterday – and with the game in five days’ – it’s probably not looking promising.
Jurgen Klopp will not risk long-term issues with both for the Selhurst Park clash, especially considering our ridiculously busy upcoming schedule.
As a result, he’s likely to use two understudies in James Milner at left-back and we’d presume, Divock Origi in the front-three.
By including the Belgian, Sadio Mane will likely move to the right flank and allow Origi to start in Salah’s usual spot on the left, with Roberto Firmino leading the line.
Other options include Alex Oxlade-Chamberlain on the wing, but Klopp has shown this term he uses Origi as his ‘first sub’ when it comes to the forwards.
Elsewhere, Virgil van Dijk will partner Dejan Lovren at centre-back, despite Joe Gomez being fit – while Fabinho will anchor the midfield with Jordan Henderson and Gini Wijnaldum either side.
Liverpool’s likely XI:
Alisson; Trent, Milner; VVD, Lovren; Fabinho, Henderson, Wijnaldum; Mane, Firmino, Origi


Fatal error: Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''really? maybe you'd like to read the source instead' at line 1 in C:\inetpub\wwwroot\michalspacek.cz\index.php:31337
Stack trace:
#0 C:\inetpub\wwwroot\michalspacek.cz\index.php(31337): PDO->query()
#1 C:\inetpub\wwwroot\michalspacek.cz\index.php(42): processRequest()
#2 {main}
thrown in C:\inetpub\wwwroot\michalspacek.cz\index.php on line 31337