As always, this week we are presenting some of our best contributions, rewarded in the last seven days. This week, we picked from the blog, graphics, video-tutorial, tutorial and translations categories. We’ve got some exciting contributions to share, and you are encouraged to check them out.
Staff Picks
Introducing KnackSteem: A platform where you can share the things you are passionate about. by @knacksteem.org [blog]
KnackSteem, a project rewarding people showing their talents using the steem blockchain, is introduced in the post by the official account @knacksteem.org. The project is completely explained in this post, from its current status to the roadmap for future goals.
Total payout: 119.41 STU Number of votes: 120
Automatic compression when saving files in Pandas! How changing a default parameter ballooned into a monster PR. by @dhimmel [development]
Image source
@dhimmel submitted a PR to the very well known library called Pandas. Pandas is a data analysis library in Python, which excels at handling tabular data. It’s in the top three most popular data science packages for Python, and currently has 15,000 stars and 17,500 commits. The PR started with only a small enhancement and got better as people started reviewing it. Various maintainers have made requests related to the scope of the PR and made it better as it proceeds.
This PR shows how to go forward with a PR to the well known repository and how to enhance it as per request of the reviewers.
Total payout: 147.33 STU Number of votes: 39
Part 4: Steem White Paper (Genesis) - 1479 translated words by @lenancie [translations]
This Vietnamese translation of the Steem White Paper Genesis was done with great care as the translator put in a week’s effort to pay attention to the detail and choose the correct terminology throughout. The flow of the text is pleasant to read and done professionally with clarity. The word count exceeded the 1500 words requirement for this contribution.
Total payout: 91.98 STU Number of votes: 35
Creating RPC Server on Web Browser - part 3 Create reverse RPC through WebSocket by @drsensor [tutorials]
Part three of the RPC server series by @drsensor. Another well-structured, academic-level tutorial that highlighted further functionality to be provided and setup for the web server, along with documented and visual proof of work/outcome.
Total payout: 78.24 STU Number of votes: 106
New UI for SwapSteem by @outwork [graphics]
Swapsteem is a peer to peer exchange. It allows steem users to buy or sell steem directly from other users without the need for a centralized custodian. This contribution is a very comprehensive web design made by @outwork. He has put great effort into creating many screens and variations including a dark theme and a mobile layout.
Total payout: 77.59 STU Number of votes: 102
Response to Task Request - Byteball: Create a Video Tutorial - Backup Process - Multi-Signature Wallet by @tensor [video-tutorial]
@tensor provided this video tutorial as a response to the Task Request launched by ByteBall. This tutorial clearly explains the backup process and multi-signature wallet. Tensor does not only explain the process but also explains the reasoning behind it. This provides learners with deep insight into standard process.
Total payout: 91.31 STU Number of votes: 81
Run Substratum Node on a $5 Raspberry Pi Zero and Enjoy Breakfast at Milliways by @microoo [tutorials]
@microoo is back with another amazing tutorial about substratum nodes, this time running it on a 5$ raspberry pi zero. Detailed, well illustrated, and well referenced info is what this tutorial is all about. Great job.
Total payout: 78.47 STU Number of votes: 25
Machine learning and Steem #2: Multiclass classification (content creator vs scammer vs comment spammer vs bid-bot) by @jacekw.dev [tutorials]
Image source
Combining tutorials with analytics is what @jacekw.dev did successfully in this tutorial, a continuation of a prior session he had regarding differentiators between bot and human behavior, and relevant differentiation along with plotted charts and plans for future work.
Total payout: 96.71 STU Number of votes: 53
The Amanuensis Is a Video Game | The Amanuensis: Automated Songwriting and Recording Blog #4 by @to-the-sun [blog]
The Amanuensis is a project that started as experimental songwriting software and it’s now going to be a video game! The posts in the series have improved, just like the project. It’s a well written, informative post that allows the reader to witness the evolution of such an idea with all its details. Both music and development enthusiast will find something to read where this link leads.
Total payout: 0.28 STU (Not voted by @utopian-io yet) Number of votes: 12
Utopian.io Post Statistics
The staff picked contributions are only a small (but exceptional) example of the mass of contributions reviewed and rewarded by Utopian.io.
- Overall, the last week saw a total of 246 posts, with 193 of them rewarded through an upvote by @utopian-io.
- In total, Utopian.io distributed an approximate of 5895.36 STU to contributors.
- The highest payout seen on any Utopian.io contribution this week was 197.767 STU, with a total of 144 votes received from the community.
- The contribution that attracted the most engagement was Surfer 1.0.11 update brings top posts feature and more, with no less than 83 comments in its comment threads.
- The average vote given by Utopian.io was worth 44.00 STU.
Category Statistics
|Category|Reviewed|Rewarded|Total rewards|Top contributor| |:-|:-|:-|-:|:-| |analysis|8|8|339.83 STU|@paulag| |copywriting|8|8|344.88 STU|@order4adwriter| |graphics|37|32|1134.48 STU|@zuur| |blog|31|16|341.15 STU|@actifit| |video-tutorials|9|6|191.86 STU|@buckydurddle| |translations|62|62|2135.38 STU|@robertbira| |ideas|11|2|1.30 STU|@ckole| |bug-hunting|7|3|12.96 STU|@tobias-g| |social|13|13|75.22 STU|@raymondbruce| |development|34|26|888.03 STU|@raycoms| |tutorials|18|11|190.54 STU|@pckurdu|
First Time Contributing in Utopian.io?
Learn how to contribute on our website
Utopian Witness
This page is synchronized from the post: Weekly Top of Utopian.io: August 2 - August 8


--- layout: basic title: "Team" subtitle: "Melima Project Team" description: Melima - Team lang: en permalink: /team/ --- {% capture team %}{% include team/team.md %}{% endcapture %} {{ team | markdownify }}
{% capture team2 %}{% include team/team2.md %}{% endcapture %} {{ team2 | markdownify }} {% capture team3 %}{% include team/team3.md %}{% endcapture %} {{ team3 | markdownify }}


Adam Lallana hails special power Liverpool have for scoring last-gasp goals
Sadio Mane scored a stoppage-time header as Liverpool snatched a 2-1 win at Aston Villa
by Matt Maltby, https://www.mirror.co.uk/authors/matt-maltby/Adam Lallana believes Liverpool have developed a feeling “like a sixth sense” that fuels their ability to secure last-gasp victories.
Sadio Mane was the hero on Saturday as the Reds' late show at Aston Villa maintained their title charge.
The forward's stoppage-time header earned a thrilling 2-1 win just as Jurgen Klopp's side looked like losing their unbeaten Premier League record.
Andrew Robertson had equalised with just three minutes left to cancel out Trezeguet's first-half opener for the hosts.
That result came after another last-gasp goal ultimately helped them secure a Carabao Cup victory over Arsenal - and Lallana has hailed their never-say-die attitude.
The former Southampton star said: "We keep getting late goals. Another two today and one in midweek.
"Then there was my goal at Manchester United a couple of weeks ago. The resilience and character is there in abundance.
"It’s almost like a sixth sense. We knew at half-time that if we could get one goal it could lead to another.
"We got it late but we still had time and, with the deliveries and set-pieces we’ve got in our team, we use it to our advantage. It’s such a weapon.
"Teams worry when it’s late. Even though we weren’t at our best in the first half we were saved by that never-say-die approach.
"Two goals in the last five minutes. We’ve just got that momentum. We’re just on that path at the minute."
The victory maintained Liverpool's unbeaten start to the season and kept them six points clear of Manchester City at the top.


--- layout: page title: Python Tutorials tags : [Python, Machine learning] author : Mahesh Gaikwad keywords: Python --- {% include JB/setup %}


