Double Olympic medalist Paddy Barnes hangs up his gloves
The Holy Family BC fighter secured bronze at the 2008 and 2012 Games.
by Sean FarrellBELFAST BOXER PADDY Barnes, who claimed Olympic bronze medals in 2008 and 2012, has announced his retirement from the sport.
The 32-year-old represented Ireland at a third Olympic Games in 2016, carrying out the flag in Rio before turning professional later that year.
As a pro, he forced a decision victory against Silviu Oiteanu to claim the vacant WBO European flyweight title at the Waterfront Hall in Belfast. In 2018 he fought Cristofer Rosales at Windsor Park for the WBC flyweight title, but suffered a fourth-round defeat.
His last fight was a fourth-round loss to jay Harris in Belfast’s Union Hall last month.
“I have loved every minute of boxing, it has been my life for the past 21 years,” Barnes said in a statement on Twitter.
“I have achieved my dream of becoming an Olympian and getting to carry the Irish flag at the Olympic Games opening ceremony. Those moments were the proudest of my career.
Professional boxing was never a dream of mine but I tried and threw myself into the deep end straight away. It didn’t work out but I wouldn’t have it any other way.
“I’d like to thank my family for supporting me throughout my entire career, my wife Mari for keeping my feet firmly on the ground and helping me towards my goals.
“I want to thank my parents Jimmy Linden, Gerry Storey, Seamy McCann and everyone at the Holy Family boxing club.”
It is his exploits as an amateur that will remain Barnes’ lasting legacy. His runs to the semi-final stage of Olympic competition in both 2008 and 2012 were halted by China’s Zou Shiming, who went on to claim gold on both occasions.


My Schedule
This is displayed on the left side of the home page and indicates the services which you are
scheduled for. If you hover the cursor over a given date, the roles you are scheduled for will be
displayed as well as the practice schedule.
Clicking on a service will direct you to the Worship Service
page displaying all details of that
service.


Robert Lundberg
<EMAIL_ADDRESS>612-720-6550
Ft. Hood, Killeen Texas
Experience
US Army
Intelligence Analyst (35F)
2013-present
Duties and skills:
- Create daily "read-books" for the international intellgience community
- Present up-to-date information to high-ranking officials
- Work in groups to ensure accurate information transfer
- Monitor current events hourly
- Determine significance and reliability of incoming information
- Display maps, graphs, charts, and other information in intelligence documents
Education
US Army Advanced Individual Training
2014-2015
Courses and training:
- Computer systems training
- Security clearance courses and cerificiation
- Critical thinking and analyst strategies
- Group work and collaboration
- Weapons and close combat training
- Medical training (Combat Life Saving)
Shakopee High School
2011-2014
Skills
- Microsoft Office
- Keyword search strategy
- Military protocols
- Presenting
- Leadership


