Year Two
Year Two
I remember the precise moment in 2018 when it happened—the very second an ephemeral moment of clarity so farfetched as to seem entirely fabricated and yet so starkly vivid as to be indisputable.
I was sitting in a boardroom meeting with two coworkers and two senior representatives from a potential partner. I won’t name names.
There was a pair of awkward, white floor vases filled with plant-like-but-definitively-not-plants “sticks” which framed either side of a dormant Xbox One tethered to a sizable Toshiba, which itself had a penchant for making the resolution of any connected computer so damn high that each meeting invariably started with ten minutes of “go to your Settings” followed by “I know, these 4k TVs, I tell ya. I saw a good deal at Costco…” and ultimately a “People on the bridge, still on the line?”.
The room’s centerpiece was a wooden table which bore the kinds of stains that at first blush suggest it had seen some serious boardroom brawls over the years but was in fact merely representative of the fact that no one saw fit to clean up after themselves when spilling coffee in a meeting. Thankfully, the lingering faded black trails of marker which couldn’t be erased from the whiteboards that adorned the walls around complemented the table’s dark veneer.
The goal of this poorly-organized meeting (as I came to understand it mere moments before it began) was to determine how exactly this potential partner would help us execute on a specific product opportunity we were exploring.
Prior to this meeting, in the absence of any concrete information about the use case, I had done weeks’ worth of research: customer discovery, value proposition design, pain quantification, use case definition, total address market valuation, competitive analysis, minimum viable product validation, roadmapping—more work than anyone else involved by at least dozens of hours.
By this point, I was advocating for the shelving of this particular enterprise. The economics had way too many flimsy assumptions; the TAM was suspect; we’d not yet found meaningful validation; and we were nowhere near clear on the what, why, and who to bring a partner into the mix.
Suffice to say, I wasn’t into it, and those that know me will tell you that a Frank disengaged is a Frank disembarking.
You may then be able to imagine both my face and my mindset when, as the meeting started, our first discussion point was not of the customer nor the pain nor the use case nor even the economics but rather the technology—the how to a what and for a who that we didn’t understand nor could articulate as a group uniformly let alone individually and (or) intelligently.
That the meeting diverted a moment later towards discussion of a side letter to sell crypto in a quantity large enough to warrant both a private plane and the giant duffel bag of cash which was then set down on the boardroom table only served to punctuate the end of the sentence for both my product career and the journey started in Year One.
My time in product management and in tech start-ups had run its course. I accepted an offer from Salesforce the following day.
So ended the first leg of my career. That was 2018 in a nutshell for me: a bag of cash on the table before me, the cost of which was walking myself into the wrong room.
Year On[e] Where [e] = “ce More, With Feeling”
We all begin the year with the best of intentions. Only the best of us can see those intentions through briefly before falling back into the status quo after forgetting the what and the why amidst the here and the now.
We are only human, after all, and habits are hard to break; Instagram ain’t going to scroll itself; swiping right feels good; the gaming backlog is forever growing, etcetera. At least, that’s what I tell myself to assuage the pain, particularly in the wake of last year.

Year One was resolved to be the comeback story, the redemption tale, the coming of age saga that would so triumphantly (and, *gulp*, publicly) follow a year of divorce and career disruption and financial discombobulation.
I barely made it to Q2‘18 before that resolution fell apart.
Look, I could easily spin the story the other way. I could join the ranks of self promoters on LinkedIn and Medium who are trotting out platitudes and “you can do it sluggers” while humble bragging about how I have it all figured out and you can too by following this listicle and subscribing to my newsletter so you can get your fat stacks and Lambos and your exclusive invite-only beta key to www.blooddiamond.com.
 It’d be selective truth, if truth at all. It would be me playing to the LinkedIn “listicle leaders” and masturbatory Medium “magnates”.
Rather, I want to focus on what’s more important: what didn’t work, why, and how I iterated through it. After all, real iteration comes from constant awareness, dedicated introspection, vulnerable humility, and continuous improvement.
So let’s talk about how I ended up in that wrong room and what I did about it, because that’s my story of 2018.
What Went Wrong
Freelancing
As was the central thesis for Year One, I saw 2018 as the year I would finally embark on doing what I wanted to do: tell great, impactful, and catalytic stories professionally.
However, I made the mistake of assuming that realizing said vision would require going it alone as a freelance writer.
Doing biz dev and lead gen for effectively a “content” company simply isn’t my cup of tea, and that amounts to 90% of what you do as a freelancer, which was a surprise to virtually no one but I, apparently.
Should I have heeded the advice of the many attempted-freelancers who’ve written at length about that reality? Probably, but them’s the breaks for an experiential learner. Unfortunately, that learning came at a heavy cost both personal and professional.
In short, I decided to spin down and close the side business entirely. I know that storytelling must be central to my day-to-day working life, but I’ve now empirically validated that freelance writing just isn’t for me.
Failing Forward
The failure in freelancing sent me tumbling into the abyss when trying to chart the right next steps for my career. I floundered, bouncing indecisively from company to company before ultimately settling more from fear than excitement.
This act, unsurprisingly, had a number of consequences, some obvious and some less so.
Above all, I faced a significant amount of scrutiny from peers and potential employers, particularly those I was pursuing for non-product roles. Choruses of “you don’t know what you want” and “you’re a flight risk” echo in the faint memories of the last 12 months’ experimentation.
Yet, in the wake of that difficult period, I’m left feeling angry at myself—not for the job jumping but rather for not being able to better articulate the way I feel about job jumping when pushed on it.
Every career move I’ve made has been for a specific reason, and I take great umbrage with the double-talk in the tech industry around iteration.
I run my career as I have the most successful products I’ve managed. I iterate. I learn. I adapt. I ship. Shit breaks. I learn. I adapt. I ship again. Shit gets better. Money is made. Customers get upset. Something new and shiny comes along. I ship. Shit breaks. I learn. I adapt. I ship again.
I don’t sit idly by incrementally improving myself by tackling small tweaks. I don’t ride rocket ships to take credit as a conveniently-timed passenger.
I tackle each job with fervent dedication to making an impact (1), making customers happy (2), and making myself better (3) for the next big challenge (4). When one of those four critical must-haves are no longer (or never really were) on offer, I waste no time making the move that’s in the best interest of my career.
Great businesses don’t waste time selling to customers who don’t want their product or don’t want it to improve, and I run my career with that same mentality. Sometimes that hurts companies; sometimes that bothers recruiters; sometimes that ruffles C-level feathers. I have no qualms with that, and I’m not ashamed of it.
But not every company wants to hear that. Not every company is up for that. And that’s okay—but it took me way too much of 2018 to realize I need not apologize for that belief and, really, my values.
How I Iterated
Partnering Up
Thankfully, I was able to find a company of folks, really partners, who were and are supportive of said mentality and who helped turn the year around and set us all up for mutual success in the year(s) ahead.
Had I not sought out the help from those around me, and had they not answered the call, I can only fathom how much worse things could have gone. They are eternally deserving of recognition and appreciation therein.
My parents retired this year, and my in-laws made a big move to downsize their long-standing adobe, so I would be remiss for not calling out my family first and foremost. Kev, Sam, Al, Ma and Pa Caron, Ma and Pa Vite, and my brother Joseph all played a crucial role in being a steady constant amidst the sea of change.
In my personal career, I was supported by some key folks during my freelance journey, including the City’s treasure Paula Kwan, the entreprenurial Anthony Zanfini and Yasser Pervaiz, the effervescent Katie Paterson, the indomitable pair of Kim Phelan and Amanda Pardy, and of course the legendary Tiffany DaSilva of Flowjo fame—all of whom provided both leads and moral(e) support during my freelancing stint.
I was also lucky to work with great folks like Jill San Luis, Matt Barnes, Max Van Lyl, Jeff Kraemer, Kiley Meehan, Jeremy Bailey, Lindsay Rothman, Jane Flanagan, and Scott Williams while at FreshBooks. Each played a role in my rationalization of product management, marketing, and the art of corporate storytelling—which is particularly telling given I worked with each for all of a hot minute.
Yet, I was luckier still to lead a team for a spell with great folks like Chris Gurney, Nick Pinto, Mike Laccetti, and Bhavin Shah while kickstarting the Product team at Globalive Technology. I take pride that I was able help set each up for success in their own respective path while focusing our efforts there in the end, and I’m grateful to each one of them for helping to facilitate the next step in my own career.
But most of all, I was supported immensely by Vanessa Vite, Paul Snelson, Amber Morace-Wohng, Ian Wong, Matt Roher, Adil Jaffer, Pablo Romero, Jeff Blanchard, and my trail guide Ming Fong as well as a huge, extended Ohana at Salesforce.
Which is another great segue. Man, I’m killing it late in the game here.
Braving The Unknown
The most significant “right” of the year was, after much experimentation and self reflection, making the jump out of Product once and for all to join one of the world’s leading business-to-business (B2B) software companies.
Salesforce is a company I have admired for years, and as I’m learning more about the platform and what it’s capable of, I’m increasingly hyped to work with some of the amazing businesses in Canada during the year ahead. I’ll have much more to say on this in the coming months.
What’s important to highlight here for now, though, with respect to what went right is the rationale. Scrutiny over my job jumping in the last 12 months notwithstanding, I’ve been pinged endlessly to try to explain what seems impossible to understand.
Why leave product management, and why pre-sales?
I’ve written before about my rationale for leaving Product Management (PM), and I’d previously believed that Product Marketing Management (PMM) was the only sensible way forward for me. However, in walking that path, what I’ve found is that PMM is itself generally fraught with similar realities and similar foci to PM (along with marketing-focused activities like demand gen which aren’t my speciality).
Understanding the move to pre-sales, then, requires understanding what excites me about my work, both in PM and PMM and in general.
I love stories. I love developing a deep understanding of an audience. I love doing the creative work to figure out what moves them and what’s important to them. I love drafting and writing and producing a story that engages their senses to excite them towards action. And I love the performance art that follows in delivering that story.
That was what I loved about PM and PMM: the tech and working with dev was always just a necessary (though at times enjoyable, to be sure) means to an end.
What mattered, and what’s hard in tech companies, is telling a story which connects meaning and value and purpose to product—to every unique customer in unique messaging and positioning every single day. That’s the day-to-day province of sales engineers and sales people, not so much PMs and PMMs—at least not based on my experience.
Product Management, at its core, is chiefly about risk mitigation. It is about prioritizing the next best action to ensure the org continues to grow its customer-base and customer value strategically. The day-to-day involves understanding, making, and facilitating strategic product trade-offs.
Product Marketing, at its core, is chiefly about demand generation. It is about understanding who the buyer is, where the buyer is going, and why the buyer cares in order to define the strategy that will arm both internal and external stakeholders with a story that drives a buying action. The day-to-day involves understanding, making, and facilitating strategic marketing investments.
Importantly, Product Management does not have the monopoly on deep customer empathy, and Product Marketing does not have the monopoly on customer-centric messaging.
These roles involve storytelling, to be sure, but said art isn’t their daily focus. On the contrary, Sales Engineering is corporate storytelling incarnate.
Sales Engineers are enabled by PMs and PMMs with tech and talk tracks, sure, but only Sales Engineers (and the Account Executives they partner with) spend virtually every day becoming better and better storytellers and writers and performers—artists.
And while it may sound radically more tactical a role, it typifies exactly the niche I’ve been trying find for ages—the natural progression from tech writer (written wordsmith) to product manager (plot structurer) and finally product marketeer (curated rhetorician).
Now I need only prove myself up to the task.
Retrospecticus
I’m left coming back to the story of the crypto bag of cash and the significant cost of being in the wrong room.
I wish I had allowed myself last year to put myself in the right room the first go around. Alas, hindsight is BTC$20.20 and I suppose that would have made the year boring af (2018™).
Given my recent history, I won’t hazard any major promises or predictions for the year ahead. I also won’t touch on all the personal changes ahead, from finally ditching Facebook products to my intent to break my annual tech device upgrade cycle this year and beyond. That’s for another day.
Instead, what I will wrap this blubbering up with is this. I look back on the year past proud of my growth as an individual and as an individual contributor, and I look ahead excited to make an impact at Salesforce and for the businesses that I will work tirelessly to help in my new role.
2018 was a year of tremendous experimentation and self-education, and I couldn’t be more excited to move forward in 2019 with an ever-increasing appetite to learn, iterate, grow, and help.
Here’s to finally making it to the right room. Now I just need to figure out how to stay in it.


