|
Connected Home over IP
672cf7684
|
#include <stdint.h>
#include <ble/BleConfig.h>
#include <system/SystemLayer.h>
#include <system/SystemPacketBuffer.h>
#include <ble/BleApplicationDelegate.h>
#include <ble/BleConnectionDelegate.h>
#include <ble/BleError.h>
#include <ble/BlePlatformDelegate.h>
#include <ble/BleUUID.h>
#include "BLEEndPoint.h"
Go to the source code of this file.
Classes | |
| class | chip::Ble::BleLayerObject |
| class | chip::Ble::BleTransportCapabilitiesRequestMessage |
| class | chip::Ble::BleTransportCapabilitiesResponseMessage |
| class | chip::Ble::BleLayer |
| This class provides an interface for a single thread to drive data either up the stack via the BleLayer platform interface functions, or down the stack via a chipConnection object associated with a BLEEndPoint. More... | |
Namespaces | |
| chip | |
| Adaptation for LwIP ip4_addr_t type. | |
| chip::Ble | |
Macros | |
| #define | __STDC_LIMIT_MACROS |
| #define | NUM_SUPPORTED_PROTOCOL_VERSIONS 8 |
| #define | CHIP_BLE_TRANSPORT_PROTOCOL_MIN_SUPPORTED_VERSION kBleTransportProtocolVersion_V2 |
| Version(s) of the CHIP BLE Transport Protocol that this stack supports. More... | |
| #define | CHIP_BLE_TRANSPORT_PROTOCOL_MAX_SUPPORTED_VERSION kBleTransportProtocolVersion_V3 |
Enumerations | |
| enum | chip::Ble::BleRole { chip::Ble::kBleRole_Central = 0, chip::Ble::kBleRole_Peripheral = 1 } |
| Role of end points' associated BLE connections. Determines means used by end points to send and receive data. More... | |
| enum | chip::Ble::BleTransportProtocolVersion { chip::Ble::kBleTransportProtocolVersion_None = 0, chip::Ble::kBleTransportProtocolVersion_V1 = 1, chip::Ble::kBleTransportProtocolVersion_V2 = 2, chip::Ble::kBleTransportProtocolVersion_V3 = 3 } |
| Enum defining versions of CHIP over BLE transport protocol. More... | |
Functions | |
| constexpr size_t | chip::Ble::kCapabilitiesResponseLength (kCapabilitiesResponseMagicnumLength+kCapabilitiesResponseL2capMtuLength+kCapabilitiesResponseSelectedProtocolVersionLength+kCapabilitiesResponseWindowSizeLength) |
Variables | |
| constexpr size_t | chip::Ble::kCapabilitiesRequestMagicnumLength = 2 |
| constexpr size_t | chip::Ble::kCapabilitiesRequestL2capMtuLength = 2 |
| constexpr size_t | chip::Ble::kCapabilitiesRequestSupportedVersionsLength = 4 |
| constexpr size_t | chip::Ble::kCapabilitiesRequestWindowSizeLength = 1 |
| constexpr size_t | chip::Ble::kCapabilitiesRequestLength |
| constexpr size_t | chip::Ble::kCapabilitiesResponseMagicnumLength = 2 |
| constexpr size_t | chip::Ble::kCapabilitiesResponseL2capMtuLength = 2 |
| constexpr size_t | chip::Ble::kCapabilitiesResponseSelectedProtocolVersionLength = 1 |
| constexpr size_t | chip::Ble::kCapabilitiesResponseWindowSizeLength = 1 |
This file defines objects that provide an abstraction layer between a platform's Bluetooth Low Energy (BLE) implementation and the CHIP stack.
The BleLayer obect accepts BLE data and control input from the application via a functional interface. It performs the fragmentation and reassembly required to transmit CHIP message via a BLE GATT characteristic interface, and drives incoming messages up the CHIP stack.
During initialization, the BleLayer object requires a pointer to the platform's implementation of the BleAdapter object. This object is defined but not implemented by the CHIP stack, and provides the BleLayer with a functional interface to drive outgoing GATT characteristic writes and indications. It also provides a mechanism for CHIP to inform the application when it has finished using a given BLE connection, i.e., when the chipConnection object wrapping this connection has closed.
To enable CHIP over BLE for a new platform, the application developer must implement the BleAdapter class for their platform, pass it to the BleLayer on startup, pass a pointer to this BleLayer to their instance of chipMessageLayer, and ensure that the application calls the necessary BleLayer functions to drive BLE data and control input up the stack.
| #define __STDC_LIMIT_MACROS |
| #define CHIP_BLE_TRANSPORT_PROTOCOL_MAX_SUPPORTED_VERSION kBleTransportProtocolVersion_V3 |
| #define CHIP_BLE_TRANSPORT_PROTOCOL_MIN_SUPPORTED_VERSION kBleTransportProtocolVersion_V2 |
Version(s) of the CHIP BLE Transport Protocol that this stack supports.
| #define NUM_SUPPORTED_PROTOCOL_VERSIONS 8 |
Number of unsigned 4-bit representations of supported transport protocol versions encapsulated in a BleTransportCapabilitiesRequest. Defined by CHIP over BLE protocol specification.