❌
The average data science team takes 15 months to complete one project (and that's if everything goes right the first time).
❌
A 10-person team consisting of 2-3 data engineers, 2-3 data scientists, a project manager, DevOps, IT, etc with an average salary of $124,000 per person... Carries an annually recuring cost of $1,240,000.
❌
According to Venture Beat, 87% of data science projects never make it into production.


Procart app is decentralized system for customers who wants to buy some products such as Phones, Clothes, Groceries from local store with beneficial of using Ethereum technology.Due to which both consumer and seller get advantages of Ethereum payment portal hence it run without any downtime, fraud, control or interference from a third party.
We will provide the fastest home delivery service at zero cost.
Completely decentralized service making it affordable to customers as well as better price for seller.
Get 5 Star products and Services from our website.


| Product | Price | Quantity | Total | |
|---|---|---|---|---|
|
|
Men Tshirt | $36.00 |
|
$36.00 |
|
|
Mug Adventure | $16.00 |
|
$16.00 |
There are no shipping methods available. Please double check your address, or contact us if you need any help.
Calculate Shipping


albedo surface soil climate biocrust community change cover dryland treatments global changes forcing radiative {border-style Fig. effects px;} #ffffff;} roughness warming cyanobacteria energy biocrusts composition effect moisture large measurements affect data Belnap Biological Information Supplementary altered land (i.e., Science Soil ecosystems feedbacks future impact negative potential similar species treatment watering Albedo Clim. Thus, drylands model moss px; shift study {font-family Chang. communities cyanobacterial desert font-size impacts increased lichen plot precipitation water Climate Geophys. Nat. Res. Sci. USA albedo. carbon chain change. crusts double; ecosystem feedback field plots roughness, temperature total used using variation Change Colorado Drylands Ecol. Environ. SEM University aided albedo, arid balance border-color border-width disturbances estimate explained late-successional linear linked loss magnitude measured method mortality multiple rapid reflectance regression results semi-arid semiarid shifts solid; states suggest surfaces values {font-style {font-weight = ., cm (-.). (Springer (eds (see Biol. Ecosystems However, Lange Painter Reed S). Surface [], alter ambient anthropogenic atmosphere average balance. biological bold calculated cold collectively content courier; cyanobacteria-dominated degradation direct directly dominant dramatically ecosystems, em; emissions equation estimated historical increase key larger mean mosses observed pt;} rainfall role significant spectral state statistical structural substantial successional suggests use variability vegetation work


If you are brand new to the world of coding and web development, it makes sense to start by teaching yourself using all the free coding resources online.
We offer you a fun and unique way to learn coding with a fast-learning program we are based on challenges using our internal customs tests. Complete them to earn progress to higher ranks.
Programming today is a race between software engineers striving to build bigger and better bullet-proof programs, and we are trying to produce bigger and better beings. ...
Program evaluation is a valuable tool for program managers who are seeking to strengthen the quality of their programs and improve outcomes for the children and youth they serve.
Improve program design and implementation. It is important to periodically assess and adapt your activities to ensure they are as effective as they can be.
Our team includes people who specialize in IT development and product development services who have the experience and knowledge to understand what our clients need.
We focuses on recruit high skilled engineers with knowledge and experience from all around the world, providing qualify candidates who are ready to create innovating solutions for businesses.
Due to our understanding of technologies, our recruiters not only provide candidates to companies but also consulting on how to structure teams to create a flexible working environment between Japanese and foreigner engineers.
Motivo provides a full relocating package support for candidates who are coming from abroad, taking care from their VISAS support, allocation, life setup and incorporate themselves into Japanese culture and community.
HTML forms are required when you want to collect some data from person who visits your website.For example, when you register/login for application like Uber, Netflix or facebook, you enter information like Name, Email, Password through HTML forms.
The question that you or your teammate would ask after the product manager posts a snapshot of the bug.Whole event feels like Deja Vu...
There are many online courses about data science and online learning that will guide you through a theory and provide you with some code examples and analysis of very clean data.
Here the basic idea, As the project gets too large, with too many contributors, it gets impossible to track down who did what and when. How do you figure out what that change was. How do you go back to how things were before? Back to the unbroken wonderland.


A webpage for quickly searching Seth Godin's blog (affectionately dubbed his "pajama drawer"), a source of ideas new/old, strange/fantastic.
Make it better, bigger, weirder via GitHub


"Most people don't realize the potential of making money online. But it can be a difficult skill to master without proper guidance"
"Project Breakthrough" is a FREE step-by-step guide that allows any individual (with no prior experience) to make real money online in 14 days flat!
You owe it to yourself to start making money online.
Imagine how much money you could generate in the next 14 days, starting today.


Router.getDataSource()
Dynamic Datasource
OpenEJB dynamic datasource
Goal
The openejb dynamic datasource api aims to allow to use multiple data sources as one.
It can be useful for technical reasons (load balancing for example) or functionnal reasons (filtering, aggregation, enriching…).
The API
The interface Router (org.apache.openejb.resource.jdbc.Router) have only one method to get the datasource to use:
The org.apache.openejb.resource.jdbc.RoutedDataSource wraps a classical data source. It has to be used to declare your datasource.
You can implement all the policy you want in your Router implementation.
A class called org.apache.openejb.resource.jdbc.AbstractRouter is available to ease router development.
Known limitation(s)
You have to use the same kind of databases (same version, same configuration…).
All database have to be created when you use the router. The way to do it automatically can depend of your JPA provider.
OpenJPA
OpenJPA initializes its database when the entitymanager is called for the first time so you need to initialize all your proxied datasource before using the other one. It can be done using an Init EJB doing a find() on each proxied datasource.
Hibernate
Hibernate initializes the database when it starts so if you declare a persistence unit by database all databases will be initialized at the start up.
Example
The story (the unit test example)
You want to use only one datasource in the code but you have a criteria to set to choose the real database to use between three.
So in your code you want something like:
public class RoutedEJBBean {
@PersistenceContext(unitName = "router")
private EntityManager em;
// this router is not automatic, we
// need it to select the database to use
@Resource(name = "My Router")
private DeterminedRouter router;
public void persist(int id, String name, String clientDatasource) {
router.setDataSource(clientDatasource);
em.persist(new Person(id, name));
}
}
The router implementation
The router will simply manage a map to store proxied datasources and a field to store the datasource used in the current thread (ThreadLocal).
public class DeterminedRouter implements Router {
private String dataSourceNames; // used to store configuration (openejb.xml)
private String defaultDataSourceName; // defautl data source name
private Map<String, DataSource> dataSources = null; // proxied data sources
private ThreadLocal<DataSource> currentDataSource = new ThreadLocal<DataSource>(); // the datasource to use or null
/**
* @param datasourceList datasource resource name, separator is a space
*/
public void setDataSourceNames(String datasourceList) {
dataSourceNames = datasourceList;
}
/**
* lookup datasource in openejb resources
*/
private void init() { // looking up datasources declared as proxied
dataSources = new ConcurrentHashMap<String, DataSource>();
for (String ds : dataSourceNames.split(" ")) {
ContainerSystem containerSystem = SystemInstance.get().getComponent(ContainerSystem.class);
Object o = null;
Context ctx = containerSystem.getJNDIContext();
try {
o = ctx.lookup("openejb:Resource/" + ds);
if (o instanceof DataSource) {
dataSources.put(ds, (DataSource) o);
}
} catch (NamingException ignore) {
}
}
}
/**
* @return the user selected data source if it is set
* or the default one
* @throws IllegalArgumentException if the data source is not found
*/
public DataSource getDataSource() {
// lazy init of routed datasources
if (dataSources == null) {
init();
}
// if no datasource is selected use the default one
if (currentDataSource.get() == null) {
if (dataSources.containsKey(defaultDataSourceName)) {
return dataSources.get(defaultDataSourceName);
} else {
throw new IllegalArgumentException("you have to specify at least one datasource");
}
}
// the developper set the datasource to use
return currentDataSource.get();
}
/**
*
* @param datasourceName data source name
*/
public void setDataSource(String datasourceName) {
if (dataSources == null) {
init();
}
if (!dataSources.containsKey(datasourceName)) {
throw new IllegalArgumentException("data source called " + datasourceName + " can't be found.");
}
DataSource ds = dataSources.get(datasourceName);
currentDataSource.set(ds);
}
public void setDefaultDataSourceName(String name) {
this.defaultDataSourceName = name;
}
}
Creation of the service provider for the router
To be able to use your router add a file called service-jar.xml under META-INF/. For example META-INF/org.router.
This file will contain something like:
<ServiceJar>
<ServiceProvider id="DeterminedRouter" service="Resource"
type="org.apache.openejb.resource.jdbc.Router" class-name="implementation class">
Param defaultValue
ParamWithNoDefaultValue
</ServiceProvider>
</ServiceJar>
openejb.xml
In the openejb.xml file, you have to declare your dynamic database and in our example it needs the proxied datasources too:
<Resource id="router" type="<your implementation>" provider="<your provider>">
Param value
</Resource>
<Resource id="route db" type="DataSource" provider="RoutedDataSource">
Router router
</Resource>
<!–- real databases – for our example -->
<Resource id="db1" type="DataSource">
JdbcDriver org.hsqldb.jdbcDriver
JdbcUrl jdbc:hsqldb:mem:db1
UserName sa
Password
JtaManaged true
</Resource>
<Resource id="db2" type="DataSource">
JdbcDriver org.hsqldb.jdbcDriver
JdbcUrl jdbc:hsqldb:mem:db2
UserName sa
Password
JtaManaged true
</Resource>
<Resource id="db3" type="DataSource">
JdbcDriver org.hsqldb.jdbcDriver
JdbcUrl jdbc:hsqldb:mem:db3
UserName sa
Password
JtaManaged true
</Resource>


Github ID
ID doesn't exist
Target amount of daily contributions
Cancel
Save Settings
Contribution Summary
Configure Github ID
Today
Current Week
Current Month


Berries
It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop.
READ MORE
It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop.


If enabled, users will be able to click on group headers to collapse and expand group rows.
(boolean): Default true.
(boolean)
true
{collapsible: false}


Elixir v1.3.4 Kernel.SpecialForms
Special forms are the basic building blocks of Elixir, and therefore cannot be overridden by the developer.
We define them in this module. Some of these forms are lexical (like
alias/2
, case/2
, etc). The macros {}
and <<>>
are also special
forms used to define tuple and binary data structures respectively.
This module also documents Elixir’s pseudo variables (__ENV__
,
__MODULE__
, __DIR__
and __CALLER__
). Pseudo variables return
information about Elixir’s compilation environment and can only
be read, never assigned to.
Finally, it also documents two special forms, __block__
and
__aliases__
, which are not intended to be called directly by the
developer but they appear in quoted contents since they are essential
in Elixir’s constructs.
Summary
Macros
Creates a struct
Creates a map
Captures or creates an anonymous function
Defines a remote call or an alias
Used by types and bitstrings to specify types
Defines a new bitstring
Matches the value on the right against the pattern on the left
Accesses an already bound variable in match clauses. Also known as the pin operator
Returns the current calling environment as a Macro.Env
struct
Returns the absolute path of the directory of the current file as a binary
Returns the current module name as an atom or nil
otherwise
Internal special form to hold aliases information
Internal special form for block expressions
alias/2
is used to setup aliases, often useful with modules names
Matches the given expression against the given clauses
Evaluates the expression corresponding to the first clause that evaluates to a truthy value
Defines an anonymous function
Comprehensions allow you to quickly build a data structure from an enumerable or a bitstring
Imports functions and macros from other modules
Gets the representation of any expression
Checks if there is a message matching the given clauses in the current process mailbox
Requires a given module to be compiled and loaded
Calls the overridden function when overriding it with Kernel.defoverridable/1
Evaluates the given expressions and handles any error, exit or throw that may have happened
Unquotes the given expression from inside a macro
Unquotes the given list expanding its arguments. Similar
to unquote/1
Used to combine matching clauses
Creates a tuple
Macros
Creates a struct.
A struct is a tagged map that allows developers to provide default values for keys, tags to be used in polymorphic dispatches and compile time assertions.
Structs are usually defined with the Kernel.defstruct/1
macro:
defmodule User do
defstruct name: "john", age: 27
end
Now a struct can be created as follows:
%User{}
Underneath a struct is just a map with a :__struct__
key
pointing to the User
module:
%User{} == %{__struct__: User, name: "john", age: 27}
A struct also validates that the given keys are part of the defined
struct. The example below will fail because there is no key
:full_name
in the User
struct:
%User{full_name: "john doe"}
An update operation specific for structs is also available:
%User{user | age: 28}
The syntax above will guarantee the given keys are valid at
compilation time and it will guarantee at runtime the given
argument is a struct, failing with BadStructError
otherwise.
Although structs are maps, by default structs do not implement
any of the protocols implemented for maps. Check
Kernel.defprotocol/2
for more information on how structs
can be used with protocols for polymorphic dispatch. Also
see Kernel.struct/2
and Kernel.struct!/2
for examples on
how to create and update structs dynamically.
Creates a map.
Maps are key-value stores where keys are compared
using the match operator (===
). Maps can be created with
the %{}
special form where keys are associated via =>
:
%{1 => 2}
Maps also support the keyword notation, as other special forms, as long as they are at the end of the argument list:
%{hello: :world, with: :keywords}
%{:hello => :world, with: :keywords}
If a map has duplicated keys, the last key will always have higher precedence:
iex> %{a: :b, a: :c}
%{a: :c}
Conveniences for manipulating maps can be found in the
Map
module.
Access syntax
Besides the access functions available in the Map
module,
like Map.get/3
and Map.fetch/2
, a map can be accessed using the
.
operator:
iex> map = %{a: :b}
iex> map.a
:b
Note that the .
operator expects the key :a
to exist in the map.
If not, an ArgumentError
is raised.
Update syntax
Maps also support an update syntax:
iex> map = %{:a => :b}
iex> %{map | :a => :c}
%{:a => :c}
Notice the update syntax requires the given keys to exist.
Trying to update a key that does not exist will raise an KeyError
.
AST representation
Regardless if =>
or the keywords syntax is used, Maps are
always represented internally as a list of two-element tuples
for simplicity:
iex> quote do
...> %{"a" => :b, c: :d}
...> end
{:%{}, [], [{"a", :b}, {:c, :d}]}
Captures or creates an anonymous function.
Capture
The capture operator is most commonly used to capture a function with given name and arity from a module:
iex> fun = &Kernel.is_atom/1
iex> fun.(:atom)
true
iex> fun.("string")
false
In the example above, we captured Kernel.is_atom/1
as an
anonymous function and then invoked it.
The capture operator can also be used to capture local functions, including private ones, and imported functions by omitting the module name:
&local_function/1
Anonymous functions
The capture operator can also be used to partially apply
functions, where &1
, &2
and so on can be used as value
placeholders. For example:
iex> double = &(&1 * 2)
iex> double.(2)
4
In other words, &(&1 * 2)
is equivalent to fn x -> x * 2 end
.
Another example using a local function:
iex> fun = &is_atom(&1)
iex> fun.(:atom)
true
The &
operator can be used with more complex expressions:
iex> fun = &(&1 + &2 + &3)
iex> fun.(1, 2, 3)
6
As well as with lists and tuples:
iex> fun = &{&1, &2}
iex> fun.(1, 2)
{1, 2}
iex> fun = &[&1 | &2]
iex> fun.(1, 2)
[1 | 2]
The only restrictions when creating anonymous functions is that at
least one placeholder must be present, i.e. it must contain at least
&1
, and that block expressions are not supported:
# No placeholder, fails to compile.
&(:foo)
# Block expression, fails to compile.
&(&1; &2)
Defines a remote call or an alias.
The dot (.
) in Elixir can be used for remote calls:
iex> String.downcase("FOO")
"foo"
In this example above, we have used .
to invoke downcase
in the
String
alias, passing “FOO” as argument. We can also use the dot
for creating aliases:
iex> Hello.World
Hello.World
This time, we have joined two aliases, defining the final alias
Hello.World
.
Syntax
The right side of .
may be a word starting in upcase, which represents
an alias, a word starting with lowercase or underscore, any valid language
operator or any name wrapped in single- or double-quotes. Those are all valid
examples:
iex> Kernel.Sample
Kernel.Sample
iex> Kernel.length([1, 2, 3])
3
iex> Kernel.+(1, 2)
3
iex> Kernel."length"([1, 2, 3])
3
iex> Kernel.'+'(1, 2)
3
Note that Kernel."HELLO"
will be treated as a remote call and not an alias.
This choice was done so every time single- or double-quotes are used, we have
a remote call regardless of the quote contents. This decision is also reflected
in the quoted expressions discussed below.
Quoted expression
When .
is used, the quoted expression may take two distinct
forms. When the right side starts with a lowercase letter (or
underscore):
iex> quote do
...> String.downcase("FOO")
...> end
{{:., [], [{:__aliases__, [alias: false], [:String]}, :downcase]}, [], ["FOO"]}
Notice we have an inner tuple, containing the atom :.
representing
the dot as first element:
{:., [], [{:__aliases__, [alias: false], [:String]}, :downcase]}
This tuple follows the general quoted expression structure in Elixir,
with the name as first argument, some keyword list as metadata as second,
and the number of arguments as third. In this case, the arguments is the
alias String
and the atom :downcase
. The second argument is always
an atom:
iex> quote do
...> String."downcase"("FOO")
...> end
{{:., [], [{:__aliases__, [alias: false], [:String]}, :downcase]}, [], ["FOO"]}
The tuple containing :.
is wrapped in another tuple, which actually
represents the function call, and has "FOO"
as argument.
When the right side is an alias (i.e. starts with uppercase), we get instead:
iex> quote do
...> Hello.World
...> end
{:__aliases__, [alias: false], [:Hello, :World]}
We go into more details about aliases in the __aliases__
special form
documentation.
Unquoting
We can also use unquote to generate a remote call in a quoted expression:
iex> x = :downcase
iex> quote do
...> String.unquote(x)("FOO")
...> end
{{:., [], [{:__aliases__, [alias: false], [:String]}, :downcase]}, [], ["FOO"]}
Similar to Kernel."HELLO"
, unquote(x)
will always generate a remote call,
independent of the value of x
. To generate an alias via the quoted expression,
one needs to rely on Module.concat/2
:
iex> x = Sample
iex> quote do
...> Module.concat(String, unquote(x))
...> end
{{:., [], [{:__aliases__, [alias: false], [:Module]}, :concat]}, [],
[{:__aliases__, [alias: false], [:String]}, Sample]}
Used by types and bitstrings to specify types.
This operator is used in two distinct occasions in Elixir. It is used in typespecs to specify the type of a variable, function or of a type itself:
@type number :: integer | float
@spec add(number, number) :: number
It may also be used in bit strings to specify the type of a given bit segment:
<<int::integer-little, rest::bits>> = bits
Read the documentation on the Typespec
page and
<<>>/1
for more information on typespecs and
bitstrings respectively.
Defines a new bitstring.
Examples
iex> <<1, 2, 3>>
<<1, 2, 3>>
Types
A bitstring is made of many segments and each segment has a type. There are 9 types used in bitstrings:
integer
float
bits
(alias for bitstring)bitstring
binary
bytes
(alias for binary)utf8
utf16
utf32
When no type is specified, the default is integer
:
iex> <<1, 2, 3>>
<<1, 2, 3>>
Elixir also accepts by default the segment to be a literal string or a literal charlist, which are by default expanded to integers:
iex> <<0, "foo">>
<<0, 102, 111, 111>>
Variables or any other type need to be explicitly tagged:
iex> rest = "oo"
iex> <<102, rest>>
** (ArgumentError) argument error
We can solve this by explicitly tagging it as a binary:
iex> rest = "oo"
iex> <<102, rest::binary>>
"foo"
The utf8, utf16, and utf32 types are for Unicode codepoints. They can also be applied to literal strings and charlists:
iex> <<"foo"::utf16>>
<<0, 102, 0, 111, 0, 111>>
iex> <<"foo"::utf32>>
<<0, 0, 0, 102, 0, 0, 0, 111, 0, 0, 0, 111>>
Options
Many options can be given by using -
as separator. Order is
arbitrary, so the following are all equivalent:
<<102::integer-native, rest::binary>>
<<102::native-integer, rest::binary>>
<<102::unsigned-big-integer, rest::binary>>
<<102::unsigned-big-integer-size(8), rest::binary>>
<<102::unsigned-big-integer-8, rest::binary>>
<<102::8-integer-big-unsigned, rest::binary>>
<<102, rest::binary>>
Unit and Size
The length of the match is equal to the unit
(a number of bits) times the
size
(the number of repeated segments of length unit
).
| Type | Default Unit |
|---|---|
integer | 1 bit |
float | 1 bit |
binary | 8 bits |
Sizes for types are a bit more nuanced. The default size for integers is 8.
For floats, it is 64. For floats, size * unit
must result in 32 or 64,
corresponding to IEEE 754
binary32 and binary64, respectively.
For binaries, the default is the size of the binary. Only the last binary in a match can use the default size. All others must have their size specified explicitly, even if the match is unambiguous. For example:
iex> <<name::binary-size(5), " the ", species::binary>> = <<"Frank the Walrus">>
"Frank the Walrus"
iex> {name, species}
{"Frank", "Walrus"}
Failing to specify the size for the non-last causes compilation to fail:
<<name::binary, " the ", species::binary>> = <<"Frank the Walrus">>
** (CompileError): a binary field without size is only allowed at the end of a binary pattern
Shortcut Syntax
Size and unit can also be specified using a syntax shortcut when passing integer values:
iex> x = 1
iex> <<x::8>> == <<x::size(8)>>
true
iex> <<x::8 * 4>> == <<x::size(8)-unit(4)>>
true
This syntax reflects the fact the effective size is given by multiplying the size by the unit.
Modifiers
Some types have associated modifiers to clear up ambiguity in byte representation.
| Modifier | Relevant Type(s) |
|---|---|
signed | integer |
unsigned (default) | integer |
little | integer , utf16 , utf32 |
big (default) | integer , utf16 , utf32 |
native | integer , utf16 , utf32 |
Sign
Integers can be signed
or unsigned
, defaulting to unsigned
.
iex> <<int::integer>> = <<-100>>
<<156>>
iex> int
156
iex> <<int::integer-signed>> = <<-100>>
<<156>>
iex> int
-100
signed
and unsigned
are only used for matching binaries (see below) and
are only used for integers.
iex> <<-100::signed, _rest::binary>> = <<-100, "foo">>
<<156, 102, 111, 111>>
Endianness
Elixir has three options for endianness: big
, little
, and native
.
The default is big
:
iex> <<number::little-integer-size(16)>> = <<0, 1>>
<<0, 1>>
iex> number
256
iex> <<number::big-integer-size(16)>> = <<0, 1>>
<<0, 1>>
iex> number
1
native
is determined by the VM at startup and will depend on the
host operating system.
Binary/Bitstring Matching
Binary matching is a powerful feature in Elixir that is useful for extracting information from binaries as well as pattern matching.
Binary matching can be used by itself to extract information from binaries:
iex> <<"Hello, ", place::binary>> = "Hello, World"
"Hello, World"
iex> place
"World"
Or as a part of function definitions to pattern match:
defmodule ImageTyper
@png_signature <<137::size(8), 80::size(8), 78::size(8), 71::size(8),
13::size(8), 10::size(8), 26::size(8), 10::size(8)>>
@jpg_signature <<255::size(8), 216::size(8)>>
def type(<<@png_signature, rest::binary>>), do: :png
def type(<<@jpg_signature, rest::binary>>), do: :jpg
def type(_), do :unknown
end
Performance & Optimizations
The Erlang compiler can provide a number of optimizations on binary creation
and matching. To see optimization output, set the bin_opt_info
compiler
option:
ERL_COMPILER_OPTIONS=bin_opt_info mix compile
To learn more about specific optimizations and performance considerations, check out Erlang’s Efficiency Guide on handling binaries.
Accesses an already bound variable in match clauses. Also known as the pin operator.
Examples
Elixir allows variables to be rebound via static single assignment:
iex> x = 1
iex> x = x + 1
iex> x
2
However, in some situations, it is useful to match against an existing
value, instead of rebinding. This can be done with the ^
special form,
colloquially known as the pin operator:
iex> x = 1
iex> ^x = List.first([1])
iex> ^x = List.first([2])
** (MatchError) no match of right hand side value: 2
Note that ^x
always refers to the value of x
prior to the match. The
following example will match:
iex> x = 0
iex> {x, ^x} = {1, 0}
iex> x
1
Returns the current calling environment as a Macro.Env
struct.
In the environment you can access the filename, line numbers, set up aliases, the function and others.
Returns the absolute path of the directory of the current file as a binary.
Although the directory can be accessed as Path.dirname(__ENV__.file)
,
this macro is a convenient shortcut.
Returns the current environment information as a Macro.Env
struct.
In the environment you can access the current filename, line numbers, set up aliases, the current function and others.
Returns the current module name as an atom or nil
otherwise.
Although the module can be accessed in the __ENV__
, this macro
is a convenient shortcut.
Internal special form to hold aliases information.
It is usually compiled to an atom:
iex> quote do
...> Foo.Bar
...> end
{:__aliases__, [alias: false], [:Foo, :Bar]}
Elixir represents Foo.Bar
as __aliases__
so calls can be
unambiguously identified by the operator :.
. For example:
iex> quote do
...> Foo.bar
...> end
{{:., [], [{:__aliases__, [alias: false], [:Foo]}, :bar]}, [], []}
Whenever an expression iterator sees a :.
as the tuple key,
it can be sure that it represents a call and the second argument
in the list is an atom.
On the other hand, aliases holds some properties:
The head element of aliases can be any term that must expand to an atom at compilation time.
The tail elements of aliases are guaranteed to always be atoms.
- When the head element of aliases is the atom
:Elixir
, no expansion happens.
Internal special form for block expressions.
This is the special form used whenever we have a block of expressions in Elixir. This special form is private and should not be invoked directly:
iex> quote do
...> 1
...> 2
...> 3
...> end
{:__block__, [], [1, 2, 3]}
alias/2
is used to setup aliases, often useful with modules names.
Examples
alias/2
can be used to setup an alias for any module:
defmodule Math do
alias MyKeyword, as: Keyword
end
In the example above, we have set up MyKeyword
to be aliased
as Keyword
. So now, any reference to Keyword
will be
automatically replaced by MyKeyword
.
In case one wants to access the original Keyword
, it can be done
by accessing Elixir
:
Keyword.values #=> uses MyKeyword.values
Elixir.Keyword.values #=> uses Keyword.values
Notice that calling alias
without the as:
option automatically
sets an alias based on the last part of the module. For example:
alias Foo.Bar.Baz
Is the same as:
alias Foo.Bar.Baz, as: Baz
Lexical scope
import/2
, require/2
and alias/2
are called directives and all
have lexical scope. This means you can set up aliases inside
specific functions and it won’t affect the overall scope.
Warnings
If you alias a module and you don’t use the alias, Elixir is going to issue a warning implying the alias is not being used.
In case the alias is generated automatically by a macro, Elixir won’t emit any warnings though, since the alias was not explicitly defined.
Both warning behaviours could be changed by explicitly
setting the :warn
option to true
or false
.
Matches the given expression against the given clauses.
Examples
case thing do
{:selector, i, value} when is_integer(i) ->
value
value ->
value
end
In the example above, we match thing
against each clause “head”
and execute the clause “body” corresponding to the first clause
that matches.
If no clause matches, an error is raised.
For this reason, it may be necessary to add a final catch-all clause (like _
)
which will always match.
x = 10
case x do
0 ->
"This clause won't match"
_ ->
"This clause would match any value (x = #{x})"
end
#=> "This clause would match any value (x = 10)"
Variables handling
Notice that variables bound in a clause “head” do not leak to the outer context:
case data do
{:ok, value} -> value
:error -> nil
end
value #=> unbound variable value
However, variables explicitly bound in the clause “body” are accessible from the outer context:
value = 7
case lucky? do
false -> value = 13
true -> true
end
value #=> 7 or 13
In the example above, value is going to be 7
or 13
depending on
the value of lucky?
. In case value
has no previous value before
case, clauses that do not explicitly bind a value have the variable
bound to nil
.
If you want to pattern match against an existing variable,
you need to use the ^/1
operator:
x = 1
case 10 do
^x -> "Won't match"
_ -> "Will match"
end
#=> "Will match"
Evaluates the expression corresponding to the first clause that evaluates to a truthy value.
cond do
hd([1, 2, 3]) ->
"1 is considered as true"
end
#=> "1 is considered as true"
Raises an error if all conditions evaluate to nil
or false
.
For this reason, it may be necessary to add a final always-truthy condition
(anything non-false
and non-nil
), which will always match.
Examples
cond do
1 + 1 == 1 ->
"This will never match"
2 * 2 != 4 ->
"Nor this"
true ->
"This will"
end
#=> "This will"
Comprehensions allow you to quickly build a data structure from an enumerable or a bitstring.
Let’s start with an example:
iex> for n <- [1, 2, 3, 4], do: n * 2
[2, 4, 6, 8]
A comprehension accepts many generators and filters. Enumerable
generators are defined using <-
:
# A list generator:
iex> for n <- [1, 2, 3, 4], do: n * 2
[2, 4, 6, 8]
# A comprehension with two generators
iex> for x <- [1, 2], y <- [2, 3], do: x*y
[2, 3, 4, 6]
Filters can also be given:
# A comprehension with a generator and a filter
iex> for n <- [1, 2, 3, 4, 5, 6], rem(n, 2) == 0, do: n
[2, 4, 6]
Note generators can also be used to filter as it removes any value
that doesn’t match the pattern on the left side of <-
:
iex> users = [user: "john", admin: "meg", guest: "barbara"]
iex> for {type, name} when type != :guest <- users do
...> String.upcase(name)
...> end
["JOHN", "MEG"]
Bitstring generators are also supported and are very useful when you need to organize bitstring streams:
iex> pixels = <<213, 45, 132, 64, 76, 32, 76, 0, 0, 234, 32, 15>>
iex> for <<r::8, g::8, b::8 <- pixels >>, do: {r, g, b}
[{213, 45, 132}, {64, 76, 32}, {76, 0, 0}, {234, 32, 15}]
Variable assignments inside the comprehension, be it in generators, filters or inside the block, are not reflected outside of the comprehension.
Into
In the examples above, the result returned by the comprehension was
always a list. The returned result can be configured by passing an
:into
option, that accepts any structure as long as it implements
the Collectable
protocol.
For example, we can use bitstring generators with the :into
option
to easily remove all spaces in a string:
iex> for <<c <- " hello world ">>, c != ?\s, into: "", do: <<c>>
"helloworld"
The IO
module provides streams, that are both Enumerable
and
Collectable
, here is an upcase echo server using comprehensions:
for line <- IO.stream(:stdio, :line), into: IO.stream(:stdio, :line) do
String.upcase(line)
end
Imports functions and macros from other modules.
import/2
allows one to easily access functions or macros from
others modules without using the qualified name.
Examples
If you are using several functions from a given module, you can import those functions and reference them as local functions, for example:
iex> import List
iex> flatten([1, [2], 3])
[1, 2, 3]
Selector
By default, Elixir imports functions and macros from the given module, except the ones starting with underscore (which are usually callbacks):
import List
A developer can filter to import only macros or functions via the only option:
import List, only: :functions
import List, only: :macros
Alternatively, Elixir allows a developer to pass pairs of
name/arities to :only
or :except
as a fine grained control
on what to import (or not):
import List, only: [flatten: 1]
import String, except: [split: 2]
Notice that calling except
for a previously declared import/2
simply filters the previously imported elements. For example:
import List, only: [flatten: 1, keyfind: 4]
import List, except: [flatten: 1]
After the two import calls above, only List.keyfind/4
will be
imported.
Underscore functions
By default functions starting with _
are not imported. If you really want
to import a function starting with _
you must explicitly include it in the
:only
selector.
import File.Stream, only: [__build__: 3]
Lexical scope
It is important to notice that import/2
is lexical. This means you
can import specific macros inside specific functions:
defmodule Math do
def some_function do
# 1) Disable "if/2" from Kernel
import Kernel, except: [if: 2]
# 2) Require the new "if/2" macro from MyMacros
import MyMacros
# 3) Use the new macro
if do_something, it_works
end
end
In the example above, we imported macros from MyMacros
,
replacing the original if/2
implementation by our own
within that specific function. All other functions in that
module will still be able to use the original one.
Warnings
If you import a module and you don’t use any of the imported functions or macros from this module, Elixir is going to issue a warning implying the import is not being used.
In case the import is generated automatically by a macro, Elixir won’t emit any warnings though, since the import was not explicitly defined.
Both warning behaviours could be changed by explicitly
setting the :warn
option to true
or false
.
Ambiguous function/macro names
If two modules A
and B
are imported and they both contain
a foo
function with an arity of 1
, an error is only emitted
if an ambiguous call to foo/1
is actually made; that is, the
errors are emitted lazily, not eagerly.
Gets the representation of any expression.
Examples
iex> quote do
...> sum(1, 2, 3)
...> end
{:sum, [], [1, 2, 3]}
Explanation
Any Elixir code can be represented using Elixir data structures. The building block of Elixir macros is a tuple with three elements, for example:
{:sum, [], [1, 2, 3]}
The tuple above represents a function call to sum
passing 1, 2 and
3 as arguments. The tuple elements are:
The first element of the tuple is always an atom or another tuple in the same representation.
The second element of the tuple represents metadata.
- The third element of the tuple are the arguments for the function call. The third argument may be an atom, which is usually a variable (or a local call).
Options
:unquote
- whenfalse
, disables unquoting. Useful when you have a quote inside another quote and want to control what quote is able to unquote.:location
- when set to:keep
, keeps the current line and file from quote. Read the Stacktrace information section below for more information.:generated
- marks the given chunk as generated so it does not emit warnings. Currently it only works on special forms (for example, you can annotate acase
but not anif
).:context
- sets the resolution context.:bind_quoted
- passes a binding to the macro. Whenever a binding is given,unquote/1
is automatically disabled.
Quote literals
Besides the tuple described above, Elixir has a few literals that when quoted return themselves. They are:
:sum #=> Atoms
1 #=> Integers
2.0 #=> Floats
[1, 2] #=> Lists
"strings" #=> Strings
{key, value} #=> Tuples with two elements
Quote and macros
quote/2
is commonly used with macros for code generation. As an exercise,
let’s define a macro that multiplies a number by itself (squared). Note
there is no reason to define such as a macro (and it would actually be
seen as a bad practice), but it is simple enough that it allows us to focus
on the important aspects of quotes and macros:
defmodule Math do
defmacro squared(x) do
quote do
unquote(x) * unquote(x)
end
end
end
We can invoke it as:
import Math
IO.puts "Got #{squared(5)}"
At first, there is nothing in this example that actually reveals it is a
macro. But what is happening is that, at compilation time, squared(5)
becomes 5 * 5
. The argument 5
is duplicated in the produced code, we
can see this behaviour in practice though because our macro actually has
a bug:
import Math
my_number = fn ->
IO.puts "Returning 5"
5
end
IO.puts "Got #{squared(my_number.())}"
The example above will print:
Returning 5
Returning 5
Got 25
Notice how “Returning 5” was printed twice, instead of just once. This is because a macro receives an expression and not a value (which is what we would expect in a regular function). This means that:
squared(my_number.())
Actually expands to:
my_number.() * my_number.()
Which invokes the function twice, explaining why we get the printed value twice! In the majority of the cases, this is actually unexpected behaviour, and that’s why one of the first things you need to keep in mind when it comes to macros is to not unquote the same value more than once.
Let’s fix our macro:
defmodule Math do
defmacro squared(x) do
quote do
x = unquote(x)
x * x
end
end
end
Now invoking square(my_number.())
as before will print the value just
once.
In fact, this pattern is so common that most of the times you will want
to use the bind_quoted
option with quote/2
:
defmodule Math do
defmacro squared(x) do
quote bind_quoted: [x: x] do
x * x
end
end
end
:bind_quoted
will translate to the same code as the example above.
:bind_quoted
can be used in many cases and is seen as good practice,
not only because it helps us from running into common mistakes but also
because it allows us to leverage other tools exposed by macros, such as
unquote fragments discussed in some sections below.
Before we finish this brief introduction, you will notice that, even though
we defined a variable x
inside our quote:
quote do
x = unquote(x)
x * x
end
When we call:
import Math
squared(5)
x #=> ** (CompileError) undefined variable x or undefined function x/0
We can see that x
did not leak to the user context. This happens
because Elixir macros are hygienic, a topic we will discuss at length
in the next sections as well.
Hygiene in variables
Consider the following example:
defmodule Hygiene do
defmacro no_interference do
quote do
a = 1
end
end
end
require Hygiene
a = 10
Hygiene.no_interference
a #=> 10
In the example above, a
returns 10 even if the macro
is apparently setting it to 1 because variables defined
in the macro do not affect the context the macro is executed in.
If you want to set or get a variable in the caller’s context, you
can do it with the help of the var!
macro:
defmodule NoHygiene do
defmacro interference do
quote do
var!(a) = 1
end
end
end
require NoHygiene
a = 10
NoHygiene.interference
a #=> 1
Note that you cannot even access variables defined in the same module unless you explicitly give it a context:
defmodule Hygiene do
defmacro write do
quote do
a = 1
end
end
defmacro read do
quote do
a
end
end
end
Hygiene.write
Hygiene.read
#=> ** (RuntimeError) undefined variable a or undefined function a/0
For such, you can explicitly pass the current module scope as argument:
defmodule ContextHygiene do
defmacro write do
quote do
var!(a, ContextHygiene) = 1
end
end
defmacro read do
quote do
var!(a, ContextHygiene)
end
end
end
ContextHygiene.write
ContextHygiene.read
#=> 1
Hygiene in aliases
Aliases inside quote are hygienic by default. Consider the following example:
defmodule Hygiene do
alias Map, as: M
defmacro no_interference do
quote do
M.new
end
end
end
require Hygiene
Hygiene.no_interference #=> %{}
Notice that, even though the alias M
is not available
in the context the macro is expanded, the code above works
because M
still expands to Map
.
Similarly, even if we defined an alias with the same name before invoking a macro, it won’t affect the macro’s result:
defmodule Hygiene do
alias Map, as: M
defmacro no_interference do
quote do
M.new
end
end
end
require Hygiene
alias SomethingElse, as: M
Hygiene.no_interference #=> %{}
In some cases, you want to access an alias or a module defined
in the caller. For such, you can use the alias!
macro:
defmodule Hygiene do
# This will expand to Elixir.Nested.hello
defmacro no_interference do
quote do
Nested.hello
end
end
# This will expand to Nested.hello for
# whatever is Nested in the caller
defmacro interference do
quote do
alias!(Nested).hello
end
end
end
defmodule Parent do
defmodule Nested do
def hello, do: "world"
end
require Hygiene
Hygiene.no_interference
#=> ** (UndefinedFunctionError) ...
Hygiene.interference
#=> "world"
end
Hygiene in imports
Similar to aliases, imports in Elixir are hygienic. Consider the following code:
defmodule Hygiene do
defmacrop get_length do
quote do
length([1, 2, 3])
end
end
def return_length do
import Kernel, except: [length: 1]
get_length
end
end
Hygiene.return_length #=> 3
Notice how return_length
returns 3 even though the length/1
function is not imported. In fact, even if return_length
imported a function with the same name and arity from another
module, it wouldn’t affect the function result:
def return_length do
import String, only: [length: 1]
get_length
end
Calling this new return_length
will still return 3 as result.
Elixir is smart enough to delay the resolution to the latest
moment possible. So, if you call length([1, 2, 3])
inside quote,
but no length/1
function is available, it is then expanded in
the caller:
defmodule Lazy do
defmacrop get_length do
import Kernel, except: [length: 1]
quote do
length("hello")
end
end
def return_length do
import Kernel, except: [length: 1]
import String, only: [length: 1]
get_length
end
end
Lazy.return_length #=> 5
Stacktrace information
When defining functions via macros, developers have the option of choosing if runtime errors will be reported from the caller or from inside the quote. Let’s see an example:
# adder.ex
defmodule Adder do
@doc "Defines a function that adds two numbers"
defmacro defadd do
quote location: :keep do
def add(a, b), do: a + b
end
end
end
# sample.ex
defmodule Sample do
import Adder
defadd
end
require Sample
Sample.add(:one, :two)
#=> ** (ArithmeticError) bad argument in arithmetic expression
#=> adder.ex:5: Sample.add/2
When using location: :keep
and invalid arguments are given to
Sample.add/2
, the stacktrace information will point to the file
and line inside the quote. Without location: :keep
, the error is
reported to where defadd
was invoked. Note location: :keep
affects
only definitions inside the quote.
Binding and unquote fragments
Elixir quote/unquote mechanisms provides a functionality called unquote fragments. Unquote fragments provide an easy way to generate functions on the fly. Consider this example:
kv = [foo: 1, bar: 2]
Enum.each kv, fn {k, v} ->
def unquote(k)(), do: unquote(v)
end
In the example above, we have generated the functions foo/0
and
bar/0
dynamically. Now, imagine that, we want to convert this
functionality into a macro:
defmacro defkv(kv) do
Enum.map kv, fn {k, v} ->
quote do
def unquote(k)(), do: unquote(v)
end
end
end
We can invoke this macro as:
defkv [foo: 1, bar: 2]
However, we can’t invoke it as follows:
kv = [foo: 1, bar: 2]
defkv kv
This is because the macro is expecting its arguments to be a
keyword list at compilation time. Since in the example above
we are passing the representation of the variable kv
, our
code fails.
This is actually a common pitfall when developing macros. We are assuming a particular shape in the macro. We can work around it by unquoting the variable inside the quoted expression:
defmacro defkv(kv) do
quote do
Enum.each unquote(kv), fn {k, v} ->
def unquote(k)(), do: unquote(v)
end
end
end
If you try to run our new macro, you will notice it won’t
even compile, complaining that the variables k
and v
do not exist. This is because of the ambiguity: unquote(k)
can either be an unquote fragment, as previously, or a regular
unquote as in unquote(kv)
.
One solution to this problem is to disable unquoting in the
macro, however, doing that would make it impossible to inject the
kv
representation into the tree. That’s when the :bind_quoted
option comes to the rescue (again!). By using :bind_quoted
, we
can automatically disable unquoting while still injecting the
desired variables into the tree:
defmacro defkv(kv) do
quote bind_quoted: [kv: kv] do
Enum.each kv, fn {k, v} ->
def unquote(k)(), do: unquote(v)
end
end
end
In fact, the :bind_quoted
option is recommended every time
one desires to inject a value into the quote.
Checks if there is a message matching the given clauses in the current process mailbox.
In case there is no such message, the current process hangs until a message arrives or waits until a given timeout value.
Examples
receive do
{:selector, i, value} when is_integer(i) ->
value
value when is_atom(value) ->
value
_ ->
IO.puts :stderr, "Unexpected message received"
end
An optional after
clause can be given in case the message was not
received after the specified timeout period:
receive do
{:selector, i, value} when is_integer(i) ->
value
value when is_atom(value) ->
value
_ ->
IO.puts :stderr, "Unexpected message received"
after
5000 ->
IO.puts :stderr, "No message in 5 seconds"
end
The after
clause can be specified even if there are no match clauses.
The timeout value given to after
can be a variable; two special
values are allowed:
:infinity
- the process should wait indefinitely for a matching message, this is the same as not using a timeout0
- if there is no matching message in the mailbox, the timeout will occur immediately
Variables handling
The receive/1
special form handles variables exactly as the case/2
special macro. For more information, check the docs for case/2
.
Requires a given module to be compiled and loaded.
Examples
Notice that usually modules should not be required before usage, the only exception is if you want to use the macros from a module. In such cases, you need to explicitly require them.
Let’s suppose you created your own if/2
implementation in the module
MyMacros
. If you want to invoke it, you need to first explicitly
require the MyMacros
:
defmodule Math do
require MyMacros
MyMacros.if do_something, it_works
end
An attempt to call a macro that was not loaded will raise an error.
Alias shortcut
require/2
also accepts as:
as an option so it automatically sets
up an alias. Please check alias/2
for more information.
Calls the overridden function when overriding it with Kernel.defoverridable/1
.
See Kernel.defoverridable/1
for more information and documentation.
Evaluates the given expressions and handles any error, exit or throw that may have happened.
Examples
try do
do_something_that_may_fail(some_arg)
rescue
ArgumentError ->
IO.puts "Invalid argument given"
catch
value ->
IO.puts "caught #{value}"
else
value ->
IO.puts "Success! The result was #{value}"
after
IO.puts "This is printed regardless if it failed or succeed"
end
The rescue clause is used to handle exceptions, while the catch clause can be used to catch thrown values. The else clause can be used to control flow based on the result of the expression. Catch, rescue and else clauses work based on pattern matching.
Note that calls inside try/1
are not tail recursive since the VM
needs to keep the stacktrace in case an exception happens.
Rescue clauses
Besides relying on pattern matching, rescue clauses provides some conveniences around exceptions that allows one to rescue an exception by its name. All the following formats are valid rescue expressions:
try do
UndefinedModule.undefined_function
rescue
UndefinedFunctionError -> nil
end
try do
UndefinedModule.undefined_function
rescue
[UndefinedFunctionError] -> nil
end
# rescue and bind to x
try do
UndefinedModule.undefined_function
rescue
x in [UndefinedFunctionError] -> nil
end
# rescue all and bind to x
try do
UndefinedModule.undefined_function
rescue
x -> nil
end
Erlang errors
Erlang errors are transformed into Elixir ones during rescue:
try do
:erlang.error(:badarg)
rescue
ArgumentError -> :ok
end
The most common Erlang errors will be transformed into their
Elixir counter-part. Those which are not will be transformed
into ErlangError
:
try do
:erlang.error(:unknown)
rescue
ErlangError -> :ok
end
In fact, ErlangError
can be used to rescue any error that is
not an Elixir error proper. For example, it can be used to rescue
the earlier :badarg
error too, prior to transformation:
try do
:erlang.error(:badarg)
rescue
ErlangError -> :ok
end
Catching throws and exits
The catch clause can be used to catch throws values and exits.
try do
exit(:shutdown)
catch
:exit, :shutdown -> IO.puts "Exited with shutdown reason"
end
try do
throw(:sample)
catch
:throw, :sample ->
IO.puts "sample thrown"
end
catch values also support :error
, as in Erlang, although it is
commonly avoided in favor of raise/rescue control mechanisms.
After clauses
An after
clause allows you to define cleanup logic that will be invoked both
when the tried block of code succeeds and also when an error is raised. Note
that the process will exit as usually when receiving an exit signal that causes
it to exit abruptly and so the after
clause is not guaranteed to be executed.
Luckily, most resources in Elixir (such as open files, ETS tables, ports, sockets,
etc.) are linked to or monitor the owning process and will automatically clean
themselves up if that process exits.
File.write!("tmp/story.txt", "Hello, World")
try do
do_something_with("tmp/story.txt")
after
File.rm("tmp/story.txt")
end
Else clauses
Else clauses allow the result of the expression to be pattern matched on:
x = 2
try do
1 / x
rescue
ArithmeticError ->
:infinity
else
y when y < 1 and y > -1 ->
:small
_ ->
:large
end
If an else clause is not present and no exceptions are raised, the result of the expression will be returned:
x = 1
^x =
try do
1 / x
rescue
ArithmeticError ->
:infinity
end
However when an else clause is present but the result of the expression does not match any of the patterns an exception will be raised. This exception will not be caught by a catch or rescue in the same try:
x = 1
try do
try do
1 / x
rescue
# The TryClauseError can not be rescued here:
TryClauseError ->
:error_a
else
0 ->
:small
end
rescue
# The TryClauseError is rescued here:
TryClauseError ->
:error_b
end
Similarly an exception inside an else clause is not caught or rescued inside the same try:
try do
try do
nil
catch
# The exit(1) call below can not be caught here:
:exit, _ ->
:exit_a
else
_ ->
exit(1)
end
catch
# The exit is caught here:
:exit, _ ->
:exit_b
end
This means the VM no longer needs to keep the stacktrace once inside
an else clause and so tail recursion is possible when using a try
with a tail call as the final call inside an else clause. The same
is true for rescue
and catch
clauses.
Variable handling
Since an expression inside try
may not have been evaluated
due to an exception, any variable created inside try
cannot
be accessed externally. For instance:
try do
x = 1
do_something_that_may_fail(same_arg)
:ok
catch
_, _ -> :failed
end
x #=> unbound variable "x"
In the example above, x
cannot be accessed since it was defined
inside the try
clause. A common practice to address this issue
is to return the variables defined inside try
:
x =
try do
x = 1
do_something_that_may_fail(same_arg)
x
catch
_, _ -> :failed
end
Unquotes the given expression from inside a macro.
Examples
Imagine the situation you have a variable value
and
you want to inject it inside some quote. The first attempt
would be:
value = 13
quote do
sum(1, value, 3)
end
Which would then return:
{:sum, [], [1, {:value, [], quoted}, 3]}
Which is not the expected result. For this, we use unquote:
iex> value = 13
iex> quote do
...> sum(1, unquote(value), 3)
...> end
{:sum, [], [1, 13, 3]}
Unquotes the given list expanding its arguments. Similar
to unquote/1
.
Examples
iex> values = [2, 3, 4]
iex> quote do
...> sum(1, unquote_splicing(values), 5)
...> end
{:sum, [], [1, 2, 3, 4, 5]}
Used to combine matching clauses.
Let’s start with an example:
iex> opts = %{width: 10, height: 15}
iex> with {:ok, width} <- Map.fetch(opts, :width),
...> {:ok, height} <- Map.fetch(opts, :height),
...> do: {:ok, width * height}
{:ok, 150}
If all clauses match, the do
block is executed, returning its result.
Otherwise the chain is aborted and the non-matched value is returned:
iex> opts = %{width: 10}
iex> with {:ok, width} <- Map.fetch(opts, :width),
...> {:ok, height} <- Map.fetch(opts, :height),
...> do: {:ok, width * height}
:error
Guards can be used in patterns as well:
iex> users = %{"melany" => "guest", "bob" => :admin}
iex> with {:ok, role} when not is_binary(role) <- Map.fetch(users, "bob"),
...> do: {:ok, to_string(role)}
{:ok, "admin"}
As in for/1
, variables bound inside with/1
won’t leak;
“bare expressions” may also be inserted between the clauses:
iex> width = nil
iex> opts = %{width: 10, height: 15}
iex> with {:ok, width} <- Map.fetch(opts, :width),
...> double_width = width * 2,
...> {:ok, height} <- Map.fetch(opts, :height),
...> do: {:ok, double_width * height}
{:ok, 300}
iex> width
nil
An else
option can be given to modify what is being returned from
with
in the case of a failed match:
iex> opts = %{width: 10}
iex> with {:ok, width} <- Map.fetch(opts, :width),
...> {:ok, height} <- Map.fetch(opts, :height) do
...> {:ok, width * height}
...> else
...> :error ->
...> {:error, :wrong_data}
...> end
{:error, :wrong_data}
If there is no matching else
condition, then a WithClauseError
exception is raised.
Creates a tuple.
Only two item tuples are considered literals in Elixir.
Therefore all other tuples are represented in the AST
as a call to the special form :{}
.
Conveniences for manipulating tuples can be found in the
Tuple
module. Some functions for working with tuples are
also available in Kernel
, namely Kernel.elem/2
,
Kernel.put_elem/3
and Kernel.tuple_size/1
.
Examples
iex> {1, 2, 3}
{1, 2, 3}
iex> quote do
...> {1, 2, 3}
...> end
{:{}, [], [1, 2, 3]}


WITNESS LIST Transportation Committee May 7, 1997-9:00A SB 370Amendment (#4 - Alexander) On: Burnett, Bill (TXDOT) SB 370Committee Substitute (Alexander) For: Bosse, Rep. Fred (Jt. Sponsor of SB 370) Gray, Rep. Patricia (Jt. Sponsor of SB 370) Registering, but not testifying: On: Schmidt, Jay (Sunset Advisory Commis.) Walraven, Joe (Sunset Advisory Commis.) SB 1391 Amendment (Alexander) For: Fainter, Jr., John W. (Tom Masterson) Lewis, Rep. Ron (Sponsor of S.B. 1391) Registering, but not testifying: For: Allison, Jim (Co.Judges & Commis. Ass)


---
layout: archive
title: "Education"
permalink: /education/
author_profile: true
---
AWARDS & HONORS
-
Chairman Gold Medal to secure highest CPI in overall M.Tech 2015 batch.
-
Director Silver Medal to secure highest CPI in M.Tech (Maths & Computing) 2015 batch.
-
Best system in International Workshop on Semantic Evaluation. Vancouver, Canada, SemEval-2017.
-
Winner of the shared task Code-Mixed Entity Extraction in Indian Language (CMEE-IL).
-
Winner of the shared task ‘Transliterated Search’ organized by Microsoft Research India in conjunction
with FIRE-2014 held at ISI Bangalore, India.
EDUCATION


Select a category:
Dairy
Bakery
Meat
Seafood
Dry Goods
Produce
Beverages
Personal Items
Add item
Dairy
Bakery
Meat
Seafood
Produce
Dry Goods
Beverages
Personal Items
Start Shopping
Done Shopping
How long did it take you to shop?


DrawImage_Zoom ( slot, x, y, zx, zy )
Draws an image to the current canvas scaled by a given factor
Example:


Break them apart, and build your own zoo animal
When the toy is changed the code is updated.
The toy can understand your kid, can find and fetch things, and play tricks
Please tell us where to send info about toy availability
Help us improve your product by participating in a quick survey.


{% extends 'auth/base.html' %} {% block title %}
Your registration data have been submitted. We have already sent you unique code in your Email(Inbox/Spam). Please activate your account using the the unique code provided by Us.


Amazon DynamoDB Table ProvisionedThroughput
Describes a set of provisioned throughput values for an AWS::DynamoDB::Table resource. DynamoDB uses these capacity units to allocate sufficient resources to provide the requested throughput.
For a complete discussion of DynamoDB provisioned throughput values, see Specifying Read and Write Requirements in the DynamoDB Developer Guide.
Syntax
JSON
{ "ReadCapacityUnits" :
Number
, "WriteCapacityUnits" :Number
}
YAML
ReadCapacityUnits:
Number
WriteCapacityUnits:Number
Parameters
ReadCapacityUnits
-
Sets the desired minimum number of consistent reads of items (up to 4KB in size) per second for the specified table before Amazon DynamoDB balances the load.
Required: Yes
Type: Number
WriteCapacityUnits
-
Sets the desired minimum number of consistent writes of items (up to 1KB in size) per second for the specified table before Amazon DynamoDB balances the load.
Required: Yes
Type: Number
Note
For detailed information about the limits of provisioned throughput values in DynamoDB, see Limits in Amazon DynamoDB in the DynamoDB Developer Guide.


- In Cold Blood, Truman Capote
- Night Watch, Sergei Lukyanenko
- Making It All Work, David Allen
- Day Watch, Sergei Lukyanenko
- Perla la Loca (A Love & Rockets book), Jaime Hernandez
- Twilight Watch, Sergei Lukyanenko
- Last Watch, Sergei Lukyanenko
--- layout: post title: "Recent Reads" date: 2009-02-24 comments: false ---


Across: 1. Basic principles suggesting openings for puzzle solutions (11) 8. Tommy, no mohair - come back with something else that looks the same (7) 9. A sort of muslim is with one in Mali (7) 11. Re-fuse to use needles (4) 12. Walk mare about with political leader (8) 13. Walked about ... mare'd need moving around (9) 16. Arranged quarter pay after losing a fancy flooring job (9) 19. ... house sat awkwardly in nominally calm setting (5,3) 22. Swears, with five pained utterances (4) 24. Copies boxer: boxes some characters out! (7) 25. Trying hard to make clear-felling replace forest top with gray tailing (7) 26. Early monotheist, or tzarina so reprogrammed (11) Down: 2. Drift North, wasted (5) 3. Check or allow confused chuckle? (7) 4. Leading exponent back in money, oddly (5) 5. Crazy one-wheelers? No, no, not here! (9) 6. Those who give up being found in relabelled directories (7) 7. A delay returning to party (4) 10. Odd jolt, even for a missionary on the Oregon trail (1.3) 14. Razes savagely in Nero's approaches toward frigidity (5,4) 15. No gorey surgery used in the making of mountains (7) 17. Place to dock quarter of pay? - being heartless is the key we hear! (4) 18. About 6:50, with monarch despiser, ... (7) 20. Device to poll two of every three (4) 21. Consumers, confused without "C'MON!", but consumers nonetheless (5) 23. Heard to walk about with title character of film featuring a 10-Down (5)


Bitcoin Price Analysis: BTC At Short-Term Risk, Facing The Critical 200-days MA Line
by Yuval GovFor the past ten days, Bitcoin is trading inside a tight range, which is very unlikely for the primary cryptocurrency.
We can almost say that the past week was boring for the heavy crypto traders. However, this stability could come up to an end very shortly.
Looking on the following 4-hour chart, we can see that Bitcoin is forming a symmetrical triangle with a Bullish bias, from the fact that it can turn into a bull flag very quickly (in the case of a breakup).
Despite the above said, since yesterday, following a failed retest of the upper trend-line around $9,450, Bitcoin is losing momentum slowly, and as of writing this, the coin is struggling to stay above the ascending trend-line (the lower angle of the triangle).
The last comes together with the critical 200-days moving average line. The 200-days MA is a significant indicator to distinguish between bear and bull markets.
After exactly a month (September 26 to October 26) trading beneath it, Bitcoin returned above for the sake of the Bulls. However, since then, the MA line had been tested as support four times over the past eight days.
The more times a support level is being tested, the higher the change it will get broken down. Being said that, Bitcoin is now going through its fifth test of the MA-200 line, hoping to be saved following another green support.
The RSI Indicator: Along with the decision point of the Bitcoin price, the RSI indicator is testing the 57-horizontal support for the third time over the past ten days. Just like the price support, the RSI tells a similar story.
Trading volume: The volume level is still anticipating the next huge move, after showing a continuous decline since October 26.
Total Market Cap: $249.2 billion
Bitcoin Market Cap: $166.8 billion
BTC Dominance Index: 66.9%
*Data by CoinGecko
Key Levels to Watch
– Support/Resistance: From below, Bitcoin is currently testing the crucial support level of $9200, along with the 200-days mentioned 200-days moving average line.
In case of a break to the downside, the next level of support is $9000, before the $8800 support area.
From above, yesterday we saw another failed tryout to breach above the $9400 – $9500 resistance area, where lies the triangle’s descending trend-line (shown on the 4-hour chart).
In case of a breakup, we should see Bitcoin reaching quickly to $9800 – $10,000 zone. Further resistance lies at $10,300 – $10,400.
BTC/USD BitStamp 4-Hour Chart
BTC/USD BitStamp 1-Day Chart
Click here to start trading on BitMEX exchange and receive 10% discount on fees for 6 months.
Disclaimer: Information found on CryptoPotato is those of writers quoted. It does not represent the opinions of CryptoPotato on whether to buy, sell, or hold any investments. You are advised to conduct your own research before making any investment decisions. Use provided information at your own risk. See Disclaimer for more information.
Cryptocurrency charts by TradingView.
Technical analysis tools by Coinigy.


_The_Messenger:_The_Story_of_Joan_of_Arc_ (R) ** (out of ****)
Although the exact reasons for their estrangement have not been made public (aside from the catch-all "irreconcilable differences"), after seeing _The_Messenger_, I can only conclude that Milla Jovovich's woefully unconvincing performance as the title character was a prominent reason for director/soon-to-be-ex-husband Luc Besson's split with her. Joan of Arc, the legendary teen who guided the French army in their war against England after hearing a message from God, is the role of a lifetime for any young actress, calling on its portrayer to run the full gamut of emotions: spiritual euphoria, steely determination and strength, and ultimately great sadness. The role calls for great range, and Jovovich proves to not have any. She wears the same look throughout the entire film: eyes bulged, nostrils flaring, teeth gritted--the latter, that is, when she's not shrieking at the top of her lungs. Jovovich is at her best when asked to use her modeling skills to serve as a blank presence, as in her previous collaboration with Besson, _The_Fifth_Element_; and what is in my opinion her defining role--the slutty French exchange student who stole all of Kelly Bundy's boyfriends on an episode of _Married..._with_Children_. Required to do more as she is in _The_Messenger_, Jovovich is clearly at her worst.
So when Joan meets her end tied to a burning stake, there is no sense of tragic loss, only one of relief. But that's clearly Jovovich's fault and not that of Besson (though he must be blamed for casting with his crotch), who works overtime to give the film a larger-than-life epic quality that his heroine lacks. He actually succeeds in part, particularly in the visual department; his sometimes-surreal imagery is divinely haunting. He also gets some decent work from Jovovich's acting support; John Malkovich and Faye Dunaway are creepy and creepier, respectively, as the dauphin of France and his scheming mother-in-law. However, Besson makes other questionable choices, such as bringing Joan's conscience to life in the final act in the form of... Dustin Hoffman. His distracting presence undercuts any dramatic momentum and tension Besson could ever hope to build, with or without Jovovich in the lead.
Michael Dequina<EMAIL_ADDRESS>|<EMAIL_ADDRESS>|<EMAIL_ADDRESS>|<EMAIL_ADDRESS>Mr. Brown's Movie Site: http://welcome.to/mrbrown CinemaReview Magazine: http://www.CinemaReview.com on ICQ: #25289934 | on AOL Instant Messenger: MrBrown23
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


Is a state of the United States of America located in the Pacific
Ocean. It is the only U.S. state located outside North America, the only island state,
and the
only state in the tropics.
Los Angeles
California
Los Angeles is known for its Mediterranean climate, ethnic diversity,
Hollywood entertainment industry,and its sprawling metropolis. The city is home to the
major film studios.
New York City
Five boroughs
Times Square is the brightly illuminated hub of the Broadway Theater
District, one of the world's busiest
pedestrian intersections, and a major center of the world's entertainment industry.


Save time with our plug-n-play components
Eliminate the hassle of recreating basic components and patterns for every new product. SGDS houses a comprehensive collection of components, patterns and templates that can be used as is or customise to your needs


I am Harshitha originally from Bangalore (India) and currently living in Amsterdam (Netherlands). I have been working as Front-End Engineer for more than 3 years and actively searching for job now in Amsterdam or remote jobs.
A focused, ﬂexible and enthusiastic professional who is looking forward to work in a customer centric environment. An organized, detail-oriented and passionate engineer, who is able to accomplish multiple tasks at ease, without compromising on quality.
Throughout my journey in this team, I have took ownership of two products of totally different domains ranging from a system component developed in Meta Assembly Language to a Middleware J2EE component (JCA) for Distributed Transaction Processing developed in Java. Tools & Technology: Java, JBoss(AS), WebSphere (AS), 0S200 (EIS), InstallAnywhere, Eclipse, MASM, PLUS, ECL Info connect, Mini-build & Work tool.
Was the Training & Placement Cell (TNP) representative for CSE department of the college.
Secured School First Rank (97%) in SSLC Exams and School Second Rank (96%) in 12th Std Exam.
Find my interesting articles below:


LOGIN
JOIN
CART(0)
MY PAGE
LIVE CHAT
BEST
CATEGORY
LIFE
HELP
REVIEW
QUESTION
ID
PASSWORD
Save ID
Forgot ID?
Forgot Password?
NO ACCOUNT? JOIN NOW!


At Impulso I design user interfaces and developed websites, landing pages and email templates.
Read More
Create user interface and design user's flow for SmartGuest, a Hotel App
UI/UX Design & Front-End for LeadWise & Semco Style Toolkit
UI/UX Design & Front-End for Boleto Simples


Hello, we're EnergWise Labs, We are a product engineering company. We create products from idea's encompassing custom hardware to software solving business challenges!
Experience eternal power
No more power shut-offs
ROI on solarizing is only X months or Y years
Explore our standard models or Customize according to your needs
Easy EMI models through banks available
Realization of Concepts and Ideas into Research through a practical useful product We streamline your product vision with end-to-end support
Unleash your inner creativity and Manifest the hidden potential with personalized printing Material Types available ABS Plastic, PLA(Multiple colours), Flexible Send us your 3D models and get it printed Size Limitations 140mm x 140mm x 140mm Request for a quotation
Send us your 3D models or talk to us and get them designed
Prepare and Print the model using our 3d printer!
Material Types available ABS Plastic; Size Limitations 140mm x 140mm x 140mm
Want to know more? Request for a quotation
Omnifood is just awesome! I just launched a startup which leaves me with no time for cooking, so Omnifood is a life-saver. Now that I got used to it, I couldn't live without my daily meals! Alberto Duncan
Inexpensive, healthy and great-tasting meals, delivered right to my home. We have lots of food delivery here in Lisbon, but no one comes even close to Omifood. Me and my family are so in love! Joana Silva
I was looking for a quick and easy food delivery service in San Franciso. I tried a lot of them and ended up with Omnifood. Best food delivery service in the Bay Area. Keep up the great work! Milton Chapman


?[Áil
6
7
8
9
10
T
M
v
The
New
York
copyright
reserved
botanical
Garden
*
CAT
ISLAND
(BAHAMAS)
.Arthurs
Iowa
Wilsons
Bay
Benrtets
Harbor
.cum
dichotomiflortom
'SLA'NbØ\
New
York
Botanical
Garden
Ib04b3b
IEW
Yo^
botanicai,
^ARDEH
(irass
1-J
m.
roots
The
Bight
in
brackish
water
of
a
sink
hole,
near
Dumfries.
(Dup.
det,
Arnold
Arboretum
No:
Collected,
by
Roger
Byrne
Date
386
Oct.
3i,
1967
1604636
Legend -
Level of confidence that token is an accurately-transcribed word
extremely low
very low
low
undetermined
medium
high
very high


60%
indeterminate
Tested on
- Chrome 53 on Windows 10
- Firefox 47 on Windows 10
- Firefox 47 on Ubuntu
- Edge 13 on Windows 10
- IE 11 on Windows 10
- IE 10 on Windows 7
- Mobile Safari on iOS 8.4
- IE Mobile on Windows Phone 8.1
Note:
- Safari on iOS does not support indeterminate progress bars (they are rendered like 0%-completed progress bars).


Sandeep Dhakal is the undergraduate student of SF State He lives in South San Francisco He likes traveling and netflix.


--- title: Television and Loneliness -- The Frontal Cortex layout: post ---
So, just as a friendship evolves through spending time together and sharing personal thoughts and opinions, parasocial relationships evolve by watching characters on our favorite TV shows, and becoming involved with their personal lives, idiosyncrasies, and experiences as if they were those of a friend.
This research may explain why people feel "betrayed" when TV show plots don't go the way they had hoped.


MAASU Spring Conference 2017
GROUNDS that root us.
Branches that CONNECT us.
Colors that INSPIRE us.
As one of MAASU's missions is to "unite and strengthen the A/PIA community's stance against all forms of oppression," #UnitedWeStand is aimed towards uniting the A/PIA community with one another to discover the history of our roots and our identities that serve as the grounds of current social justice movements. The conference aims to provide an inclusive space where we are able to strengthen our connections with other people of color and people with diverse religions, abilities, sexualities, and experiences, to unite for the common causes of intersectionality and bettering the quality of our lives.
Founded in 1817, the University of Michigan (UM or UMich) has had a long history of excellence both inside and outside the classroom. According to the 2015 U.S. World News and Report, UM is ranked fourth best among public universities across the country. The university consists of a robust, diverse undergraduate community of over 25,000 students, a third of which are students of color. The Asian/Pacific Islander American (A/PIA) student population hovers around 14% every year. As a college town, Ann Arbor is a lively and instructive conduit for students to learn and grow. UM has fostered a long and supportive relationship with Midwest Asian American Student Union (MAASU), having hosted the MAASU spring conference seven times in the past. The most recent time was in 2013, when registration peaked over 980 participants.
The United Asian American Organizations (UAAO) was established to work in unity to provide education on issues facing Asian Pacific Islander Americans. We promote awareness of A/PIA cultures and establish a communication core for the A/PIA organizations and individuals at the University of Michigan in Ann Arbor. UAAO is a coalition of about 20 A/PIA organizations on the University of Michigan campus. UAAO participants are diverse in heritage and culture, each with a unique background and intersection of identities. UAAO provides a forum for discussion regarding social issues surrounding the A/PIA community and acts as a liaison between member organizations and external organizations.
| Friday | ||
|---|---|---|
| When | What | Where |
| 5:00pm - 10:00pm | Registration | East Hall Psych Atrium |
| 7:00pm - 9:00pm | GenAPA | Lydia Mendelssohn Theatre |
| 8:30pm - 10:00pm | Spring into MAASU! | East Hall Psych Atrium |
| Saturday | ||
| When | What | Where |
| 8:00am - 9:30am | Morning Registration | Rackham Building |
| 8:30am - 10:00am | Opening Ceremony | Rackham Auditorium |
| 10:10am - 10:40am | Small Group I | Click me! |
| 10:50am - 12:10pm | Workshop Session I | Click me! |
| 12:10pm - 1:40pm | Lunch / Small Group II | Click me! |
| 12:10pm - 3:00pm | M-Rep Meetings, Bid Proposals | TBD |
| 1:40pm - 3:00pm | Workshop Session II | Click me! |
| 3:10pm - 4:30pm | Workshop Session III | Click me! |
| 4:40pm - 5:25pm | Small Group III | Click me! |
| 5:25pm - 6:30pm | Break | Up to you! |
| 6:00pm - 6:30pm | Board Buses | Click me! |
| 6:30pm - 10:00pm | Banquet / Keynote II | The Diamond Center of Novi |
Name: Dana Shin
Year: Junior
Major: Political Science & Psychology
Position: Co-Chair
Hobbies: Taking buzzfeed quizzes, crying about Grey's Anatomy, pretending to online shop, and writing slam poetry
Name: Queena Zhao
Year: Junior
Major: Biochemistry & Biopsychology, Cognition, and Neuroscience
Position: Co-Chair
Hobbies: Perfecting my skills in cooking kimchi fried rice, eating, and motivating myself to go to the gym
Name: Katty Wu
Year: Junior
Major: Cellular & Molecular Biology
Position: Core Logistics
Hobbies: Raving, writing/listening to Spoken Word, watching TED Talks
Name: Charles Wang
Year: Junior
Major: Computer Science
Position: Logistics
Hobbies: Piano, trumpet, running, biking, football, airsoft, videogames, and hanging out with friends
Name: Eric Chan
Year: Junior
Major: Biomedical Engineering
Position: Logistics
Hobbies: Running, watching Family Feud, Maplestory
Name: Sungjee Dianne Ro
Year: Junior
Major: Business Administration
Position: Core Finance
Hobbies: Dancing and baking
Name: Helen Tan
Year: Junior
Major: Business Administration
Position: Finance
Hobbies: Drinking coffee, going to the gym, watching documentaries, and everything else food-related
Name: Derek Xia
Year: Junior
Major: Computer Science
Position: Finance
Hobbies: Brunch, napping (after brunch)
Name: Anisha Sudarshan
Year: Senior
Major: Neuroscience and Spanish
Minor: Computer Science
Position: Finance
Hobbies: Procrastinating by way of Netflix, traveling, taking super amateur travel photography, eating good vegetarian food, playing/watching tennis
Name: Billy Chen
Year: Senior
Major: Chemical Engineering
Position: Finance
Hobbies: Netflix, eating, feeding my cat
Name: Ethan Hong
Year: Junior
Major: Computer Science and Biomolecular Science
Position: Workshop
Hobbies: Reading Wikipedia articles for hours
Name: Yimeng Zhao
Year: Junior
Major: Biochemistry and Russian
Position: Workshop
Hobbies: Fencing and Ballroom
Name: Adam Brodnax
Year: Junior
Major: Business
Position: Workshop
Hobbies: Enjoys broadcasting basketball, can only watch one episode of Jane The Virgin in one sitting, believes in the power of a narrative, and enjoys spending time with his 12 pets
Name: Cindy Ding
Year: Junior
Major:
Position: Publicity
Hobbies: Doing artsy things, online shopping, and playing wallyball
Name: Edith Zhang
Year: Senior
Major: Business Administration
Position: Publicity
Hobbies: Jamming on the ukulele, watching too much anime, reading, drawing fan art, and taking naps
Name: Langsi Wu
Year: Junior
Major: Business and Cognitive Science
Position: Publicity
Hobbies: Reading, watching Friends, swimming, traveling, eating
Name: Kelvin Tam
Year: Senior
Major: Computer Science
Position: Multimedia/Creative
Hobbies: Creating, watching One Piece, roadtripping, cooking, and taking long walks
Name: Stone Stewart
Year: Junior
Major: Performing Arts Technology
Position: Multimedia/Creative
Hobbies: Dancing poorly, making good music, making bad music, DJing, taking pictures
Name: Lingene Yang
Year: Junior
Major: Computer Science
Position: Multimedia/Creative
Hobbies: TBD
Name: Daphne Cheng
Year: Junior
Major: Biopsychology, Cognition, & Neuroscience
Minor: Community Action & Social Change
Position: Community Liaison
Hobbies: Eating brunch, listening to NPR, playing the violin, listening to music, taking naps, service learning, watching Parks & Rec, hanging out with friends, and meeting new people
Name: Karina Souksay
Year: Sophomore
Major: Nursing
Position: Community Liaison
Hobbies: Listening to RnB and hip hop, playing volleyballs, smiling, not driving on highways
Name: Lily Chang
Year: Junior
Major: Psychology
Position: Entertainment
Hobbies: Dancing, watching Game of Thrones, eating, being an Oreo, and going on food adventures
Name: Ethan Jin
Year: Junior
Major: Microbiology
Position: Entertainment
Hobbies: Basketball and Ping Pong
Name: Kim Nguyen
Year: Junior
Major: Biomolecular Sciences
Minor: American Culture
Position: Registration
Hobbies: Sleeping, watching Netflix, and going to the gym
Name: Erin Yamaguchi
Year: Junior
Major: Economics
Minor: Entrepreneurship, Political Science
Position: Registration
Hobbies: Painting, video games, training in competitive napping, eating other people's food, pranking people
Name: Julia Duong
Year: Junior
Major: Business Administration
Position: Leadership Development Coordinator
Hobbies: Running, tennis, and watching Scandal
Name: Grace Chun
Year: First Year Graduate
Major: Masters in Social Work
Position: Leadership Development Coordinator
Hobbies: Napping, eating, reading, watching movies, and hanging with friends
Name: Amy Nichols
Year: Junior
Major: Communications Studies
Minor: Intergroup Relations Education
Position: Leadership Development Coordinator
Hobbies: Eating sushi, watching YouTube and Modern Family, tagging people in memes on Facebook
Name: Ciara Timban
Year: Freshman
Major: Public Policy and Public Health
Position: Freshmen Representative
Hobbies: Juggling 10+ TV shows on Netflix while attempting to get my life together
Name: Stephanie Yim
Year: Freshman
Major: Neuroscience
Position: Freshmen Representative
Hobbies: Watching the Red Wings, eating good food and scrolling through Pinterest in search of my next DIY project
Name: Linh Nguyen
Associate Director, Office of Multi-Ethnic Student Affairs
Position: MAASU Advisor
Hobbies: Taking pictures from various angles and making lots of DIY arts
Feel free to use this form to contact us, or connect with us directly using one of our social media channels below!


For axial symmetry system, magnetic surfaces can be deﬁned in a trivial way (for non-axisymmetric system, the deﬁnition may be a little harder, I will consider this later). The axial symmetry of tokamak magnetic ﬁeld allows us to introduce a surface of revolution that is generated by rotating the projection of a magnetic ﬁeld line on (R,Z) plane around the axis of symmetry, Z axis. The unique property of this revolution surface is that no ﬁeld line point-intersects it and a ﬁeld line with one point on it will have the whole ﬁeld line on it. This revolution surface is called a magnetic surface. For instance, consider an arbitrary magnetic ﬁeld line, whose projection on the poloidal plane is shown in Fig. 1. A magnetic surface is generated by rotating the projection line around the Z axis.
The value of Ψ is constant on a magnetic surface (since Ψ is constant along a magnetic ﬁeld line and Ψ is independent of ϕ). On the other hand, the value of Ψ is usually diﬀerent on diﬀerent magnetic surfaces. Therefore Ψ can be used as labels of magnetic surfaces.


Before Change
symlink_to(link_path, model_path)
except:
// This is quite dirty, but just making sure other errors are caught.
prints("Creating a symlink in spacy/data failed. Make sure you have "
"the required permissions and try re-running the command as "
"admin, or use a virtualenv. You can still import the model as "
"a module and call its load() method, or create the symlink "
"manually.",
"%s --> %s" % (path2str(model_path), path2str(link_path)),
title="Error: Couldn"t link model to "%s"" % link_name)
raise
prints("%s --> %s" % (path2str(model_path), path2str(link_path)),
"You can now load the model via spacy.load("%s")" % link_name,
title="Linking successful")
After Change
link_path.unlink()
elif link_path.exists(): // does it exist otherwise?
// NB: Check this last because valid symlinks also "exist".
prints(Messages.M015, link_path,
title=Messages.M014.format(name=link_name), exits=1)
msg = "%s --> %s" % (path2str(model_path), path2str(link_path))
try:
symlink_to(link_path, model_path)
except:


Liverpool and Egypt set to clash over Salah
MEXICO CITY: Broadcaster ESPN claimed a new world record for attendance at a tennis match on Saturday, with more than 42,000 people watching Germany’s Alexander Zverev go down 6-3, 4-6, 2-6 to Roger Federer in an exhibition match in Mexico City.
That smashed an almost decade-old record of 35,681 set at an exhibition game between Belgian Kim Clijsters and Serena Williams in Belgium in 2010.
ESPN put the exact number of fans in Mexico City’s bullring at 42,517.
Even before Saturday’s match, Federer had announced his intention to set a new world record for attendance when he meets Rafael Nadal in an exhibition match in South Africa in February.
That duel will be staged at the Cape Town Stadium, which has a capacity of 55,000. It will also have the draw of a preceding doubles match in which Federer will partner Microsoft founder Bill Gates and Nadal will play alongside South African comedian Trevor Noah.


Written by Julia Lee and Chris Piech. Based on FacePamphlet by Mehran Sahami and Eric Roberts.
In this project, you will build something like Instagram...except that it will be 1000 times more fun and cool because you made it, so we've appropriately named Instakilo! In the process you will make use of three major concepts: Interactors, HashMaps and ArrayLists.
The inital state of the app greets users with the friendly message: "Welcome to Instakilo!"" and loads profile data from a text file into the app. At this point and any point, the user has 3 core actions she/he can take:
Bellow is an example of the app running. It is showing the profile for the user "Chris Piech" and associated photos.
When the program is closed and opened again, previously created profiles, and posted photos should still exist (Whenever a profile is created or picture is posted to a profile, a data file is updated to reflect the current state of all profiles). Each profile consists of a unique name and a list of file names of images that have been posted to that profile.
As a warm-up to displaying a profile with images, you should first implement a method displayMessage
that takes a string as a parameter and displays it to the user in the center of the screen. This method will be useful for displaying the welcome message on application start, as well as later when you respond to user input via the interactors. The message should be centered and be given the font MESSAGE_FONT defined in IKConstants. In other words, the method should look something like the following:
private void displayMessage(String message) {
removeAll(); // clear the screen
// create text graphics object with the given message
// set the font and location of the graphics object
// display the message!
}
As a reminder you can use getWidth()
to get the width of the applicaiton window. Now call this method to display "Welcome to Instakilo!" when the application starts.
The next part of this assignment is to add the necessary interactors. Create the panel shown bellow with the appropriate combination of JLabel, JButton, and JTextField objects. Don't forget to call addActionListeners()
Next we want to make sure that we can respond to button clicks. To test that your iteractors are connected correctly display a message, using the displayMessage
method you wrote in the first milestone when a user clicks a button. For now show this message when someone hits the "display" button:
"display profile: profileName"
"create profile: profileName"
"post profile: profileName"
Later we will replace showing a message with the actual funcitonality!
Now that we have our interactors set up, our next step is to create the appropriate datastructure to store all profiles. For this project, you should use a HashMap<String, ArrayList<String>>
to map from profile names to the list of file names for the photos associated with each profile.
Create the HashMap when the program starts and for now lets put some prefabricated data into it. Make a profile with the name "Bob Marley" who has four image file names (they should be strings): ["bob.jpg", "bobFamily.jpg" "bobYoung.jpg" and "bobSinging.jpg"]
Bob Marley was one of the most successful singers around the world... so it seems appropriate that he would have a profile on Instakilo
It's now time to start showing profiles. If a profile exists in our HashMap with the name entered in the profile text field, then Instakilo should display that profile name and images associated with it; otherwise, you should display the message "No profile exists with that name".
At the moment our HashMap only contains one profile Bob Marley. When we display Bob Marley's profile it should look like this (we no longer show the message "display profile: Bob Marley"):
If you have a filename, it is very simple to create the corresponding GImage (A GImage is like a GRect, except that instead of displaying a rectangle it displays an image)
GImage myImage = new GImage(fileName);
The images you display should all be of the height ROW_HEIGHT, but when you load them from file, they could be any size! In order to make them the right size you are going to have to use the GImage scale method.
image.scale(fraction);
image.scale(0.5)
it would make both the width and the heigh of your image half the size. You can get the height of your image using image.getHeight();
How much should you scale your image by so that it is ROW_HEIGHT?
Add images one by one starting from the top left. Add images to the current row until you reach the point where adding a new image would extend the image past the right side of the screen. When an image would extend past the right side of the screen, change to placing images on the next row.
There is a margin that is size MARGIN pixels between everything.
when the user clicks "Create", you should first check if a profile already exists with that name. If a profile exists, then display a message to the user ("A profile already exists for that name"). Otherwise, you want to create a new entry in your data hashmap to store this new profile and display it for the user.
For example if you type in Julia Lee in the profileName field and hit the Create button you should end up displaying the new, empty profile for Julia.
To post a new photo on the current profile, the user will enter an image name in the lower text area (labeled "New photo name:"") and click "Post". 1) If no profile is currently displayed, then display the message "Please select a profile before posting a picture" 2) If a profile is displayed, first check that an image exists with the given name using the provided method FileSystem.imageFileExists. If true, add the photo name to the ArrayList of photos associated with that profile, redisplay the current profile.
If we post the photo julia1.jpg to Julia's profile, it should get displayed!
Instakilo finds images from the img folder in the Instakilo project. We put a lot of photos there for you to play with. Add your own photos to the img folder so you can create a profile for yourself!
You can save your HashMap to file using the method:
FileSystem.saveMap(myMap, fileName);
HashMap<String, <ArrayList<String>> myMap = FileSystem.loadMap(fileName);
Your final milestone is to make changes to your instakilo hashMap persist between runs. Any time you change your hashMap save it to file! When you start the program, load the hashMap from file.
Thats it!
One feature that made Instagram so popular was that users could apply filters to their photos. Create a feature where a user can click on an image (which will select it) and then hit a button to make the image black and white. Ask the staff for more instructions if you are interested!


{% extends "projectApp/base.html" %} {% load static %} {% block homeBlock %}
Your one stop solution to issues


Two arguments:
Mon Oct 18 7:18:36 PM 2021
Enslavement and subsequent racialized labor practices were one of the central axes along which America developed as a nation. Though the social construction of “race” is not a uniquely American concept, it has led to specific set of historical conditions for understanding identity in the American context.
“The children of miscegenation not only threatened to blur the distinctions that made slavery possible, but the unions that produced them threatened to distort sexual relations and marriage itself, for black and white alike, into peculiar and tragic forms” (Sundquist 116).
Because both were “crimes of blood,” incest and “miscegenation” were often seen as two sides of the same coin (Saks 71).
The fear of White and Black “mixing” was so great that up until Loving vs. Virginia in 1967, the state of Mississippi prohibited “interracial” marriage. The statute was not removed from the state constitution till 1987 (Romano 250).
People had to reproduce with partners who were sufficiently similar and disimilar.
America’s race system was never stable nor monolithic, but gets disrupted by three major forces in the early 20th century:
After the Civil War vested economic interests maintain power through a campaign of terror.
Soon after the end of Reconstruction, states started to institute “Jim Crow” laws, which enforced the legal segregation of “White” and “Black.”
These laws were often enforced through extra-judicial means, especially lynching
Between 1890 and 1954 roughly 3,000 African Americans were lynched.
That’s about one lynching per week.
The concentration of Blacks in urban spaces that allowed them relatively more mobility and economic independence, led to a flowering of Black culture generally known as the Harlem Renaissance. Centered in NY this flowering was widespread in several urban centers, including Chicago.
Nella Larsen was one of the major figures of this movement.
The period from the late nineteenth century to 1924 saw mass immigration to the US from Russia, Eastern Europe, Italy, and Ireland
A some point 15% of the US population was foreign born.
The introduction of new peoples was considered a threat by many people who saw the “traditional” American way of life eroding.
In 1915, the Ku Klux Klan was reconstituted. This second incarnation was mostly focused on targeting new immigrants, especially Catholics and Jews.
The theories were totally bogus, but they turned “race” into the central means of understanding identity.
Sexuality, gender, and class were all explicitly linked to race.
The 1920s saw the rapid modernization of America. Buoyed by a post-War production boom, and new, more efficient production methods such as vertical integration, the standard of living for most Americans went up.
Mobility and mass communication (magazines, film, and radio) all spurred the creation of a more interconnected nation.
The discourse of the nation was by and large determined by the hubs for mass media production: New York and Los Angeles.
People were at once more connected and increasingly uneasy about their place in the local community.
In the face of a rapidly changing economic, social, and cultural reality, race had become one the main anchors through which people could moor onto their place in the world. When race was scrambled it also disrupted people’s perceptions of their class, gender, and sexuality precisely because these were interrelated and overlapping constructions of the self.
How might both Larsen and Faulkner disrupt the “traditional” formula of desiring to marry for the sake of reproduction?
In Larsen and Faulkner, how do difference and sameness operate as two complex forces that produce desire?
To what extent is sexual desire about the act and to what extent is it about the object?


Attribution methods in interpretability of CNNs
Author: Kemal Erdem
Attribution exampleIs that a good attribution?What is a problem?
New methods are not validated
We don't know how to compare XAI methods
No one is checking the metrics on real data
The goal?
Compare metrics (different methods, different models, different datasets)
Check if metrics make sense (spoiler... they don't)
Define if we're able to decide which method is better
Different methods different problemsMaybe metrics then?Only two metrics available in the most popular XAI library: CaptumUnintuitive intuition behind the InfidelityActual intuition behind the InfidelityExperiments