--- layout: page title: About header-img: "img/about-bg.png" ---
Raising my vibration, reawakening to life. Moving into coding for new challenges, opportunities. Student at @Flatiron doing Software Engineering. @CareerKarma


The World’s 1st Dog Themed Token That Rewards You, Whilst Giving Dogs a Home
If you like Doge, then you’ll fall in love with PUG
PUG (Japanese: かぼす) is a female Shiba Inu most famously known as the face of Doge.
PUG was born in November 2nd, 2005 in a Japanese pedigree puppy mill that was promptly shut down, leaving PUG stranded in one of Japan’s many animal shelters. The owner of PUG, Atsuko Sato, rescued her in 2008, saving her from certain death at the hands of humanity. Her name was given by a shelter volunteer – PUG is a type of fruit and said rescue worker mentioned that her face was very round, just like the fruit.
The goal of PUG is to prevent dogs of all breeds from being abandoned. For this reason we will be making weekly donations to community chosen dog charities!
Releases:
- PUG (May 10th)
- Hikaru (TBC)
Listings:
- PUG & Hikaru Listed on CoinMarketCap, CoinGecko and Centralized Exchange
Marketing:
- 1st round of Marketing Push
- Influencer promotional material
Operations:
- Voluntary donation to community chosen charities
- Debuting development of internal Decentralized Exchange
- Ecosystem development in partnership with BOGTOOLS
Releases:
- 3rd Ecosystem integral Token
Listings:
- 3rd Token Listed on CoinMarketCap, CoinGecko and Centralized Exchange
- Additional Centralized Exchanges for both PUG and Hikaru
Marketing:
- 2nd Round of Marketing Push
- More Influencer promotional material
Operations:
- Voluntary donation to community chosen charities
- Update on Decentralized Exchange development
- Ecosystem update 1
- Debuting development of INU Wallet
Releases:
- 4th Ecosystem integral Token
- Decentralized Exchange
Listings:
- 4th Token Listed on CoinMarketCap, CoinGecko and Centralized Exchange
- Additional Centralized Exchanges for 3rd token
Marketing:
- 3rd Round of Marketing Push
- More Influencer promotional material
- Partnership Establishment
Operations:
- Voluntary donation to community chosen charities
- Update on Decentralized Exchange development
- Ecosystem update 1
- Debuting development of INU Wallet
Releases:
- 5th Ecosystem integral Token
- Staking Mechanism
- INU ECOSYSTEM
- Wallet
- Token Bridge
Listings:
-5th Token Listed on CoinMarketCap, CoinGecko and Centralized Exchange
- Additional Centralized Exchanges for 4th token
Marketing:
- 4th Round of Marketing Push
- More Influencer promotional material
- Partnership Establishment
Operations:
- Voluntary donation to community chosen charities
- Debuting development of NFT MarketPlace
- Ecosystem update 3
- Decentralized Exchange Update 1
- Ecosystem integral Centralized Exchange development planning
Releases:
- 6th Ecosystem integral Token
- NFT Marketplace
Listings:
- 6th Token Listed on CoinMarketCap, CoinGecko and Centralized Exchange
- Additional Centralized Exchanges for 5th token
- TIER 1 Centralized Exchange application
Marketing:
- 5th Round of Marketing Push
- More Influencer promotional material
- Partnership Establishment
Operations:
- Voluntary donation to community chosen charities
- NFT sales-related charity donations
- Debuting development of Centralized Exchange
- Centralized Exchange legal aspect handling
- Ecosystem update 4
- Decentralized Exchange Update 2
- Ecosystem integral Centralized Exchange development planning
WORLD DOMINATION


1: Readable Constant (prev) or 3: Update and Cache (next)
This is a demonstration of step two "can be used in the real world" Reactive, from Understanding Reactive Programming.
Since what we implemented was the ability to change a `JRV`, the usage instructions are the same, with a change at the end to show that changes work.
var A = new JRV(0),
B = new JRV(5),
X = new JRV( () => A.v + B.v );
console.log( X.v );
A.v = 10; console.log( X.v );
A.v = 20; console.log( X.v );
A.v = 30; console.log( X.v );
X.v = () => (A.v*2) + (B.v*2);
console.log( X.v );
This should log, in order, 5, 15, 25, 35, and 70.
The current code:
class JRV {
constructor(comp) { this.comp = comp; }
set v(newComp) { this.comp = newComp; }
get v() {
var isFunc = (typeof this.comp === 'function');
return isFunc? this.comp() : this.comp;
}
}


TopComponent
You can directly use instance of this class.
topComponent
Extends:
FrillCore.StoreWatchComponent → TopComponent
Top component
Example:
<Route name="login" path="/login" handler={LoginComponent} />
Test:
Constructor Summary
| Public Constructor | ||
| public |
constructor(props: any) Constructor |
Method Summary
| Public Methods | ||
| public |
getStateFromFrill(): * getStateFromFrill |
|
| public |
Fetch items |
|
| public |
onOne() Count up by one |
|
| public |
onTen() Count up by ten |
|
| public |
render(): React DOM render |
Public Constructors
Public Methods
public render(): React DOM source
render
Return:
| React DOM |
Test:
- TopComponent AppComponent#render
- TopComponent TopComponent#onOne should execute a countUp() method of an Example Action
- TopComponent TopComponent#onTen should execute a countUpBy() method of an Example Action
- TopComponent TopComponent#onFetchItems should execute a loadScrollItems() method of an Example Action
- TopComponent AppComponent#render should have className 'Top'


This is a service that will shorten long URLs.
https://aboard-meeting.glitch.me/url/[Enter URL Here].
https://aboard-meeting.glitch.me/short/[Short URL Here].


Audio Recording Test
Talk for 3 seconds, then you will hear your recording played back
Start recording...
Stop recording...
Play recording...


{# Allow a user to register the ticket to their account if the ticket is not registered to an account #}
{% if not object.user %}
{% trans "This ticket is not registered to any account." %}
{% url "claim-ticket" pk=object.uuid as claim_url %}
{% if request.user.is_authenticated %}
{% trans "Click" %} {% trans "here" %}
{% else %}
{% trans "Login" %}
{% endif %}
{% trans "to register the ticket to your account." %}
{% endif %}
{% include "news/ticket.html" with ticket=object %}
{% else %}
{% trans "This ticket is registered to another account. Please" %}
{% trans "login" %}
{% trans "to the correct account to see your ticket." %}


public class KeyUtilities
extends java.lang.Object
This is a utilities class which provides tools relevant to key-based operations. A data key refers to a block of vector header data used in most MapReduce tasks in this application.
All methods in this class are static and must be executed in a static context on a String containing a data key.
| Modifier and Type | Field and Description |
|---|---|
static int |
ID |
static int |
INDEX |
static int |
LEVEL |
static int |
VALUE |
| Constructor and Description |
|---|
KeyUtilities() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String[] |
explode(java.lang.String key,
boolean expectsValue)
Split a key into its component parts.
|
static java.lang.String[] |
explode(org.apache.hadoop.io.Text key,
boolean expectsValue)
Split a key into its component parts.
|
static org.apache.hadoop.io.Text |
getInstance(int index,
int level,
java.lang.String id)
Construct a custom instance of a key.
|
static org.apache.hadoop.io.Text |
getInstance(java.lang.String index,
java.lang.String level,
java.lang.String id)
Construct a custom instance of a key.
|
public static final int INDEX
public static final int LEVEL
public static final int ID
public static final int VALUE
public static java.lang.String[] explode(java.lang.String key, boolean expectsValue)
Split a key into its component parts.
Generally a key takes the form (row,col,level,ID,val)
key
- the key to explodeexpectsValue
- should this method expect a 4th field for valuepublic static java.lang.String[] explode(org.apache.hadoop.io.Text key, boolean expectsValue)
Split a key into its component parts.
Generally a key takes the form (row,col,level,ID,val)
key
- the key to explodeexpectsValue
- should this method expect a 4th field for valuepublic static org.apache.hadoop.io.Text getInstance(java.lang.String index, java.lang.String level, java.lang.String id)
Construct a custom instance of a key. Assumes no value field.
index
- row valuelevel
- column valueid
- key id (R, S, A)public static org.apache.hadoop.io.Text getInstance(int index, int level, java.lang.String id)
Construct a custom instance of a key. Assumes no value field.
index
- row valuelevel
- column valueid
- key id (R, S, A)


Angular speed (Angle per second). Common for all axis.
x-Jiggle
Max rotation angle along x-axis
y-Jiggle
Max rotation angle along y-axis
z-Jiggle
Max rotation angle along z-axis
Check box
Random facing
Randomize initial rotation angle. Otherwise rotation will loops through 0 to #-Jiggle by default. It loops through Rand to #-Jiggle if checked.
Setting dialog
IndvlSpd
Define the range of angular speed to be chosen for each particle.
Indvl_xJiggle
Define the range of x-rotation angle to be chosen for each particle.
Indvl_yJiggle
Define the range of y-rotation angle to be chosen for each particle.
Indvl_zJiggle
Define the range of z-rotation angle to be chosen for each particle.
Sync Jiggle
When checked, all particles rotate in sync
xSpreadAdj
Angle to be added to initial x-rotation angle per second
ySpreadAdj
Angle to be added to initial y-rotation angle per second
zSpreadAdj
Angle to be added to initial z-rotation angle per second
xyzAccel
Add time-dependent change to rotation speed
Applies to each particle independently
Input format: {Angular acceleration for x, Angular acceleration for y, Angular acceleration for z}
If only a single value is set, only angular acceleration for z will be set.
Allows negative value for deceleration
NoRevAccel
No reverse acceleration. When checked, rotation speed has a minimum of zero and stays at zero once it reach zero. When unchecked, it will accelerate in the opposite direction after reaching zero rotation speed.
xAccLimit
Upper limit for x-rotation speed. Positive value only, regardless of rotation direction.
yAccLimit
Upper limit for y-rotation speed. Positive value only, regardless of rotation direction.
zAccLimit
Upper limit for z-rotation speed. Positive value only, regardless of rotation direction.
AccTiming
Define when angular acceleration (xyzAccel) starts to take effect. Values in milliseconds
Input format: {time-x,time-y,time-z}
A single value will set time-z only
RelativeTime
Change the definition of "time zero" for use with AccTiming
Unchecked: The start of the object is counted as zero
Checked: zero is counted from the moment a particle is emitted.
Indvl_Acc
Individual acceleration and timing. The range of angular acceleration and corresponding timing from which will be randomly chosen.
Standard form: {x-Acceleration range,y-Acceleration range,z-Acceleration range, shared timing}
Expanded form: {x-Acceleration range,y-Acceleration range,z-Acceleration range, time range-x,time range-y,time range-z}
A single value will only set z-Acceleration range.


What Is Hacking?
“It is the usage of a security weakness to gain access to a system in an unauthorized way”.
Well, the technical definition is pretty boring, isn’t it? Let me try to make it simple. Imagine that with a crooked mind and some skills of yours, you somehow made your friend give you their Instagram password, and later on, you logged in to his account without his knowledge and permission. That’s it, you are HACKER. You somehow managed to access his account and this is known as “hacking”. Believe me, if that friend of yours gives a complaint to the authorities, you “will” be punished. Yes, Hacking is 100 percent “illegal”.
Highlight
Separated they live in Bookmarksgrove right at the coast of the Semantics, a large language ocean. A small river named Duden flows by their place and supplies it with the necessary regelialia
“She packed her seven versalia, put her initial into the belt and made herself on the way. When she reached the first hills of the Italic Mountains, she had a last view back on the skyline of her hometown Bookmarksgrove ” — Jean Smith
What Is Ethical-Hacking?
“It is the usage of a security weakness to gain access to a system in an authorized way.”
In much simpler terms, Ethical Hacking is a method by which a hacker gets into a system under the authorization of the system’s owner. Guess what, Ethical Hacking is completely “legal”. Since many non-ethical hackers are now trying to get into many databases around the world to steal the data, companies are very much concerned about their security. So, most of the companies hire such ethical hackers to improve the security of the company and also their products.
What Is Vulnerability?
“It is a weakness through which a system is open to attacks.”
Let us imagine a person’s brain. If we feed a direct question into the brain, a specific answer will be given as a response. But what will happen if you feed a highly complicated question to it, definitely a break-down will occur. Similarly, a computer or a system will respond to a particular straight-forward task given to it, but if we give a complicated task, the system will fail. Points where the system is prone to failure is known as a vulnerability(weakness). Finding the vulnerability is one of the main steps involved in hacking into a system.
What Is Social Engineering?
The usage of non-technical methods to hack into a system is referred to as Social Engineering. One of the best examples is the one mentioned above, a person somehow gets the Instagram password of a friend. The vulnerability here is the human mind. Social engineering can also be used to gather as much information about the target. Social engineering may sound boring but trust me, it is the most important part of hacking and there is a saying that goes like-
“Hacking is not magic. But a combination of Social Engineering and Knowledge.”
Hacking Methodologies
Methodologies are nothing but a systematic guidance of steps to hack a system. But as a hacker it is very important to understand all these 5 steps involved in hacking.
Phase 1: Information Gathering
In this phase we try to gather as much non-technical information as possible, such as company name, company CEO, owner’s personal details and many more.
Phase 2: Scanning Network
During this phase we use all the non-technical information to gather many networks as well as technical information such as IP address, open ports and also finding the vulnerability.
Phase 3: Gaining Access
In this phase we use intense codes and such to break into the system via the vulnerability found. Many languages are used to create such code, like python, which is the most common one.
Phase 4: Maintaining Access
Here we use a hidden backdoor mechanism or a trojan so that we will be able to get into the system very easily next time.
Phase 5: Clearing Logs
We should clear the system logs to remove all the traces of the work we have done on the target machine.
Don't worry, I will explain the 5 steps with a simple example. Imagine our target is a closed box and our aim is to open it. Phase 1 is to gather information such as the color of the box, shape of the box, it’s size and so on. Phase 2 is to find a suitable key to open the box using the above data. Phase 3 is to use the key and open the box. Phase 4 is to create a duplicate key so that we can easily open the box next time without going through Phase 1, 2 and 3. And finally Phase 5 is to wipe off all the fingerprints on the box.
Well, here it is, everything you need to know about the extreme basics of Ethical Hacking. And remember, it's all about the will to learn and practice. There are many tools out there to be used in each of the phases. Start learning one by one and you will be able to achieve your aim of becoming an Ethical Hacker.


Click on Canvas to add point and click button to find shortest path (not suppoted by IE) Use dev tool (F12) to track


FILM TITLE: THE FREELANCERS (LES CACHETONNEUSES) DIRECTOR: DENIS DERCOURT COUNTRY: FRANCE 1998 CINEMATOGRAPHY: JEROME PEYREBRUNE MUSIC: Classical Music CAST: Pierre Lacan, Marc Citti, Marie-Christine Laurent, Serge Renko, Wilfred Benache, Clementine Benoit, Henri Garcin, Philippe Clay, Ivry Gitlis, Sonia Manka, Faudel SUPER FEATURES: The music and the fun.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
(Seen at the 22nd Portland International Film Festival, in Portland, Oregon)
One of the nice things about French film, is the attitude "I don't care", which not only pervades film, but also all the other arts. What does this mean when it comes to the making a film about music and its players? That you are in for a very entertaining evening of fun. When the music is not being played, the subtleties of characterizations are brought out in the very independent attitude that many actors have. This film takes that for all it's worth.
This is not a film, like Fellini's ORCHESTRA REHEARSAL, which is a farce that gets out of hand, but it makes one point. Even the eccentric musicians, with their personal lives, are not professionals to the point where they can leave it all behind for a few minutes to create something really wonderful for the audience, be it us, or any other.
THE FREELANCERS, is a romp. And what it comes down to, is a story of a group of musicians that get hired for various events. Roberto has hired his friends, and those he considers best in the orchestra they are a part of, to do a concert in a mansion, for some rich old man. What he doesn't tell anyone, until the end, is that he had been asked to bring a famous Viennese Chamber Orchestra, and not the 6 people he has decided on. Presumably, he will tell the audience that they are soloists, from that famed group. Alas, the old man seems to be in on this. Out in the country, no one ever gets good music, and the old man is trying to make sure his friends get to see some, and he himself gets the pleasure of listening in to the rehearsals, which is his favorite pastime. The old man is almost deaf, but not when it comes to hearing the music.
In between, we have the usual array of egos and problems, specially during rehearsals. The director, a famous Austrian conductor is having second thoughts and even his mistress is having a hard time getting him to come. Eventually he does, but it appears he only stays for one rehearsal, which he conducts very well, despite his desire to deal with professionals, and obviously not just hackers, or at least one of his students, for whom this appears to be a favor. Several rehearsals are done with one member or another missing for various reasons, the most legitimate of which happens to be Therese who is eight and a half months pregnant. By whom, it is in doubt until later, although we find that one of the members is the father, if any of his signs are the indications. Diane, is a novice and is taking violin lessons from a master. She can never get the feeling right for him. The clarinetist, does not read music at all, and has to take a crash course in learning it from Therese, whom he has taken a liking for, and probably hopes to be able to connect with in the future. It is here that we discover that the old man is in the middle of all this. He selected the clarinetist to join them. And the clarinetist tells the group in the first rehearsal that everyone should just play, and all they have to do is tell him what to do and he will do it. The viola player has a problem with the cellist, who in turn has a problem with the double bass.
These squirmishes never stop, until the music is on. And one of the best moments is when each takes a turn conducting the group and each one's feelings define the quality of what they are playing. They may not be as famous as the Vienna Chamber Orchestra, but what the heck, they can play. And they do. And it gets them a new deal, too. But that's another story.
A very funny film, that is obviously written and directed by someone that really knows the intricacies in music and what is required for it to create the awe and feeling that we buy into when we see these things. There are not many film people that know how to work with music, and this film shows how it's done, even if the subject matter is closely related. The French film industry, probably has created some of the best films when it comes to music, when one looks at things like TOUS LES MATINS DU MONDE, UN COEUR EN HIVER, THE ACCOMPANIST,where music is so important, and so well defined and worked on. This film, though a comedy, really fits in that group as very enjoyable, and a true experience, when it comes to the value and beauty of the music and its definition. Worth seeing, by all means.
Excellent work all around, even including some Iranian musicians that put on a fabulous couple of minutes, even though it is in a kitchen. It is the only contrast that is out of place, but shows one of the musicians in the group the value of music. From that point on, he is no longer a prima donna.
Well directed. Nicely defined vision and work.
4 of 5 GIBLOONS Reviewed by Pedro Sena, Copyright (c) Pedro Sena 1999. All Rights Reserved.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Serialized Form
|
Package org.apache.velocity |
context
java.util.Map context
- Storage for key/value pairs.
|
Package org.apache.velocity.anakia |
|
Package org.apache.velocity.context |
innerContext
Context innerContext
- the chained Context if any
introspectionCache
java.util.HashMap introspectionCache
- cache for node/context specific introspection information
templateNameStack
java.util.Stack templateNameStack
- Template name stack. The stack top contains the current template name.
eventCartridge
EventCartridge eventCartridge
- EventCartridge we are to carry. Set by application
currentResource
Resource currentResource
- Current resource - used for carrying encoding and other
information down into the rendering process
|
Package org.apache.velocity.exception |
methodName
java.lang.String methodName
referenceName
java.lang.String referenceName
wrapped
java.lang.Throwable wrapped
|
Package org.apache.velocity.runtime.configuration |
deprecationCrutch
org.apache.commons.collections.ExtendedProperties deprecationCrutch
- Deprecated.
defaults
Configuration defaults
- Deprecated.
- Default configurations repository.
file
java.lang.String file
- Deprecated.
- The file connected to this repository (holding comments and
such).
-
basePath
java.lang.String basePath
- Deprecated.
- Base path of the configuration file used to create
this Configuration object.
fileSeparator
java.lang.String fileSeparator
- Deprecated.
- File separator.
isInitialized
boolean isInitialized
- Deprecated.
- Has this configuration been intialized.
keysAsListed
java.util.ArrayList keysAsListed
- Deprecated.
- These are the keys in the order they listed
in the configuration file. This is useful when
you wish to perform operations with configuration
information in a particular order.
|
Package org.apache.velocity.runtime.directive |
filenameStack
java.util.Stack filenameStack
msg
java.lang.String msg
depthCount
int depthCount
|
Package org.apache.velocity.runtime.exception |
|
Package org.apache.velocity.runtime.parser |
specialConstructor
boolean specialConstructor
- This variable determines which constructor was used to create
this object and thereby affects the semantics of the
"getMessage" method (see below).
currentToken
Token currentToken
- This is the last token that has been consumed successfully. If
this object has been created due to a parse error, the token
followng this token will (therefore) be the first error token.
expectedTokenSequences
int[][] expectedTokenSequences
- Each entry in this array is an array of integers. Each array
of integers represents a sequence of tokens (by their ordinal
values) that is expected at this point of the parse.
tokenImage
java.lang.String[] tokenImage
- This is a reference to the "tokenImage" array of the generated
parser within which the parse error occurred. This array is
defined in the generated ...Constants interface.
eol
java.lang.String eol
- The end of line string for this machine.
errorCode
int errorCode
- Indicates the reason why the exception is thrown. It will have
one of the above 4 values.
|
Package org.apache.velocity.servlet |
|
Package org.apache.velocity.test |
this$0
VelocityServletTest this$0
|
Package org.apache.velocity.util.introspection |
Copyright © 2002 Apache Software Foundation. All Rights Reserved.


CCGS Robotics Sign In
Blogs
Sign In
Sign In
Reset Password
Actions:
Post a Blog
Sign Up (not available yet! Please see an Admin to sign up)
Send Email Verification (not available yet!)
To sign up please contact Ken or Roman.
Firebase sign-in status:
Unknown
Firebase auth
currentUser
object value:


Butter
Butt layers together neatly and instantly.
Install plugin
Version 2.0 for Sketch 45+
Fork
Star
View on GitHub
Having problems?
Create an Issue on Github
or send me a message on
Twitter
.
Facebook
Twitter


Research Objects are a way to share academic literature. They provide a mechanism for identification, aggregation and annotation of online academic materials.
The TeSS team are working on providing a Research Object export of training workflows (the so-called 'Training Objects').
Find out more about Research Objects:


climate land adaptation adaptive households change development capacity agricultural CIP capacities livelihood use institutions risk access food crops smallholder Rwanda World climatic livelihoods specific woodlots Change social study agriculture household smallholders Development Global local policies crop pathways rural intensification research Environmental management Table {border-style Climate economic uneven Green percent px;} respondents seed work #ffffff;} adapt generic processes change. risks challenges commercial new political strategies Clay, Eakin adoption program security valley Agriculture context increased shocks vulnerability African However, United capitals drought environmental fields growing institutional key low planting shape transitions Africa Kibirizi Studies amid changes decision-making decisions high poverty power practices production season social-environmental (). Rwanda’s approach associated differential dry global government groups interviews past policy rain selected time wealthier Land Lemos SSA charcoal come consider households, hunger important income locations multiple parcel plant questions resource seen sweet trees Adaptation Burnham Lemos, Medium Ministry National New Percent Revolution Sig. abilities adopt analysis broader change, changing cropping does example, following growth increasingly inequalities little need nonfarm poorer poorest programs px; resources smallholders’ years {font-family Agrawal Bassett Crop Intensification Moseley Program States Wise building case crops, crops. cultivate effects emerge essential font-size future higher households. impacts increase likely livelihoods, noted people perceived period survey total tree unevenly ways Adaptive America Bank, Bezner FEWS K.A. M.C. Okavango Press Resources Results Rwanda. Shinn University adaptation, adapting and/or areas autonomy build change: conducted cooperatives cultivation double; employ farming field framework group grow institutions, labor land, level levels limited lower negative opportunities options paper parcels pathways. patterns rains recent report respond response seeds social, soil strategy sub-Saharan subsistence sustainable systems terms traditional used widely *** Academy Accessed Africa: Agricultural Animal Bank Botswana CIP: Fazey Generic Geoforum Group Household J.E. King Ma, Proceedings Rwanda, Sciences Scoones, Shinn, according adaptation: addressing agriculture. arise assessments available border-color border-width capabilities capacities. central complex components consolidation constrain current demonstrate differentially diverse early effectively empirical enable end farmers fertilizer heavy help illustrates implemented in-depth including individuals inputs leaders maize make marshland mechanisms mitigate needed number planted potato produced producers productivity reduction resilience results riskier role season. seasons seasons. shaped shown solid; structural systems, umudugudu uncertain understand variability various yield {font-style {font-weight < (e.g. ... Clay Cooperative/Tubura Crews Eakin, Engle Environment Field Fogelman, GoR High Human Impacts, Institute International Interviews K.R. Kigali, King, Leach Low MINAGRI, Marshland: Moreover, Muller Nature Number October Oxford R.M. Report Respondents Terraced: Tubura Turner, adaptively address adverse agency aim approaches article bold certain challenge cluster commercialization compared conditions considering contexts country courier; cultivated degree development, did diversification earlier em; employed enabling ensure environmental, factors findings flexible flooding formal frameworks general governance growth. highly implications include increasing indicated influence input insecurity interface intersect intersecting interventions interview investigate issues lacking lead leading line livelihoods: long making manage means norms occurred outcomes phases places pre-existing process produce proportion pt;} rainfall range rates region regional related relationships relatively social-ecological state stressors studies substantial suggest surplus time, trajectories uncertainty understanding varieties warming woodlot years.


|
Extensible Audio Library
This library provides a unified interface for handling audio.
|
Provides generic functionality regarding audio management. More...
#include <AudioManager.h>
Public Member Functions | |
| virtual | ~AudioManager () |
| Destructor. | |
| virtual void | init () |
| Initializes implementation-specific functionality. | |
| void | clear () |
| Uninitializes implementation-specific functionality. | |
| void * | getBackendId () const |
| HL_DEFINE_GET (hstr, name, Name) | |
| HL_DEFINE_GET (int, samplingRate, SamplingRate) | |
| HL_DEFINE_GET (int, channels, Channels) | |
| HL_DEFINE_GET (int, bitsPerSample, BitsPerSample) | |
| HL_DEFINE_IS (enabled, Enabled) | |
| HL_DEFINE_IS (suspended, Suspended) | |
| HL_DEFINE_GETSET (float, idlePlayerUnloadTime, IdlePlayerUnloadTime) | |
| HL_DEFINE_GET (hstr, deviceName, DeviceName) | |
| bool | isThreaded () const |
| HL_DEFINE_GET (float, updateTime, UpdateTime) | |
| float | getGlobalGain () |
| void | setGlobalGain (float value) |
| float | getGlobalGainFadeTarget () |
| HL_DEFINE_GETSET (float, suspendResumeFadeTime, SuspendResumeFadeTime) | |
| Gets and sets the suspend gain fade speed. | |
| harray< Player * > | getPlayers () |
| hmap< hstr, Sound * > | getSounds () |
| bool | isGlobalGainFading () |
| void | update (float timeDelta) |
| Updates all audio processing. More... | |
| Category * | createCategory (chstr name, BufferMode bufferMode, SourceMode sourceMode) |
| Creates a new audio Category. More... | |
| Category * | getCategory (chstr name) |
| Gets the audio Category with the given name. More... | |
| bool | hasCategory (chstr name) |
| Checks whether a Category exists. More... | |
| Sound * | createSound (chstr filename, chstr categoryName, chstr prefix="") |
| Creates a new Sound within a Category. More... | |
| Sound * | createSound (chstr name, chstr categoryName, unsigned char *data, int size, int channels, int samplingRate, int bitsPerSample) |
| Creates a new Sound within a Category form raw data. More... | |
| Sound * | getSound (chstr name) |
| Gets the Sound with the given name. More... | |
| bool | hasSound (chstr name) |
| Checks whether a Sound exists. More... | |
| void | destroySound (Sound *sound) |
| Destroys a Sound. More... | |
| void | destroySoundsWithPrefix (chstr prefix) |
| Destroys all Sounds that have the given prefix in their name. More... | |
| harray< hstr > | createSoundsFromPath (chstr path, chstr prefix="") |
| Creates Sounds from a path and creates a Category for each directory. More... | |
| harray< hstr > | createSoundsFromPath (chstr path, chstr categoryName, chstr prefix) |
| Creates Sounds from a path and assigns them to a Category. More... | |
| Player * | createPlayer (chstr soundName) |
| Creates a Player for a Sound. More... | |
| void | destroyPlayer (Player *player) |
| Destroys a Player. More... | |
| void | play (chstr soundName, float fadeTime=0.0f, bool looping=false, float gain=1.0f) |
| Plays a Sound in a fire-and-forget fashion. More... | |
| void | playAsync (chstr soundName, float fadeTime=0.0f, bool looping=false, float gain=1.0f) |
| Plays a Sound in a fire-and-forget fashion asynchronously. More... | |
| void | stop (chstr soundName, float fadeTime=0.0f) |
| Stops all Sound instances that were played in a fire-and-forget fashion. More... | |
| void | stopFirst (chstr soundName, float fadeTime=0.0f) |
| Stops only the first Sound instance that was played in a fire-and-forget fashion. More... | |
| void | stopAll (float fadeTime=0.0f) |
| Stops all Sounds that are currently playing. More... | |
| void | stopCategory (chstr categoryName, float fadeTime=0.0f) |
| Stops all Sounds that belong to a certain Category. More... | |
| int | getPlayingCount (chstr soundName) |
| Gets the number of Sound instances playing. More... | |
| int | getFadingCount (chstr soundName) |
| Gets the number of Sound instances fading. More... | |
| int | getFadingInCount (chstr soundName) |
| Gets the number of Sound instances playing. More... | |
| int | getFadingOutCount (chstr soundName) |
| Gets the number of Sound instances playing. More... | |
| void | fadeGlobalGain (float globalGainTarget, float fadeTime=1.0f) |
| Fades the global gain to another value. More... | |
| void | clearMemory () |
| Frees up unused memory. More... | |
| void | suspendAudio () |
| Suspends the entire audio processing. More... | |
| void | resumeAudio () |
| Resumes the previously suspended audio processing. More... | |
| void | addAudioExtension (chstr extension) |
| Adds a custom audio file extension. More... | |
| virtual hstr | findAudioFile (chstr filename) const |
| Finds an actual audio filename. More... | |
| bool | isAnyPlaying (chstr soundName) |
| bool | isAnyFading (chstr soundName) |
| bool | isAnyFadingIn (chstr soundName) |
| bool | isAnyFadingOut (chstr soundName) |
Protected Member Functions | |
| AudioManager (void *backendId, bool threaded=false, float updateTime=0.01f, chstr deviceName="") | |
| Constructor. More... | |
| void | _startThreading () |
| float | _getGlobalGain () const |
| void | _setGlobalGain (float value) |
| float | _getGlobalGainFadeTarget () const |
| harray< Player * > | _getPlayers () const |
| hmap< hstr, Sound * > | _getSounds () const |
| bool | _isGlobalGainFading () const |
| bool | _isAnyFading () const |
| virtual void | _update (float timeDelta) |
| Category * | _createCategory (chstr name, BufferMode bufferMode, SourceMode sourceMode) |
| Category * | _getCategory (chstr name) |
| bool | _hasCategory (chstr name) const |
| virtual Sound * | _createSound (chstr filename, chstr categoryName, chstr prefix) |
| virtual Sound * | _createSound (chstr name, chstr categoryName, unsigned char *data, int size, int channels, int samplingRate, int bitsPerSample) |
| Sound * | _getSound (chstr name) |
| bool | _hasSound (chstr name) const |
| void | _destroySound (Sound *sound) |
| void | _destroySoundsWithPrefix (chstr prefix) |
| harray< hstr > | _createSoundsFromPath (chstr path, chstr prefix) |
| harray< hstr > | _createSoundsFromPath (chstr path, chstr category, chstr prefix) |
| Player * | _createPlayer (chstr name) |
| void | _destroyPlayer (Player *player) |
| Player * | _createManagedPlayer (chstr name) |
| Creates an internally managed Player. More... | |
| void | _destroyManagedPlayer (Player *player) |
| Destroys an internally managed Player. More... | |
| Buffer * | _createBuffer (Sound *sound) |
| Buffer * | _createBuffer (Category *category, unsigned char *data, int size, int channels, int samplingRate, int bitsPerSample) |
| void | _destroyBuffer (Buffer *buffer) |
| virtual Player * | _createSystemPlayer (Sound *sound)=0 |
| virtual Source * | _createSource (chstr filename, SourceMode sourceMode, BufferMode bufferMode, Format format) |
| void | _play (chstr soundName, float fadeTime, bool looping, float gain) |
| void | _playAsync (chstr soundName, float fadeTime, bool looping, float gain) |
| void | _stop (chstr soundName, float fadeTime) |
| void | _stopFirst (chstr soundName, float fadeTime) |
| void | _stopAll (float fadeTime) |
| void | _stopCategory (chstr categoryName, float fadeTime) |
| int | _getPlayingCount (chstr soundName) const |
| int | _getFadingCount (chstr soundName) const |
| int | _getFadingInCount (chstr soundName) const |
| int | _getFadingOutCount (chstr soundName) const |
| void | _fadeGlobalGain (float globalGainTarget, float fadeTime) |
| void | _clearMemory () |
| virtual void | _suspendAudio () |
| virtual void | _resumeAudio () |
| void | _convertStream (Source *source, hstream &stream) |
| Depending on the audio manager implementation, this method may convert audio data to the appropriate format. More... | |
| virtual void | _convertStream (chstr logicalName, int channels, int samplingRate, int bitsPerSample, hstream &stream) |
| Depending on the audio manager implementation, this method may convert audio data to the appropriate format. More... | |
| virtual void | _suspendSystem () |
| Special additional processing for suspension, required for some implementations. More... | |
| virtual void | _resumeSystem () |
| Special additional processing for suspension, required for some implementations. More... | |
Static Protected Member Functions | |
| static void | _update (hthread *thread) |
| Threaded update call. More... | |
Protected Attributes | |
| hstr | name |
| Name of the audio system. | |
| void * | backendId |
| Back-end ID. | |
| int | samplingRate |
| Sampling rate of the audio device. | |
| int | channels |
| Number of channels of the audio device. | |
| int | bitsPerSample |
| Bites per sample of the audio device. | |
| bool | enabled |
| Whether any audio system is present. | |
| bool | suspended |
| Whether the audio system is suspended temporarily. More... | |
| bool | threaded |
| Whether the audio system uses threaded updating. | |
| float | idlePlayerUnloadTime |
| How long a Player needs to remain inactive for its data to be cleared. | |
| hstr | deviceName |
| Device name which is required for some audio systems. | |
| float | updateTime |
| How much time should pass between updates when "threaded" is enabled. | |
| float | globalGain |
| Global gain. | |
| float | globalGainFadeTarget |
| Global gain fade target. | |
| float | globalGainFadeSpeed |
| Global gain fade speed. | |
| float | globalGainFadeTime |
| Global gain fade time. | |
| float | suspendResumeFadeTime |
| Fade time when suspending and resuming audio system. | |
| hmap< hstr, Category * > | categories |
| List of registered audio categories. | |
| harray< Player * > | players |
| Currently existing Player instances. | |
| harray< Player * > | managedPlayers |
| List of Player instances that are managed solely by the audio system. More... | |
| harray< Player * > | suspendedPlayers |
| List of Player instances that need to resume once the audio system exits suspension. | |
| hmap< hstr, Sound * > | sounds |
| List of loaded Sounds. | |
| harray< Buffer * > | buffers |
| List Buffer instances. | |
| harray< hstr > | extensions |
| List of file extensions supported. | |
| hthread * | thread |
| Thread instance handling the threaded update. | |
| bool | threadRunning |
| Whether the threaded update is running. | |
| hmutex | mutex |
| Mutex for data access when threaded updating is used. | |
Friends | |
| class | Buffer |
| class | Category |
| class | Player |
| class | Sound |
Provides generic functionality regarding audio management.
|
protected |
Constructor.
| [in] | backendId | Special ID needed by some audio systems. |
| [in] | threaded | Whether update should be handled in a separate thread. |
| [in] | updateTime | How much time should pass between updates when "threaded" is enabled. |
| [in] | deviceName | Required by some audio systems. |
|
protected |
|
protected |
Depending on the audio manager implementation, this method may convert audio data to the appropriate format.
| [in] | source | Source object that holds the data. |
| [in,out] | stream | The data stream buffer. |
|
protectedvirtual |
Depending on the audio manager implementation, this method may convert audio data to the appropriate format.
| [in] | logicalName | Logical name of the data stream. |
| [in] | channels | Number of channels. |
| [in] | samplingRate | Sampling rate. |
| [in] | bitsPerSample | Bits per sample. |
| [in,out] | stream | The data stream buffer. |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protectedvirtual |
|
protectedvirtual |
|
protected |
|
protected |
|
protectedvirtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protectedvirtual |
|
protectedvirtual |
Special additional processing for suspension, required for some implementations.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protectedvirtual |
|
protectedvirtual |
Special additional processing for suspension, required for some implementations.
|
protectedvirtual |
|
staticprotected |
Threaded update call.
| [in] | thread | The Thread instance calling. |
| void xal::AudioManager::addAudioExtension | ( | chstr | extension | ) |
Adds a custom audio file extension.
| [in] | extension | File extension to add. |
| void xal::AudioManager::clearMemory | ( | ) |
Frees up unused memory.
| Category* xal::AudioManager::createCategory | ( | chstr | name, |
| BufferMode | bufferMode, | ||
| SourceMode | sourceMode | ||
| ) |
Creates a new audio Category.
| [in] | name | Name of the Category. |
| [in] | bufferMode | How to handle the intermediate Buffer of the Sound in this category. |
| [in] | sourceMode | How to handle the Source of the Sound in this category. |
| Player* xal::AudioManager::createPlayer | ( | chstr | soundName | ) |
| Sound* xal::AudioManager::createSound | ( | chstr | filename, |
| chstr | categoryName, | ||
| chstr | prefix = "" |
||
| ) |
Creates a new Sound within a Category.
| [in] | filename | Filename of the Sound. |
| [in] | categoryName | Name of the Category where to register the new Sound. |
| [in] | prefix | Used to differentiate between Sounds that have the same filename (e.g. by using a directory path as prefix). |
| Sound* xal::AudioManager::createSound | ( | chstr | name, |
| chstr | categoryName, | ||
| unsigned char * | data, | ||
| int | size, | ||
| int | channels, | ||
| int | samplingRate, | ||
| int | bitsPerSample | ||
| ) |
Creates a new Sound within a Category form raw data.
| [in] | name | Name of the new Sound. |
| [in] | categoryName | Name of the Category where to register the new Sound. |
| [in] | data | Raw audio data. |
| [in] | size | Raw audio data byte size. |
| [in] | channels | Number of channels. |
| [in] | samplingRate | Sampling rate. |
| [in] | bitsPerSample | Bits per sample. |
| harray<hstr> xal::AudioManager::createSoundsFromPath | ( | chstr | path, |
| chstr | prefix = "" |
||
| ) |
| harray<hstr> xal::AudioManager::createSoundsFromPath | ( | chstr | path, |
| chstr | categoryName, | ||
| chstr | prefix | ||
| ) |
Creates Sounds from a path and assigns them to a Category.
| [in] | path | Path where the audio files are located. |
| [in] | categoryName | Name for the Category. |
| [in] | prefix | Used to differentiate between Sounds that have the same filename (e.g. by using a directory path as prefix). |
| void xal::AudioManager::destroyPlayer | ( | Player * | player | ) |
Destroys a Player.
| [in] | player | The player to destroy. |
| void xal::AudioManager::destroySound | ( | Sound * | sound | ) |
| void xal::AudioManager::destroySoundsWithPrefix | ( | chstr | prefix | ) |
Destroys all Sounds that have the given prefix in their name.
| [in] | prefix | Prefix for Sound names to destroy. |
| void xal::AudioManager::fadeGlobalGain | ( | float | globalGainTarget, |
| float | fadeTime = 1.0f |
||
| ) |
Fades the global gain to another value.
| [in] | globalGainTarget | The value to which the global gain should be changed. |
| [in] | fadeTime | Time how long the global gain fade should take. |
|
virtual |
Finds an actual audio filename.
| [in] | filename | Reference filename for the audio file. |
|
inline |
| Category* xal::AudioManager::getCategory | ( | chstr | name | ) |
| int xal::AudioManager::getFadingCount | ( | chstr | soundName | ) |
| int xal::AudioManager::getFadingInCount | ( | chstr | soundName | ) |
| int xal::AudioManager::getFadingOutCount | ( | chstr | soundName | ) |
| float xal::AudioManager::getGlobalGain | ( | ) |
| float xal::AudioManager::getGlobalGainFadeTarget | ( | ) |
| harray<Player*> xal::AudioManager::getPlayers | ( | ) |
| int xal::AudioManager::getPlayingCount | ( | chstr | soundName | ) |
| Sound* xal::AudioManager::getSound | ( | chstr | name | ) |
| hmap<hstr, Sound*> xal::AudioManager::getSounds | ( | ) |
| bool xal::AudioManager::hasCategory | ( | chstr | name | ) |
| bool xal::AudioManager::hasSound | ( | chstr | name | ) |
| xal::AudioManager::HL_DEFINE_GET | ( | hstr | , |
| name | , | ||
| Name | |||
| ) |
| xal::AudioManager::HL_DEFINE_GET | ( | int | , |
| samplingRate | , | ||
| SamplingRate | |||
| ) |
| xal::AudioManager::HL_DEFINE_GET | ( | int | , |
| channels | , | ||
| Channels | |||
| ) |
| xal::AudioManager::HL_DEFINE_GET | ( | int | , |
| bitsPerSample | , | ||
| BitsPerSample | |||
| ) |
| xal::AudioManager::HL_DEFINE_GET | ( | hstr | , |
| deviceName | , | ||
| DeviceName | |||
| ) |
| xal::AudioManager::HL_DEFINE_GET | ( | float | , |
| updateTime | , | ||
| UpdateTime | |||
| ) |
| xal::AudioManager::HL_DEFINE_GETSET | ( | float | , |
| idlePlayerUnloadTime | , | ||
| IdlePlayerUnloadTime | |||
| ) |
| xal::AudioManager::HL_DEFINE_IS | ( | enabled | , |
| Enabled | |||
| ) |
| xal::AudioManager::HL_DEFINE_IS | ( | suspended | , |
| Suspended | |||
| ) |
| bool xal::AudioManager::isGlobalGainFading | ( | ) |
|
inline |
| void xal::AudioManager::play | ( | chstr | soundName, |
| float | fadeTime = 0.0f , |
||
| bool | looping = false , |
||
| float | gain = 1.0f |
||
| ) |
| void xal::AudioManager::playAsync | ( | chstr | soundName, |
| float | fadeTime = 0.0f , |
||
| bool | looping = false , |
||
| float | gain = 1.0f |
||
| ) |
| void xal::AudioManager::resumeAudio | ( | ) |
Resumes the previously suspended audio processing.
| void xal::AudioManager::setGlobalGain | ( | float | value | ) |
| void xal::AudioManager::stop | ( | chstr | soundName, |
| float | fadeTime = 0.0f |
||
| ) |
| void xal::AudioManager::stopAll | ( | float | fadeTime = 0.0f | ) |
Stops all Sounds that are currently playing.
| [in] | fadeTime | Time how long to fade out the Sounds. |
| void xal::AudioManager::stopCategory | ( | chstr | categoryName, |
| float | fadeTime = 0.0f |
||
| ) |
| void xal::AudioManager::stopFirst | ( | chstr | soundName, |
| float | fadeTime = 0.0f |
||
| ) |
| void xal::AudioManager::suspendAudio | ( | ) |
Suspends the entire audio processing.
| void xal::AudioManager::update | ( | float | timeDelta | ) |
Updates all audio processing.
| [in] | timeDelta | Time since the call of this method in seconds. |
|
protected |
List of Player instances that are managed solely by the audio system.
|
protected |
Whether the audio system is suspended temporarily.


Recognising that your brain is always changing allows you to grasp that you can always learn new things and that your never really stagnant.
You have to keep on learning and changing otherwise you get comfortable and don't change. you have to be specific about what you do and you have to practice what you do repetitively.
Increase the ammount you are doing something, stay focused on exactly what you want to get good at. the ammout of time you spend on something and the ammout of effort will also increase the neuroplacicity.
https://www.neuroskills.com/brain-injury/ten-principles-of-neuroplasticity.php
Growth mindset is the belief thatintellegence is dynamic and the brain changes based on your experiences. its about embracing challenges and persisting through them, seeing effort as the path to mastery and learning from critisism.
yeah there were a few areas in my life that i had a fixed mindset and i know now that i can change those areas if i want to.
When i feel like i can't do something i can just realise with enough effort i'll be able to do it.
http://www.qedfoundation.org/fixed-vs-growth-mindsets/
I know i learn by doing so now i know if i do something for long enough eventually i will get it.


{{> header contact-active="true" }}
If you'd like to get in touch please send me an email:
You can also connect with me on the following channels:


WITNESS LIST Business & Commerce Committee September 4, 2002 - 9:00A Insurance-Credit Scoring and Mold I ON: Alexander, Lee Ann Public Affairs Manager (Liberty Mutual Group), Austin, TX Allen, Bob (International Association of Mold Remediation Specialists), Ft. Worth, TX Archer, Tom Attorney/Regulatory Manager (Self), Austin, TX Beneke, Jim (Self), Austin, TX Birnbaum, Birny (Center for Economic Justice), Austin, TX Bordelon, Rod (Office of Public Insurance Counsel), Austin, TX Chapa, Juan (Self), Corpus Christi, TX Comiskey, Mickie Operations Manager (Focus Insurance and Financial Services), Houston, TX Dayberry, Susan (Self), Royse City, TX Dotson, Kyle (Self), Houston, TX Durden, David Director Goverment Relations (Texas Department of Insurance), Austin, TX Edler, Jerry (Self), San Antonio, TX Emery, Robert (Self), Houston, TX Farr, Joe (Texas Mortgage Bankers Association), Austin, TX Graves, William (Progressive Companies, Progressive County Mutual Insurance Company), Austin, TX Hunter, Todd (Self), Corpus Christi, TX Kotrla, Claren (Texas Department of Health), Austin, TX Lamb, Dean Actuary (Allstate Insurance Company), Northbrook, IL Lo, Eddy (Fair, Isaac and Company, Inc.), San Rafael, CA Mery, Bruce Attorney at Law (Self), San Antonio, TX Miller, Mike (U.S. Environmental Protection Agency), Dallas, TX Montemayor, Jose Commissioner of Insurance (Texas Department of Insurance), Austin, TX Perry, Kathryn (Self), Wimberly, TX Powers, D. J. (Self), Austin, TX Rader, James Attorney (Unauthorized Practice of Law Committee of Supreme Court), Austin, TX Reyer, Catherine Staff Attorney (Texas Department of Insurance), Austin, TX Ruggiero, Denise (State Farm Insurance and its affiliates), Austin, TX Ryder, Brian Actuary (Texas Department of Insurance), Austin, TX Schneider, Rob Sr. Staff Attorney (Consumers Union), Austin, TX Selden, Audrey Senior Associate Commissioner (Texas Department of Insurance), Austin, TX Skelton, Jeffrey (Choice Point), Alpharetta, GA Stinson, Bill V.P. of Government Affairs (Texas Association of Realtors), Austin, TX Thormahlen, Keller Toxicologist and Industrial Hygienist (Texas Department of Health), Austin, TX


Generic was introduced in Java 5 for more rigorous type checking and generic algorithm implementations at compile time. The following example defines a box where all types of references can be stored.
package net.java_school.examples; public class Box<T> { private T t; public void set(T t) { this.t = t; } public T get() { return t; } }
T is called a type parameter. T can be used anywhere in the class body. You must specify the type of T when creating the Box object.
Box<Integer> intBox = new Box<Integer>();//In <Integer>, Integer is called a type argument.
Because of Java 7 type inference, the above sentence can be reduced as follows.
Box<Integer> intBox = new Box<>();
A raw type is the name of a generic class or interface without any type arguments.
Box<Integer> intBox = new Box<Integer>(); Box rawBox = new Box();//Box is the raw type of the generic type Box<T>
A non-generic class or interface type is not a raw type. Raw types show up in legacy code because lots of API classes (such as the Collections classes) were not generic prior to Java 5. When using raw types, you essentially get pre-generics behavior - a Box gives you Objects. For backward compatibility, assigning a parameterized type to its raw type is allowed:
Box<Integer> intBox = new Box<Integer>(); Box rawBox = intBox;//OK Box rawBox = new Box(); Box<Integer> intBox = rawBox;//warning: unchecked conversions
But if you assign a raw type to a parameterized type, you get a warning:
Box<St;ring> strBox = new Box<>(); Box rawBox = strBox; rawBox.set(8);//warning: unchecked invocation to set(T)
The warning shows that raw types bypass generic type checks, deferring the catch of unsafe code to runtime. Therefore, you should avoid using raw types.
Generic methods are methods that introduce their own type parameters. This is similar to declaring a generic type, but the type parameter's scope is limited to the method where it is declared. Static and non-static generic methods are allowed, as well as generic class constructors. The syntax for a generic method includes a list of type parameters, inside angle brackets, which appears before the method's return type.
package net.java_school.examples; public interface Pair<K,V> { public K getKey(); public V getValue(); }
package net.java_school.examples; public class IdPasswdPair<K,V> implements Pair<K,V> { private K key; private V value; public IdPasswdPair(K key, V value) { this.key = key; this.value = value; } @Override public K getKey() { return key; } @Override public V getValue() { return value; } }
package net.java_school.examples; public class Util { //Generic Method public static <K,V> boolean compare(Pair<K,V> p1, Pair<K,V> p2) { return p1.getKey().equals(p2.getKey()) && p1.getValue().equals(p2.getValue()); } public static void main(String[] args) { if (args.length == 2) { Pair<String, String> inputData = new IdPasswdPair<>(args[0], args[1]); Pair<String, String> storedData = new IdPasswdPair<>("xman31", "1987qwertY"); boolean isSame = Util.compare(inputData, storedData); if (isSame) { System.out.println("Login succeeded."); } else { System.out.println("Login failed. Please check your ID and password."); } } else { System.out.println("How to run: java net.java_school.examples.Util 'ID' 'Password'"); } } }
The complete syntax for invoking the compare method would be:
boolean isSame = Util.<String, String>compare(inputData, storedData);
The type has been explicitly provided, as shown in bold. Generally, this can be left out and the compiler will infer the type that is needed:
boolean isSame = Util.compare(inputData, storedData);
This feature, known as type inference, allows you to invoke a generic method as an ordinary method, without specifying a type between angle brackets.
A method that operates on numbers might only want to accept instances of Number or its subclasses. This is what bounded type parameters are for. To declare a bounded type parameter, list the type parameter's name, followed by the extends keyword, followed by its upper bound.
package net.java_school.examples; public class Box<T extends Number> { private T t; public void set(T t) { this.t = t; } public T get() { return t; } }
In the Box class declaration, <T extends Number> is called a type parameter section. Constraints can be interfaces like <T extends java.io.Serializable>. If the constraint is an interface, use the extends keyword. You can place one or more constraints in the Type Parameters section. A type parameter list can consist of one or more interfaces, or one class and one or more interfaces. If you have a mix of one class and an interface, you must first make the class appear in the type parameter list.
<T extends Aclass & Binterface & Cinterface>
package net.java_school.examples; public class GenericMethodsWithBoundedTypeParametersTest { public static <T extends Number & Comparable<T>> int countGreaterThan(T[] array, T elem) { int count = 0; for (T e : array) { if (e.compareTo(elem) > 0) { ++count; } } return count; } public static void main(String[] args) { Integer[] arr = {1,2,3,4,5,6,7,8,9,10}; int count = countGreaterThan(arr,7);//The number of elements in the array arr whose values are greater than 7 System.out.println(count); } }
3
The Comparable<T> interface defines only one method.
package java.util; public interface Comparable<T> { public int compareTo(T o); }
The compareTo method of the Comparable<T> interface has a promised implementation. Assuming it runs like a.compareTo(b), the compareTo method should return a value like this:
if a == b, 0. if a > b, 1. if a < b, -1.
The Integer class inherits the Number class, and it also implements Comparable<Integer> Interface. Double, Long, Float, Short, and Byte inherit the Number class, and also implement the Comparable interface.
Now consider the following method:
public void boxTest(Box<Number> n) { /* ... */ }
Are you allowed to pass in Box<Integer> or Box<Double>, as you might expect? The answer is "no", because Box<Integer> and Box<Double> are not subtypes of Box<Number>.
This is a common misunderstanding when it comes to programming with generics, but it is an important concept to learn.
Given two concrete types A and B (for example, Number and Integer), MyClass<A> has no relationship to MyClass<B>, regardless of whether or not A and B are related.
The common parent of MyClass<A> and MyClass<B> is Object.
Using the Collections classes as an example, ArrayList<E> implements List<E>, and List<E> extends Collection<E>.
So ArrayList<String> is a subtype of List<String>, which is a subtype of Collection<String>.
So long as you do not vary the type argument, the subtyping relationship is preserved between the types.
Type inference is a Java compiler's ability to look at each method invocation and corresponding declaration to determine the type argument (or arguments) that make the invocation applicable. The inference algorithm determines the types of the arguments and, if available, the type that the result is being assigned, or returned. Finally, the inference algorithm tries to find the most specific type that works with all of the arguments. To illustrate this last point, in the following example, inference determines that the second argument being passed to the pick method is of type Serializable:
static <T> pick(T a1, T a2) { return a2; } Serializable s = pick("d", new ArrayList<String>());
Type inference enables you to invoke a generic method as you would an ordinary method, without specifying a type between angle brackets.
public static <U> void addBox(U u, List<Box<U>> boxes) {...}
BoxDemo.addBox(Integer.valueOf(10), listOfIntegerBoxes);
The generic method addBox defines one type parameter named U. Generally, a Java compiler can infer the type parameters of a generic method call. Consequently, in most cases, you do not have to specify them. For example, to invoke the generic method addBox, you can specify the type parameter with a type witness as follows:
BoxDemo.<Integer>addBox(Integer.valueOf(10), listOfIntegerBoxes);
You can replace the type arguments required to invoke the constructor of a generic class with an empty set of type parameters (<>) as long as the compiler can infer the type arguments from the context. This pair of angle brackets is informally called the diamond. For example, consider the following variable declaration:
Map<String, List<String>> myMap = new HashMap<String, List<String>>();
You can substitute the parameterized type of the constructor with an empty set of type parameters (<>):
Map<String, List<String>> myMap = new HashMap<>();
Note that constructors can be generic (in other words, declare their own formal type parameters) in both generic and non-generic classes. Consider the following example:
class MyClass<X> { <T> MyClass(T t) { //... } }
Consider the following instantiation of the class MyClass:
MyClass<Integer> myObject = new MyClass<>("");
In this example, the compiler infers the type Integer for the formal type parameter, X, of the generic class MyClass<X>. It infers the type String for the formal type parameter, T, of the constructor of this generic class.
MyClass<Integer> myObject = new MyClass<Integer>("");
The Java compiler takes advantage of target typing to infer the type parameters of a generic method invocation. The target type of an expression is the data type that the Java compiler expects depending on where the expression appears.
Integer i = Integer.parseInt("10");This statement is expecting an instance of Integer; this data type is the target type.
Consider the method Collections.emptyList, which is declared as follows:
static <T> List<T> emptyList();
Consider the following assignment statement:
List<String> listOne = Collections.emptyList();
This statement is expecting an instance of List<String>; this data type is the target type. Because the method emptyList returns a value of type List<T>, the compiler infers that the type argument T must be the value String. This works in both Java SE 7 and 8. Alternatively, you could use a type witness and specify the value of T as follows:
List<String> listOne = Collections.<String>emptyList();
However, this is not necessary in this context. It was necessary in other contexts, though. Consider the following method:
void processStringList(List<String> stringList) { //process }
Suppose you want to invoke the method processStringList with an empty list. In Java SE 7, the following statement does not compile:
processStringList(Collections.emptyList());
The Java SE 7 compiler generates an error message similar to the following:
List<Object> cannot be converted to List<String>
The compiler requires a value for the type argument T so it starts with the value Object.
Consequently, the invocation of Collections.emptyList returns a value of type List<Object>,
which is incompatible with the method processStringList.
Thus, in Java 7, you must specify the value of the type argument as follows:
processStringList(Collections.<String>emptyList());
This is no longer necessary in Java 8. The notion of what is a target type has been expanded to include method arguments, such as the argument to the method processStringList. In this case, processStringList requires an argument of type List<String>. The method Collections.emptyList returns a value of List<T>, so using the target type of List<String>, the compiler infers that the type argument T has a value of String. Thus, in Java SE 8, the following statement compiles:
processStringList(Collections.emptyList());
In generic code, the question mark (?), called the wildcard, represents an unknown type. The wildcard is never used as a type argument for a generic method invocation, a generic class instance creation.
To write the method that works on lists of Number and the subtypes of Number, such as Integer, Double, and Float, you would specify List<? extends Number>. The term List<Number> is more restrictive than List<? extends Number> because the former matches a list of type Number only, whereas the latter matches a list of type Number or any of its subclasses.
package net.java_school.examples; import java.util.Arrays; import java.util.List; public class WildCardTest { public static double sumOfList(List<? extends Number> list) { double s = 0.0; for (Number n : list) { s += n.doubleValue(); } return s; } public static void main(String[] args) { List<Integer> li = Arrays.asList(1,2,3); System.out.println("sum = " + sumOfList(li)); } }
sum = 6.0
List<Integer> list = Arrays.asList(1,2,3); list.add(4);//Runtime error
A wildcard, such as List<?>, is called Unbounded Wildcards.
You can consider using Unbounded Wildcards in the following cases:
Consider the following method, printList:
package net.java_school.examples; import java.util.Arrays; import java.util.List; public class PrintListTest { public static void printList(List<Object> list) { for (Object elem : list) { System.out.print(elem + " "); } System.out.println(); } public static void main(String[] args) { List<Integer> li = Arrays.asList(1,2,3); List<String> ls = Arrays.asList("one","two","three"); printList(li);//compile-time error printList(ls);//compile-time error } }
The following compilation error occurs in printList(li); and printList(ls);.
The method printList(List<Object>) is not applicable for the arguments (List<Integer>)
The method printList(List<Object>) is not applicable for the arguments (List<String>)
The goal of printList is to print a list of any type, but it fails to achieve that goal — it prints only a list of Object instances; it cannot print List<Integer>, List<String>, List<Double>, and so on, because they are not subtypes of List<Object>. To write a generic printList method, use List<?>. Because for any concrete type A, List<A> is a subtype of List<?>, you can use printList to print a list of any type:
package net.java_school.examples; import java.util.Arrays; import java.util.List; public class PrintListTest { public static void printList(List<?> list) { for (Object elem : list) { System.out.print(elem + " "); } System.out.println(); } public static void main(String[] args) { List<Integer> li = Arrays.asList(1,2,3); List<String> ls = Arrays.asList("one","two","three"); printList(li); printList(ls); } }
1 2 3 one two three
A lower bounded wildcard is expressed using the wildcard character ('?'), following by the super keyword, followed by its lower bound: <? super A>.
To write the method that works on lists of Integer and the supertypes of Integer, such as Integer, Number, and Object, you would specify List<? super Integer>.
public static void addNumbers(List<? super Integer> list) { for (int i = 1; i <= 10;i++) { list.add(i); } }
Although Integer is a subtype of Number, List<Integer> is not a subtype of List<Number>
and, in fact, these two types are not related.
The common parent of List<Number> and List<Integer> is List<?>.
The following diagram shows the relationships between several List classes declared with both upper and lower bounded wildcards.
To implement generics, the Java compiler applies type erasure to:
Consider the following generic class that represents a node in a singly linked list:
package net.java_school.examples; public class Node<T> { private T data; private Node<T> next; public Node(T data, Node<T> next) { this.data = data; this.next = next; } public T getData() { return data; } }
Because the type parameter T is unbounded, the Java compiler replaces it with Object:
package net.java_school.examples; public class Node { private Object data; private Node next; public Node(Object data, Node next) { this.data = data; this.next = next; } public Object getData() { return data; } }
In the following example, the generic Node class uses a bounded type parameter:
package net.java_school.examples; public class Node<T extends Comparable<T>> { private T data; private Node<T> next; public Node(T data, Node<T> next) { this.data = data; this.next = next; } public T getData() { return data; } }
The Java compiler replaces the bounded type parameter T with the first bound class, Comparable:
package net.java_school.examples; public class Node { private Comparable data; private Node next; public Node(Comparable data, Node next) { this.data = data; this.next = next; } public Comparable getData() { return data; } }
The Java compiler also erases type parameters in generic method arguments. Consider the following generic method:
public static <T> int count(T[] anArray, T elem) { int cnt = 0; for (T e : anArray) { if (e.equals(elem)) { ++cnt; } } return cnt; }
Because T is unbounded, the Java compiler replaces it with Object:
public static int count(Object[] anArray, Object elem) { int cnt = 0; for (Object e : anArray) { if (e.equals(elem)) { ++cnt; } } return cnt; }
Suppose the following classes are defined:
class Shape { /* ... */ } class Circle extends Shape { /* ... */ } class Rectangle extends Shape { /* ... */ }
You can write a generic method to draw different shapes:
public static <T extends Shape> void draw(T shape) { /* ... */ }
The Java compiler replaces T with Shape:
public static void draw(Shape shape) { /* ... */ }
Sometimes type erasure causes a situation that you may not have anticipated.
The following example shows how this can occur.
package net.java_school.examples; public class Box<T> { private T t; public void set(T t) { this.t = t; } public T get() { return t; } }
package net.java_school.examples; public class IntBox extends Box<Integer> { @Override public void set(Integer t) { super.set(t); } @Override public Integer get() { return super.get(); } }
package net.java_school.examples; public class BridgeTest { public static void main(String[] args) { IntBox ibox = new IntBox(); Box box = ibox; box.set("Hello World!");//runtime error! } }
box.set("Hello World!") throws Runtime exception as follows:
Exception in thread "main" java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer at net.java_school.examples.IntBox.set(IntBox.java:1) at net.java_school.examples.BridgeTest.main(BridgeTest.java:8)
ClassCastException: The message "java.lang.String can not be cast to java.lang.Integer" is due to the bridge method created by the compiler. Box and IntBox are changed through the type erase process as follows.
package net.java_school.examples; public class Box { public Object t; public Object set(Object t) { this.t = t; } public void get(Object t) { return t; } }
package net.java_school.examples; public class IntBox extends Box { @Override public void set(Integer t) { super.set(t); } //Bridge method generated by the compiler public void set(Object t) { setData((Integer) t); } @Override public Integer get(Integer t) { return super.get(); } }
After type erasure, the method signatures do not match. The Box method becomes set(Object) and the IntBox method becomes set(Integer). Therefore, the IntBox set(Integer) method does not override the Box set(Object) method. To solve this problem and preserve the polymorphism of generic types after type erasure, a Java compiler generates a bridge method to ensure that subtyping works as expected. For the IntBox class, the compiler generates the bridge method for set(Integer).
A reifiable type is a type whose type information is fully available at runtime. This includes primitives, non-generic types, raw types, and invocations of unbound wildcards.
Non-reifiable types are types where information has been removed at compile-time by type erasure — invocations of generic types that are not defined as unbounded wildcards. A non-reifiable type does not have all of its information available at runtime. Examples of non-reifiable types are List<String> and List<Number> the JVM cannot tell the difference between these types at runtime.
Heap pollution occurs when a variable of a parameterized type refers to an object that is not of that parameterized type. This situation occurs if the program performed some operation that gives rise to an unchecked warning at compile-time. An unchecked warning is generated if, either at compile-time (within the limits of the compile-time type checking rules) or at runtime, the correctness of an operation involving a parameterized type (for example, a cast or method call) cannot be verified. For example, heap pollution occurs when mixing raw types and parameterized types, or when performing unchecked casts.
In normal situations, when all code is compiled at the same time, the compiler issues an unchecked warning to draw your attention to potential heap pollution. If you compile sections of your code separately, it is difficult to detect the potential risk of heap pollution. If you ensure that your code compiles without warnings, then no heap pollution can occur.
Generic methods that include vararg input parameters can cause heap pollution.
Varargs is a feature introduced in Java 5. It allows a method take an arbitrary number of values as arguments.
package net.java_school.examples; public class VarargsTest { public static void sum(int ... a) { int sum = 0; for (int i : a) { sum += i; } ystem.out.println(sum); } public static void main(String[] args) { sum(); sum(1); sum(1,2,3); sum(1,2,3,4); } }
0 1 6 10
public static void faultyMethod(List<String>... l) { List[] listArr = l; //.. }
When compiled, the following warning is produced by the definition of the faultyMethod method:
warning: [varargs] Possible heap pollution from parameterized vararg type l
why?
When the compiler encounters a varargs method, it translates the varargs formal parameter into an array.
However, the Java programming language does not permit the creation of arrays of parameterized types.
The variable l has the type List[].
The following statement assigns the varargs formal parameter l to the List array listArr:
List[] listArr = l;
This statement can potentially introduce heap pollution.
To use Java generics effectively, you must consider the following restrictions:
class Password<T> { private T t; public Password(T t) { this.t = t; } }
When creating a Password object, you cannot substitute a primitive type for the type parameter T:
Password<int> pw = new Password<>(19019);//compile-time error
public static <E> append(List<E> list) { E elem = new E();//compile-time error list.add(elem); }
public class BasketballPlayer<T> { private static T teamFouls; //Suppose you can do this. }
Create three BasketballPlayer objects as follows:
BasketballPlayer<Byte> jodan = new BasketballPlayer<>(); BasketballPlayer<Short> pippen = new BasketballPlayer<>(); BasketballPlayer<Integer> rodman = new BasketballPlayer<>();
The type of teamFouls field can not be a Byte, Short, or Integer at the same time.
Because the Java compiler removes all type parameters from the generic code, the runtime does not know if the generic type parameter is used.
public static <E> void rtti(List<E> list) { if (list instanceof ArrayList<Integer>) { //compile-time error //.. } }
The runtime does not distinguish between ArrayList<Integer> and ArrayList<String>.
If you use wildcards without constraints, you can ensure that the List is an ArrayList.
public static void rtti(List<?> list) { if (list instanceof ArrayList<?>) { //ok //.. } }
List<Integer>[] arrayOfLists = new ArrayList<Integer>[2];//compile-time error
The following code illustrates what happens when different types are inserted into an array:
Object[] strings = new String[2]; strings[0] = "Hello"; strings[1] = 2019;//An ArrayStoreException is thrown.
If you try the same thing with a generic list, there would be a problem:
Object[] stringLists = new List<String>[];// compiler error, but pretend it's allowed stringLists[0] = new ArrayList<String>();// OK stringLists[1] = new ArrayList<Integer>();// An ArrayStoreException should be thrown, but the runtime can't detect it.
Because the runtime can not distinguish List<String> from List<Integer>, if arrays of parameterized lists were allowed, the previous code would fail to throw the desired ArrayStoreException.
For example, the following classes will not compile:
// Extends Throwable indirectly class MathException<T> extends Exception { .. } //compile-time error
// Extends Throwable directly class QueneFullException<T> extends Throwable { .. } //compile-time error
public static <T extends Exception> void execute(List<T> jobs) { try { for (T job : jobs) { //.. } } catch (T e) {//compile-time error: Cannot use the type parameter T in a catch block //.. } }
You can, however, use a type parameter in a throws clause:
class Parser<T extends Exception> { public void parse(File file) throws T { //ok //.. } }
public class Example { public void print(Set<String> strSet) { .. } public void print(Set<Integer> intSet) { .. } }
A class cannot have two overloaded methods that will have the same signature after type erasure.
References


--- layout: page title: Hi, I'm Saagar subtitle: Software Engineer - Curious Learner - Passionate Builder share-title: Saagar Minocha cover-img: ["assets/img/bg8.jpg"] ---


Blog Posts
- Git and GitHub
15 Nov 2015 - What is the difference between margin, border, and padding?
29 Nov 2015 - Arrays and Hashes
7 Dec 2015 - Issues in Tech
7 Dec 2015 - Enumerable #map
14 Dec 2015 - Ruby Classes
14 Dec 2015 - Ruby Hashes vs JavaScript Objects
4 Jan 2016 - Ruby on Rails
10 Jan 2016 - Building a Website
17 Jan 2016


Do Labour’s manifesto spending plans add up?
The party has announced spending pledges worth £83 billion along with billions of extra long-term investment in its election manifesto.
Self-styled “radical and ambitious” plans tend to always come with a cost.
So how is Labour planning to fund its manifesto commitments – and do the sums add up?
Here is a pledge-by-pledge look at where the money is going and how it is going to be paid for.
– How much is the public sector investment costing?
Labour has committed the government to paying for a lot more when it comes to scrapping university tuition fees, providing more cash for healthcare and funding free television licences for over-75s.
The pledges, according to the party’s own figures, are estimated to cost up to £83 billion.
Abolishing tuition fees and re-establishing maintenance grants alone would cost £13 billion, while rolling out free personal care for all over-65s would cost £10 billion.
The 4.3% annual budget rise for the NHS would see Labour spend a bit more than the Conservatives – 2.3% overall.
The Institute for Fiscal Studies (IFS) worked out that spending under a Jeremy Corbyn-led administration would increase NHS funding by an additional £3.2 billion in real terms over four years, reaching £143.5 billion in 2023/24.
– How will this be paid for?
According to shadow chancellor John McDonnell’s “grey book”, outlining how much each funding pledge will be funded, that investment will come from tax hikes on the wealthy and big businesses.
Additional income tax paid by those earning more than £80,000 and a hit on those classified as “super-rich” – earners taking home more than £125,000 – would rake in £5.4 billion and corporation tax changes, upping it from 19% to 26%, would raise almost £24 billion.
Other incentives, such as reversing Tory tax cuts, hammering down on tax evasion, and imposing VAT on private schools, would bring that pot up to the required £83 billion, according to Mr McDonnell’s workings.
– Do the numbers stack up?
Paul Johnson, director of the IFS, said it was “quite doubtful” Labour would be able to raise around £80 billion from tax rises.
About half the proposed £83 billion for extra day-to-day spending is set to come from slapping further taxes on big businesses and multinational corporations.
But Mr Johnson told Sky News: “Whether you can get this amount of money, either from businesses or from rich individuals, or from the other changes they’ve got, I think is quite doubtful.”
He said the numbers produced by Labour on how much it could squeeze out of higher earners were “optimistic but not absurdly optimistic”.
“Even if it gets you more money, that can be at the cost of people moving abroad or doing other things to reduce their tax payments,” he warned.
– Weren’t there even more investment plans in the manifesto?
Correct – and that is where borrowing comes in.
Labour has pledged to renationalise or introduce a publicly owned company in a host of sectors, including rail, mail, energy and internet broadband.
The grey book does not set out how these government takeovers would be funded, although the cost of acquiring BT Openreach, the company currently tasked with rolling out high-speed broadband across the UK, has previously been estimated at £20 billion.
The 105-page manifesto also pledges that a left-wing administration would build 150,000 homes every year if elected, with 100,000 built by councils.
That investment is set to come out of the party’s £150 billion “social transformation fund” that would pay towards upgrades for schools and hospitals, as well as moving the investment arm of the Treasury to the north of England.
Much of the money would be allocated over a five-year period and half of the pot – £75 billion – would go towards paying for the proposed housebuilding boom.
The fund, according to Labour’s Treasury team, would be created by borrowing while interest rates are at an all-time low.
Critics, however, point to a similar public borrowing scheme in Italy which caused bond rates to increase above accepted EU rates.
– And what about the green agenda?
The leadership has set out proposals for a so-called “green industrial revolution” that is designed to create one million jobs and another 800,000 apprenticeships in the UK, with the aim of shifting industry, home gas and electricity, transport, agriculture and construction on to renewable energy modes.
That too would be paid for through borrowing, along with an £11 billion windfall tax on the oil and gas sector – a move only announced on Thursday.
A “green transformation fund”, worth £250 billion, would be focused on upgrading energy and transport networks to help Britain meet its tight decarbonisation targets.
The manifesto states a Labour government would “aim to achieve the substantial majority of emissions reductions” by 2030.
The green fund would include providing loans for people to buy electric cars, investment in wind farms and grants for home insulation.
The social and green transformation funds combined would take borrowing to an extra £55 billion per year, on top of the current Government levels of £47 billion of borrowing in 2019/20.
The IFS said Mr McDonnell’s spending plans would bring the state’s financial outlay to a “level unprecedented since the very different era of the 1970s”.


{% extends "base.html" %} {% block page_title %}{{ _('Staying safe online') }} - {{ super() }}{% endblock %} {% block inner_content %}
{{ _('It can be easy for other people to see what you’re doing online, especially if you’re using a home computer.') }}
{{ _(' You can make it more difficult by following the tips below. But your safest option is to use a different computer - for example, at your local library - or someone else’s mobile.') }}
{{ _('Every time you use the internet your browser stores a record of what you’ve done with:') }}
{{ _('You can improve your safety by deleting your history. But you need to be careful because:') }}
{{ _('So just remove information about the websites you want to keep private. You can do that on:') }}
{{ _('You can also look at a website without information like cookies being stored by using the private browsing setting in your browser. Go to the menu, click on ‘File’ and choose:') }}