Copyright © 2016 Guilherme Andrade
Version: 1.0.0
Authors: Guilherme Andrade (erlzquad(at)gandrade(dot)net).
erlzquad
: An Erlang quadtree implementation with Z-order curve indexing
erlzquad
is an Erlang implementation of quadtrees which makes use of a Z-order curve as a way to speed up adding objects in bulk as well as querying arbitrary areas.
* Objects can be anything; a bounding-box -fetching function, which receives an object and returns a 4-tuple {Left, Bottom, Right, Top}
is therefore a mandatory argument when adding;
* Coordinates are, for now, restricted to non-negative values that start on {0, 0} and may go up to the specified width and height;
* Explicit Z-index calculation code is included for levels up to 8 (inclusive); from that point on we recurse and the whole thing becomes slower than a turtle.
Object = #square{id = 'a square', x = 1000, y = 750, side = 10},
GetBox = fun(#square{x = X, y = Y, side = S}) -> {X - S/2, Y - S/2, X + S/2, Y + S/2} end,
Q1 = erlzquad:new_qtree(4000, 3000, 1),
Q2 = erlzquad:add_objects([Object], GetBox, Q1),
Results1 = erlzquad:query_area(0, 0, 2000, 1500, Q2), % 1 result: [#square{...}]
Results2 = erlzquad:query_area(2000, 1500, 0, 0, Q2). % 0 results: []
Generated by EDoc, Feb 21 2016, 18:08:38.


An array is a collection of variables, which are all of the same type. An array variable can be declared by appending dimensions within square brackets after a class name or after a variable name.
Using the alternative syntax of attaching dimensions after the variable name, the same declarations can be expressed as:
The multiplication operator * is scalar product when used between vectors, matrix multiplication when used between matrices and element-wise multiplication when used between an array and a scalar. In the function ElementWiseMultiplication positionvector is multiplied by the scalar 2.
We see that when applying the function ElementWiseMultiplication on positionvector, we get the result {2, 4, 6}.
The common special cases of concatenation along the first and second dimensions are supported through the special syntax forms [A;B;C;...] and [A,B,C,...] respectively. Both of these forms can be mixed. Scalar and vector arguments to these special operators are promoted to become matrices before performing the concatenation. This gives the effect that a matrix can be constructed from scalar expressions by separating rows by semicolon and columns by comma.


You should see that the margin-left version triggers a series of repaints as the element moves, while the transform version only causes repaints in the start and end positions.
Why? Well, when you use transform, the browser creates a separate layer for the element. So when the element is moved, all that's changed is the relation of the two layers to each other, which is handled in composition: neither layer needs a repaint.
In this case, with a simple style, the extra repaints don't make much of a difference. But if the style were computationally expensive to paint, they might. It's difficult to know what optimizations the browser will make to minimize repaints, and they are subject to change from one version to the next. So testing your website with the paint flashing tool helps ensure that it's still performing optimally.


Recently I was on a reoccurring call with Human System Dynamics (HSD) associates and friends where a volunteer shares a wicked issue they have and then listen to questions without answering. The questions are open ended, not disguised advice, beyond the knowledge of the asker.
I hope these questions will help you see a next step for your Agile Retrospective missing reflection.
Answers have short shelf lives in complex systems, and a good question can last a lifetime. -Glenda Eoyang
After that the person considers a next wise action that is within control, reasonable, promising, short term response.
The groups follows HSD simple rules:
- Stand in inquiry
- Turn judgment in to curiosity
- Turn conflict in to shared exploration
- Turn defensiveness into self-reflection
- Turn assumptions in to questions
- Search for true and useful
- Find the energy in difference
- Zoom in and zoom out
- Connect with stories and impacts
- Celebrate life
What is a wicked issue?
Here’s how HSD defines it:
- Many levels
- Many stakeholders
- Massive interdependencies
- Fuzzy boundaries
- Repeating but never exactly
- No root cause
- Cannot be solved, but can be influenced
Here are some graphics I created to explain the process in a micro talk I gave:
My wicked issue
Retrospectives are times to reflect with your team. You can use Adaptive Action, but many people jump from WHAT to NOW WHAT. They miss the time of reflection.
The questions I received
- GE : What does time have to do with it?
- JK: What kind of false time lines do we put on ourselves and our teams?
- GE : What if you started with the SO WHAT and left out the WHAT and NOW WHAT once?
- RH: Where else do you see that lack of reflection
- GE : How many different tools and models exist to support SO WHAT?
- GE : What do feelings have to do with it?
- BMC : Are there other spaces or processes where the team is capable of doing reflection? What’s different?
- JJ : If you can apply only ONE simple rule (HSD) to trigger off the introspection, what would it be?
- SB : Building on MKS.is there judgment usually at play?
- RH: What kinds of invitation do you have and how do people know what to reflect on?
- GE : Are there some people who are better at SO WHAT than others are?
- BMC : Are they aware that they are skipping the step?
- SB : where might they do so what elsewhere?
- JK: How does our current educational system teach and promote reflection?
- LP : What pattern(s) are these reflection times intended to generate?
- EMN : Have you worked with a team that does reflection intuitively and what is different about that team?
- RH: Is engaging in retrospective a finite game or an infinite game?
- MKS : What is your So What on the teams not doing a So What?
- JJ : What is the “fear” behind the skipping Reflection?
- SB : What’s the normative truth about the so what?
- GE : How is the retrospective about individual and how about team performance?
- JJ : Is time/urgency more important than quality?
- GE : How would a retrospective work if it were totally in inquiry?
- RH: How do your team members understand or use the inquiry practices?
- SB : what do they really want to know?
- EMN : Are there any fun games that require reflection?
- GE : What would a prospective look like?
- RH: How would we turn some of the models and methods into games?
- MKS : Would the team even do a retrospective, if given the choice?
- GE : What would happen if you took this wicked issue to the group?
- GE : What does it have to do with learning?
- LP : What role do questions play in a retrospective?
- RH: What’s the difference between an invitation and a “rule”?
- GE : Who wins the retrospective game?
- GE : Where besides Agile world does this issue happen?
- SB : What are the simple rules that govern how the retrospective is done now?
I enjoyed this session, it was comforting hearing similar questions to the ones I am asking and the different ones that I didn’t explore yet.
Those questions aren’t “disguised advice” but tokens to get to a deeper insight.
After that there was a conversation with many interesting exchanged, somebody raised a good point about the downside of too much reflection. That made me realize how some people have been burned–or are concerned–by analysis-paralysis and might be leaning towards action/reaction. That’s why I find the adaptive action cycle step “Now what?” such a natural and important one.
Now what?
The question that stuck most for me was “why do you care about this?”. It took me a little to reply and the answer is I want to leave the world in a better place than I’ve found it, and fostering reflection is for me a way to do that.
Clearing out why I care gave me more energy in making Agile Retrospectives the tool they’re meant to be and not just a checkbox.
How did those questions resonate with you? Do they inspire you to a wise next step on your Agile Retrospectives that are lacking reflection? Do they make you see your current issue differently?


In this room you can drag and drop a video from you desktop and it will play on the TV screen.
Grant this site permission to access your microphone and share the following link with your friends (or open it in another browser/tab). Wait for a friend to start chatting.


user->isAdmin()){ $baseModel = new \Olabs\Oims\Models\BaseModel(); $assigned_projects = $baseModel->getProjectOptions(); } if($assigned_projects){ $expenseOnMaterialsCount = \Olabs\Oims\Models\ExpenseOnMaterial::whereIn('project_id', array_keys($assigned_projects))->count(); $expenseOnMaterialsPending = \Olabs\Oims\Models\ExpenseOnMaterial::where("paid_date", null)->whereIn('project_id', array_keys($assigned_projects))->count(); $expenseOnMaterialsCountThis = \Olabs\Oims\Models\ExpenseOnMaterial::where("created_at",">=", Carbon\Carbon::now()->addDay(-30))->whereIn('project_id', array_keys($assigned_projects))->count(); $expenseOnMaterialsCountLast = \Olabs\Oims\Models\ExpenseOnMaterial::whereBetween("created_at", [Carbon\Carbon::now()->addDay(-60), Carbon\Carbon::now()->addDay(-30)])->whereIn('project_id', array_keys($assigned_projects))->count(); $expenseOnMaterialsValueThis = \Olabs\Oims\Models\ExpenseOnMaterial::where("created_at",">=", Carbon\Carbon::now()->addDay(-30))->whereIn('project_id', array_keys($assigned_projects))->sum("total_price"); $expenseOnMaterialsValueLast = \Olabs\Oims\Models\ExpenseOnMaterial::whereBetween("created_at", [Carbon\Carbon::now()->addDay(-60), Carbon\Carbon::now()->addDay(-30)])->whereIn('project_id', array_keys($assigned_projects))->sum("total_price"); $approved = \Olabs\Oims\Models\ExpenseOnMaterial::where("created_at",">=", Carbon\Carbon::now()->addDay(-30))->where("status",\Olabs\Oims\Models\Status::STATUS_APPROVED)->whereIn('project_id', array_keys($assigned_projects))->count(); $rejected = \Olabs\Oims\Models\ExpenseOnMaterial::where("created_at",">=", Carbon\Carbon::now()->addDay(-30))->where("status",\Olabs\Oims\Models\Status::STATUS_REJECTED)->whereIn('project_id', array_keys($assigned_projects))->count(); $new = \Olabs\Oims\Models\ExpenseOnMaterial::where("created_at",">=", Carbon\Carbon::now()->addDay(-30))->where("status",\Olabs\Oims\Models\Status::STATUS_NEW)->whereIn('project_id', array_keys($assigned_projects))->count(); $submited = \Olabs\Oims\Models\ExpenseOnMaterial::where("created_at",">=", Carbon\Carbon::now()->addDay(-30))->where("status",\Olabs\Oims\Models\Status::STATUS_SUBMITTED)->whereIn('project_id', array_keys($assigned_projects))->count(); }else{ $expenseOnMaterialsCount = \Olabs\Oims\Models\ExpenseOnMaterial::count(); $expenseOnMaterialsPending = \Olabs\Oims\Models\ExpenseOnMaterial::where("paid_date", null)->count(); $expenseOnMaterialsCountThis = \Olabs\Oims\Models\ExpenseOnMaterial::where("created_at",">=", Carbon\Carbon::now()->addDay(-30))->count(); $expenseOnMaterialsCountLast = \Olabs\Oims\Models\ExpenseOnMaterial::whereBetween("created_at", [Carbon\Carbon::now()->addDay(-60), Carbon\Carbon::now()->addDay(-30)])->count(); $expenseOnMaterialsValueThis = \Olabs\Oims\Models\ExpenseOnMaterial::where("created_at",">=", Carbon\Carbon::now()->addDay(-30))->sum("total_price"); $expenseOnMaterialsValueLast = \Olabs\Oims\Models\ExpenseOnMaterial::whereBetween("created_at", [Carbon\Carbon::now()->addDay(-60), Carbon\Carbon::now()->addDay(-30)])->sum("total_price"); $approved = \Olabs\Oims\Models\ExpenseOnMaterial::where("created_at",">=", Carbon\Carbon::now()->addDay(-30))->where("status",\Olabs\Oims\Models\Status::STATUS_APPROVED)->count(); $rejected = \Olabs\Oims\Models\ExpenseOnMaterial::where("created_at",">=", Carbon\Carbon::now()->addDay(-30))->where("status",\Olabs\Oims\Models\Status::STATUS_REJECTED)->count(); $new = \Olabs\Oims\Models\ExpenseOnMaterial::where("created_at",">=", Carbon\Carbon::now()->addDay(-30))->where("status",\Olabs\Oims\Models\Status::STATUS_NEW)->count(); $submited = \Olabs\Oims\Models\ExpenseOnMaterial::where("created_at",">=", Carbon\Carbon::now()->addDay(-30))->where("status",\Olabs\Oims\Models\Status::STATUS_SUBMITTED)->count(); } $expenseOnMaterialsCountClass = "positive"; if ($expenseOnMaterialsCountThis < $expenseOnMaterialsCountLast) { $expenseOnMaterialsCountClass = "negative"; } $expenseOnMaterialsValueClass = "positive"; if ($expenseOnMaterialsValueThis < $expenseOnMaterialsValueLast) { $expenseOnMaterialsValueClass = "negative"; } ?>
= $expenseOnMaterialsCountThis ?>
= Lang::get("olabs.oims::lang.expenseonmaterials.sales_30_days")?>: = $expenseOnMaterialsCountLast ?>
= $expenseOnMaterialsValueThis ?>
= Lang::get("olabs.oims::lang.expenseonmaterials.previous_30_days")?>: = $expenseOnMaterialsValueLast ?>


Wedding Bells
!
Personal Information
Physical Qualities
Community
Education and Occupation
Lifestyle and Family Value
Profile Pic
Community
Sub Community
Agastya
Atreya/Atri
Angirasa
Alambyayan
Badarayan
Bakshi
Batish
Bhalki
Bharadwaj
Bharagava
Brahabhatt
Buddhi
Chandrayana
Chyavana
Dalabhya
Dhananaya
Gaur
Gautama
Harita
Kankar
Kaushik
Kanva
Kapil
Kanudinya
Katyayana
Kashyapa
Kotas
Kutsa
Lakhi
Krishnatrey
Lohita
Maitreya/Mitra
Mandavya
Mudgil/Mudgal
Pourugutsa
Pautamarshi
Parashara
Salankayana
Sankrithi
Savarna
Soral
Shandilya
Shukla
Shunak
Srivatsa
Suryadhwaja
Upmanyu
Vadhoola
Vashistha
Vasudev
Vatsayana
Vishwamitra
Vishnuvardhan
Vishnu
Yaska
Maritial Status
Never Married
Divorced
Widowed
Awaiting Divorce
Manglik
Non Manglik
Anshik Manglik
Manglik


I’m often the melancholy sort. I try to have a lot of energy and pour it into projects, but there’s always a hint of sadness. One of he main reasons why is the passing of my mom. She died at the age of 59. She was a pretty extraordinary woman. She was fierce as could be, loved deeply, and tried to make the world a better place through her actions. Hardly a day and certainly not a week goes by without me missing her some way. It makes Christmas extra hard.
Am I the only one that doesn’t love Christmas?
I just wish this thing was called what it is: an end of year sale.  I can’t sing but I was caroling. I don’t mind some aspects of this time of year… but I’ll tell you a quick story.
I don’t like the excessive gift giving, but that’s not really taken into account in my home at Christmas time. After an hour of opening presents my first baby says “Last year we had more presents.” Kinda broke my heart. I try to instill an attitude of gratefulness and I think Christmas often times brings out massive selfishness.  It’s no fun holding the line, but I want a child with healthy perspectives and Christmas actually doesn’t instill them. Sorry not sorry.
To top that off I can’t help but miss my mom. It’s been over 10 years since she passed. I’m incredibly grateful for how fiercely she loved me, but it still stings because especially on the holidays I can feel that missing gap even to this day.
So, I know this is a sorta Christmas Grump message, but as we approach the new year let us remember those we loved and lost, let us carry some of their best spirit with us, here’s to those holding the line on sensibility during the Christmas season, and as we have some family time let’s try to stay in that moment and store just a hint of it to carry with us later.
Much love,
Merry Christmas,
Aggroed
This page is synchronized from the post: ‘Merry Christmas! And here’’s to those no longer with us!’


{% include head.html %}
{% include sidebar.html %}The Portland Common Data Model (PCDM) is a flexible, extensible domain model that is intended to underlie a wide array of repository and DAMS applications. The primary objective of this model is to establish a framework that developers of tools [e.g., Hydra-based engines, such as Sufia, Curation Concerns, Avalon; Islandora; custom Fedora sites) can use for working with models in a general way, allowing adopters to easily use custom models with any tool. Given this interoperability goal, the initial work focused on structural metadata and access control, since these are the key actionable metadata.
This model supports the most complex use cases, which include rich hierarchies of inter-related collections and works, but also elegantly supports the simplest use cases, such as a single user-contributed file with a few fields of metadata. It provides a compact interface that tool developers can easily implement, but is also extensible enough for adopters to customize to their local needs.
As the community migrates to Fedora 4, much of our metadata is migrating to RDF. This model encourages linked data best practices, such as using URIs to identify all resources, using widely-used vocabularies where possible, and subclassing existing classes and properties when creating new terms. To improve interoperability, we encourage participation in metadata interest groups for Islandora and Hydra.
The PCDM Wiki provides a fuller description of the core data model, diagrams, project documentation, and recent presentations.
All contributions are welcome: use-cases, documentation, code, patches, bug reports, feature requests, etc. You do not need to be a programmer to speak up!
The RDF vocabularies are in the GitHub repository for PCDM, which also includes an issue queue that you're welcome to contribute to. Anyone can open an issue to discuss changes to the model or documentation.
In addition to the GitHub repository, you can also interact with the community via our Google Group.
{{ content }}


Here is my report in real-time:
6:00 PM: Insufflated 3-4mg DOC
Weighed the DOC cap again, got 90 mgs. Scrapped the bottom of the baggie for the other 10 and came with 3-4mgs. The scale was weighing the caps at 73-4-5 mgs instead of 75-80 this time, so something must have been different. Opened the cap and spilt in on a dusty transparent cd case. unfortunately I spilt in in the center so could only see the two largests grain of DOC. Snorted them, lined up the rest with a cardboard postcard and snorted again until I knew I was snorting dust. Licked the thing off anyway and swallowed the empty capsule.
6:20 PM: Felt something immediately. Feeling hyper already. Never done a PEA before. Somehow never felt as 'holy' as the tryptamines for justification purposes. Shamanic intent and the belief that this isn't as unhealthy as it seems, or if it was then the rewards are worth it.
6:25 PM: The initial unease and tension seems to have passed. I'd like to elaborate on my worry about the unhealthiness of PEAs. The way I understand it, they are more likely to cause neurotoxicity than tryptamines. When I'm in a shamanic state of mind then, the justification of the consumption of these substances by a neutral physical health standpoint vs. an eye-opening promise of psychological something collapses as soon as there is any proven physical health deficit.
6:30 PM: Definitely feeling something, but adapted to it. Feels as stimulating as the tryptamines. Worried about having to go into work tomorrow. So I have to do shadow work to find the motivation for consuming substances that are below the border and that are more logically grouped with Meth and Crack than Salvia.
6:31 PM: Euphoria, steadily increasing the volume of the music, Joy but not quite justified when it's exposed. Shivers, shudder, the same exact cold as I first felt on DPT then 4-Aco. I know it's boiling in my apartment, though, as I remember remarking that it was stuffy and humid when I came home an hour and half ago.
6:40 PM: Feel empty, like hungry.. Liked listening to 'That night in Toronto' by The Tragically Hip earlier though. The track that ends their first set (they come back for an encore) was the last on my playlist so it went into Trance, Rock by Ozone. The transition was seamless (and not only in the 'I enabled crossfading in itunes' kind of way).
6:43 PM: Still shivering. Thinking about snorting. In this case it's definitely the best way. Swallowing the drip (which is active - so everybody wins) is like going orally that I wouldn't be sure about right now since I just ate.
6:46 PM: Didn't know what time it was and reflexively looked at the time which in retrospect was foolish since only 3 minutes had passed. Thinking about guys I saw in the subway earlier as a thought-pointer to the people who synthesize research chemicals. Thought 2c-e was really the only 'social' drug. That pattern of thought was clearly already in place, whether or not I thought it up, by the time I read about K's Japan story. Thinking faster than I'm typing again and getting the feeling that I could not type and not much would be different. Like in real life, with speech. Think they correctly predicted what I am about to say so say something different just for the sake of difference. I want to have better meaning. This comes out looking nonsensical however and is often the cause of looking dumb. Unfinished thoughts come back to also sometimes feel suicidal. Yearly check-up.
6:54 PM: Definitely feel strong sense of ability. The shivers are mostly gone unless I think about them. Am I going to do homework? 'I can't stop dreaming' sounds like a cw. Just change the suic-prefix to homi-.
6:57 PM: 'What did that guy put in my back?'
7:00 PM: Doing third weekly assignment in intermediate logic class. Catching myself not being the best. I feel like I won't rise to be the best I could be. In retrospect, I could so have gone to class like this. What hurts the most is re-calling the past into question.
7:14 PM: Wasting time? Want to note that all this 'psychedelic' thinking made conscious has the aftertaste that I'd think this anyway but unconsciously and therefore faster. E.g. Doing homework without understanding.. What about webwork? Hope?
7:17 PM: Can't do work. Books are so incompatible with working with electronically. Just totally broke my new textbook trying to keep it open.
7:19 PM: Making creative executions. Like scorning the text has challenged the computer. As soon as I said that the fan started twice as loud, I started feeling like I was wasting energy at the rate I was writing and the music was unnecessary. Turning off the monitor while I read will be the limit of thinking there's more to read than there is.
7:24 PM: Didn't take long to see the subject matter wasn't the dearest to my heart. If I'm not going to devote myself to it, I get a sense of the worthless any engagement is at all... Do it because I have to. I don't have to like it, but I can. That's a sense of having realized something. I don't have to like everything I do, but the ability to like something, anything, is worth hanging on to. Reminded of Li Mu Bai in Crouching Tiger, Hidden Dragon saying there's nothing we can hold on to in this world. Wanting something is different from liking it. I think I want things because of the promise of how easy it will be to like them. I.e, being rich is attractive because it will be easy to like being rich. I'm happy now, the working-class neighborhood seems to want to tell me, if I'm one of them. Again, falling short of potential, but by the time I realize it's too late. . 'Don't you paint into a corner like that!' -RC Ah, the art.
7:31 PM: Feeling very good. Smile on my face. Homework getting me down. Work tomorrow. It's such an easy goal, though. I can't say I'm confident because I know it would take me the better part of the rest of the night. Dad and his disappointment in the time it takes me to do what I'm asked. (School). This drug is going to be one depressing come-down.. But maybe . What MUSIC?
7:34 PM: Guilt takes away the potential for creative enjoyment.. Like I can only enjoy it as much as I know the artists want me to. If I'm ripping them off, or if it's just for promo in hopes that I'll buy something later (which I wouldn't).
7:38 PM: I can either forget about my worries and enjoy myself or worry endlessly. The music selection, for example, is impossible to please. Anything new begs me to buy it and I've heard silence so many times. The teachers never liked my flair for the dramatic.
7:42 PM: Like speed readings! SPEED! So not the same as speeding.
7:44 PM: Being extroverted to the point of smiling, sighing and talking to myself. (It should be nothing new). I guess I took less than I thought? The inner voice has an accent that makes me want to change what I wrote.
7:48 PM: Feelings perceived in that electronic voice of elecperiod true. Quidding, disappointed, the elements ARE coming more slowly.  The hip's 'Never Worked that Hard' an audition.
7:54 PM: 'Does Gord smoke? I think so.' Willing to do whatever he does. Did. Times have changed. What about taping the show. Have to start adding tv to this equation. It'll be hard with the book though. WHAT about the music? It can be paused.
7:57 PM: Liking the chair I can't afford. If I want to afford any of these things I better get to work. Or know that I'll figure it out. DOC reminds of Doctor so anything related to this chem's powers are automatically getting mapped to doctors. Not paying much attention to TV. Maybe that's wasting? Just because it's pointing in a particular direction.
8:02 PM: Sickh head again. Blackened by :
Canada's wasting, China's coming over. The US's ways aren't the same because I'm not watching TV the same way, I'm not even able to. Wanting to join the US. China fear to be contagious. Ghost whisperer why is the guy always evil at some point? (So I can like the girl, duh). 'Are you going to give me a story?' I have to tell their stories! Should be going out on Friday night but can't do a bit of homework. If I do my homework first I'll have more time to play on Sunday.
8:11 PM: After all that money TV's a re-run. Do I turn it off now, or.. I'm obviously not going to control TV. I'm getting hot now.
8:16 PM: It's like the more I do at once the less I appreciate each thing. I refuse (being my classic, 'don't want' being less special and more intelligent) to believe I have a finite amount of attention. The 'You can't do that' when reaching for the next problem.
-30 minutes lost time with -
8:53 PM Dealing with data loss. Enjoyed seeing those little red dots, now I have a half hour of lost time. [EDIT: Computer crashed trying to run too many apps at once] The benefits of understanding what you're doing. Too bad drugs leave you and I feel digestion. How do you feel about losing work? Saying a half hour is VERY generous.
9:04 PM The kid who killed his sister should get away with it. Always with the car commercials. More like the US or more like China?
9:07 PM The more adult, more industrious students would work on Friday to be able to relax on Sunday instead of doing things last minute. I know there are bugs anyway.
9:12 Not going into the DOC is like meth extreme again..
9:13 Prove that it really isn't safe.
9:14 Compromising potential future trangressions. If you give your DNA they'll be able to ID you. Considering I wanted to make a run for it less than 16 minutes ago I think that makes a difference.
9:24 Offense is the best defense. The kids work on Friday at school.
9:36 You knew he was going to go down. I'm going to lose as long as I don't want to watch the game. If you're with men, the only thing worth watching TV for is the game. Reasons for data loss: power failure due to overheating. Fan supposed to be full of dust.
9:50 You don't have to KNOW history to CHANGE it!
9:53 It probably wouldn't help me work, not like DOC a PEA. Logic is Blatant. For the future, publish assignments to the web.
[EDIT: dosed Salvia]
10:21 Succumbed to the Group Sage-in. DOC and Salvia, it's officially been done. It was all about keeping it legal here where everything is legal. Where we place more importance on karma. I hope I'll remember to abstain talking about ..
10:28 It'll never be over. My working theory is that lowering my endogenous dopamine while introducing a PEA will teach the body how to produce it in addition to the regular amounts.. Logically it will fit the PEA where the DA is supposed to go. I want to lower the DA to resistance train against low levels and increase baseline. I'm also under the influence of addition to my baseline.
10:38 I want to increase throughput. In the long run by taking Salvia which slows down aging by lowering dopamine. Low levels of dopamine induce death due to old age. I want to increase DA. Taking a PEA will downregulate DA.. but it's fun. If Salvia heals, whether it brings me back to baseline or synergises as per my working theory it's all good.
10:39 Downregulation: Too much DA reduces demand permanently.
10:48 I don't like using up my karma with others specifically like that. If it's even a bad thing.]
11:00 The robbery of your ghost!
11:08 The furniture, that was cold. I actually believe I'll be going to bed by 2-3. At latest. Work at being quiet. Creation.
11:11 Saving it. Saying it.
11:19 Pictures of the importing of The SmaK
11:26 Change to 11:23
11:43 Shakes on time with
'':54 I heard a girl on her cellphone saying inappropriate about teachers
00:01 And there's no drug in effect here. The most psychedelic. Discovery.
I actually washed up believing I was going to go to bed after that. I was in bed by 1:45. I layed there, got up twice, once at 3:56. I got up a 3rd time and smoked a little extract at 5:55. Finally fell asleep for 5 hours. A little tired the next day but I took all kinds of herbal remedies, i.e. Green tea, Ashwagandah, Bacopa, etc. And made it through work (although I was obviously slower than normal). Overall good but I should make sure I _really_don't have anything to do tomorrow.
The long time it took me to get to sleep might have been partly due to Salvia as well. I get really picky about how comfortable I can be (too hot, cold sweats) after Salvia, like the first time I tried it, for instance, I spent at least 2-3 hrs tossing and turning that night (very uncommon at the time).
Also, the remark about no drug in effect here probably had some kind of sarcastic tone intended at the time. I was definitely past the peak but enjoying a clearly off-baseline feeling.  (L-Selegiline is a MAOI-B, which I think has an effect on PEAs, check this report's epilogue). I actually looked at myself at about the 3-4 hour mark and didn't notice my pupils. I was flushed and sweating, though, so that might have drow my attention away. I remember remarking many times that I was very confident I would have no problem acting normally, that I could have done this at school.
Originally the plan was to dose orally Thurs. night at around 12-1 and go to my class at 9 the next day before turning in.
It was a test-dose before going for a high dose in a more shamanic context (i.e. not doing homework). I wanted to know if I'd need a sitter, how hard it would be to actually get to sleep the after and if snorting it was a good idea. I gained a unique perspective on my life at school while doing homework, which I hadn't planned on doing by the way.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Target Interception
Guidance refers to the determination of a strategy through which an object is made to follow a nominal trajectory in the presence of off-nominal conditions. These off-nominal conditions, in the context of aerospace engineering, may arise due to a number of factors such as wind gust, turbulence, navigational anomalies, change in weather conditions during flight, etc. More intuitively, when we discuss guidance, we generally consider an object (pursuer/interceptor) and a goal (target/evader). It is required that the object attains a trajectory in such a way that it comes closer to the goal as time progresses. In doing so, the object acquires information from its environment and take some decisions. The target, however, may not always be stationary, rather it is mobile in general. While a single pursuer may intercept the target using carefully designed guidance strategies, several pursuers may coordinate among themselves to their advantage. Such a cooperative behavior is common in natural entities to gain competitive advantages in claiming territory, hunting for food, avoiding predators, survival and evolution.
We explore the possibility of intercepting a target using multiple interceptors in two and three-dimensions. It is required that interceptors arrive at the target simultaneously. The time of interception may either be specified in advance to only one interceptor, or interceptors arrive at the target by deciding the time of interception implicitly during homing. In either case, control over engagement duration is necessary.


Hot-keys on this page
n s m x c change column sorting
| Module | statements | missing | excluded | coverage |
|---|---|---|---|---|
| Total | 1982 | 138 | 0 | 93% |
| app/__init__.py | 31 | 0 | 0 | 100% |
| app/actions.py | 448 | 59 | 0 | 87% |
| app/auth/__init__.py | 3 | 0 | 0 | 100% |
| app/auth/routes.py | 39 | 2 | 0 | 95% |
| app/digital_signatures.py | 36 | 6 | 0 | 83% |
| app/federation/__init__.py | 0 | 0 | 0 | 100% |
| app/federation/instance.py | 136 | 19 | 0 | 86% |
| app/federation/manager.py | 64 | 2 | 0 | 97% |
| app/main/__init__.py | 3 | 0 | 0 | 100% |
| app/main/routes.py | 186 | 9 | 0 | 95% |
| app/models.py | 128 | 11 | 0 | 91% |
| app/supergroup_protocol/__init__.py | 3 | 0 | 0 | 100% |
| app/supergroup_protocol/routes.py | 174 | 7 | 0 | 96% |
| config.py | 18 | 0 | 0 | 100% |
| conftest.py | 54 | 1 | 0 | 98% |
| database_test.py | 113 | 1 | 0 | 99% |
| tests/auth_test.py | 32 | 0 | 0 | 100% |
| tests/federation_test.py | 75 | 0 | 0 | 100% |
| tests/internal_protocol_test.py | 217 | 0 | 0 | 100% |
| tests/supergroup_protocol_test.py | 104 | 0 | 0 | 100% |
| tests/test_test.py | 4 | 0 | 0 | 100% |
| utils.py | 114 | 21 | 0 | 82% |
No items found using the specified filter.


A young beginning of a full-stack developer who is always eager to learn and try new.
HTML5
CSS3
JavaScript
SASS
WordPress
ReactJS
PHP
SQL
Git
NPM
Linux
A project of my own
A website for a hairdresser
+358 404115130
<EMAIL_ADDRESS>Espoo, Finland
GitHub
LinkedIn


Fantasy Football Week 1
This is a little different then my normal stuff but I enjoy fantasy football (and football in general) and I think it’s worth posting, if just for my own sake.
This year I joined NARFFL reddit’s fantasy football league, I then promptly missed the draft.
When I remember the next day and logged in, the autodraft had picked me this (This is my current line-up, substitue Tampa Bay with Knile Davis and Julian Edelman with Ronnie Hillman). This league awards 1 point per reception.
For an auto-draft this wasn’t the worst thing ever
Pros
- An amazing QB in Peyton Manning
- 1 decent rb in Ray Rice
- Good WR and TE depth (too many TEs)
Cons
- Monte Ball isn’t an RB2 or an RB anything, this is a serious problem
- I have way too many TEs and not enough RBs
- I have one ok running back (notice a pattern)
Before the Game
Trying to be smart I dropped the RB Knile Davis and picked up the Tampa Bay defense because they were playing the Jets. ( the Jets are my favorite team but it was worth taking the opportunityt
The First Game
This week went pretty well, Peyton Manning had a record setting game and Ray Rice and my WRs, TE and Kicked had solid performances. My favorite part was that Tampa Bay managed to lose to the Jets and they still put up more points than the Bronco’s D.
The only bad thing (and it’s a large bad thing) is that Monte Ball put up 2.4 points as it became evident that Denver really is making the game a running back by committee.
For Next Week
I need to fix my RB situation, I can probably pawn off Brandon Myers, the NYG Tight End.


(num_images, height, width, num_channels),
dtype=np.uint8
)
for i in range(len(dataset_df)):
filepath = get_abs_path(
csv_path,
dataset_df[feature["name"]][i]
(num_images, height, width, num_channels),
dtype=np.uint8
)
for i, filepath in enumerate(all_file_paths):
image_dataset[i, :height, :width, :] = \
read_image_and_resize(filepath)
data[feature["name"]] = np.arange(num_images)
class ImageInputFeature(ImageBaseFeature, InputFeature):


Play the best RPG game of all time
Warriors have higher health and stamina ,however their strength also makes them slowerand clumsier
Rogue are fast and have high stamina and speed which makes up for their lack in strength and health
Mages are glass canons which puts all their effort into spells .This means they stack on everything else
Hunters are well rounded fighters that focus on evening out their skills No Strengths or weaknesses


Expensify
You appear to be offline, this app requires an internet connection to manage your expenses.


Used to estimate unknown functions (complex, non-linear hypothesis) that are based on a large number of inputs, through the back-propagation algorithm.
Generally more complex and computationally expensive than other methods, but powerful for certain problems.
The basis of many deep learning methods.
Today is the state of the art technique for many different machine learning problems.
Neural networks were developed to vaguely simulate the neurons in the brain.
A neuron is a computational unit that receives a number of inputs through its input wires (dendrites),
does some computation and then sends signals through its output wire (axon) to other neurons in the brain.
A neural network is a group of neurons.
The inputs are grouped in an input layer.
The outputs are grouped in a final output layer.
The layers in between are called the hidden layers.
Adding more layers helps computing even more complex functions on the input data.
training set \(X = \left\{(x^{(1)}, y^{(1)}), (x^{(2)}, y^{(2)}), ..., (x^{(m)}, y^{(m)})\right\}\) with \(m\) training samples
each input variable has \(n\) features: \(x^{(i)}=\{x_1^{(i)}, x_2^{(i)}, ..., x_n^{(i)}\}\)
output variable \(y^{(i)}\), represented by either a single value (in case of regression or binary classification) or by an identity vector (in case of multi-class classification)
\(L\): the total number of layers in the network (comprising the hidden layers and the output layer)
\(n^{[l]}\): the number of units (neurons) in layer \(l\)
\(w^{[l]}\): weights matrix \(\left[ n^{[l]},\ n^{[l-1]} \right]\) controlling function mapping from layer \(l-1\) to layer \(l\); \(w_{ij}^{[l]}\): weight to unit \(i\) in layer \(l\) from unit \(j\) in layer \(l-1\)
\(b^{[l]}\): bias vector \(\left[ n^{[l]},\ 1 \right]\) on layer \(l\); \(b_{i}^{[l]}\): bias on unit \(i\) in layer \(l\)
activation values outputed from layer \(l\)
\(z^{[l]} = w^{[l]} a^{[l-1]} + b^{[l]}\)
\(a^{[l]} = g^{[l]}(z^{[l]})\)
in detail for each unit in the layer
\(z_j^{[l]} = w_{j0}^{[l]} a_0^{[l-1]} + w_{j1}^{[l]} a_1^{[l-1]} + ... + w_{jn^{[l-1]}}^{[l]} a_{n^{[l-1]}}^{[l-1]} + b_j^{[l]}\)
\(a_j^{[l]} = g^{[l]}(z_j^{[l]})\)
output \(\hat{y} = a^{[L]} = h(x)\)
Model's architecture
Model's parameters
Data
Cost function (for the softmax activation function)
\(J(w, b) = \frac{1}{m} \sum_{i=1}^{m} \mathscr{L}(\hat{y}, y) = \frac{1}{m} \sum_{i=1}^{m} \sum_{k=1}^{K} \left( -y_k^{(i)}\ log\ \hat{y}_k^{(i)}\right)\)
Goal
\(\underset{w, b}{\operatorname{min}} J(w, b)\)
Algorithm (vectorized implementation)
initialize the model parameters
for each epoch
set \(A^{[0]} = X\)
perform forward-propagation to compute \(A^{[l]}\) for \(l=\{1, 2, ..., L\}\)
perform back-propagation: back propagate the error through each layer
last layer
\(dz^{[L]} = \frac{\partial \ J}{\partial \ Z^{[l]}} = A^{[L]} - Y\)
\(dw^{[L]} = \frac{\partial \ J}{\partial \ w^{[L]}} = \frac{1}{m} dz^{[L]} A^{[L-1]^T}\)
\(db^{[L]} = \frac{\partial \ J}{\partial b^{[L]}} = np.mean(dz^{[L]}, axis=1, keepdims=True)\)
previous layers
\(dz^{[l]} = w^{[l+1]^T} dz^{[l+1]} * g'^{[l]}(Z^{[l]})\)
\(dw^{[l]} = \frac{1}{m} dz^{[l]} A^{[l-1]^T}\)
\(db^{[l]} = np.mean(dz^{[l]}, axis=1, keepdims=True)\)
update the weights and biases for every layer
\(w^{[l]} = w^{[l]} - \alpha \ dw^{[l]}\)
\(b^{[l]} = b^{[l]} - \alpha \ db^{[l]}\)


This test verifies that a selection in a region is painted correctly when a user drags it.
Steps:
- Starting at "Some text", select all of the text in the yellow box.
- While the text is selected, press the mouse down on the link. Do not release the mouse.
- Drag the selection to the whitespace on the right.
Expected Results:
- A faded image of the selected text and link should follow the mouse as you drag.
- The faded image should only contain the selected text and link.
- The faded image should have a transparent background, not yellow and not gray.
Some text, followed by a
link.


JCA is the Java Connector Architecture. This architecture provides a standard for connecting the J2EE platform to legacy enterprise information systems (EIS), such as ERP systems, database systems, and legacy applications not written in Java. JE supports this architecture.
Users who want to run JE within a J2EE Application Server can use the JCA Resource Adapter to connect to JE through a standard API. Note that the base API is required if you want to do this. The JE Resource Adapter supports all three J2EE application server transaction types:
No transaction.
Local transactions.
XA transactions.
JCA also includes the Java Transaction API (JTA), which means that JE supports 2 phase commit (XA). Therefore, JEs can participate in distributed transactions managed by either a J2EE server or the applications direct use of the JTA API.
The JE distribution includes an example showing JCA usage in a simple EJB. The Resource Adaptor has been tested using JBoss 3.2.6, and the Sun Java System Application Server, version 8.1. Instructions for how to build the Resource Adapter and run a simple "smoke test" example for each of the application servers can be found here:
JE_HOME/examples/jca/HOWTO-jboss.txt
and
JE_HOME/examples/jca/HOWTO-sjsas.txt


Files CCore/inc/Packet.h CCore/src/Packet.cpp
Packets is an infra-structure for efficient, flexible, parallel mass request processing. In this infra-structure processing nodes, also called devices, are exchanging packets. Packet is a task request. It contains a small stack for request parameters and return value and typically has an attached data buffer to transfer a bulk of data. Packet may be canceled by the originator. Each packet device has a packet entry gate, through which packets are coming for a processing. During processing a packet can be stored, transferred to another packet device or completed. Eventually packet must be completed and during completion returned to the packet pool, from which it was borrowed. Packet cancellation is a mean the packet originator can use to ask a current packet device to cancel a packet processing. It is assumed, that packet should be quickly disengaged from the processing and completed.
Packet functions, complete or cancel, must be called in a lock-free context.
The number of software entities are required to deal with packets.
using TimeStamp = SecTimer::ValueType ; using PacketFunction = Function<void (PacketHeader *)> ;
TimeStamp is a type of time-stamp value.
PacketFunction is a packet function type.
inline constexpr ulen MaxPacketExtLen = Align(256) ; inline constexpr ulen MaxPacketCompleteFunctions = 8 ; inline constexpr ulen DefaultPacketMaxDataLen = 1600 ; enum PacketCancelState { Packet_NoCancelFunction, Packet_HasCancelFunction, Packet_Cancelled }; enum LenStatus { Len_ok, Len_too_short, Len_too_long };
MaxPacketExtLen is a space for the packet extension stack.
MaxPacketCompleteFunctions is a packet complete function stack depth.
DefaultPacketMaxDataLen is a default packet data buffer length.
PacketCancelState is a packet cancel state constants.
LenStatus is a length status.
void GuardLenSubTooShort(const char *name,ulen len,ulen delta); inline ulen LenSub(const char *name,ulen len,ulen delta) // always > 0 { if( len<=delta ) GuardLenSubTooShort(name,len,delta); return len-delta; } inline PacketHeader * GetPacketHeader(PacketHeader *packet) { return packet; } template <class POD,class ... TT> PacketHeader * GetPacketHeader(Packet<POD,TT...> packet) { return packet.getPtr(); } template <class POD,class T> void DropPacketExt(PacketHeader *packet_) { Packet<POD,T> packet=packet_; packet.popExt().complete(); } template <class P> concept bool PacketType = requires(P packet) { { GetPacketHeader(packet) } -> PacketHeader * ; } ;
LenSub() performs the length subtraction. It is expected, that the result is positive. Otherwise, an exception is thrown. GuardLenSubTooShort() throw an exception. name is a function name in the exception message.
GetPacketHeader() casts a "packet" to the pointer to the PacketHeader.
DropPacketExt() is a simple packet completion function. Use it when you need only to pop some packet extension.
Concept PacketType covers all advanced packet header pointers.
The class PacketBuf is used to handle a packet data buffer. This class keeps a pointer to the data buffer alone with its length and the data length, stored in the buffer. From the PacketBuf perspective data is a raw data, i.e. a sequence of bytes.
class PacketBuf : NoCopy
{
void *data;
ulen max_data_len;
ulen data_len;
....
public:
// constructors
PacketBuf() noexcept;
explicit PacketBuf(ulen max_data_len);
~PacketBuf();
// std move
PacketBuf(PacketBuf &&obj) noexcept;
PacketBuf & operator = (PacketBuf &&obj) noexcept;
// methods
bool provide(ulen max_data_len);
void detach();
// data methods
bool noSpace() const { return !max_data_len; }
ulen getMaxRawLen() const { return max_data_len; }
ulen getRawLen() const { return data_len; }
void setRawLen(ulen data_len_) { guardLen(data_len_); data_len=data_len_; }
Place<void> getRaw() { return PlaceAt(data); }
};
Default constructor creates an empty data buffer.
Another constructor creates a data buffer with the given capacity. The data_len is zero. Exception is thrown in case of error.
Destructor releases the buffer.
PacketBuf is std movable. The original object is nullified during the move.
provide() ensures the data buffer has the given capacity. It also clears data_len. If the buffer of a greater capacity was already allocated, the extra memory is returned to the heap. The return value is true, if the operation is successful.
detach() releases the buffer. The object becomes empty.
noSpace() is true, if the buffer is empty.
getMaxRawLen() returns the buffer capacity in bytes.
getRawLen() returns the actual data length in the buffer.
setRawLen() sets the actual data length, the value must not exceed the buffer capacity, otherwise the Abort() is called.
getRaw() returns the "place" of the beginning of the data buffer. You may use this value to put data to the buffer.
Packet itself consists of the packet header, which is an object of the class PacketHeader and the packet extension behind the header. All of this is placed in a memory block of some predefined length. Packet extension is organized as a stack of any type objects. PacketHeader contains another stack of completion functions.
class PacketHeader : NoCopy
{
PacketBuf pbuf;
TimeStamp time_stamp;
Atomic cancel_state; // PacketCancelState
PacketFunction cancel_function;
void *cancel_arg;
PacketFunction stack[MaxPacketCompleteFunctions];
ulen stack_len;
ulen ext_len;
DLink<PacketHeader> link;
bool in_list;
public:
// constructors
static constexpr ulen AllocLen() { return Delta()+MaxPacketExtLen; }
explicit PacketHeader(PacketFunction complete_function) noexcept;
void recycle(PacketFunction complete_function);
~PacketHeader() {}
PacketHeader has a number of inner data fields. It also has an extension.
Normally you don't need the PacketHeader constructor, because you get a ready-to-use packet from a packet pool. This constructor creates a clean packet with the given completion function.
The destructor is not trivial: it calls a destructor of the inner PacketBuf. And again, you don't use it directly, because once you finished with a packet, you call its complete method and packet returns to the packet pool, where it was originally taken.
recycle() is used to prepare the packet for reuse. The packet must have empty extension, complete stack and no cancel function, otherwise the Abort() is called.
AllocLen() is a packet memory block length.
// complete void pushCompleteFunction(PacketFunction complete_function); PacketFunction popCompleteFunction(); void complete() { popCompleteFunction()(this); }
Packet has the inner complete function stack. Once a packet processing is finished, the method complete() must be called to complete the packet. A packet originator assigns a complete function, when preparing a packet for a processing. When a packet is taken from a packet pool, it has the one complete function in the stack, which returns the packet to the pool.
pushCompleteFunction() pushes a packet function to the complete function stack.
popCompleteFunction() pops a packet function from the complete function stack.
complete() pops a packet function from the complete function stack and applies it to the packet.
In case of stack overflow or underflow the Abort() is called.
// cancel PacketCancelState setCancelFunction(PacketFunction cancel_function,void *cancel_arg=0); PacketCancelState clearCancelFunction(); PacketCancelState getCancelFunction(PacketFunction &ret); void * getCancelArg() const { return cancel_arg; }
Packet has a cancel state. The state has one of three values: Packet_NoCancelFunction, Packet_HasCancelFunction, Packet_Cancelled.
setCancelFunction() assigns a cancel function with an optional argument. The packet must not have a cancel function assigned. If the packet is already canceled, the function does nothing, otherwise it assigns a cancel function and changes the packet state to the Packet_HasCancelFunction. The previous state is returned.
clearCancelFunction() clears the cancel function. The packet must be in Packet_HasCancelFunction or Packet_Cancelled state. If the packet is already canceled, the function does nothing, otherwise it clears a cancel function and changes the packet state to the Packet_NoCancelFunction. The previous state is returned.
These two functions are called by packet processors. Once a packet is received for processing, a packet processor may assign a cancel function to it, if the packet processing is not immediate. Before the packet is disengaged, a cancel function must be cleared. To learn how to properly use this feature, see the CancelPacketList implementation.
getCancelFunction() cancels the packet. The state is changed to Packet_Cancelled. The previous state is returned and the cancel function is returned if has been set. This function is called by the packet originator to cancel the packet processing. If the packet has an assigned cancel function, then it must be called to request the packet processing cancellation. The cancel function, if exists, completes the packet.
getCancelArg() returns the cancel argument.
// stamp TimeStamp getStamp() const { return time_stamp; } bool isOld(TimeStamp now,TimeStamp how_old) const { return now-time_stamp>how_old; } void stamp() { time_stamp=SecTimer::Get(); }
PacketHeader has the inner time-stamp field. The seconds timer is used for the time-stamping.
getStamp() return the packet time-stamp.
isOld() is used to check, if the packet is old enough. The first argument is the current time and the second is a desired life-time.
stamp() sets the current time as a time-stamp.
// ext template <class T,class ... SS> T * pushExt(SS && ... ss) requires ( NothrowDtorType<T> && ConstructibleType<T,SS...> ) ; template <class T> T * getExt(); template <class T,class ... TT> // T, T1, T2, ... , Ttop T * getDeepExt(); template <class T> void popExt();
The next set of methods are to "extend" the packet.
pushExt() pushs the object of the type T to the extension stack. The object is constructed using the given set of arguments. Pointer to the constructed object is returned. If there is no enough room for the object, the Abort() is called.
getExt() returns a pointer to the top of the extension stack. You must known exactly, that the object exists and has the given type.
getDeepExt() is used, if you have to look deeper into the extension stack. If the stack contains a sequence of objects of types T, T1, ... Ttop, you may use this methods to get a pointer to the deep object of the type T.
popExt() pops and destroys the top object from the extension stack. You must known exactly, that the object exists and has the given type.
// data attach/detach bool provide(ulen max_data_len=DefaultPacketMaxDataLen); void detach(); void attach(PacketBuf &pbuf); void detach(PacketBuf &pbuf); void detach(PacketHeader *dst);
PacketHeader has the inner PacketBuf field and a set of methods to deal with it. This buffer can be used to store a bulk of data with a packet.
These methods are direct calls of the correspondent PacketBuf methods. Last three methods move the data buffer. It is not allowed if the packet belongs to a packet list. In this case the Abort() is called. The last method moves the packet buffer to another packet. This packet also must not belong to a packet list.
// raw data bool noSpace() const { return pbuf.noSpace(); } ulen getMaxRawLen() const { return pbuf.getMaxRawLen(); } ulen getRawLen() const { return pbuf.getRawLen(); } void setRawLen(ulen data_len) { pbuf.setRawLen(data_len); } Place<void> getRaw() { return pbuf.getRaw(); } };
Raw data methods are direct calls of the correspondent PacketBuf methods.
PacketHeader contains a list link and can be inserted into a PacketList. It is not possible to have a PacketHeader in two lists. If a packet belongs to a list, it cannot be completed also.
class PacketList : NoCopy
{
....
public:
// constructors
PacketList() noexcept;
~PacketList();
// std move
PacketList(PacketList &&obj) noexcept;
PacketList & operator = (PacketList &&obj) noexcept;
// props
ulen getCount() const { return count; }
ulen getTotalLen() const { return total_len; }
// put
void put(PacketHeader *packet);
void put_first(PacketHeader *packet);
void put(PacketType packet) { put(GetPacketHeader(packet)); }
void put_first(PacketType packet) { put_first(GetPacketHeader(packet)); }
// get
PacketHeader * get();
PacketHeader * get_last();
// del
void del(PacketHeader *packet);
void del(PacketType packet) { del(GetPacketHeader(packet)); }
// methods
void complete();
void moveOld(TimeStamp how_old,PacketList &dest);
// swap/move object
void objSwap(PacketList &obj);
explicit PacketList(ToMoveCtor<PacketList> obj);
};
PacketList must be empty before the destructor is called, otherwise the Abort() is called.
PacketList is std movable. The original object is nullified during the move.
getCount() is the number of packets in the list.
getTotalLen() is the total buffer space of packets in the list.
put() puts the packet into the list. Packet must not be in a list, otherwise the Abort() is called.
put_first() puts the packet into the list as the first element. Packet must not be in a list, otherwise the Abort() is called.
get() gets the first packet from the list. If the list is empty, a null pointer is returned.
get_last() gets the last packet from the list. If the list is empty, a null pointer is returned.
del() deletes the packet form the list. Packet must belong to this list.
complete() completes all packets from the list. List becomes empty.
moveOld() moves all packets, older than how_old to the destination list.
PacketList is swappable and movable.
The class Packet is a PacketHeader pointer wrapper. It behaves like a raw pointer, so use it with caution.
template <PODType POD,class ... TT> // T1, T2, ... , Ttop
class Packet
{
PacketHeader *packet;
public:
// constructors
Packet() noexcept : packet(0) {}
Packet(NothingType) : Packet() {}
Packet(PacketHeader *packet_) : packet(packet_) {}
Packet template parameters are: the assumed type of data in the data buffer, it is a POD type. Usually, it is char or uint8. Other parameters are types of top extension objects.
Packet can be implicitly constructed from a raw pointer. Make sure the pointer either null, or points to a packet with required properties.
// props PacketHeader * operator + () const { return packet; } bool operator ! () const { return packet==0; } PacketHeader * getPtr() const { return packet; }
Usual "is null", "not null" and object access operations. You may use the GetPacketHeader() function to convert a Packet to the PacketHeader pointer.
// complete
void pushCompleteFunction(PacketFunction complete_function) { packet->pushCompleteFunction(complete_function); }
PacketFunction popCompleteFunction() { return packet->popCompleteFunction(); }
void complete() { Replace_null(packet)->complete(); }
Complete function methods.
The method complete() not only completes the packet, but also nullifies it. After this method call the object becomes null. Remember, once you called the method complete, the packet is no longer available for you. That is why we nullify the pointer in this class.
// cancel PacketCancelState setCancelFunction(PacketFunction cancel_function,void *cancel_arg=0) { return packet->setCancelFunction(cancel_function,cancel_arg); } PacketCancelState clearCancelFunction() { return packet->clearCancelFunction(); } void * getCancelArg() { return packet->getCancelArg(); }
These methods are the packet cancellation methods.
// stamp TimeStamp getStamp() { return packet->getStamp(); } bool isOld(TimeStamp now,TimeStamp how_old) { return packet->isOld(now,how_old); } void stamp() { packet->stamp(); }
These methods are the packet time-stamp methods.
// ext template <class T,class ... SS> Packet<POD,TT...,T> pushExt(SS && ... ss) requires ( NothrowDtorType<T> && ConstructibleType<T,SS...> ) { PacketHeader *ret=Replace_null(packet); ret->pushExt<T>( std::forward<SS>(ss)... ); return ret; } Ttop * getExt() { return packet->getExt<typename PacketExtType<POD,TT...>::TopType>(); } Packet<POD,...> popExt() { PacketHeader *ret=Replace_null(packet); ret->popExt<typename PacketExtType<POD,TT...>::TopType>(); return ret; } template<unsigned Index> TIndex * getDeepExt() // 1 -> T1, 2 -> T2, ... { return PacketDeepExt<Index,TT...>::Get(packet); } template<unsigned Index> Packet<POD,TIndex+1,...> forgetExt() // 1 -> T2,... , 2 -> T3,... , ... { return Replace_null(packet); }
Packet extension methods.
pushExt() pushs the object to the packet extension stack. The type of the packet changes, so this method nullifies the current Packet and returns the new Packet of the proper type.
getExt() returns a pointer to the top extension object. The type is derived from the Packet type.
popExt() pops an object from the packet extension stack. The type of the packet changes, so this method nullifies the current Packet and returns the new Packet of the proper type.
getDeepExt() gets a deep object from the packet extension. The type is derived from the Packet type.
forgetExt() "forgets" some packet extension object types. This method nullifies the current Packet and returns the new Packet of the proper type.
// data attach/detach bool provide(ulen max_data_len) { return packet->provide(max_data_len*sizeof (POD)); } bool provide() { return packet->provide(); } void detach() { packet->detach(); } void attach(PacketBuf &pbuf) { packet->attach(pbuf); } void detach(PacketBuf &pbuf) { packet->detach(pbuf); } void detach(PacketHeader *dst) { packet->detach(dst); } template <class ... SS> void detach(Packet<POD,SS...> dst) { packet->detach(dst.getPtr()); }
Packet data buffer methods. The method provide() takes the data length in POD units, not in bytes.
// data bool noSpace() { return packet->noSpace(); } ulen getMaxDataLen() { return packet->getMaxRawLen()/sizeof (POD); } ulen getDataLen() { return packet->getRawLen()/sizeof (POD); } POD * getData() { return packet->getRaw(); } PtrLen<POD> getMaxRange() { return Range(getData(),getMaxDataLen()); } PtrLen<POD> getRange() { return Range(getData(),getDataLen()); } bool checkDataLen(ULenSat data_len) { return data_len<=getMaxDataLen(); } PtrLen<POD> setDataLen(ULenSat data_len) // assume checkDataLen(data_len) { ulen raw_len=data_len.value*sizeof (POD); packet->setRawLen(raw_len); return Range(getData(),data_len.value); }
Packet data methods. All length here are in POD units.
checkDataLen() checks the data_len of the ULenSat type to fit into the data buffer capacity.
setDataLen() sets the data length and returns the data range. It is assumed, the data_len fits into the data buffer capacity.
// format PacketFormat::SubResult getMaxDataLen(PacketFormat format) { return format.sub(getMaxDataLen()); } PacketFormat::SubResult getDataLen(PacketFormat format) { return format.sub(getDataLen()); } PacketFormat::CutResult<POD> getMaxRange(PacketFormat format) { return format.cutMax(getMaxRange()); } bool checkRange(PacketFormat format) { return format.check(getDataLen()); } PtrLen<POD> getRange(PacketFormat format) // assume checkRange(format) { return format.cut(getRange()); } PtrLen<POD> getPrefix(PacketFormat format) // assume checkRange(format) { return format.cutPrefix(getRange()); } PtrLen<POD> getSuffix(PacketFormat format) // assume checkRange(format) { return format.cutSuffix(getRange()); } bool checkDataLen(PacketFormat format,ULenSat data_len) { return format.checkLen(data_len,getMaxDataLen()); } PtrLen<POD> setDataLen(PacketFormat format,ULenSat data_len) // assume checkDataLen(format,data_len) { setDataLen(format.add(data_len.value)); return Range(getData()+format.prefix,data_len.value); } };
The set of data methods with PacketFormat. See below more explanations about packet formats.
getMaxDataLen() returns the maximum working data length with the given packet format.
getDataLen() returns the working data length with the given packet format.
getMaxRange() return the maximum working data range with the given packet format.
checkRange() returns true, if the data length fits in the given packet format.
getRange() returns the working data range with the given packet format.
getPrefix() returns the data prefix with the given packet format.
getSuffix() returns the data suffix with the given packet format.
checkDataLen() checks if the given working data length can be set.
setDataLen() sets the working data length and returns the working data range.
PacketCanceller is a helper class. It simplifies the process of packet cancellation.
class PacketCanceller : NoCopy
{
PacketHeader *packet;
PacketFunction cancel_function;
public:
explicit PacketCanceller(PacketType packet_) : packet(GetPacketHeader(packet_)) {}
bool getCancelFunction() { return packet->getCancelFunction(cancel_function)==Packet_HasCancelFunction; }
void cancel() { cancel_function(packet); }
};
Constructor records a packet pointer.
getCancelFunction() cancels the recorded packet. The method returns true, if a cancel function has been retrieved.
cancel() calls the cancel function. Use must call it, if the getCancelFunction() returned true.
The process has two phases, because the first call can be done in any context, but a cancel function must be called in a lock-free context.
Packet format consists of three values: the prefix length, the suffix length and the maximum working data length. It is often required to reserve some prefix and suffix in the data range for a further processing. Fox example, when you prepare UDP packet, the prefix for UDP header, IP header and Ethernet header is reserved. These parts are filled by the next-layer packet devices. You put data into the working subrange after this prefix.
PacketFormat represents the packet format and has a number of methods to manipulate with lengths and data ranges.
struct PacketFormat
{
ulen prefix;
ulen max_data;
ulen suffix;
// prefix + suffix + max_data <= MaxULen
PacketFormat() noexcept
{
prefix=0;
max_data=0;
suffix=0;
}
PacketFormat(NothingType) : PacketFormat() {}
ulen getMaxTotalLen() const { return prefix+max_data+suffix; }
PacketFormat addPrefix(ulen prefix_len) const;
PacketFormat addSuffix(ulen suffix_len) const;
PacketFormat addPrefixSuffix(ulen prefix_len,ulen suffix_len) const;
getMaxTotalLen() is the maximum total data length. It is the sum of the prefix length, the suffix length and the maximum working data length.
addPrefix() creates the new PacketFormat with increased prefix, max_data is decreased. Exception is thrown, if there is no space.
addSuffix() creates the new PacketFormat with increased suffix, max_data is decreased. Exception is thrown, if there is no space.
addPrefixSuffix() creates the new PacketFormat with increased prefix and suffix, max_data is decreased. Exception is thrown, if there is no space.
ulen add(ulen len) const; // return total_len; struct SubResult { ulen len; LenStatus status; SubResult(ulen len_,LenStatus status_) : len(len_),status(status_) {} bool isTooShort() const { return status==Len_too_short; } bool notFitFormat() const { return status!=Len_ok; } }; SubResult sub(ulen total_len) const; // return len; bool checkLen(ULenSat len,ulen max_total_len) const;
add() calculates the total data range length from the working range length. No checks are performed.
sub() performs the inverse operation: it calculates the working range length from the total data range length. But it is a checked operation, so it returns a data structure with two fields: len and status. If the total_len is too short, the status is Len_too_short and the len is zero. If the total_len is too large, the status is Len_too_long and the len is max_data. Otherwise status is Len_ok and the len is the working range length.
checkLen() checks, if the len can be used as the working data length and the total data length is limited by the given limit.
bool check(ulen total_len) const; template <class T> PtrLen<T> cut(PtrLen<T> range) const; // assume check(range.len) template <class T> PtrLen<T> cutPrefix(PtrLen<T> range) const; // assume check(range.len) template <class T> PtrLen<T> cutSuffix(PtrLen<T> range) const; // assume check(range.len) template <class T> struct CutResult { PtrLen<T> range; LenStatus status; CutResult(PtrLen<T> range_,LenStatus status_) : range(range_),status(status_) {} LenStatus operator ! () const { return status==Len_too_short; } }; template <class T> CutResult<T> cutMax(PtrLen<T> range) const; };
check() checks, if the given length can be a total data length.
cut() cuts the working range from the total data range.
cutPrefix() cuts the prefix from the total data range.
cutSuffix() cuts the suffix from the total data range.
cutMax() cuts the working range from the total data range. This method doesn't assume the total range has the proper length. It returns the structure with two fields: range with the resulting range and status with the length status. If the input range is too short, the status is Len_too_short and the range is empty. If the input range has a good length, the status is Len_ok and the range is the working range. Finally, if the input range is too long, the status is Len_too_long and the range has max_data length.
Assume, we have a packet processing device, like this:
class Device { .... public: .... void put(Packet<uint8,int> packet); };
To use this device a packet must be acquired. You may simply borrow it from the default packet pool:
Packet<uint8> packet=AllocPacket<uint8>(); if( !packet ) { .... } // error handling
If the pool is empty, the call is blocked until some packet is returned. This is different, than a memory allocation behavior. We assume, that packets will be eventually completed and return to the pool. So if there is no available packets, processing will be delayed.
Or (preferred), you may use the packet set.
PacketSet<uint8> pset; Packet<uint8> packet=pset.get(); if( !packet ) { .... } // error handling
Packet set takes packets from the same pool, but it limits the number. It also tracks packets, so you may also wait until all packets, taken from this set, are completed, or cancel them.
Then you have to prepare the packet:
Packet<uint8,int> packet2=packet.pushExt<int>(12345); // int = 12345 is pushed auto range=packet2.setDataLen(100); .... // fill range packet2.pushCompleteFunction(DropPacketExt<uint8,int>);
You should push the required packet extension and fill the data buffer. You also have to push a complete function. In our case we push the function to drop the additional packet extension we have pushed to the packet.
When the packet is ready, submit it to the processing.
Device *device=....; device->put(packet2);
Now the device owns the packet. When it finish to deal with one, the packet will be completed and returned to the packet pool (or packet set). You may prepare and submit several packets. If you need a packet processing result, you may push such a complete function, which examines the result. Let's assume, the device above returns some integer code in the packet extension. Then you may proceed as following:
class Submitter : public Funchor_nocopy { int code; Sem sem; private: void complete(PacketHeader *packet_) { Packet<uint8,int> packet=packet_; code=*packet.getExt(); sem.give(); packet.popExt().complete(); } PacketFunction function_complete() { return FunctionOf(this,&Submitter::complete); } public: Submitter(); ~Submitter(); int submit(Device *device,Packet<uint8> packet) { Packet<uint8,int> packet2=packet.pushExt<int>(0); packet2.pushCompleteFunction(function_complete()); device->put(packet2); sem.take(); return code; } }; .... Submitter submitter; Device *device=....; Packet<uint8> packet=AllocPacket<uint8>(); if( !packet ) { .... } // error handling auto range=packet.setDataLen(100); .... // fill range int code=submitter.submit(device,packet);
It is recommended to use the PacketSet class as a packet source. To learn more about packet processing see the test3009.PacketSet.cpp.


In this tutorial, we are going to take the simple word count example and spice it up. We are going to use Apache PIG to determine the number of times each characters name has appeared in the book pride and prejudice.
If you have not installed PIG - please follow the steps in this tutorial.
Lets get started !!!
Just for reference, these are the main characters we are going to look for. I’m going by their first names.
- Catherine
- Elizabeth
- Collins
- George
- Jane
- Lydia
- Caroline
- Kitty
- Charles
Step 1: Download the book
wget https://s3.amazonaws.com/omairaasim.github.io/data/pride_and_prejudice.txt
Step 2: Copy the book into HDFS
hadoop fs -copyFromLocal /home/hadoop/pride_and_prejudice.txt /data/pig/pride_and_prejudice.txt
Step 3: Load the data
Start pig and load the data
pnp_book = LOAD '/data/pig/pride_and_prejudice.txt' AS (lines:chararray);
Step 4: Tokenize the data
Lets tokenize and flatten the data so we get one word in each line. Also in this step - I’m replacing all punctuation marks and (“’s’”). If we don’t do that, then when we tokenize - these 3 would be considered as separate tokens
- Elizabeth
- Elizabeth.
- Elizabeth’s
tokens = FOREACH pnp_book GENERATE FLATTEN (TOKENIZE(REPLACE(lines, '\'[s]|[\\.;,!:]',''))) AS word;
Step 5: Filter the data
character_names = FILTER tokens BY
(
LOWER(word) matches LOWER('Elizabeth') OR
LOWER(word) matches LOWER('Collins') OR
LOWER(word) matches LOWER('George') OR
LOWER(word) matches LOWER('Jane') OR
LOWER(word) matches LOWER('Lydia') OR
LOWER(word) matches LOWER('Caroline') OR
LOWER(word) matches LOWER('Kitty') OR
LOWER(word) matches LOWER('Charles')
);
Step 6: Group the words together
Next we will group the words
group_by_name = GROUP character_names BY LOWER(word);
Step 7: Count the occurrences
Next we will count the number of times each character name has occurred
count_names = FOREACH group_by_name GENERATE group, COUNT(character_names) as total_count;
Step 8: Order by max count
order_count = ORDER count_names BY total_count DESC;
Step 9: Save the script
Lets save it as a pride_and_prejudice.pig file
STORE order_count INTO '/output/pig/pride_and_prejudice';
Step 10: Output
The output is saved in the hdfs folder we specified in step 9. To view the results - you can use this command.
hadoop fs -cat /output/pig/pride_and_prejudice/part-r-00000
elizabeth 633
jane 293
collins 180
lydia 170
kitty 70
caroline 17
george 8
charles 7
Here is the complete script
pnp_book = LOAD '/data/pig/pride_and_prejudice.txt' AS (lines:chararray);
tokens = FOREACH pnp_book GENERATE FLATTEN (TOKENIZE(REPLACE(lines, '\'[s]|[\\.;,!:]',''))) AS word;
character_names = FILTER tokens BY
(
LOWER(word) matches LOWER('Elizabeth') OR
LOWER(word) matches LOWER('Collins') OR
LOWER(word) matches LOWER('George') OR
LOWER(word) matches LOWER('Jane') OR
LOWER(word) matches LOWER('Lydia') OR
LOWER(word) matches LOWER('Caroline') OR
LOWER(word) matches LOWER('Kitty') OR
LOWER(word) matches LOWER('Charles')
);
group_by_name = GROUP character_names BY LOWER(word);
count_names = FOREACH group_by_name GENERATE group, COUNT(character_names) as total_count;
order_count = ORDER count_names BY total_count DESC;
STORE order_count INTO '/output/pig/pride_and_prejudice';
As you can see - this is nothing but an extension of word count program but we’ve used it to do a simple analysis.


Design is not just what it looks like and feels like. Design is how it works.
Creating great a user experience starts with people. By understanding your users at a deep level we will uncover big opportunities for your organization.
Your interface is your brand. Colors, type, icons, and shapes combine to set the tone of your user experience. We will work with your team to find the right balance to express your brand in a delightful way for your users.
Seeing is believing. We build prototypes to help you test the hypotheses and validate your idea. Once we gain the proper understanding we will develop your product and launch it. We can maintain it, you just need to ask!
(it better be f*#cking awesome)
(pretty + useless = pretty useless)
A/B testing is a simple way to test changes to your page against the current design and determine which ones produce positive results. It is a method to validate that any new design or change to an element on your webpage is improving your conversion rate before you make that change to your site code.
Five second tests helps you fine tune your landing pages and calls to action by analyzing the most prominent elements of your design.
Test your brand message
Make sure users can recall your company slogan or understand what you do from your logo.
Test first impressions
Identify if your call to action is working by testing what users remember about your websites.
Solicit user feedback
Quickly find out what users like the most and least about your designs and mockups.
Where do your users click?
Click tests help you find out how your users interact with your interfaces.
By finding out where users click on your interfaces you can quickly find out whether your calls to action are working effectively.
Is your website easy to navigate?
Navflow helps you find out how users navigate around your websites and applications.
Navflow lets you combine multiple click tests into funnels that help you indentify exactly which page is causing your users difficulty when completing multi-step processes.


AN
onymous
E
-
V
oting using
E
thereum
.
1st phase
Generate the key and Publish it.
modulo: nothing
generator: nothing
Publish Voting Key


|
hcash
2.0.0
hcash
|
#include <ThreadPool.hpp>
Public Member Functions | |
| thread_safe_queue () | |
| thread_safe_queue (thread_safe_queue const &other) | |
| void | push (T tValue) |
| void | wait_and_pop (T &tValue) |
| std::shared_ptr< T > | wait_and_pop () |
| bool | try_pop (T &tValue) |
| std::shared_ptr< T > | try_pop () |
| bool | empty () const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |


Map, Group_by, and Cycle
map { |item| block } → new_ary map → Enumerator Invokes the given block once for each element of self. Creates a new array containing the values returned by the block. See also Enumerable#collect. If no block is given, an Enumerator is returned instead. ex. a = [ "a", "b", "c", "d" ] a.collect { |x| x + "!" } #=> ["a!", "b!", "c!", "d!"] a.map.with_index{ |x, i| x * i } #=> ["", "b", "cc", "ddd"] a #=> ["a", "b", "c", "d"]
group_by { |obj| block } → a_hash group_by → an_enumerator Groups the collection by result of the block. Returns a hash where the keys are the evaluated result from the block and the values are arrays of elements in the collection that correspond to the key. If no block is given an enumerator is returned. ex. (1..6).group_by { |i| i%3 } #=> {0=>[3, 6], 1=>[1, 4], 2=>[2, 5]}
cycle(n=nil) { |obj| block } → nil cycle(n=nil) → an_enumerator Calls block for each element of enum repeatedly n times or forever if none or nil is given. If a non-positive number is given or the collection is empty, does nothing. Returns nil if the loop has finished without getting interrupted. #cycle saves elements in an internal array so changes to enum after the first pass have no effect. If no block is given, an enumerator is returned instead. a = ["a", "b", "c"] a.cycle { |x| puts x } # print, a, b, c, a, b, c,.. forever. a.cycle(2) { |x| puts x } # print, a, b, c, a, b, c.


|
|
For live capture if your user does not have permission to monitor the network interface then you may need to run as root:
For details on setting up network permissions see User Permissions wiki
For details on setting up network permissions see User Permissions wiki


|
|
| TextBox (const TextBoxParams ¶ms) |
| |
| LoadState | Load (SDL_Renderer *renderer) override |
| |
| void | Render (SDL_Renderer *renderer) override |
| |
| void | Clean () override |
| |
|
void | SetText (const std::string &text) |
| |
|
void | SetPosition (int32_t x, int32_t y) |
| |
|
void | SetCenterPosition (int32_t x, int32_t y) |
| |
|
int32_t | GetX () const |
| |
|
int32_t | GetY () const |
| |
|
int32_t | GetCenterX () const |
| |
|
int32_t | GetCenterY () const |
| |
|
int32_t | GetWidth () const |
| |
|
int32_t | GetHeight () const |
| |
| | IGameObject () |
| |
| virtual void | Update () |
| |
| LoadState | GetLoadState () const |
| |
| void | SetLoadState (const LoadState newState) |
| |
| bool | IsShown () const |
| |
| virtual void | Show (const bool show) |
| |
| int32_t | GetZ () const |
| |
| void | Destroy () |
| |
| bool | DestructionWanted () const |
| |
◆ Clean()
| void JadeEngine::TextBox::Clean |
( |
| ) |
|
|
overridevirtual |
Triggered when the game object is about to be destroyed or reset.
All resources belonging solely to the game object, such as textures, should be released at this point. The game object instance itself may or may not be destroyed after this callback.
Reimplemented from JadeEngine::IGameObject.
◆ Load()
| LoadState JadeEngine::TextBox::Load |
( |
SDL_Renderer * |
renderer | ) |
|
|
overridevirtual |
◆ Render()
| void JadeEngine::TextBox::Render |
( |
SDL_Renderer * |
renderer | ) |
|
|
overridevirtual |
The documentation for this class was generated from the following files:


const ( // ExpectOneBlock expects one block ExpectOneBlock NumBlock = 1 // ExpectTwoBlocks expects two block ExpectTwoBlocks NumBlock = 2 // ExpectThreeBlocks expects three block ExpectThreeBlocks NumBlock = 3 // ExpectFourBlocks expects four block ExpectFourBlocks NumBlock = 4 // ExpectFiveBlocks expects five block ExpectFiveBlocks NumBlock = 5 // ExpectSixBlocks expects six block ExpectSixBlocks NumBlock = 6 // ExpectSevenBlocks expects seven block ExpectSevenBlocks NumBlock = 7 // ExpectOneCC expects one chaincode event ExpectOneCC NumChaincode = 1 // ExpectTwoCC expects two chaincode event ExpectTwoCC NumChaincode = 2 // ExpectThreeCC expects three chaincode event ExpectThreeCC NumChaincode = 3 // ExpectFourCC expects four chaincode event ExpectFourCC NumChaincode = 4 )
ConnFactory creates mock connections
var ConnFactory = func(opts ...Opt) Connection { return NewMockConnection(opts...) }
func NewDiscoveryService(peers ...fab.Peer) fab.DiscoveryService
NewDiscoveryService returns a new MockDiscoveryService
func NewMockConfig(channelID string, policy fab.EventServicePolicy) *fabmocks.MockConfig
NewMockConfig returns a mock endpoint config with the given event service policy for the given channel
Attempt specifies the number of connection attempts
type Attempt uint
const ( // FirstAttempt is the first attempt FirstAttempt Attempt = 1 // SecondAttempt is the second attempt SecondAttempt Attempt = 2 // ThirdAttempt is the third attempt ThirdAttempt Attempt = 3 // FourthAttempt is the fourth attempt FourthAttempt Attempt = 4 )
ConnectAttemptResults maps a connection attempt to a connection result
type ConnectAttemptResults map[Attempt]ConnectResult
func NewConnectResults(results ...ConnectResult) ConnectAttemptResults
NewConnectResults returns a new ConnectAttemptResults
ConnectResult contains the connection factory to use for the N'th connection attempt
type ConnectResult struct { Attempt Attempt ConnFactory ConnectionFactory }
func NewConnectResult(attempt Attempt, connFactory ConnectionFactory) ConnectResult
NewConnectResult returns a new ConnectResult
Connection extends Connection and adds functions to allow simulating certain situations
type Connection interface { api.Connection // ProduceEvent send the given event to the event channel ProduceEvent(event interface{}) // Result returns the result for the given operation Result(operation Operation) (ResultDesc, bool) // Ledger returns the mock ledger Ledger() servicemocks.Ledger }
ConnectionFactory creates a new mock connection
type ConnectionFactory func(opts ...Opt) Connection
MockConnection is a mock connection used for unit testing
type MockConnection struct {
// contains filtered or unexported fields
}
func NewMockConnection(opts ...Opt) *MockConnection
NewMockConnection returns a new MockConnection using the given options
func (c *MockConnection) Close()
Close implements the MockConnection interface
func (c *MockConnection) Closed() bool
Closed return true if the connection is closed
func (c *MockConnection) Ledger() servicemocks.Ledger
Ledger returns the mock ledger
func (c *MockConnection) ProduceEvent(event interface{})
ProduceEvent send the given event to the event channel
func (c *MockConnection) Receive(eventch chan<- interface{})
Receive implements the MockConnection interface
func (c *MockConnection) Result(operation Operation) (ResultDesc, bool)
Result returns the result for the given operation
func (c *MockConnection) SourceURL() string
SourceURL returns the event source
MockDiscoveryService is a mock discovery service used for event endpoint discovery
type MockDiscoveryService struct {
// contains filtered or unexported fields
}
func (s *MockDiscoveryService) GetPeers() ([]fab.Peer, error)
GetPeers returns a list of discovered peers
MockDispatcher is a mock Dispatcher
type MockDispatcher struct { Error error LastBlock uint64 }
func (d *MockDispatcher) EventCh() (chan<- interface{}, error)
EventCh simply returns the configured error
func (d *MockDispatcher) LastBlockNum() uint64
LastBlockNum returns the last block number
func (d *MockDispatcher) Start() error
Start returns the configured error
MockPeer contains mock PeerState
type MockPeer struct { *fabmocks.MockPeer // contains filtered or unexported fields }
func NewMockPeer(name, url string, blockHeight uint64) *MockPeer
NewMockPeer returns a new MockPeer Deprecated: This function will be deprecated in the future. Use NewMockStatefulPeer instead.
func NewMockStatefulPeer(name, url string, opts ...MockPeerOpt) *MockPeer
NewMockStatefulPeer returns a new MockPeer with the given options
func (p *MockPeer) BlockHeight() uint64
BlockHeight returns the block height
func (p *MockPeer) SetBlockHeight(blockHeight uint64)
SetBlockHeight sets the block height
MockPeerOpt is a mock peer option
type MockPeerOpt func(*MockPeer)
func WithBlockHeight(blockHeight uint64) MockPeerOpt
WithBlockHeight sets the block height of the mock peer
func WithMSP(mspID string) MockPeerOpt
WithMSP sets the MSP ID of the mock peer
NumBlock is the number of block events received
type NumBlock uint
NumChaincode is the number of chaincode events received
type NumChaincode uint
Operation is the operation being performed
type Operation string
OperationMap maps an Operation to a ResultDesc
type OperationMap map[Operation]ResultDesc
OperationResult contains the result of an operation
type OperationResult struct { Operation Operation Result Result ErrMessage string }
func NewResult(operation Operation, result Result, errMsg ...string) *OperationResult
NewResult returns a new OperationResult
Opt applies an option
type Opt func(opts *Opts)
func WithLedger(ledger servicemocks.Ledger) Opt
WithLedger provides the mock connection with a ledger
func WithResults(funcResults ...*OperationResult) Opt
WithResults specifies the results for one or more operations
func WithSourceURL(sourceURL string) Opt
WithSourceURL provides the mock connection with an event source
Opts contains mock connection options
type Opts struct { Ledger servicemocks.Ledger Operations OperationMap Factory ConnectionFactory SourceURL string }
Outcome is the outcome of the attempt
type Outcome string
const ( // ReconnectedOutcome means that the client reconnect ReconnectedOutcome Outcome = "reconnected" // ClosedOutcome means that the client was closed ClosedOutcome Outcome = "closed" // TimedOutOutcome means that the client timed out TimedOutOutcome Outcome = "timeout" // ConnectedOutcome means that the client connected ConnectedOutcome Outcome = "connected" // ErrorOutcome means that the operation resulted in an error ErrorOutcome Outcome = "error" )
ProviderFactory creates various mock MockConnection Providers
type ProviderFactory struct {
// contains filtered or unexported fields
}
func NewProviderFactory() *ProviderFactory
NewProviderFactory returns a new ProviderFactory
func (cp *ProviderFactory) Connection() Connection
Connection returns the connection
func (cp *ProviderFactory) FlakeyProvider(connAttemptResults ConnectAttemptResults, opts ...Opt) api.ConnectionProvider
FlakeyProvider creates a connection provider that returns a connection according to the given connection attempt results. The results tell the connection provider whether or not to fail, to return a connection, what authorization to give the connection, etc.
func (cp *ProviderFactory) Provider(conn Connection) api.ConnectionProvider
Provider returns a connection provider that always returns the given connection
Received contains the number of block and chaincode events received
type Received struct { NumBlock NumBlock NumChaincode NumChaincode }
func NewReceived(numBlock NumBlock, numChaincode NumChaincode) Received
NewReceived returns a new Received struct
Result is the result to take for a given operation
type Result string
const ( // SucceedResult indicates that the operation should succeed SucceedResult Result = "succeed" // FailResult indicates that the operation should fail FailResult Result = "fail" // NoOpResult indicates that the operation should be ignored (i.e. just do nothing) // This should result in the client timing out waiting for a response. NoOpResult Result = "no-op" )
ResultDesc describes the result of an operation and optional error string
type ResultDesc struct { Result Result ErrMsg string }


--- title: My first post resumen: Lorem ipsum dolor, sit amet consectetur adipisicing elit fist. date: 2021-08-09 slug: my-first-post ---
Lorem ipsum dolor, sit amet consectetur adipisicing elit. Facere


Gembok Authenticator is software based (virtual) authenticator to generate 2-Steps authentication token using browser. It is written in HTML and Javascript so it should works on Google Chrome, Firefox, Safari and other browsers. It uses simple JSON file to store all data which needed to generate the token.
Gembok Authenticator uses the same algorithm as most software based authenticator such as Google Authenticator. Based on my personal limited test using various services such as Twitter and AWS I found no issue.
Gembok Authenticator uses following library.
- https://github.com/hectorm/otpauth by Héctor Molinero Fernández.
v1.1
- New feature: Copy token to clipboard (2021/09/19)
v1.0
- Initial release of Gembok Authenticator (2021/08/03)
This application is written by Rio Astamal.
This application is open source licensed under MIT license.
First thing you need to do to start using Gembok Authenticator is to create JSON file containing token's information.
Here is an example of JSON file. Copy JSON string below and then save it to your computer as .json extension.
[
{
"provider": "Google",
"description": "Main account",
"secret": "I5XW6Z3MMUQG2YLJNYQGCY3D",
"period": 30,
"digits": 6,
"algorithm": "SHA1",
"indicatorColor": "red"
},
{
"provider": "AWS",
"description": "Root account (john@example.com)",
"secret": "IFLVG4TPN52GCY3D",
"indicatorColor": "orange"
},
{
"provider": "Twitter",
"description"<EMAIL_ADDRESS>"secret": "KR3WS5DUMVZC4Y3PNVVG62DO",
"indicatorColor": "#1DA1F2"
},
{
"provider": "Facebook",
"description": "Foo account",
"secret": "IZQWGZLCN5XWWLTD",
"indicatorColor": "#4267B2"
}
]
The only required attributes are "provider" and "secret" the rest are optional.
Save the JSON file and then use Open File... menu to load the file. You should now see 4 items being displayed.
Click "Open File..." to load your data.


public class BroadcastMissingDimensionsStrategy extends java.lang.Object implements BroadcastingStrategy
The reason for this important difference to numpy, is that we consider this as more consistent in the general case: If a dimension is not present in a tensor, we treat it as 'applicable for all' while if the dimension is present with one entry, then it is clearly defined where the values are positioned in this dimension and it would be dangerous to assume they would be applicable everywhere.
| Constructor and Description |
|---|
BroadcastMissingDimensionsStrategy()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
<V> TensorPair<V> |
broadcast(Tensor<V> left,
Tensor<V> right,
java.util.Set<java.lang.Class<?>> excludedDimensions)
Has to broadcast the given to tensors into a new pair of tensors, that are consistent according to the
broadcasting strategy in question.
|
static BroadcastMissingDimensionsStrategy |
get() |
java.lang.Class<BroadcastingStrategy> |
getMarkerInterface() |
@Deprecated public BroadcastMissingDimensionsStrategy()
get()
public static BroadcastMissingDimensionsStrategy get()
public <V> TensorPair<V> broadcast(Tensor<V> left, Tensor<V> right, java.util.Set<java.lang.Class<?>> excludedDimensions)
BroadcastingStrategy
broadcast
in interface BroadcastingStrategy
left
- the left tensor to broadcastright
- the right tensor to broadcastexcludedDimensions
- a set of dimensions, which should be excluded from broadcastingpublic java.lang.Class<BroadcastingStrategy> getMarkerInterface()
getMarkerInterface
in interface Option<ManipulationOption>


Looming breakup! CR7#Juve may split if…
by Agency ReportCristiano Ronaldo has become unsettled at Juventus.
That’s according to Okdiario’s chief pundit Eduardo Inda, speaking on El Chiringuito.
Inda suggests Ronaldo could leave Juve by mutual agreement should they fail to win the Champions League this season.
Ultimately, Ronaldo will seek a club capable of winning the Champions League, while Juve will be happy to move him on in order to make room for Manchester United midfielder Paul Pogba and PSG star Kylian Mbappe.
He explained, “He could leave Juventus at the end of the season if he does not win the Champions League.
“Juve wants to sign Pogba and Mbappé and for the salary limit they have to sell to Cristiano.”
Copyright PUNCH.
All rights reserved. This material, and other digital content on this website, may not be reproduced, published, broadcast, rewritten or redistributed in whole or in part without prior express written permission from PUNCH.
Contact: theeditor@punchng.com