This document provides information on water therapy and its benefits according to Dr. Mahmoud Hussain Ibn Sina Company. It claims that drinking 1.5 liters of water per day can cure diseases like constipation, acidity, diabetes, cancer, pulmonary tuberculosis, blood pressure, and more. The therapy procedure involves drinking 1.5 liters of water first thing in the morning on an empty stomach. It states that certain diseases like constipation and acidity can be cured within 1-2 days, while others like diabetes, cancer and pulmonary tuberculosis take weeks or months.
A short story is told without using any words. Visual storytelling is used to convey a narrative through images alone. The lack of words allows the viewer to interpret the story and derive their own meaning from the events depicted in the images.
Evolving a strategy for Emerging and startup companiesguest716604
The document discusses seven strategies for startups and emerging companies presented by Navyug Mohnot, CEO of QAI, at the Nasscom EmergeOut Conclave 2008. The strategies include: 1) Thinking through the business model and stakeholders. 2) Setting bold goals. 3) Recognizing that people are the most important resource. 4) Building a brand from the start. 5) Executing plans thoroughly. 6) Constantly reinventing and redefining. 7) Failing fast to learn. The document also provides background on QAI and its global consulting experience.
Jack London (1876-1916) was an American novelist best known for his adventure novels including Call of the Wild and The Sea Wolf. He had a life of adventure himself, working various jobs including on fishing boats and sailing ships as a young man. He participated in the Klondike Gold Rush in an effort to support his family after his stepfather died. He went on to become a successful writer, publishing over 50 novels and articles, though he struggled financially at times. He was married twice and had three children total. He advocated for socialist ideas and writing what you have directly experienced.
Cascao Hydropolitics Twm Mena 2008(2 November)Ana Cascao
The document discusses hydropolitics in the Middle East and North Africa region. It provides an overview of transboundary water resources like rivers, lakes and aquifers across North Africa and the Middle East. It then covers three main topics: the linkages between water and politics; how international water law has been applied in the region; and approaches to resolving conflicts and promoting cooperation over shared water resources. The document includes exercises for participants to assess power relations between riparian states and discuss cases like the Nile Basin.
This document provides information on water therapy and its benefits according to Dr. Mahmoud Hussain Ibn Sina Company. It claims that drinking 1.5 liters of water per day can cure diseases like constipation, acidity, diabetes, cancer, pulmonary tuberculosis, blood pressure, and more. The therapy procedure involves drinking 1.5 liters of water first thing in the morning on an empty stomach. It states that certain diseases like constipation and acidity can be cured within 1-2 days, while others like diabetes, cancer and pulmonary tuberculosis take weeks or months.
A short story is told without using any words. Visual storytelling is used to convey a narrative through images alone. The lack of words allows the viewer to interpret the story and derive their own meaning from the events depicted in the images.
Evolving a strategy for Emerging and startup companiesguest716604
The document discusses seven strategies for startups and emerging companies presented by Navyug Mohnot, CEO of QAI, at the Nasscom EmergeOut Conclave 2008. The strategies include: 1) Thinking through the business model and stakeholders. 2) Setting bold goals. 3) Recognizing that people are the most important resource. 4) Building a brand from the start. 5) Executing plans thoroughly. 6) Constantly reinventing and redefining. 7) Failing fast to learn. The document also provides background on QAI and its global consulting experience.
Jack London (1876-1916) was an American novelist best known for his adventure novels including Call of the Wild and The Sea Wolf. He had a life of adventure himself, working various jobs including on fishing boats and sailing ships as a young man. He participated in the Klondike Gold Rush in an effort to support his family after his stepfather died. He went on to become a successful writer, publishing over 50 novels and articles, though he struggled financially at times. He was married twice and had three children total. He advocated for socialist ideas and writing what you have directly experienced.
Cascao Hydropolitics Twm Mena 2008(2 November)Ana Cascao
The document discusses hydropolitics in the Middle East and North Africa region. It provides an overview of transboundary water resources like rivers, lakes and aquifers across North Africa and the Middle East. It then covers three main topics: the linkages between water and politics; how international water law has been applied in the region; and approaches to resolving conflicts and promoting cooperation over shared water resources. The document includes exercises for participants to assess power relations between riparian states and discuss cases like the Nile Basin.
This document offers life lessons on paying attention to life's surprises and warning signs, having courage to pursue goals without letting vices or confusion rule one's life, not humiliating the weak, and trusting one's heart to find happiness without fear.
AEGIS Conference of African Studies 2011 - Uppsala [Land grabbing in Gambella...Ana Cascao
The document discusses land investments and 'land grabbing' in Gambella, Ethiopia. It notes that over 1 million hectares of land, nearly a quarter of Gambella's farmland, has been leased to 896 companies since 2009 for agricultural development. Two major projects, Saudi Star and Karuturi, have been given large tracts of land for rice, palm oil, and other crop production. However, there are concerns about the environmental and social impacts of these large-scale land investments, including increasing deforestation and pressure on water resources as well as impacts on communities' access to land and water. The document questions whether there will be sufficient land and water available for all uses and users in Gambella amid
The document discusses how money cannot buy important things like a home, sleep, time, knowledge, appetite, respect, life, health, love, or safety. It claims money is not everything and offers to take away the reader's pain and suffering if they send all their money, though this is clearly a scam as it only requests cash and claims the reader will never find a truer friend.
The document discusses the many health benefits of bananas. It states that bananas provide quick energy from their natural sugars and fiber. They are high in vitamins, minerals, protein and carbohydrates. Bananas can help cure or prevent conditions like depression, anemia, strokes, stress, ulcers, mosquito bites, constipation, and hangovers due to their nutritional content. The document also claims bananas can help with warts, morning sickness, PMS, blood pressure, temperature regulation, and smoking cessation. It suggests bananas may be the reason monkeys are so happy and concludes that eating a banana a day can keep the doctor away.
A young boy donated all the coins from his bowl and money from his pocket to a charity institute. Moved by his generosity from such a young child, onlookers were left speechless. Wise sayings note that acts of generosity not only help others but also make oneself happier, and true happiness can be found through giving.
This document provides an overview of the company Lanyrd.com and its journey as an startup. It discusses how Lanyrd started as an accidental project on Twitter, launched as a private beta, and grew its community. It covers Lanyrd applying to and being accepted by Y Combinator, its demo day presentation, and raising $1.4 million in investment. The document offers tips and lessons learned around launching products, building communities, dealing with bugs, fundraising, and the challenges of running a startup.
Las frases célebres son expresiones breves pero significativas que han trascendido en el tiempo y que forman parte de la cultura popular. Algunas de las frases más conocidas son "Conócete a ti mismo" de Sócrates, "Ser o no ser" de Shakespeare y "Lo imposible solo lleva un poco más de tiempo" de Lewis Carroll. Estas frases suelen encapsular grandes ideas de manera concisa y memorable.
Cascao Greece Ambiguity Law Nile Basin AgreementAna Cascao
The document discusses ambiguity in transboundary river basin agreements and negotiations, using the Nile River Basin as a case study. It notes that ambiguity can both increase flexibility in negotiations but also lead to divergent interpretations later. Specifically in the Nile River Basin, older agreements between upstream and downstream states led to a legal deadlock, and the 2007 Cooperative Framework Agreement sought to resolve this through ambiguous language around water security that allowed an illusion of consensus without changing the status quo.
This document is a pre-course evaluation for a marketing management course. It outlines the learning objectives, which include assessing current marketing plans, understanding target markets, and creating a value proposition. It also details the marketing process and various modules that will be covered, including research, positioning, marketing mix, implementation and controls. The goal is to help participants attract and retain customers through effective marketing strategies.
The document introduces several individuals - Archy, Jo Jo Jorge Falcon, Gabriel from Chiapas, and Allan. It states that together they are eternally romantic and provides a website for more information.
Connie Duque has over 15 years of experience in marketing and product management. She has worked for several companies in roles such as Product Development Manager, Brand Manager, and Marketing Manager. Notable accomplishments include developing a new category of water filtration products that generated $20 million in revenue, expanding product lines, and centralizing brand messaging. In her spare time, she enjoys yoga, pilates, and running.
The document provides background on the speaker and discusses the science of stress and techniques for managing it, including through yoga, pranayama (breathing exercises), and meditation. It explains that stress is a mind-body reaction that can negatively impact physical and mental health. Regular practice of yoga, pranayama and meditation can help manage stress by regulating physiological and emotional responses, reducing stress hormones, and promoting relaxation.
Equips cibernètics, realitat o ficció? (Jornada TIC UPC 2017)Alex Muntada Duran
La proliferació d'agents intel·ligents, també coneguts com "bots", en diferents plataformes digitals posa damunt la taula la possibilitat que aquests esdevinguin un membre més de l'equip, amb responsabilitats i amb competència per dur a terme determinades tasques de forma autònoma i aportant feedback.
My talk about REST in Barcelona Software Craftsmanship Meetup on May 19, 2014.
http://www.meetup.com/Barcelona-Software-Craftsmanship/events/173793192/
This document offers life lessons on paying attention to life's surprises and warning signs, having courage to pursue goals without letting vices or confusion rule one's life, not humiliating the weak, and trusting one's heart to find happiness without fear.
AEGIS Conference of African Studies 2011 - Uppsala [Land grabbing in Gambella...Ana Cascao
The document discusses land investments and 'land grabbing' in Gambella, Ethiopia. It notes that over 1 million hectares of land, nearly a quarter of Gambella's farmland, has been leased to 896 companies since 2009 for agricultural development. Two major projects, Saudi Star and Karuturi, have been given large tracts of land for rice, palm oil, and other crop production. However, there are concerns about the environmental and social impacts of these large-scale land investments, including increasing deforestation and pressure on water resources as well as impacts on communities' access to land and water. The document questions whether there will be sufficient land and water available for all uses and users in Gambella amid
The document discusses how money cannot buy important things like a home, sleep, time, knowledge, appetite, respect, life, health, love, or safety. It claims money is not everything and offers to take away the reader's pain and suffering if they send all their money, though this is clearly a scam as it only requests cash and claims the reader will never find a truer friend.
The document discusses the many health benefits of bananas. It states that bananas provide quick energy from their natural sugars and fiber. They are high in vitamins, minerals, protein and carbohydrates. Bananas can help cure or prevent conditions like depression, anemia, strokes, stress, ulcers, mosquito bites, constipation, and hangovers due to their nutritional content. The document also claims bananas can help with warts, morning sickness, PMS, blood pressure, temperature regulation, and smoking cessation. It suggests bananas may be the reason monkeys are so happy and concludes that eating a banana a day can keep the doctor away.
A young boy donated all the coins from his bowl and money from his pocket to a charity institute. Moved by his generosity from such a young child, onlookers were left speechless. Wise sayings note that acts of generosity not only help others but also make oneself happier, and true happiness can be found through giving.
This document provides an overview of the company Lanyrd.com and its journey as an startup. It discusses how Lanyrd started as an accidental project on Twitter, launched as a private beta, and grew its community. It covers Lanyrd applying to and being accepted by Y Combinator, its demo day presentation, and raising $1.4 million in investment. The document offers tips and lessons learned around launching products, building communities, dealing with bugs, fundraising, and the challenges of running a startup.
Las frases célebres son expresiones breves pero significativas que han trascendido en el tiempo y que forman parte de la cultura popular. Algunas de las frases más conocidas son "Conócete a ti mismo" de Sócrates, "Ser o no ser" de Shakespeare y "Lo imposible solo lleva un poco más de tiempo" de Lewis Carroll. Estas frases suelen encapsular grandes ideas de manera concisa y memorable.
Cascao Greece Ambiguity Law Nile Basin AgreementAna Cascao
The document discusses ambiguity in transboundary river basin agreements and negotiations, using the Nile River Basin as a case study. It notes that ambiguity can both increase flexibility in negotiations but also lead to divergent interpretations later. Specifically in the Nile River Basin, older agreements between upstream and downstream states led to a legal deadlock, and the 2007 Cooperative Framework Agreement sought to resolve this through ambiguous language around water security that allowed an illusion of consensus without changing the status quo.
This document is a pre-course evaluation for a marketing management course. It outlines the learning objectives, which include assessing current marketing plans, understanding target markets, and creating a value proposition. It also details the marketing process and various modules that will be covered, including research, positioning, marketing mix, implementation and controls. The goal is to help participants attract and retain customers through effective marketing strategies.
The document introduces several individuals - Archy, Jo Jo Jorge Falcon, Gabriel from Chiapas, and Allan. It states that together they are eternally romantic and provides a website for more information.
Connie Duque has over 15 years of experience in marketing and product management. She has worked for several companies in roles such as Product Development Manager, Brand Manager, and Marketing Manager. Notable accomplishments include developing a new category of water filtration products that generated $20 million in revenue, expanding product lines, and centralizing brand messaging. In her spare time, she enjoys yoga, pilates, and running.
The document provides background on the speaker and discusses the science of stress and techniques for managing it, including through yoga, pranayama (breathing exercises), and meditation. It explains that stress is a mind-body reaction that can negatively impact physical and mental health. Regular practice of yoga, pranayama and meditation can help manage stress by regulating physiological and emotional responses, reducing stress hormones, and promoting relaxation.
Equips cibernètics, realitat o ficció? (Jornada TIC UPC 2017)Alex Muntada Duran
La proliferació d'agents intel·ligents, també coneguts com "bots", en diferents plataformes digitals posa damunt la taula la possibilitat que aquests esdevinguin un membre més de l'equip, amb responsabilitats i amb competència per dur a terme determinades tasques de forma autònoma i aportant feedback.
My talk about REST in Barcelona Software Craftsmanship Meetup on May 19, 2014.
http://www.meetup.com/Barcelona-Software-Craftsmanship/events/173793192/
This document provides an overview of key Perl concepts including scalars, arrays, hashes, I/O, operators, and control structures. It discusses scalar data types like strings and numbers. It also covers arrays, hashes, and common functions for each. The document outlines I/O with the console, files, and handles. It briefly summarizes operators and precedence. Finally, it discusses control structures like if/else, loops, and modifiers.
This document provides an introduction to the Perl programming language. It discusses the history and creation of Perl in 1987 by Larry Wall. It also covers the differences between Perl 5 and Perl 6, and provides information about Barcelona.pm which is a local Perl user group that teaches Perl courses on topics like data and operators, data structures, files and directories, regular expressions, and object-oriented programming. Wi-Fi connection details are also listed for attending their events.
This document summarizes tools for modern Perl development including App::perlbrew for managing multiple Perl installations, App::cpanminus for installing modules, and Dist::Zilla for building and releasing distributions. It provides instructions for installing each tool and using them to install Perls, modules, and develop and release distributions.
This document discusses various methods for packaging and testing Perl modules for Ubuntu, including the classic Perl way, the quick cpan way, and the Debian/Ubuntu way using dh-make-perl. It also covers creating a Personal Package Archive (PPA) on Launchpad to distribute packages and use bzr-buildpackage for version control. Testing with pbuilder is recommended to build packages in a clean, controlled environment.
1. Programació OO en Perl
Curs d'introducció a Perl 2011
Barcelona Perl Mongers
Alex Muntada <alexm@alexm.org>
Moose
El sistema d'objectes de Perl 5
Simple, bàsic, esquelètic, flexible.
Ofereix poca ajuda per a la programació orientada a objectes.
Moose
Moose és un sistema d'objectes complet i
potent
Està construït al damunt del sistema d'objectes de Perl 5.
Pren característiques d'altres llenguatges com Smalltalk, Common Lisp i
Perl 6.
Moose és la millor manera de programar objectes en Perl 5 modern.
Classes
En Perl 5 clàssic una classe és un paquet (o mòdul) de Perl dins un fitxer:
Cat.pm
package Cat;
use Moose;
1;
1 de 11
2. Classes
En Perl 5 modern és el mateix però amb una sintaxi alternativa que permet
crear un context més específic que el del fitxer.
Això ens interessa en cas que vulguem posar més d'una classe dins el mateix
fitxer.
{
package Cat;
use Moose;
}
Mètodes
use Cat;
my $brad = Cat->new();
my $jack = Cat->new();
Mètodes
use Cat;
Cat->meow();
my $alarm = Cat->new();
$alarm->meow();
Mètodes
{
package Cat;
use Moose;
sub meow
{
my $self = shift;
say "Meow!";
2 de 11
3. }
}
Atributs
{
package Cat;
use Moose;
has 'name' => (
is => 'ro',
isa => 'Str',
);
has( 'age', is, 'ro' );
has 'diet', is => 'rw';
}
Atributs
use Cat;
my $fat = Cat->new( name => 'Fatty', age => 8, diet => 'Sea Treats' );
say $fat->name(), ' eats ', $fat->diet();
$fat->diet( 'Low Sodium Kitty Lo Mein' );
say $fat->name(), ' now eats ', $fat->diet();
Encapsulament
{
package Cat;
use Moose;
has 'name', is => 'ro', isa => 'Str';
has 'diet', is => 'rw';
has 'birth_year', is => 'ro', isa => 'Int',
default => sub { (localtime)[5] + 1900 };
3 de 11
4. Encapsulament
sub age
{
my $self = shift;
my $year = (localtime)[5] + 1900;
return $year - $self->birth_year();
}
}
Polimorfisme
sub show_vital_stats
{
my $object = shift;
say 'My name is ', $object->name();
say 'I am ', $object->age();
say 'I eat ', $object->diet();
}
Polimorfisme
Duck Typing
Si quelcom fa quack() és que és un ànec.
Polimorfisme
# how old is the cat?
my $years = $zeppie->age();
# store the cheese in the warehouse for six months
$cheese->age();
Rols
{
4 de 11
5. package LivingBeing;
use Moose::Role;
requires qw( name age diet );
}
Rols
{
package Cat;
use Moose;
has 'name', is => 'ro', isa => 'Str';
has 'diet', is => 'rw', isa => 'Str';
has 'birth_year', is => 'ro', isa => 'Int',
default => (localtime)[5] + 1900;
with 'LivingBeing';
sub age { ... }
}
Rols
{
package Cat;
use Moose;
has 'name', is => 'ro', isa => 'Str';
has 'diet', is => 'rw';
with 'LivingBeing', 'CalculateAge::From::BirthYear';
}
Rols
use Cat;
my $kitten = Cat->new( name => 'Kitty', diet => 'fish' );
say 'This Cat is alive!'
5 de 11
6. if $kitten->DOES( 'LivingBeing' );
Herència
{
package LightSource;
use Moose;
has 'candle_power', is => 'ro', isa => 'Int',
default => 1;
has 'enabled', is => 'ro', isa => 'Bool',
default => 0, writer => '_set_enabled';
Herència
sub light
{
my $self = shift;
$self->_set_enabled(1);
}
sub extinguish
{
my $self = shift;
$self->_set_enabled(0);
}
}
Herència
{
package LightSource::SuperCandle;
use Moose;
extends 'LightSource';
has '+candle_power', default => 100;
}
6 de 11
7. Herència
{
package LightSource::Glowstick;
use Moose;
extends 'LightSource';
sub extinguish { }
}
Herència
{
package LightSource::Cranky;
use Carp;
use Moose;
extends 'LightSource';
Herència
override light => sub
{
my $self = shift;
Carp::carp( "Can't light a lit light source!" )
if $self->enabled;
super();
};
Herència
override extinguish => sub
{
my $self = shift;
Carp::carp( "Can't extinguish an unlit light source!" )
unless $self->enabled;
7 de 11
8. super();
};
}
Herència
say 'Looks like a LightSource'
if $sconce->isa( 'LightSource' );
say 'Monkeys do not glow'
unless $chimpy->isa( 'LightSource' );
Moose i OO en Perl 5
my $metaclass = Monkey::Pants->meta();
say 'Monkey::Pants instances have the attributes:';
say $_->name for $metaclass->get_all_attributes;
say 'Monkey::Pants instances support the methods:';
say $_->fully_qualified_name for $metaclass->get_all_methods;
# You can even see which classes extend a given class
my $metaclass = Monkey->meta();
say 'Monkey is the superclass of:';
say $_ for $metaclass->subclasses;
Referències d'objectes
{
package Player;
sub new
{
my ($class, %attrs) = @_;
return bless %attrs, $class;
}
}
8 de 11
9. Referències d'objectes
my $joel = Player->new(
number => 10,
position => 'center',
);
my $jerryd = Player->new(
number => 4,
position => 'guard',
);
Referències d'objectes
sub format
{
my $self = shift;
return '#' . $self->{'number'} . ' plays ' . $self->{'position'};
}
sub number { return shift->{'number'} }
sub position { return shift->{'position'} }
Cerca de mètodes i herència
package InjuredPlayer;
use parent qw( Player Hospital::Patient );
use mro 'c3';
AUTOLOAD
{
package Foobar;
sub AUTOLOAD
{
our $AUTOLOAD;
9 de 11
10. my ($name) = $AUTOLOAD =~ /::(w+)$/;
# pretty-print the arguments
local $" = ', ';
say "In AUTOLOAD(@_) for $name!"
}
}
Sobrecàrrega de mètodes
sub overridden
{
my $self = shift;
return $self->SUPER::overridden( @_ );
}
Reflexió
say "$pkg exists" if eval { $pkg->can( 'can' ) };
sub module_loaded
{
ny $modname = shift;
$modname =~ s!::!/!g;
return exists $INC{ $modname . '.pm' };
}
say "$func() exists" if $pkg->can( $func );
Conceptes avançats
Afavoriu la composició abans que l'herència.
Principi de responsabilitat única: una classe no ha de fer més feina
de la que li correpon (Empleat sap d'empleats no de nòmines).
DRY: Don¿t Repeat Yourself.
Principi de substitució de Liskov: accepteu generalitzacions però
10 de 11
11. sigueu específics en el que retorneu.
Subtipus i coercions.
Immutabilitat: proveu a fer els vostres objectes no modificables.
Gràcies
Preguntes? Dubtes? Comentaris? Idees?
11 de 11