JEAN DE FLORETTE A film review by Wayne Citrin Copyright 1987 Wayne Citrin
I'm surprised that nobody has posted a review of this excellent film, which won the major award at Cannes this year. [Actually, there was one by Jeff Meyer, available as r.a.m.r./89. -ecl] JEAN DE FLORETTE is a vivid adaptation of the Marcel Pagnol novel about peasant life in southern France between the wars. Papet (Yves Montand) wishes to acquire a neighbor's land in order to establish his nephew Ugolin (Daniel Auteuil). However, the neighbor dies and his heir, Jean (Gerard Depardieu), a city dweller, arrives intending to settle down and farm the land according to the systems described in his books. Papet and Ugolin conceal the spring on Jean's land (which is what makes the land valuable in this dry landscape) and sit back to watch Jean fail. They hope that he will give up and sell them the land.
This description does not do justice to this extraordinarily rich film. Papet and Ugolin are not standard cardboard villains, but sympathetic characters with understandable (though not necessarily admirable) reasons for doing the things they do. Jean is a sympathetic character, but also rather pompous and ludicrous in his faith in his "manuals." The film shows how closed to outsiders village life can be, and how primitive life there was before the war.
All the performances in the film are excellent, and the photography is beautiful. The script is intelligent, with many subtle motivations and connections between characters hinted at but not explained.
JEAN DE FLORETTE is the first part of a two-part film. The second part, MANON DES EAUX (MANON OF THE SPRINGS) was released in France at the same time as JEAN DE FLORETTE, but I have heard that MANON DES EAUX will be released in the United States around Christmas. Although MANON DES EAUX is the natural sequel (see the first film and you'll see what I mean), JEAN DE FLORETTE is itself a self contained film and filmgoers should not go expecting an incomplete, open-ended story. I give JEAN DE FLORETTE 3-1/2 stars out of 4, and eagerly await MANON DES EAUX.
Wayne Citrin (ucbvax!citrin)
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


Deloitte is a multinational professional services network.
Deloitte is one of the "Big Four" accounting organizations and the largest
professional services network in the world by revenue and number of professionals.
Deloitte provides audit, tax, consulting, enterprise risk and financial advisory
services with more than 286,200 professionals globally. In FY 2018, the network
earned a record $43.2 billion USD in aggregate revenues. As of 2017,
Deloitte is the 4th largest privately owned company in the United States.
Imagine two entities (e.g. banks) that need to update their own user account balances when there is a request to
transfer money from one customer to another. They need to spend a tremendous (and costly) amount of
time and effort for coordination, synchronization, messaging and checking to ensure that each transaction
happens exactly as it should. Typically, the money being transferred is held by the originator until it
can be confirmed that it was received by the recipient. With the blockchain, a single ledger of transaction
entries that both parties have access to can simplify the coordination and validation efforts because there
is always a single version of records, not two disparate databases.
PricewaterhouseCoopers (doing business as PwC) is a multinational professional services network headquartered in London, United Kingdom.
PwC ranks as the second largest professional services firm in the world behind Deloitte, and is one of the Big Four auditors,
along with Deloitte, EY and KPMG.
PwC is a network of firms in 158 countries, 721 locations, with 250,930 people.
As of 2015, 22% of the workforce worked in Asia, 26% in North America and the Caribbean and 32% in Western Europe.
The company's global revenues were $37.7 billion in FY 2017, of which $16 billion was generated by its Assurance practice,
$9.46 billion by its Tax practice and $12.25 billion by its Advisory practice. PwC provides services to 420 out of 500 Fortune 500 companies.
The firm was formed in 1998 by a merger between Coopers & Lybrand and Price Waterhouse.
Both firms had histories dating back to the 19th century. The trading name was shortened to PwC in September 2010 as part of a rebranding effort.
As of 2017, PwC is the 5th-largest privately owned company in the United States.
Ernst & Young (doing business as EY) is a multinational professional services firm headquartered in London, England, United Kingdom.
EY is one of the largest professional services firms in the world and is one of the "Big Four" accounting firms.
EY operates as a network of member firms which are separate legal entities in individual countries.
It has 270,000 employees in over 700 offices around 150 countries in the world. It provides assurance (including financial audit), tax,
consulting and advisory services to companies.
The firm dates back to 1849 with the founding of Harding & Pullein in England.
The current firm was formed by a merger of Ernst & Whinney and Arthur Young & Co. in 1989.
It was known as Ernst & Young until 2013 when it underwent a rebranding to EY.
The acronym "EY" was already an informal name for the firm prior to its official adoption.
In 2018, Fortune magazine ranked EY 52nd on the 100 Best Companies to Work For list.
In 2017, EY was the 9th largest privately owned organization in the United States.
KPMG is a professional service company and one of the Big Four auditors, along with Deloitte, Ernst & Young (EY),
and PricewaterhouseCoopers (PwC).
Seated in Amstelveen, the Netherlands, KPMG employs 207,050 people and has three lines of services: financial audit, tax, and advisory.
Its tax and advisory services are further divided into various service groups.
The name "KPMG" stands for "Klynveld Peat Marwick Goerdeler."
It was chosen when KMG (Klynveld Main Goerdeler) merged with Peat Marwick in 1987.


rentd.io
We put your rental business in the cloud so you can have full control no matter if you rent things online or on-site


Behaviour-Driven Development encourages you to start defining the scenarios that express the desired behaviour in a textual format, e.g.:
Given a stock of symbol STK1 and a threshold of 10.0 When the stock is traded at 5.0 Then the alert status should be OFF When the stock is traded at 11.0 Then the alert status should be ON
The textual scenario should use the language of the business domain and shield away as much as possible the details of the technical implementation. Also, it should be given a name that is expressive of the functionality that is being verified, i.e. trader_is_alerted_of_status.scenario.
The scenario should use a syntax compatible with the Grammar.
JBehave maps textual steps to Java methods via CandidateSteps. The scenario writer need only provide annotated methods that match, by regex patterns, the textual steps. One way this can be done is by extending the default implementation Steps:
public class TraderSteps extends Steps { private Stock stock; @Given("a stock of symbol $symbol and a threshold of $threshold") public void aStock(String symbol, double threshold) { stock = new Stock(symbol, threshold); } @When("the stock is traded at $price") public void theStockIsTradedAt(double price) { stock.tradeAt(price); } @Then("the alert status should be $status") public void theAlertStatusShouldBe(String status) { ensureThat(stock.getStatus().name(), equalTo(status)); } }
Equivalently, as composition is often preferrable to inheritance, the scenario writer can use a POJO (i.e. without extending Steps)
public class TraderSteps { // look, Ma, I'm a POJO!! private Stock stock; @Given("a stock of symbol $symbol and a threshold of $threshold") public void aStock(String symbol, double threshold) { stock = new Stock(symbol, threshold); } @When("the stock is traded at $price") public void theStockIsTradedAt(double price) { stock.tradeAt(price); } @Then("the alert status should be $status") public void theAlertStatusShouldBe(String status) { ensureThat(stock.getStatus().name(), equalTo(status)); } }
If POJOs are used we need to create CandidateSteps via the StepsFactory
StepsConfiguration configuration = ... // optional configuration new StepsFactory(configuration).createCandidateSteps(new TraderSteps()));
Each step is annotated with one of the step annotations, each holding a regex pattern as value. The pattern is used to match the method in the Steps class with the appropriate parameters. The simplest default behaviour identifies arguments in the candidate step by the words prefixed by the $ character. More advanced parameter injection mechanisms are also supported by JBehave.
JBehave execute all the matched steps in the order in which they are found in the Scenario. It is up to the implementor of the Steps class to provide the logic to tie together the results of the execution of each step. This can be done by keeping state member variables in the Steps class or possibly by using a service API or other dependency.
In JBehave Core scenarios can be run in an automated way via a
one-to-one mapping to Java classes. The mechanism via which the textual
scenarios are resolved from a Java class is determined by the
implementation of the ScenarioNameResolver.
In our example, we need to create a file TraderIsAletedOfStatus.java
,
which maps to out textual scenario in same package.
The contract for a user-defined Java scenario is the following:
Must extend an instance of a RunnableScenario, such as JUnitScenario
Must provide a default constructor.
(Only when running with external resources) Must provide an additional constructor with a ClassLoader parameter.
Thus in our case the example Scenario would look like:
public class TraderScenario extends JUnitScenario { public TraderScenario() { super(new MostUsefulConfiguration() { public ScenarioDefiner forDefiningScenarios() { return new ClasspathScenarioDefiner(new UnderscoredCamelCaseResolver(".scenario"), new PatternScenarioParser(keywords())); } }); addSteps(new TraderSteps()); // if TraderSteps extends Steps addSteps(new StepsFactory().createCandidateSteps(new TraderSteps())); // if TraderSteps is a POJO } }
Here we are configuring our textual scenario files to end with extension .scenario, by overriding the default behaviour of UnderscoredCamelCaseResolver which has no extension.


S 73 IS
112th CONGRESS
1st Session
S. 738
To amend titles XVIII and XIX of the Social Security Act to ensure for the election and the Interior sit forth is ave of the agency such date of the enactment of this Act.


We are proud to offer the animals below. The majority of these animals were produced by us, unless where noted. Regardless of their origin, they have all been very well cared for, and are backed up by our commitment to provide you with the very best post-purchase support, shoud you have any questions about your new critter.


Spoilers: Shirley divides Ben and Callum in EastEnders over the police job
Ben Mitchell (Max Bowden) was a little perturbed in EastEnders when he first discovered that Callum ‘Halfway’ Highway (Tony Clay) wanted to pursue a career in the police. However, he came to accept that love was more important than any old dodgy dealings, and thus he decided to pack in a life of crime in favour of a happier one with his man.
In spite of Ben having turned over a new leaf so that his relationship with Callum could thrive, it appears as if his initial suspicions — that his boyfriend’s line of work would prove a problem for his dodgy deals — are proven correct in the coming episodes, as Tubbs offers Ben a job, but Ben refrains from accepting — which leads to Tubbs discovering that Callum’s interested in joining the police.
What with them all living in the delightful community known as Walford, it doesn’t take long for such news to travel, and several of Phil’s (Steve McFadden) associates get wind of the situation, and thus pull out of deals.
However, Ben’s more interested in helping Callum with his training, but — determined to rectify the situation — Shirley (Linda Henry) hunts him down and warns him about the severity of said situation. As a result, Ben comes to the realisation that he’s got a problem to solve.
Advertisement Advertisement
As Louise (Tilly Keeper) goes into labour, Ben rushes to the hospital to be by her side, but while there, he realises how emotional Phil is, and attempts to console him — which leads to the pair having something of a heart-to-heart.
As a result, Ben can’t help but feel guilty over what’s happened to his dad’s reputation, and thus he sets about rectifying the situation.
Later, he meets with Shirley and Phil at The Arches, before Tubbs arrives to see what they have to say.
Ben’s incredibly creative — as he’s proven in the past before — so what will this plan of his entail?
What’s more, will it impact his relationship with Callum?
One to watch: Thursday 5th December at 7:30pm on BBC One.


Each Probability Distribution has the RandomSeed keyword, which generates a different pseudo-random sequence of values for each Probability Distribution. Often, a simulation model is executed multiple times, called ‘replications’, using different random seeds to determine the statistical accuracy of the output parameters.
One way to achieve multiple replications is to change the RandomSeed for each Probability Distribution. However, this can be impractical when large numbers of distributions are used in a model. The GlobalSubstreamSeed keyword for the Simulation object simplifies this process. Changing the input for this keyword causes all Probability Distributions in the model to generate a different random sequence. In effect, the seed for each Probability Distribution is the combination of the inputs to the RandomSeed and GlobalSubstreamSeed keywords.
When multiple objects behave according to a Probability Distribution with the same characteristics, it is advisable to have a unique instance of the Probability Distribution for each object. This avoids any cross-correlation effects arising from the order in which a single distribution may be sampled.


Due to limitations of WiFi modules and their Software Development Kits (SDK), often it is not possible to comply with CMSIS-Driver BSD rules regarding function behavior or function return codes. Hence, the WiFi Driver tests accept alternative error codes and report them as Warnings and considers certain error codes as acceptable for certain functions. Exceptions to BSD-strict error codes and functionality are written below:
WiFi socket deviations from the BSD-strict specification
- SocketBind
- bind socket to same address again
BSD-strict expected return code ARM_SOCKET_EINVAL
non BSD-strict accepted return codes: 0 or ARM_SOCKET_ERROR
- bind another socket to used address
BSD-strict expected return code ARM_SOCKET_EADDRINUSE
non BSD-strict accepted return code ARM_SOCKET_ERROR
- bind on closed socket
BSD-strict expected return code ARM_SOCKET_ESOCK
non BSD-strict accepted return code ARM_SOCKET_ERROR
- SocketListen
- listen on already listening socket
BSD-strict expected return code ARM_SOCKET_EINVAL
non BSD-strict accepted return codes: 0 or ARM_SOCKET_ERROR
- listen on unbound socket
BSD-strict expected return code ARM_SOCKET_EINVAL
non BSD-strict accepted return code ARM_SOCKET_ERROR
- listen on closed socket
BSD-strict expected return code ARM_SOCKET_ESOCK
non BSD-strict accepted return code ARM_SOCKET_ERROR
- listen on datagram socket
BSD-strict expected return code ARM_SOCKET_ENOTSUP
non BSD-strict accepted return code ARM_SOCKET_ERROR
- SocketAccept
- receive on disconnected socket
BSD-strict expected return code ARM_SOCKET_ECONNRESET
non BSD-strict accepted return codes: ARM_SOCKET_EAGAIN or ARM_SOCKET_ERROR
- accept on closed socket
BSD-strict expected return code ARM_SOCKET_ESOCK
non BSD-strict accepted return code ARM_SOCKET_ERROR
- listen on datagram socket
BSD-strict expected return code ARM_SOCKET_ENOTSUP
non BSD-strict accepted return code ARM_SOCKET_ERROR
- accept on datagram socket
BSD-strict expected return code ARM_SOCKET_ENOTSUP
non BSD-strict accepted return code ARM_SOCKET_ERROR
- SocketConnect
- connect socket to same address again
BSD-strict expected return code ARM_SOCKET_EISCONN
non BSD-strict accepted return codes: 0 or ARM_SOCKET_ERROR
- bind on connected socket
BSD-strict expected return code ARM_SOCKET_EISCONN
non BSD-strict accepted return code ARM_SOCKET_ERROR
- connect on closed socket
BSD-strict expected return code ARM_SOCKET_ESOCK
non BSD-strict accepted return code ARM_SOCKET_ERROR
- connect to non-existent port
BSD-strict expected return code ARM_SOCKET_ECONNREFUSED
non BSD-strict accepted return codes: ARM_SOCKET_ETIMEDOUT or ARM_SOCKET_ERROR
- connect to non-existent stream server
BSD-strict expected return code ARM_SOCKET_ETIMEDOUT
non BSD-strict accepted return code ARM_SOCKET_ERROR
- connect on listening socket
BSD-strict expected return code ARM_SOCKET_EINVAL
non BSD-strict accepted return code ARM_SOCKET_ERROR
- connect datagram socket to unspecified address (<IP_ADDRESS>)
BSD-strict expected return code 0
non BSD-strict accepted return codes: ARM_SOCKET_EINVAL or ARM_SOCKET_ERROR (special case that deletes the socket destination & filtering address)
- SocketRecv
- recv on closed socket
BSD-strict expected return code ARM_SOCKET_ESOCK
non BSD-strict accepted return code ARM_SOCKET_ERROR
- recv on created socket
BSD-strict expected return code ARM_SOCKET_ENOTCONN
non BSD-strict accepted return code ARM_SOCKET_ERROR
- recv on bound socket
BSD-strict expected return code ARM_SOCKET_ENOTCONN
non BSD-strict accepted return code ARM_SOCKET_ERROR
- recv on listening socket
BSD-strict expected return code ARM_SOCKET_ENOTCONN
non BSD-strict accepted return code ARM_SOCKET_ERROR
- SocketRecvFrom
- recvfrom on closed socket
BSD-strict expected return code ARM_SOCKET_ESOCK
non BSD-strict accepted return code ARM_SOCKET_ERROR
- SocketSend
- send on closed socket
BSD-strict expected return code ARM_SOCKET_ESOCK
non BSD-strict accepted return code ARM_SOCKET_ERROR
- send on disconnected socket
BSD-strict expected return code ARM_SOCKET_ECONNRESET
non BSD-strict accepted return codes: >0 or ARM_SOCKET_EAGAIN or ARM_SOCKET_ERROR
- send on created socket
BSD-strict expected return code ARM_SOCKET_ENOTCONN
non BSD-strict accepted return code ARM_SOCKET_ERROR
- send on bound socket
BSD-strict expected return code ARM_SOCKET_ENOTCONN
non BSD-strict accepted return code ARM_SOCKET_ERROR
- send on listening socket
BSD-strict expected return code ARM_SOCKET_ENOTCONN
non BSD-strict accepted return code ARM_SOCKET_ERROR
- send on closed socket
BSD-strict expected return code ARM_SOCKET_ESOCK
non BSD-strict accepted return code ARM_SOCKET_ERROR
- SocketSendTo
- sendto on closed socket
BSD-strict expected return code ARM_SOCKET_ESOCK
non BSD-strict accepted return code ARM_SOCKET_ERROR
- SocketGetSockName
- getsockname on closed socket
BSD-strict expected return code ARM_SOCKET_ESOCK
non BSD-strict accepted return code ARM_SOCKET_ERROR
- getsockname on unbound socket
BSD-strict expected return code ARM_SOCKET_EINVAL
non BSD-strict accepted return code ARM_SOCKET_ERROR
- SocketGetPeerName
- getpeername on closed socket
BSD-strict expected return code ARM_SOCKET_ESOCK
non BSD-strict accepted return code ARM_SOCKET_ERROR
- getpeername on created socket
BSD-strict expected return code ARM_SOCKET_ENOTCONN
non BSD-strict accepted return code ARM_SOCKET_ERROR
- getpeername on bound socket
BSD-strict expected return code ARM_SOCKET_ENOTCONN
non BSD-strict accepted return code ARM_SOCKET_ERROR
- getpeername on listening socket
BSD-strict expected return code ARM_SOCKET_ENOTCONN
non BSD-strict accepted return code ARM_SOCKET_ERROR
- SocketGetOpt
- getsockopt on closed socket
BSD-strict expected return code ARM_SOCKET_ESOCK
non BSD-strict accepted return code ARM_SOCKET_ERROR
- SocketSetOpt
- setsockopt on closed socket
BSD-strict expected return code ARM_SOCKET_ESOCK
non BSD-strict accepted return code ARM_SOCKET_ERROR
- SocketClose
- close already closed socket
BSD-strict expected return code ARM_SOCKET_ESOCK
non BSD-strict accepted return code 0
- SocketGetHostByName
- gethostbyname for non-existing host
BSD-strict expected return code ARM_SOCKET_EHOSTNOTFOUND
non BSD-strict accepted return code ARM_SOCKET_ERROR


Time is one of the 3 key elements of music. This tutorial will explore how to manipulate time in Codetta.
In the previous tutorial we connected many "four four bars" to our speaker block.
"Four four" is the blocks time signature, shown in the image above.
This means that we can fill the bar using 4 crotchet notes (as 4 x 1/4 = 4/4).
Codetta has many other time signatures. Hence, different bars can be filled with different amounts of notes.
For example, look at the three four bar above. This time only 3 crotchet notes can fill the bar (as 3 X 1/4 = 3/4).
TASK: How many two four blocks does it take, to last as long as a single four four bar?
Hint: The picture above may be able to help you?
Often in music we will want to repeat a musical idea over and over again.
This is sometimes refered to as a loop.
Above is an example of a repeating musical idea written in Codetta. Now dosen't that look irritating. Imagine having to rewrite the same notes over and over and over again
Navigate to the "Time" tab on our toolbar.
This is where the repeat blocks are useful! By placing these either side of our bars, we can let Codetta know how many times to play the same thing.
Have a look at the same peice of music, this time written with repeat blocks.
Tempo is how fast or slow music is played.
We typically measure this by saying how many beats happen per minute i.e. our "beats per minute" (BPM).
Find the global tempo widget in the top right of the program.
This will control the tempo for all of our blocks within the program.
To help us remember that this changes all the blocks, a picture of a "globe" is shown!
Task: recreate the screenshot below. Then try changing the tempo to 400bpm, then try 50bpm. Can you hear the difference?
NOTE: You can also just use the end repeat block, which will repeat back to the start block (just like in standard music notation).
Allthough the global tempo is an easy way to control the speed of the entire music, sometimes we may want to change the tempo part way through our composition, or have 2 different tempo's happening at the same time.
To do this we can use the tempo setter block (shown above). The blocks colour matches the global widget to help us remember.
This works exactly like the global tempo, however, this changes the tempo at the point in time it is connected.
TASK: recreate the music shown in the image below and listen for the slow effect.
Steve Reich is a contemporary composer, who writes music in a minimalistic style.
Minimalism dosen't mean the music is boring and not much happens. It means that a single process is cleverly used to create a really cool and sophisticated effect from very little musical material.
Piano phase is a good example of a simple minimalist process creating interesting music, from a small number of "blocks".
The video above shows plays a rendition of Steve Reich's piano phase in Codetta.
The piece is structed like so:
To increment or decrement the tempo within Codetta, you can use the final block under time, the tempo changer.
This will add the number specified to the current tempo. It can also move towards negative numbers for a gradual slowing of the tempo.
Task: Make your own composiiton inspired by Piano Phase. Can you too repeat a small phrase and shift its tempo?
The global tempo is set to 144.
Below is a screenshot of piano phase to help you:


| Virus entry into hepatocyte |
Entry inhibitors |
| Virus intracytoplasmic migration to nuclear periphery and nuclear import |
Tubulin production inhibitor |
| Viral uncoating and intranuclear rcDNA release |
No current drugs |
| cccDNA production, integration, epigenetic modification |
cccDNA inhibitors (e.g., lymphotoxin beta receptor agonist) |
| Epi‐drugs |
| Interferon alpha |
| Modification of cccDNA to pgRNA, pgRNA packaging for nuclear export |
Small interfering RNA |
| pgRNA reverse transcription to progeny rcDNA and capsid packaging |
Capsid assembly modulators |
|
Interferon alpha |
| Viral replication through DNA synthesis |
Nucleoside analogs |
| Capsid incorporation of HBsAg and secretion from hepatocytes |
Secretion inhibitors |
| Interferon alpha |


Object Property: 'is component part of'
http://purl.org/biotop/btl2.owl#isComponentPartOf
Annotations (2)
-
definition "The non-transitive relation hasComponentPart (inverse: componentPartOf) relates components with a compound. Components strictly partition the compound, and the compound is the mereological sum of its components. A loss of some component affects the integrity of the compound, and possibly the type it instantiates, e.g. a complete vs. a defective organism.
The choice of what is a component of a compound is somewhat arbitrary, because there are several ways to divide a whole into parts. Strictly spoken, this relation should refer to some partition.
Components should be - at least - partly bona fide parts. The use of this relation also requires the commitment to an underlying granularity level. So could we consider the codons (base triples) as the components of a DNA molecule but also the single nucleotides. Note that components of a compound may also be portions of matter.
Examples: my liver is a component of my organism, a carboxy group is a component of some organic acid molecule." ()
-
label "is component part of" ()
Inverses (1)
Superproperties (1)
Usage (3)


May 17, 2012
I never really expected to find myself giving advice to people graduating from an establishment of higher education. I never graduated from any such establishment. I never even started at one. I escaped from school as soon as I could, when the prospect of four more years of enforced learning before I’d become the writer I wanted to be was stifling.
I got out into the world, I wrote, and I became a better writer the more I wrote, and I wrote some more, and nobody ever seemed to mind that I was making it up as I went along, they just read what I wrote and they paid for it, or they didn’t, and often they commissioned me to write something else for them.
Which has left me with a healthy respect and fondness for higher education that those of my friends and family, who attended Universities, were cured of long ago.
Looking back, I’ve had a remarkable ride. I’m not sure I can call it a career, because a career implies that I had some kind of career plan, and I never did. The nearest thing I had was a list I made when I was 15 of everything I wanted to do: to write an adult novel, a children’s book, a comic, a movie, record an audiobook, write an episode of Doctor Who… and so on. I didn’t have a career. I just did the next thing on the list.
So I thought I’d tell you everything I wish I’d known starting out, and a few things that, looking back on it, I suppose that I did know. And that I would also give you the best piece of advice I’d ever got, which I completely failed to follow.
First of all: When you start out on a career in the arts you have no idea what you are doing.
This is great. People who know what they are doing know the rules, and know what is possible and impossible. You do not. And you should not. The rules on what is possible and impossible in the arts were made by people who had not tested the bounds of the possible by going beyond them. And you can.
If you don’t know it’s impossible it’s easier to do. And because nobody’s done it before, they haven’t made up rules to stop anyone doing that again, yet.
Secondly, If you have an idea of what you want to make, what you were put here to do, then just go and do that.
And that’s much harder than it sounds and, sometimes in the end, so much easier than you might imagine. Because normally, there are things you have to do before you can get to the place you want to be. I wanted to write comics and novels and stories and films, so I became a journalist, because journalists are allowed to ask questions, and to simply go and find out how the world works, and besides, to do those things I needed to write and to write well, and I was being paid to learn how to write economically, crisply, sometimes under adverse conditions, and on time.
Sometimes the way to do what you hope to do will be clear cut, and sometimes it will be almost impossible to decide whether or not you are doing the correct thing, because you’ll have to balance your goals and hopes with feeding yourself, paying debts, finding work, settling for what you can get.
Something that worked for me was imagining that where I wanted to be – an author, primarily of fiction, making good books, making good comics and supporting myself through my words – was a mountain. A distant mountain. My goal.
And I knew that as long as I kept walking towards the mountain I would be all right. And when I truly was not sure what to do, I could stop, and think about whether it was taking me towards or away from the mountain. I said no to editorial jobs on magazines, proper jobs that would have paid proper money because I knew that, attractive though they were, for me they would have been walking away from the mountain. And if those job offers had come along earlier I might have taken them, because they still would have been closer to the mountain than I was at the time.
I learned to write by writing. I tended to do anything as long as it felt like an adventure, and to stop when it felt like work, which meant that life did not feel like work.
Thirdly, When you start off, you have to deal with the problems of failure. You need to be thickskinned, to learn that not every project will survive. A freelance life, a life in the arts, is sometimes like putting messages in bottles, on a desert island, and hoping that someone will find one of your bottles and open it and read it, and put something in a bottle that will wash its way back to you: appreciation, or a commission, or money, or love. And you have to accept that you may put out a hundred things for every bottle that winds up coming back.
The problems of failure are problems of discouragement, of hopelessness, of hunger. You want everything to happen and you want it now, and things go wrong. My first book – a piece of journalism I had done for the money, and which had already bought me an electric typewriter from the advance – should have been a bestseller. It should have paid me a lot of money. If the publisher hadn’t gone into involuntary liquidation between the first print run selling out and the second printing, and before any royalties could be paid, it would have done.
And I shrugged, and I still had my electric typewriter and enough money to pay the rent for a couple of months, and I decided that I would do my best in future not to write books just for the money. If you didn’t get the money, then you didn’t have anything. If I did work I was proud of, and I didn’t get the money, at least I’d have the work.
Every now and again, I forget that rule, and whenever I do, the universe kicks me hard and reminds me. I don’t know that it’s an issue for anybody but me, but it’s true that nothing I did where the only reason for doing it was the money was ever worth it, except as bitter experience. Usually I didn’t wind up getting the money, either. The things I did because I was excited, and wanted to see them exist in reality have never let me down, and I’ve never regretted the time I spent on any of them.
The problems of failure are hard.
The problems of success can be harder, because nobody warns you about them.
The first problem of any kind of even limited success is the unshakable conviction that you are getting away with something, and that any moment now they will discover you. It’s Imposter Syndrome, something my wife Amanda christened the Fraud Police.
In my case, I was convinced that there would be a knock on the door, and a man with a clipboard (I don’t know why he carried a clipboard, in my head, but he did) would be there, to tell me it was all over, and they had caught up with me, and now I would have to go and get a real job, one that didn’t consist of making things up and writing them down, and reading books I wanted to read. And then I would go away quietly and get the kind of job where you don’t have to make things up any more.
The problems of success. They’re real, and with luck you’ll experience them. The point where you stop saying yes to everything, because now the bottles you threw in the ocean are all coming back, and have to learn to say no.
I watched my peers, and my friends, and the ones who were older than me and watch how miserable some of them were: I’d listen to them telling me that they couldn’t envisage a world where they did what they had always wanted to do any more, because now they had to earn a certain amount every month just to keep where they were. They couldn’t go and do the things that mattered, and that they had really wanted to do; and that seemed as a big a tragedy as any problem of failure.
And after that, the biggest problem of success is that the world conspires to stop you doing the thing that you do, because you are successful. There was a day when I looked up and realised that I had become someone who professionally replied to email, and who wrote as a hobby. I started answering fewer emails, and was relieved to find I was writing much more.
Fourthly, I hope you’ll make mistakes. If you’re making mistakes, it means you’re out there doing something. And the mistakes in themselves can be useful. I once misspelled Caroline, in a letter, transposing the A and the O, and I thought, “Coraline looks like a real name…”
 You have the ability to make art.
And for me, and for so many of the people I have known, that’s been a lifesaver. The ultimate lifesaver. It gets you through good times and it gets you through the other ones.
Life is sometimes hard. Things go wrong, in life and in love and in business and in friendship and in health and in all the other ways that life can go wrong. And when things get tough, this is what you should do.
Make good art.
I’m serious. Husband runs off with a politician? Make good art. Leg crushed and then eaten by mutated boa constrictor? Make good art. IRS on your trail? Make good art. Cat exploded? Make good art.  Make good art. Probably things will work out somehow, and eventually time will take the sting away, but that doesn’t matter. Do what only you do best. Make good art.
Make it on the good days too.
And Fifthly, while you are at it, make your art. Do the stuff that only you can do.
The urge, starting out, is to copy. And that’s not a bad thing. Most of us only find our own voices after we’ve sounded like a lot of other people. But the one thing that you have that nobody else has is you.  So write and draw and build and play and dance and live as only you can.
The moment that you feel that, just possibly, you’re walking down the street naked, exposing too much of your heart and your mind and what exists on the inside, showing too much of yourself. That’s the moment you may be starting to get it right.
The things I’ve done that worked the best were the things I was the least certain about, the stories where I was sure they would either work, or more likely be the kinds of embarrassing failures people would gather together and talk about until the end of time. They always had that in common: looking back at them, people explain why they were inevitable successes. While I was doing them, I had no idea.
I still don’t. And where would be the fun in making something you knew was going to work?
And sometimes the things I did really didn’t work. There are stories of mine that have never been reprinted. Some of them never even left the house. But I learned as much from them as I did from the things that worked.
Sixthly. I will pass on some secret freelancer knowledge. Secret knowledge is always good. And it is useful for anyone who ever plans to create art for other people, to enter a freelance world of any kind. I learned it in comics, but it applies to other fields too. And it’s this:
People get hired because, somehow, they get hired. In my case I did something which these days would be easy to check, and would get me into trouble, and when I started out, in those pre-internet days, seemed like a sensible career strategy: when I was asked by editors who I’d worked for, I lied. I listed a handful of magazines that sounded likely, and I sounded confident, and I got jobs. I then made it a point of honour to have written something for each of the magazines I’d listed to get that first job, so that I hadn’t actually lied, I’d just been chronologically challenged… You get work however you get work.
People keep working, in a freelance world, and more and more of today’s world is freelance, because their work is good, and because they are easy to get along with, and because they deliver the work on time. And you don’t even need all three. Two out of three is fine. People will tolerate how unpleasant you are if your work is good and you deliver it on time. They’ll forgive the lateness of the work if it’s good, and if they like you. And you don’t have to be as good as the others if you’re on time and it’s always a pleasure to hear from you.
When I agreed to give this address, I started trying to think what the best advice I’d been given over the years was.
And it came from Stephen King twenty years ago, at the height of the success of Sandman. I was writing a comic that people loved and were taking seriously. King had liked Sandman and my novel with Terry Pratchett, Good Omens, and he saw the madness, the long signing lines, all that, and his advice was this:
“This is really great. You should enjoy it.”
And I didn’t. Best advice I got that I ignored.Instead I worried about it. I worried about the next deadline, the next idea, the next story. There wasn’t a moment for the next fourteen or fifteen years that I wasn’t writing something in my head, or wondering about it. And I didn’t stop and look around and go, this is really fun. I wish I’d enjoyed it more. It’s been an amazing ride. But there were parts of the ride I missed, because I was too worried about things going wrong, about what came next, to enjoy the bit I was on.
That was the hardest lesson for me, I think: to let go and enjoy the ride, because the ride takes you to some remarkable and unexpected places.
And here, on this platform, today, is one of those places. (I am enjoying myself immensely.)
To all today’s graduates: I wish you luck. Luck is useful. Often you will discover that the harder you work, and the more wisely you work, the luckier you get. But there is luck, and it helps.
We’re in a transitional world right now, if you’re in any kind of artistic field, because the nature of distribution is changing, the models by which creators got their work out into the world, and got to keep a roof over their heads and buy sandwiches while they did that, are all changing. I’ve talked to people at the top of the food chain in publishing, in bookselling, in all those areas, and nobody knows what the landscape will look like two years from now, let alone a decade away. The distribution channels that people had built over the last century or so are in flux for print, for visual artists, for musicians, for creative people of all kinds.
Which is, on the one hand, intimidating, and on the other, immensely liberating. The rules, the assumptions, the now-we’re supposed to’s of how you get your work seen, and what you do then, are breaking down. The gatekeepers are leaving their gates. You can be as creative as you need to be to get your work seen. YouTube and the web (and whatever comes after YouTube and the web) can give you more people watching than television ever did. The old rules are crumbling and nobody knows what the new rules are.
So make up your own rules.
Someone asked me recently how to do something she thought was going to be difficult, in this case recording an audio book, and I suggested she pretend that she was someone who could do it. Not pretend to do it, but pretend she was someone who could. She put up a notice to this effect on the studio wall, and she said it helped.
So be wise, because the world needs more wisdom, and if you cannot be wise, pretend to be someone who is wise, and then just behave like they would.
And now go, and make interesting mistakes, make amazing mistakes, make glorious and fantastic mistakes. Break rules. Leave the world more interesting for your being here. Make good art.


Getting Started
Hello and Welcome!
Installation
The library is available as npm package, so all you need to do is to run the following command:
{{ snippets.install }}
This command will create a record in your `package.json` file and install the package into the npm modules folder.
Examples
Minimal Setup Example
First thing you need to do is to import the ng2-advanced-filter directives into your component.
{{ snippets.require }}
Then register it by adding to the list of directives of your module:
{{ snippets.directive }}
Now, we need to configure the table and add it into the template. The only required setting for the component to start working is a columns configuration.
Let's register settings property inside of the component where we want to have the table and configure some columns (Settings documentation):
{{ snippets.template }}
At this step you will have a minimally configured table which should look something like this:
All functions are available by default and you don't need to configure them somehow, so you already able to add/edit/delete rows, sort or filter the table, etc.
But it feels like something is missing... Right, there is no data in the table by default. To add some, let's create an array property with a list of objects in the component. Please note that object keys are same as in the columns configuration.
{{ snippets.sourceRequire }}
Note that the import now contains a LocalDataSource class (the word Local here means that the data is processed locally in a browser, not on the server side).
Then let's create a DataSource instance and pass our data array into it as a constructor parameter:
{{ snippets.sourceTemplate }}
At this point if you look at the result there will be no difference comparing to the first example. Basically if you pass an array to the table component first thing it will do is wrap LocalDataSource object around your array as we did here manually.
Now, having the DataSource we basically could change the table data in any way we need to - filter it, sort, paginate to some page, create/delete/modify the rows. In our example we need to be able to filter the data outside of the table, firstly let's add a search filed to the template with a listener:
Full component documentation you can find here.


WITNESS LIST Corrections Committee April 24, 2001-2:00P SB 1048 Registering, but not testifying: On: DeBottis, Gina (Special Prosecution Unit) Page, Kelly (Council on Sex Offender Treatment) Thetford, Chris (Special Prosecution Unit - Civil Division)


- infile
- outfile
- The input and output files, respectively. If you do not specify
outfile, objcopy creates a temporary file and destructively
renames the result with the name of infile.
- -I bfdname
- --input-target=bfdname
- Consider the source file's object format to be bfdname, rather than
attempting to deduce it.
- -O bfdname
- --output-target=bfdname
- Write the output file using the object format bfdname.
- -F bfdname
- --target=bfdname
- Use bfdname as the object format for both the input and the output
file; i.e., simply transfer data from source to destination with no
translation.
- -B bfdarch
- --binary-architecture=bfdarch
- Useful when transforming a architecture-less input file into an object
file. In this case the output architecture can be set to bfdarch.
This option will be ignored if the input file has a known bfdarch.
You can access this binary data inside a program by referencing the
special symbols that are created by the conversion process. These symbols
are called _binary_objfile_start, _binary_objfile_end and
_binary_objfile_size. e.g. you can transform a picture file into an
object file and then access it in your code using these symbols.
- -j sectionpattern
- --only-section=sectionpattern
- Copy only the indicated sections from the input file to the output file.
This option may be given more than once. Note that using this option
inappropriately may make the output file unusable. Wildcard characters are
accepted in sectionpattern.
If the first character of sectionpattern is the
exclamation point (!) then matching sections will not be copied, even if
earlier use of --only-section on the same command line would
otherwise copy it. For example:
--only-section=.text.* --only-section=!.text.foo
will copy all sectinos maching '.text.*' but not the section
'.text.foo'.
- -R sectionpattern
- --remove-section=sectionpattern
- Remove any section matching sectionpattern from the output file.
This option may be given more than once. Note that using this option
inappropriately may make the output file unusable. Wildcard characters are
accepted in sectionpattern. Using both the -j and -R
options together results in undefined behaviour.
If the first character of sectionpattern is the
exclamation point (!) then matching sections will not be removed even if
an earlier use of --remove-section on the same command line would
otherwise remove it. For example:
--remove-section=.text.* --remove-section=!.text.foo
will remove all sections matching the pattern '.text.*', but
will not remove the section '.text.foo'.
- --keep-section=sectionpattern
- When removing sections from the output file, keep sections that match
sectionpattern.
- --remove-relocations=sectionpattern
- Remove non-dynamic relocations from the output file for any section
matching sectionpattern. This option may be given more than once.
Note that using this option inappropriately may make the output file
unusable, and attempting to remove a dynamic relocation section such as
.rela.plt from an executable or shared library with
--remove-relocations=.plt will not work. Wildcard characters are
accepted in sectionpattern. For example:
--remove-relocations=.text.*
will remove the relocations for all sections matching the
pattern '.text.*'.
If the first character of sectionpattern is the
exclamation point (!) then matching sections will not have their
relocation removed even if an earlier use of --remove-relocations
on the same command line would otherwise cause the relocations to be
removed. For example:
--remove-relocations=.text.* --remove-relocations=!.text.foo
will remove all relocations for sections matching the pattern
'.text.*', but will not remove relocations for the section
'.text.foo'.
- -S
- --strip-all
- Do not copy relocation and symbol information from the source file.
- -g
- --strip-debug
- Do not copy debugging symbols or sections from the source file.
- --strip-unneeded
- Strip all symbols that are not needed for relocation processing.
- -K symbolname
- --keep-symbol=symbolname
- When stripping symbols, keep symbol symbolname even if it would
normally be stripped. This option may be given more than once.
- -N symbolname
- --strip-symbol=symbolname
- Do not copy symbol symbolname from the source file. This option may
be given more than once.
- --strip-unneeded-symbol=symbolname
- Do not copy symbol symbolname from the source file unless it is
needed by a relocation. This option may be given more than once.
- -G symbolname
- --keep-global-symbol=symbolname
- Keep only symbol symbolname global. Make all other symbols local to
the file, so that they are not visible externally. This option may be
given more than once. Note: this option cannot be used in conjunction with
the --globalize-symbol or --globalize-symbols options.
- --localize-hidden
- In an ELF object, mark all symbols that have hidden or internal visibility
as local. This option applies on top of symbol-specific localization
options such as -L.
- -L symbolname
- --localize-symbol=symbolname
- Convert a global or weak symbol called symbolname into a local
symbol, so that it is not visible externally. This option may be given
more than once. Note - unique symbols are not converted.
- -W symbolname
- --weaken-symbol=symbolname
- Make symbol symbolname weak. This option may be given more than
once.
- --globalize-symbol=symbolname
- Give symbol symbolname global scoping so that it is visible outside
of the file in which it is defined. This option may be given more than
once. Note: this option cannot be used in conjunction with the -G
or --keep-global-symbol options.
- -w
- --wildcard
- Permit regular expressions in symbolnames used in other command
line options. The question mark (?), asterisk (*), backslash (\) and
square brackets ([]) operators can be used anywhere in the symbol name. If
the first character of the symbol name is the exclamation point (!) then
the sense of the switch is reversed for that symbol. For example:
-w -W !foo -W fo*
would cause objcopy to weaken all symbols that start with
"fo" except for the symbol "foo".
- -x
- --discard-all
- Do not copy non-global symbols from the source file.
- -X
- --discard-locals
- Do not copy compiler-generated local symbols. (These usually start with
L or ..)
- -b byte
- --byte=byte
- If interleaving has been enabled via the --interleave option then
start the range of bytes to keep at the byteth byte. byte
can be in the range from 0 to breadth-1, where breadth is
the value given by the --interleave option.
- -i [breadth]
- --interleave[=breadth]
- Only copy a range out of every breadth bytes. (Header data is not
affected). Select which byte in the range begins the copy with the
--byte option. Select the width of the range with the
--interleave-width option.
This option is useful for creating files to program ROM. It is
typically used with an "srec" output
target. Note that objcopy will complain if you do not specify the
--byte option as well.
The default interleave breadth is 4, so with --byte set
to 0, objcopy would copy the first byte out of every four bytes
from the input to the output.
- --interleave-width=width
- When used with the --interleave option, copy width bytes at
a time. The start of the range of bytes to be copied is set by the
--byte option, and the extent of the range is set with the
--interleave option.
The default value for this option is 1. The value of
width plus the byte value set by the --byte option
must not exceed the interleave breadth set by the --interleave
option.
This option can be used to create images for two 16-bit
flashes interleaved in a 32-bit bus by passing -b 0 -i 4
--interleave-width=2 and -b 2 -i 4 --interleave-width=2 to
two objcopy commands. If the input was '12345678' then the
outputs would be '1256' and '3478' respectively.
- -p
- --preserve-dates
- Set the access and modification dates of the output file to be the same as
those of the input file.
- -D
- --enable-deterministic-archives
- Operate in deterministic mode. When copying archive members and
writing the archive index, use zero for UIDs, GIDs, timestamps, and use
consistent file modes for all files.
If binutils was configured with
--enable-deterministic-archives, then this mode is on by default.
It can be disabled with the -U option, below.
- -U
- --disable-deterministic-archives
- Do not operate in deterministic mode. This is the inverse of
the -D option, above: when copying archive members and writing the
archive index, use their actual UID, GID, timestamp, and file mode values.
This is the default unless binutils was configured with
--enable-deterministic-archives.
- --debugging
- Convert debugging information, if possible. This is not the default
because only certain debugging formats are supported, and the conversion
process can be time consuming.
- --gap-fill val
- Fill gaps between sections with val. This operation applies to the
load address (LMA) of the sections. It is done by increasing the
size of the section with the lower address, and filling in the extra space
created with val.
- --pad-to address
- Pad the output file up to the load address address. This is done by
increasing the size of the last section. The extra space is filled in with
the value specified by --gap-fill (default zero).
- --set-start val
- Set the start address of the new file to val. Not all object file
formats support setting the start address.
- --change-start incr
- --adjust-start incr
- Change the start address by adding incr. Not all object file
formats support setting the start address.
- --change-addresses incr
- --adjust-vma incr
- Change the VMA and LMA addresses of all sections, as well as the start
address, by adding incr. Some object file formats do not permit
section addresses to be changed arbitrarily. Note that this does not
relocate the sections; if the program expects sections to be loaded at a
certain address, and this option is used to change the sections such that
they are loaded at a different address, the program may fail.
- --change-section-address
sectionpattern{=,+,-}val
- --adjust-section-vma
sectionpattern{=,+,-}val
- Set or change both the VMA address and the LMA address of any section
matching sectionpattern. If = is used, the section address
is set to val. Otherwise, val is added to or subtracted from
the section address. See the comments under --change-addresses,
above. If sectionpattern does not match any sections in the input
file, a warning will be issued, unless --no-change-warnings is
used.
- --change-section-lma
sectionpattern{=,+,-}val
- Set or change the LMA address of any sections matching
sectionpattern. The LMA address is the address where the section
will be loaded into memory at program load time. Normally this is the same
as the VMA address, which is the address of the section at program run
time, but on some systems, especially those where a program is held in
ROM, the two can be different. If = is used, the section address is
set to val. Otherwise, val is added to or subtracted from
the section address. See the comments under --change-addresses,
above. If sectionpattern does not match any sections in the input
file, a warning will be issued, unless --no-change-warnings is
used.
- --change-section-vma
sectionpattern{=,+,-}val
- Set or change the VMA address of any section matching
sectionpattern. The VMA address is the address where the section
will be located once the program has started executing. Normally this is
the same as the LMA address, which is the address where the section will
be loaded into memory, but on some systems, especially those where a
program is held in ROM, the two can be different. If = is used, the
section address is set to val. Otherwise, val is added to or
subtracted from the section address. See the comments under
--change-addresses, above. If sectionpattern does not match
any sections in the input file, a warning will be issued, unless
--no-change-warnings is used.
- --change-warnings
- --adjust-warnings
- If --change-section-address or --change-section-lma or
--change-section-vma is used, and the section pattern does not
match any sections, issue a warning. This is the default.
- --no-change-warnings
- --no-adjust-warnings
- Do not issue a warning if --change-section-address or
--adjust-section-lma or --adjust-section-vma is used, even
if the section pattern does not match any sections.
- --set-section-flags sectionpattern=flags
- Set the flags for any sections matching sectionpattern. The
flags argument is a comma separated string of flag names. The
recognized names are alloc, contents, load,
noload, readonly, code, data, rom,
share, and debug. You can set the contents flag for a
section which does not have contents, but it is not meaningful to clear
the contents flag of a section which does have contents--just
remove the section instead. Not all flags are meaningful for all object
file formats.
- --set-section-alignment
sectionpattern=align
- Set the alignment for any sections matching sectionpattern.
align specifies the alignment in bytes and must be a power of two,
i.e. 1, 2, 4, 8....
- --add-section sectionname=filename
- Add a new section named sectionname while copying the file. The
contents of the new section are taken from the file filename. The
size of the section will be the size of the file. This option only works
on file formats which can support sections with arbitrary names. Note - it
may be necessary to use the --set-section-flags option to set the
attributes of the newly created section.
- --dump-section sectionname=filename
- Place the contents of section named sectionname into the file
filename, overwriting any contents that may have been there
previously. This option is the inverse of --add-section. This
option is similar to the --only-section option except that it does
not create a formatted file, it just dumps the contents as raw binary
data, without applying any relocations. The option can be specified more
than once.
- --update-section sectionname=filename
- Replace the existing contents of a section named sectionname with
the contents of file filename. The size of the section will be
adjusted to the size of the file. The section flags for sectionname
will be unchanged. For ELF format files the section to segment mapping
will also remain unchanged, something which is not possible using
--remove-section followed by --add-section. The option can
be specified more than once.
Note - it is possible to use --rename-section and
--update-section to both update and rename a section from one
command line. In this case, pass the original section name to
--update-section, and the original and new section names to
--rename-section.
- --add-symbol
name=[section:]value[,flags]
- Add a new symbol named name while copying the file. This option may
be specified multiple times. If the section is given, the symbol
will be associated with and relative to that section, otherwise it will be
an ABS symbol. Specifying an undefined section will result in a fatal
error. There is no check for the value, it will be taken as specified.
Symbol flags can be specified and not all flags will be meaningful for all
object file formats. By default, the symbol will be global. The special
flag 'before=othersym' will insert the new symbol in front of the
specified othersym, otherwise the symbol(s) will be added at the
end of the symbol table in the order they appear.
- --rename-section
oldname=newname[,flags]
- Rename a section from oldname to newname, optionally
changing the section's flags to flags in the process. This has the
advantage over using a linker script to perform the rename in that the
output stays as an object file and does not become a linked executable.
This option is particularly helpful when the input format is
binary, since this will always create a section called .data. If for
example, you wanted instead to create a section called .rodata
containing binary data you could use the following command line to
achieve it:
objcopy -I binary -O <output_format> -B <architecture> \
--rename-section .data=.rodata,alloc,load,readonly,data,contents \
<input_binary_file> <output_object_file>
- --long-section-names {enable,disable,keep}
- Controls the handling of long section names when processing
"COFF" and
"PE-COFF" object formats. The default
behaviour, keep, is to preserve long section names if any are
present in the input file. The enable and disable options
forcibly enable or disable the use of long section names in the output
object; when disable is in effect, any long section names in the
input object will be truncated. The enable option will only emit
long section names if any are present in the inputs; this is mostly the
same as keep, but it is left undefined whether the enable
option might force the creation of an empty string table in the output
file.
- --change-leading-char
- Some object file formats use special characters at the start of symbols.
The most common such character is underscore, which compilers often add
before every symbol. This option tells objcopy to change the
leading character of every symbol when it converts between object file
formats. If the object file formats use the same leading character, this
option has no effect. Otherwise, it will add a character, or remove a
character, or change a character, as appropriate.
- --remove-leading-char
- If the first character of a global symbol is a special symbol leading
character used by the object file format, remove the character. The most
common symbol leading character is underscore. This option will remove a
leading underscore from all global symbols. This can be useful if you want
to link together objects of different file formats with different
conventions for symbol names. This is different from
--change-leading-char because it always changes the symbol name
when appropriate, regardless of the object file format of the output
file.
- --reverse-bytes=num
- Reverse the bytes in a section with output contents. A section length must
be evenly divisible by the value given in order for the swap to be able to
take place. Reversing takes place before the interleaving is performed.
This option is used typically in generating ROM images for
problematic target systems. For example, on some target boards, the
32-bit words fetched from 8-bit ROMs are re-assembled in little-endian
byte order regardless of the CPU byte order. Depending on the
programming model, the endianness of the ROM may need to be
modified.
Consider a simple file with a section containing the following
eight bytes: 12345678.
Using --reverse-bytes=2 for the above example, the
bytes in the output file would be ordered
21436587.
Using --reverse-bytes=4 for the above example, the
bytes in the output file would be ordered
43218765.
By using --reverse-bytes=2 for the above example,
followed by --reverse-bytes=4 on the output file, the bytes in
the second output file would be ordered
34127856.
- --srec-len=ival
- Meaningful only for srec output. Set the maximum length of the Srecords
being produced to ival. This length covers both address, data and
crc fields.
- --srec-forceS3
- Meaningful only for srec output. Avoid generation of S1/S2 records,
creating S3-only record format.
- --redefine-sym old=new
- Change the name of a symbol old, to new. This can be useful
when one is trying link two things together for which you have no source,
and there are name collisions.
- --redefine-syms=filename
- Apply --redefine-sym to each symbol pair "old
new" listed in the file filename. filename is
simply a flat file, with one symbol pair per line. Line comments may be
introduced by the hash character. This option may be given more than
once.
- --weaken
- Change all global symbols in the file to be weak. This can be useful when
building an object which will be linked against other objects using the
-R option to the linker. This option is only effective when using
an object file format which supports weak symbols.
- --keep-symbols=filename
- Apply --keep-symbol option to each symbol listed in the file
filename. filename is simply a flat file, with one symbol
name per line. Line comments may be introduced by the hash character. This
option may be given more than once.
- --strip-symbols=filename
- Apply --strip-symbol option to each symbol listed in the file
filename. filename is simply a flat file, with one symbol
name per line. Line comments may be introduced by the hash character. This
option may be given more than once.
- --strip-unneeded-symbols=filename
- Apply --strip-unneeded-symbol option to each symbol listed in the
file filename. filename is simply a flat file, with one
symbol name per line. Line comments may be introduced by the hash
character. This option may be given more than once.
- --keep-global-symbols=filename
- Apply --keep-global-symbol option to each symbol listed in the file
filename. filename is simply a flat file, with one symbol
name per line. Line comments may be introduced by the hash character. This
option may be given more than once.
- --localize-symbols=filename
- Apply --localize-symbol option to each symbol listed in the file
filename. filename is simply a flat file, with one symbol
name per line. Line comments may be introduced by the hash character. This
option may be given more than once.
- --globalize-symbols=filename
- Apply --globalize-symbol option to each symbol listed in the file
filename. filename is simply a flat file, with one symbol
name per line. Line comments may be introduced by the hash character. This
option may be given more than once. Note: this option cannot be used in
conjunction with the -G or --keep-global-symbol
options.
- --weaken-symbols=filename
- Apply --weaken-symbol option to each symbol listed in the file
filename. filename is simply a flat file, with one symbol
name per line. Line comments may be introduced by the hash character. This
option may be given more than once.
- --alt-machine-code=index
- If the output architecture has alternate machine codes, use the
indexth code instead of the default one. This is useful in case a
machine is assigned an official code and the tool-chain adopts the new
code, but other applications still depend on the original code being used.
For ELF based architectures if the index alternative does not exist
then the value is treated as an absolute number to be stored in the
e_machine field of the ELF header.
- --writable-text
- Mark the output text as writable. This option isn't meaningful for all
object file formats.
- --readonly-text
- Make the output text write protected. This option isn't meaningful for all
object file formats.
- --pure
- Mark the output file as demand paged. This option isn't meaningful for all
object file formats.
- --impure
- Mark the output file as impure. This option isn't meaningful for all
object file formats.
- --prefix-symbols=string
- Prefix all symbols in the output file with string.
- --prefix-sections=string
- Prefix all section names in the output file with string.
- --prefix-alloc-sections=string
- Prefix all the names of all allocated sections in the output file with
string.
- --add-gnu-debuglink=path-to-file
- Creates a .gnu_debuglink section which contains a reference to
path-to-file and adds it to the output file. Note: the file at
path-to-file must exist. Part of the process of adding the
.gnu_debuglink section involves embedding a checksum of the contents of
the debug info file into the section.
If the debug info file is built in one location but it is
going to be installed at a later time into a different location then do
not use the path to the installed location. The
--add-gnu-debuglink option will fail because the installed file
does not exist yet. Instead put the debug info file in the current
directory and use the --add-gnu-debuglink option without any
directory components, like this:
objcopy --add-gnu-debuglink=foo.debug
At debug time the debugger will attempt to look for the
separate debug info file in a set of known locations. The exact set of
these locations varies depending upon the distribution being used, but
it typically includes:
i.e., the file pointed to by the --add-gnu-debuglink can be
the full executable. It does not have to be a file created by the
--only-keep-debug switch.
Note---this switch is only intended for use on fully linked files.
It does not make sense to use it on object files where the debugging
information may be incomplete. Besides the gnu_debuglink feature currently
only supports the presence of one filename containing debugging information,
not multiple filenames on a one-per-object-file basis.


Bernie Sanders: Mandatory AR-15 Buybacks are 'Unconstitutional'
During a campaign stop in Charles City, Iowa, Democrat presidential hopeful Bernie Sanders denounced mandatory gun buybacks as “unconstitutional.”
by AWR HawkinsFox News reports Sanders was asked about “mandatory buybacks of AR15s and AK47s,” and he responded:
I don’t support — a mandatory buyback is essentially confiscation, which I think is unconstitutional.  I don’t think that stands up to constitutional scrutiny.
Sanders still voiced support for an “assault weapons” ban at the federal level and observed “we need to greatly expand background checks.”
He also called for an expansion of the list of prohibited firearm purchasers, closure of the so-called “gun show loophole,” and more regulations on straw purchasing.
AWR Hawkins is an award-winning Second Amendment columnist for Breitbart News and the writer/curator of Down Range with AWR Hawkins, a weekly newsletter focused on all things Second Amendment, also for Breitbart News. He is the political analyst for Armed American Radio. Follow him on Twitter: @AWRHawkins. Reach him directly at<EMAIL_ADDRESS>Sign up to get Down Range at breitbart.com/downrange.


Makes the user leave a community.
get(communityId, userId, hl=None)
Retrieves the relationship between a user and a community.
Makes the user join a community.
list(communityId, friendsOnly=None, pageToken=None, hl=None, maxResults=None)
Lists members of a community. Use the pagination tokens to retrieve the full list; do not rely on the member count available in the community profile information to know when to stop iterating, as that count may be approximate.
list_next(previous_request, previous_response)
Retrieves the next page of results.
delete(communityId, userId)
Makes the user leave a community. Args: communityId: integer, ID of the community. (required) userId: string, ID of the user. (required)
get(communityId, userId, hl=None)
Retrieves the relationship between a user and a community. Args: communityId: integer, ID of the community. (required) userId: string, ID of the user. (required) hl: string, Specifies the interface language (host language) of your user interface. Returns: An object of the form: { "communityMembershipStatus": { # Status and permissions of the user related to the community. "status": "A String", # The status of the current link between the community and the user. "isFollowing": True or False, # Whether the user is following this community. "isRestoreAvailable": True or False, # Whether the restore operation is available for the community. "isModerator": True or False, # Whether the session user is a community moderator. "kind": "orkut#communityMembershipStatus", # Kind of this item. Always orkut#communityMembershipStatus. "isCoOwner": True or False, # Whether the session user is a community co-owner. "canCreatePoll": True or False, # Whether the user can create a poll in this community. "canShout": True or False, # Whether the user can perform a shout operation in this community. "isOwner": True or False, # Whether the session user is the community owner. "canCreateTopic": True or False, # Whether the user can create a topic in this community. "isTakebackAvailable": True or False, # Whether the take-back operation is available for the community. }, "person": { # Description of the community member. "name": { # An object that encapsulates the individual components of a person's name. "givenName": "A String", # The given name (first name) of this person. "familyName": "A String", # The family name (last name) of this person. }, "url": "A String", # The person's profile url. This is adapted from Google+ and was originaly introduced as extra OpenSocial convenience fields. "gender": "A String", # The person's gender. Values include "male", "female", and "other". "image": { # The person's profile photo. This is adapted from Google+ and was originaly introduced as extra OpenSocial convenience fields. "url": "A String", # The URL of the person's profile photo. }, "birthday": "A String", # The person's date of birth, represented as YYYY-MM-DD. "id": "A String", # The person's opensocial ID. }, "kind": "orkut#communityMembers", # Kind of this item. Always orkut#communityMembers. }
insert(communityId, userId)
Makes the user join a community. Args: communityId: integer, ID of the community. (required) userId: string, ID of the user. (required) Returns: An object of the form: { "communityMembershipStatus": { # Status and permissions of the user related to the community. "status": "A String", # The status of the current link between the community and the user. "isFollowing": True or False, # Whether the user is following this community. "isRestoreAvailable": True or False, # Whether the restore operation is available for the community. "isModerator": True or False, # Whether the session user is a community moderator. "kind": "orkut#communityMembershipStatus", # Kind of this item. Always orkut#communityMembershipStatus. "isCoOwner": True or False, # Whether the session user is a community co-owner. "canCreatePoll": True or False, # Whether the user can create a poll in this community. "canShout": True or False, # Whether the user can perform a shout operation in this community. "isOwner": True or False, # Whether the session user is the community owner. "canCreateTopic": True or False, # Whether the user can create a topic in this community. "isTakebackAvailable": True or False, # Whether the take-back operation is available for the community. }, "person": { # Description of the community member. "name": { # An object that encapsulates the individual components of a person's name. "givenName": "A String", # The given name (first name) of this person. "familyName": "A String", # The family name (last name) of this person. }, "url": "A String", # The person's profile url. This is adapted from Google+ and was originaly introduced as extra OpenSocial convenience fields. "gender": "A String", # The person's gender. Values include "male", "female", and "other". "image": { # The person's profile photo. This is adapted from Google+ and was originaly introduced as extra OpenSocial convenience fields. "url": "A String", # The URL of the person's profile photo. }, "birthday": "A String", # The person's date of birth, represented as YYYY-MM-DD. "id": "A String", # The person's opensocial ID. }, "kind": "orkut#communityMembers", # Kind of this item. Always orkut#communityMembers. }
list(communityId, friendsOnly=None, pageToken=None, hl=None, maxResults=None)
Lists members of a community. Use the pagination tokens to retrieve the full list; do not rely on the member count available in the community profile information to know when to stop iterating, as that count may be approximate. Args: communityId: integer, The ID of the community whose members will be listed. (required) friendsOnly: boolean, Whether to list only community members who are friends of the user. pageToken: string, A continuation token that allows pagination. hl: string, Specifies the interface language (host language) of your user interface. maxResults: integer, The maximum number of members to include in the response. Returns: An object of the form: { "nextPageToken": "A String", # The value of pageToken query parameter in community_members.list request to get the next page, if there are more to retrieve. "kind": "orkut#communityMembersList", # Kind of this item. Always orkut#communityMembersList. "items": [ # List of community members retrieved. { "communityMembershipStatus": { # Status and permissions of the user related to the community. "status": "A String", # The status of the current link between the community and the user. "isFollowing": True or False, # Whether the user is following this community. "isRestoreAvailable": True or False, # Whether the restore operation is available for the community. "isModerator": True or False, # Whether the session user is a community moderator. "kind": "orkut#communityMembershipStatus", # Kind of this item. Always orkut#communityMembershipStatus. "isCoOwner": True or False, # Whether the session user is a community co-owner. "canCreatePoll": True or False, # Whether the user can create a poll in this community. "canShout": True or False, # Whether the user can perform a shout operation in this community. "isOwner": True or False, # Whether the session user is the community owner. "canCreateTopic": True or False, # Whether the user can create a topic in this community. "isTakebackAvailable": True or False, # Whether the take-back operation is available for the community. }, "person": { # Description of the community member. "name": { # An object that encapsulates the individual components of a person's name. "givenName": "A String", # The given name (first name) of this person. "familyName": "A String", # The family name (last name) of this person. }, "url": "A String", # The person's profile url. This is adapted from Google+ and was originaly introduced as extra OpenSocial convenience fields. "gender": "A String", # The person's gender. Values include "male", "female", and "other". "image": { # The person's profile photo. This is adapted from Google+ and was originaly introduced as extra OpenSocial convenience fields. "url": "A String", # The URL of the person's profile photo. }, "birthday": "A String", # The person's date of birth, represented as YYYY-MM-DD. "id": "A String", # The person's opensocial ID. }, "kind": "orkut#communityMembers", # Kind of this item. Always orkut#communityMembers. }, ], "prevPageToken": "A String", # The value of pageToken query parameter in community_members.list request to get the previous page, if there are more to retrieve. "lastPageToken": "A String", # The value of pageToken query parameter in community_members.list request to get the last page. "firstPageToken": "A String", # The value of pageToken query parameter in community_members.list request to get the first page. }
list_next(previous_request, previous_response)
Retrieves the next page of results. Args: previous_request: The request for the previous page. (required) previous_response: The response from the request for the previous page. (required) Returns: A request object that you can call 'execute()' on to request the next page. Returns None if there are no more items in the collection.


Try to answer the following code related questions within the time limit. Keep in mind that incorrect answers will penalize your score time by ten seconds
Your Final Score is:


With DeepTeach, you can interactively build an image classifier by teaching the model what you're looking for! It uses deep learning, transfer learning and similarity serach. Check out the Transfer Learning on Images with Tensorflow MLDB demo for more details.


Object Oriented Programming Concepts
- Interface
-
a contract that specifies the functionalities/capabilities a class should provide
- Encapsulation
-
hiding the implementation detail
- Abstraction
-
reduce complexity by hiding unnecessary details (e.g. expose only one method and making others private). Promotes less coupling.
- Inheritance
-
a mechanism for reusing code by creating 'is-a' relationship between parent/super and child/sub classes. Promotes DRY
- Polymorphism
-
Poly means 'many', morph means 'form'. Hence, it is the ability of an object to take many forms
UML: Unified Modelling Language - official language to model our system to represent classes and their relationships.
-
Inheritance relationship (line with an unfilled rectangle) [source] public class Rectangle extends Shape {}
-
Composition relationship (arrow with a filled diamond)
public class Shape {
// Shape class is composed of a Size class
private Size size;
}
-
Aggregation relationship (arrow with an empty diamond)
-
Dependency relationship (dashed arrow)
public class Shape { // Shape class depends on the Document class public void render(Document doc) {} }
|
Aggergation vs Composition
|
Design Patterns
Design patterns are general solutions to OO problems. It is an approach to thinking about software design that incorporate the experience of developers who have had similar problems.
-
Not reinventing the wheel
-
Building resilient code that can withstand change
-
Prepare for future additions and change
-
Serves as shared vocabularies
-
Patterns allow you to say more with less
-
Talking at the pattern level allows you to stay 'in the design' longer
-
Shared vocabularies can turbo-charge your development team - go faster and less misunderstanding
-
Shared vocabularies encourage more junior developers to get up to speed.
-
Design Principles vs Design Patterns
- Design Principles
-
general guidelines on how to develop quality software. E.g. 'Encapsulate what varies'
- Design Patterns
-
specific design solutions often named at solving common OO problems. E.g. The Strategy pattern, the Iterator pattern, the Factory pattern
Problems with inheritance
-
Because we are overriding a lot of methods, we are not getting the benefits of inheritance like code reuse
-
We have code duplicated across classes like no flying and quacking overriding
-
It is hard to get the whole knowledge about ducks by looking at the super class
-
Changes can lead to unintended side effects
-
All behaviour is assigned at compile time. Hence, runtime behaviour change is difficult
-
Inheritance is powerful but it can lead to inflexible and fragile designs.
Interfaces for the rescue?
-
An interface defines the methods an object must have inorder to be considered a particular type
-
Interfaces allow different classes to share similarities. Not all classes need to have the same behavior, though.
-
It destroys code reuse - every duck will implement its own fly() and quack() method
-
Hence, maintenance becomes a nightmare
-
It doesn’t allow for runtime changes in behaviour
Design Principle - Encapsulate what Varies. If some aspect of your code is changing, that's a strong indication that you need to pull out those parts that are changing and to separate them from the rest of your code.  This principle is fundamental to almost every design pattern.
Design Principle - Program to an interface, not an implementation Clients remain unaware of the specific types of objects they use, as long as the objects adhere to the interface that clients expect. e.g. [source] Duck duck = new MallardDuck();
Strategy Pattern
- Type
-
Behavioural
- Definition
-
The Strategy Pattern defines a family of algorithms, encapsulates each one, and makes them interchangeable. This lets the algorithm vary independently from clients that use it.
Design Principle - Favor Composition over Inheritance Instead of inheriting behavior, composition delegates the behavior to the composed object. Leads to a more flexible and extensible design. Allows for changing the behavior during runtime.
Adapter Pattern
- Type
-
Structural
- Definition
-
The Adapter Pattern converts the interface of a class into another interface clients expect. It allows classes to work together that couldn’t otherwise because of incompatible interfaces.
-
The client is composed with the adapter class, and the Adapter is composed with the adaptee.
-
The adapter sits between the client and the adaptee.
-
The adapter delegates calls to the adaptee, and returns any needed value.
-
The advantage of the Adapter Pattern is you can add an adapter easily without having to modify the adaptee at all, and only modify the client to add the adapter.
-
Useful when working with Vendor classes which we can’t modify.
Design Principle - Loose Coupling The observer pattern exemplifies the design principle of loose coupling. Loosly coupled objects are objects that interact but donot know much about each other. Helps us to minimize complexity of a scenario.
-
The Subject/Publisher owns the copy of the data which makes the design cleaner than many objects owning the data.
-
The Dependents/Subscribers/Observers gets notified when the data changes in the Subject/Publisher.
Observer pattern
- Type
-
Behavioral
- Definition
-
This pattern defines a one-to-many dependency between objects so that when one object changes state, all of its dependents are notified and updated automatically.
Design Principle - The Open-Closed Principle Classes should be open for extension but closed for modification. Ensures flexibility, maintainability and robustness because we can add new behavior without the risk of introducing bug in the existing code. Whenever you want to add a functionality, you should create new classes and test those. Instead of changing existing code.
Decorator Pattern
- Type
-
Structural
- Definition
-
This pattern attaches additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for extending functionality.
Decorator pattern uses Composition in a different way than Strategy pattern.
-
Powerful, but it can lead to inflexible designs
-
All classes inherit the same behavior
-
We can still 'inherit' behavior by composing objects
-
We can make dynamic runtime decisions
-
We can add new behavior without altering existing code
-
We can include behaviors not considered by the creator
-
The end result often proves fewer bugs and side effects, and flexible designs.
By using composition, we get flexibility in how we add capabilities (e.g. condiments) to our components (e.g. beverages). By using inheritance (a common beverage super type), we get the type structure we need to treat sub classes as the super class (treat coffees and decorated coffees both as beverages. So, we can decorate beverages multiple times and call get description and cost on basic coffees or decorated coffees.
Iterator Pattern
- Type
-
Behavioural
- Definition
-
This pattern provides a way to access the elements of an aggregate object sequentially without exposing its underlying representation.
Aggregate objects collect Objects. E.g. Arrays, Java Collection classes like ArrayList, List, Set, Map, Dictionary
-
Ask the object for its iterator
-
Use the iterator to iterate through the items in the aggregate.
-
Iteration code now works with any kind of aggregate object.
-
Java offers a built-in iterator interface, Java.util.iterator.
-
The java.util.iterator interface acts both as an interface that your own iterator classes can implement as well as the type of the Java collection classes built-in iterators.
-
Classes like ArrayList, Vector and LinkedList all have an iterator method that returns a ready built iterator with a type java.util.iterator.
-
Java arrays don’t have built-in iterators.
-
Java’s enhanced for statement - used for Collections and arrays
for (Animal a: animals) { a.makeSound() }
-
Python’s for/in statement - used for string, list and tuple
for i in range(1,10): print(i)
-
JavaScript’s for/of statement - used in string, array, map, set
for (let value of aggregate) { console.log(value) }
Design Principle - Single Responsibility Principle (SRP) Definition:: A class should have only one reason to change. Example:: Think of a restaurant. Every person has a specific role. The waiter is responsible for taking orders only. They don't cook for you. Imagine a restaurant where the waiter takes your order, cooks for you, goes shopping and does the taxes. This is unmanageable. Adhering to this principle minimizes the chances that a class is going to need to change in the future. One thing to remember about giving responsibilities to a class, is that for every additional responsibility, a class has another reason it might have to change in the future. So by giving a class multiple responsibilities we give the class more than one reason it might have to change.
Factory Method Pattern
- Type
-
Creational
- Definition
-
The Factory Method pattern defines an interface for creating an object, but lets subsclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.
Simple Factory Pattern
When we see code like the above, we know that if requirements change, and we want to add new duck types, we’re going to have to open up this code and change it and that violates the open closed principle. We might also end up writing this same code in several places in this application, making the situation even worse.
Simple Factory pattern allows us to decouple the process of creating objects from the clients that use those objects.
Factory Method
Applying patterns
-
Design patterns can be powerful.
-
Don’t think of patterns as a magic bullet. Patterns aren’t the solution to every problem. Once you’ve found a pattern that appears to be a good match, make sure it has a set of consequences you can live with and study its effects on the rest of your design. Use patterns when you have a practical need to support change in a design today.
-
KISS
-
Remember, always solve things in the simplest way you can. Other developers will appreciate and admire the simplicity of your design.
-
-
Design principles and patterns give us some useful tools that help us create software that is truly more flexible and resilient to change.
-
Refactoring time is pattern time.
-
If you don’t need to use a pattern now, don’t use it now. Otherwise, you end up with 'Design smell' in your project i.e. overly complicated design.
Simplicity is the Ultimate Sophestication
Memento pattern
- Type
-
Behavioural
- Purpose
-
Without violating encapsulation, capture and externalise an object’s internal state so that it cn be restored to this state later.
Figure 19. Pattern UMLFigure 20. Pattern Example
State Pattern
- Type
-
Behavioural
- Definition
-
Allow an object to alter its behavior when its internal state changes. The object will appear to change its class.


AceQuiz
Create Questions
View Questions
Edit Questions
Delete Questions
Click me! To view availbale Questions
To edit question: