Collection Types
Swift provides three primary collection types, known as arrays, sets, and dictionaries, for storing collections of values. Arrays are ordered collections of values. Sets are unordered collections of unique values. Dictionaries are unordered collections of key-value associations.
Arrays, sets, and dictionaries in Swift are always clear about the types of values and keys that they can store. This means that you cannot insert a value of the wrong type into a collection by mistake. It also means you can be confident about the type of values you will retrieve from a collection.
Mutability of Collections
If you create an array, a set, or a dictionary, and assign it to a variable, the collection that is created will be mutable. This means that you can change (or mutate) the collection after it’s created by adding, removing, or changing items in the collection. If you assign an array, a set, or a dictionary to a constant, that collection is immutable, and its size and contents cannot be changed.
Arrays
An array stores values of the same type in an ordered list. The same value can appear in an array multiple times at different positions.
Array Type Shorthand Syntax
The type of a Swift array is written in full as Array<Element>
, where Element
is the type of values the array is allowed to store. You can also write the type of an array in shorthand form as [Element]
. Although the two forms are functionally identical, the shorthand form is preferred and is used throughout this guide when referring to the type of an array.
Creating an Empty Array
You can create an empty array of a certain type using initializer syntax:
var someInts = [Int]()
print("someInts is of type [Int] with \(someInts.count) items.")
// Prints "someInts is of type [Int] with 0 items."
Note that the type of the someInts
variable is inferred to be [Int]
from the type of the initializer.
Alternatively, if the context already provides type information, such as a function argument or an already typed variable or constant, you can create an empty array with an empty array literal, which is written as []
(an empty pair of square brackets):
someInts.append(3)
// someInts now contains 1 value of type Int
someInts = []
// someInts is now an empty array, but is still of type [Int]
Creating an Array with a Default Value
Swift’s Array
type also provides an initializer for creating an array of a certain size with all of its values set to the same default value. You pass this initializer a default value of the appropriate type (called repeating
): and the number of times that value is repeated in the new array (called count
):
var threeDoubles = Array(repeating: 0.0, count: 3)
// threeDoubles is of type [Double], and equals [0.0, 0.0, 0.0]
Creating an Array by Adding Two Arrays Together
You can create a new array by adding together two existing arrays with compatible types with the addition operator (+
). The new array’s type is inferred from the type of the two arrays you add together:
var anotherThreeDoubles = Array(repeating: 2.5, count: 3)
// anotherThreeDoubles is of type [Double], and equals [2.5, 2.5, 2.5]
var sixDoubles = threeDoubles + anotherThreeDoubles
// sixDoubles is inferred as [Double], and equals [0.0, 0.0, 0.0, 2.5, 2.5, 2.5]
Creating an Array with an Array Literal
You can also initialize an array with an array literal, which is a shorthand way to write one or more values as an array collection. An array literal is written as a list of values, separated by commas, surrounded by a pair of square brackets:
[value 1, value 2, value 3]
The example below creates an array called shoppingList
to store String
values:
var shoppingList: [String] = ["Eggs", "Milk"]
// shoppingList has been initialized with two initial items
The shoppingList
variable is declared as “an array of string values”, written as [String]
. Because this particular array has specified a value type of String
, it is allowed to store String
values only. Here, the shoppingList
array is initialized with two String
values ("Eggs"
and "Milk"
), written within an array literal.
In this case, the array literal contains two String
values and nothing else. This matches the type of the shoppingList
variable’s declaration (an array that can only contain String
values), and so the assignment of the array literal is permitted as a way to initialize shoppingList
with two initial items.
Thanks to Swift’s type inference, you don’t have to write the type of the array if you’re initializing it with an array literal containing values of the same type. The initialization of shoppingList
could have been written in a shorter form instead:
var shoppingList = ["Eggs", "Milk"]
Because all values in the array literal are of the same type, Swift can infer that [String]
is the correct type to use for the shoppingList
variable.
Accessing and Modifying an Array
You access and modify an array through its methods and properties, or by using subscript syntax.
To find out the number of items in an array, check its read-only count
property:
print("The shopping list contains \(shoppingList.count) items.")
// Prints "The shopping list contains 2 items."
Use the Boolean isEmpty
property as a shortcut for checking whether the count
property is equal to 0
:
if shoppingList.isEmpty {
print("The shopping list is empty.")
} else {
print("The shopping list is not empty.")
}
// Prints "The shopping list is not empty."
You can add a new item to the end of an array by calling the array’s append(_:)
method:
shoppingList.append("Flour")
// shoppingList now contains 3 items, and someone is making pancakes
Alternatively, append an array of one or more compatible items with the addition assignment operator (+=
):
shoppingList += ["Baking Powder"]
// shoppingList now contains 4 items
shoppingList += ["Chocolate Spread", "Cheese", "Butter"]
// shoppingList now contains 7 items
Retrieve a value from the array by using subscript syntax, passing the index of the value you want to retrieve within square brackets immediately after the name of the array:
var firstItem = shoppingList[0]
// firstItem is equal to "Eggs"
You can use subscript syntax to change an existing value at a given index:
shoppingList[0] = "Six eggs"
// the first item in the list is now equal to "Six eggs" rather than "Eggs"
When you use subscript syntax, the index you specify needs to be valid. For example, writing shoppingList[shoppingList.count] = "Salt"
to try to append an item to the end of the array results in a runtime error.
You can also use subscript syntax to change a range of values at once, even if the replacement set of values has a different length than the range you are replacing. The following example replaces "Chocolate Spread"
, "Cheese"
, and "Butter"
with "Bananas"
and "Apples"
:
shoppingList[4...6] = ["Bananas", "Apples"]
// shoppingList now contains 6 items
To insert an item into the array at a specified index, call the array’s insert(_:at:)
method:
shoppingList.insert("Maple Syrup", at: 0)
// shoppingList now contains 7 items
// "Maple Syrup" is now the first item in the list
This call to the insert(_:at:)
method inserts a new item with a value of "Maple Syrup"
at the very beginning of the shopping list, indicated by an index of 0
.
Similarly, you remove an item from the array with the remove(at:)
method. This method removes the item at the specified index and returns the removed item (although you can ignore the returned value if you do not need it):
let mapleSyrup = shoppingList.remove(at: 0)
// the item that was at index 0 has just been removed
// shoppingList now contains 6 items, and no Maple Syrup
// the mapleSyrup constant is now equal to the removed "Maple Syrup" string
Any gaps in an array are closed when an item is removed, and so the value at index 0
is once again equal to "Six eggs"
:
firstItem = shoppingList[0]
// firstItem is now equal to "Six eggs"
If you want to remove the final item from an array, use the removeLast()
method rather than the remove(at:)
method to avoid the need to query the array’s count
property. Like the remove(at:)
method, removeLast()
returns the removed item:
let apples = shoppingList.removeLast()
// the last item in the array has just been removed
// shoppingList now contains 5 items, and no apples
// the apples constant is now equal to the removed "Apples" string
Iterating Over an Array
You can iterate over the entire set of values in an array with the for
-in
loop:
for item in shoppingList {
print(item)
}
// Six eggs
// Milk
// Flour
// Baking Powder
// Bananas
If you need the integer index of each item as well as its value, use the enumerated()
method to iterate over the array instead. For each item in the array, the enumerated()
method returns a tuple composed of an integer and the item. The integers start at zero and count up by one for each item; if you enumerate over a whole array, these integers match the items’ indices. You can decompose the tuple into temporary constants or variables as part of the iteration:
for (index, value) in shoppingList.enumerated() {
print("Item \(index + 1): \(value)")
}
// Item 1: Six eggs
// Item 2: Milk
// Item 3: Flour
// Item 4: Baking Powder
// Item 5: Bananas
For more about the for
-in
loop, see For-In Loops.
Sets
A set stores distinct values of the same type in a collection with no defined ordering. You can use a set instead of an array when the order of items is not important, or when you need to ensure that an item only appears once.
Hash Values for Set Types
A type must be hashable in order to be stored in a set—that is, the type must provide a way to compute a hash value for itself. A hash value is an Int
value that is the same for all objects that compare equally, such that if a == b
, it follows that a.hashValue == b.hashValue
.
All of Swift’s basic types (such as String
, Int
, Double
, and Bool
) are hashable by default, and can be used as set value types or dictionary key types. Enumeration case values without associated values (as described in Enumerations) are also hashable by default.
Set Type Syntax
The type of a Swift set is written as Set<Element>
, where Element
is the type that the set is allowed to store. Unlike arrays, sets do not have an equivalent shorthand form.
Creating and Initializing an Empty Set
You can create an empty set of a certain type using initializer syntax:
var letters = Set<Character>()
print("letters is of type Set<Character> with \(letters.count) items.")
// Prints "letters is of type Set<Character> with 0 items."
Alternatively, if the context already provides type information, such as a function argument or an already typed variable or constant, you can create an empty set with an empty array literal:
letters.insert("a")
// letters now contains 1 value of type Character
letters = []
// letters is now an empty set, but is still of type Set<Character>
Creating a Set with an Array Literal
You can also initialize a set with an array literal, as a shorthand way to write one or more values as a set collection.
The example below creates a set called favoriteGenres
to store String
values:
var favoriteGenres: Set<String> = ["Rock", "Classical", "Hip hop"]
// favoriteGenres has been initialized with three initial items
The favoriteGenres
variable is declared as “a set of String
values”, written as Set<String>
. Because this particular set has specified a value type of String
, it is only allowed to store String
values. Here, the favoriteGenres
set is initialized with three String
values ("Rock"
, "Classical"
, and "Hip hop"
), written within an array literal.
A set type cannot be inferred from an array literal alone, so the type Set
must be explicitly declared. However, because of Swift’s type inference, you don’t have to write the type of the set if you’re initializing it with an array literal containing values of the same type. The initialization of favoriteGenres
could have been written in a shorter form instead:
var favoriteGenres: Set = ["Rock", "Classical", "Hip hop"]
Because all values in the array literal are of the same type, Swift can infer that Set<String>
is the correct type to use for the favoriteGenres
variable.
Accessing and Modifying a Set
You access and modify a set through its methods and properties.
To find out the number of items in a set, check its read-only count
property:
print("I have \(favoriteGenres.count) favorite music genres.")
// Prints "I have 3 favorite music genres."
Use the Boolean isEmpty
property as a shortcut for checking whether the count
property is equal to 0
:
if favoriteGenres.isEmpty {
print("As far as music goes, I'm not picky.")
} else {
print("I have particular music preferences.")
}
// Prints "I have particular music preferences."
You can add a new item into a set by calling the set’s insert(_:)
method:
favoriteGenres.insert("Jazz")
// favoriteGenres now contains 4 items
You can remove an item from a set by calling the set’s remove(_:)
method, which removes the item if it’s a member of the set, and returns the removed value, or returns nil
if the set did not contain it. Alternatively, all items in a set can be removed with its removeAll()
method.
if let removedGenre = favoriteGenres.remove("Rock") {
print("\(removedGenre)? I'm over it.")
} else {
print("I never much cared for that.")
}
// Prints "Rock? I'm over it."
To check whether a set contains a particular item, use the contains(_:)
method.
if favoriteGenres.contains("Funk") {
print("I get up on the good foot.")
} else {
print("It's too funky in here.")
}
// Prints "It's too funky in here."
Iterating Over a Set
You can iterate over the values in a set with a for
-in
loop.
for genre in favoriteGenres {
print("\(genre)")
}
// Jazz
// Hip hop
// Classical
For more about the for
-in
loop, see For-In Loops.
Swift’s Set
type does not have a defined ordering. To iterate over the values of a set in a specific order, use the sorted()
method, which returns the set’s elements as an array sorted using the <
operator.
for genre in favoriteGenres.sorted() {
print("\(genre)")
}
// Classical
// Hip hop
// Jazz
Performing Set Operations
You can efficiently perform fundamental set operations, such as combining two sets together, determining which values two sets have in common, or determining whether two sets contain all, some, or none of the same values.
Fundamental Set Operations
The illustration below depicts two sets—a
and b
—with the results of various set operations represented by the shaded regions.
Use the
intersection(_:)
method to create a new set with only the values common to both sets.Use the
symmetricDifference(_:)
method to create a new set with values in either set, but not both.Use the
union(_:)
method to create a new set with all of the values in both sets.Use the
subtracting(_:)
method to create a new set with values not in the specified set.
let oddDigits: Set = [1, 3, 5, 7, 9]
let evenDigits: Set = [0, 2, 4, 6, 8]
let singleDigitPrimeNumbers: Set = [2, 3, 5, 7]
oddDigits.union(evenDigits).sorted()
// [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
oddDigits.intersection(evenDigits).sorted()
// []
oddDigits.subtracting(singleDigitPrimeNumbers).sorted()
// [1, 9]
oddDigits.symmetricDifference(singleDigitPrimeNumbers).sorted()
// [1, 2, 9]
Set Membership and Equality
The illustration below depicts three sets—a
, b
and c
—with overlapping regions representing elements shared among sets. Set a
is a superset of set b
, because a
contains all elements in b
. Conversely, set b
is a subset of set a
, because all elements in b
are also contained by a
. Set b
and set c
are disjoint with one another, because they share no elements in common.
Use the “is equal” operator (
==
) to determine whether two sets contain all of the same values.Use the
isSubset(of:)
method to determine whether all of the values of a set are contained in the specified set.Use the
isSuperset(of:)
method to determine whether a set contains all of the values in a specified set.Use the
isStrictSubset(of:)
orisStrictSuperset(of:)
methods to determine whether a set is a subset or superset, but not equal to, a specified set.Use the
isDisjoint(with:)
method to determine whether two sets have no values in common.
let houseAnimals: Set = ["🐶", "🐱"]
let farmAnimals: Set = ["🐮", "🐔", "🐑", "🐶", "🐱"]
let cityAnimals: Set = ["🐦", "🐭"]
houseAnimals.isSubset(of: farmAnimals)
// true
farmAnimals.isSuperset(of: houseAnimals)
// true
farmAnimals.isDisjoint(with: cityAnimals)
// true
Dictionaries
A dictionary stores associations between keys of the same type and values of the same type in a collection with no defined ordering. Each value is associated with a unique key, which acts as an identifier for that value within the dictionary. Unlike items in an array, items in a dictionary do not have a specified order. You use a dictionary when you need to look up values based on their identifier, in much the same way that a real-world dictionary is used to look up the definition for a particular word.
Dictionary Type Shorthand Syntax
The type of a Swift dictionary is written in full as Dictionary<Key, Value>
, where Key
is the type of value that can be used as a dictionary key, and Value
is the type of value that the dictionary stores for those keys.
You can also write the type of a dictionary in shorthand form as [Key: Value]
. Although the two forms are functionally identical, the shorthand form is preferred and is used throughout this guide when referring to the type of a dictionary.
Creating an Empty Dictionary
As with arrays, you can create an empty Dictionary
of a certain type by using initializer syntax:
var namesOfIntegers = [Int: String]()
// namesOfIntegers is an empty [Int: String] dictionary
This example creates an empty dictionary of type [Int: String]
to store human-readable names of integer values. Its keys are of type Int
, and its values are of type String
.
If the context already provides type information, you can create an empty dictionary with an empty dictionary literal, which is written as [:]
(a colon inside a pair of square brackets):
namesOfIntegers[16] = "sixteen"
// namesOfIntegers now contains 1 key-value pair
namesOfIntegers = [:]
// namesOfIntegers is once again an empty dictionary of type [Int: String]
Creating a Dictionary with a Dictionary Literal
You can also initialize a dictionary with a dictionary literal, which has a similar syntax to the array literal seen earlier. A dictionary literal is a shorthand way to write one or more key-value pairs as a Dictionary
collection.
A key-value pair is a combination of a key and a value. In a dictionary literal, the key and value in each key-value pair are separated by a colon. The key-value pairs are written as a list, separated by commas, surrounded by a pair of square brackets:
[key 1: value 1, key 2: value 2, key 3: value 3]
The example below creates a dictionary to store the names of international airports. In this dictionary, the keys are three-letter International Air Transport Association codes, and the values are airport names:
var airports: [String: String] = ["YYZ": "Toronto Pearson", "DUB": "Dublin"]
The airports
dictionary is declared as having a type of [String: String]
, which means “a Dictionary
whose keys are of type String
, and whose values are also of type String
”.
The airports
dictionary is initialized with a dictionary literal containing two key-value pairs. The first pair has a key of "YYZ"
and a value of "Toronto Pearson"
. The second pair has a key of "DUB"
and a value of "Dublin"
.
This dictionary literal contains two String: String
pairs. This key-value type matches the type of the airports
variable declaration (a dictionary with only String
keys, and only String
values), and so the assignment of the dictionary literal is permitted as a way to initialize the airports
dictionary with two initial items.
As with arrays, you don’t have to write the type of the dictionary if you’re initializing it with a dictionary literal whose keys and values have consistent types. The initialization of airports
could have been written in a shorter form instead:
var airports = ["YYZ": "Toronto Pearson", "DUB": "Dublin"]
Because all keys in the literal are of the same type as each other, and likewise all values are of the same type as each other, Swift can infer that [String: String]
is the correct type to use for the airports
dictionary.
Accessing and Modifying a Dictionary
You access and modify a dictionary through its methods and properties, or by using subscript syntax.
As with an array, you find out the number of items in a Dictionary
by checking its read-only count
property:
print("The airports dictionary contains \(airports.count) items.")
// Prints "The airports dictionary contains 2 items."
Use the Boolean isEmpty
property as a shortcut for checking whether the count
property is equal to 0
:
if airports.isEmpty {
print("The airports dictionary is empty.")
} else {
print("The airports dictionary is not empty.")
}
// Prints "The airports dictionary is not empty."
You can add a new item to a dictionary with subscript syntax. Use a new key of the appropriate type as the subscript index, and assign a new value of the appropriate type:
airports["LHR"] = "London"
// the airports dictionary now contains 3 items
You can also use subscript syntax to change the value associated with a particular key:
airports["LHR"] = "London Heathrow"
// the value for "LHR" has been changed to "London Heathrow"
As an alternative to subscripting, use a dictionary’s updateValue(_:forKey:)
method to set or update the value for a particular key. Like the subscript examples above, the updateValue(_:forKey:)
method sets a value for a key if none exists, or updates the value if that key already exists. Unlike a subscript, however, the updateValue(_:forKey:)
method returns the old value after performing an update. This enables you to check whether or not an update took place.
The updateValue(_:forKey:)
method returns an optional value of the dictionary’s value type. For a dictionary that stores String
values, for example, the method returns a value of type String?
, or “optional String
”. This optional value contains the old value for that key if one existed before the update, or nil
if no value existed:
if let oldValue = airports.updateValue("Dublin Airport", forKey: "DUB") {
print("The old value for DUB was \(oldValue).")
}
// Prints "The old value for DUB was Dublin."
You can also use subscript syntax to retrieve a value from the dictionary for a particular key. Because it is possible to request a key for which no value exists, a dictionary’s subscript returns an optional value of the dictionary’s value type. If the dictionary contains a value for the requested key, the subscript returns an optional value containing the existing value for that key. Otherwise, the subscript returns nil
:
if let airportName = airports["DUB"] {
print("The name of the airport is \(airportName).")
} else {
print("That airport is not in the airports dictionary.")
}
// Prints "The name of the airport is Dublin Airport."
You can use subscript syntax to remove a key-value pair from a dictionary by assigning a value of nil
for that key:
airports["APL"] = "Apple International"
// "Apple International" is not the real airport for APL, so delete it
airports["APL"] = nil
// APL has now been removed from the dictionary
Alternatively, remove a key-value pair from a dictionary with the removeValue(forKey:)
method. This method removes the key-value pair if it exists and returns the removed value, or returns nil
if no value existed:
if let removedValue = airports.removeValue(forKey: "DUB") {
print("The removed airport's name is \(removedValue).")
} else {
print("The airports dictionary does not contain a value for DUB.")
}
// Prints "The removed airport's name is Dublin Airport."
Iterating Over a Dictionary
You can iterate over the key-value pairs in a dictionary with a for
-in
loop. Each item in the dictionary is returned as a (key, value)
tuple, and you can decompose the tuple’s members into temporary constants or variables as part of the iteration:
for (airportCode, airportName) in airports {
print("\(airportCode): \(airportName)")
}
// YYZ: Toronto Pearson
// LHR: London Heathrow
For more about the for
-in
loop, see For-In Loops.
You can also retrieve an iterable collection of a dictionary’s keys or values by accessing its keys
and values
properties:
for airportCode in airports.keys {
print("Airport code: \(airportCode)")
}
// Airport code: YYZ
// Airport code: LHR
for airportName in airports.values {
print("Airport name: \(airportName)")
}
// Airport name: Toronto Pearson
// Airport name: London Heathrow
If you need to use a dictionary’s keys or values with an API that takes an Array
instance, initialize a new array with the keys
or values
property:
let airportCodes = [String](airports.keys)
// airportCodes is ["YYZ", "LHR"]
let airportNames = [String](airports.values)
// airportNames is ["Toronto Pearson", "London Heathrow"]
Swift’s Dictionary
type does not have a defined ordering. To iterate over the keys or values of a dictionary in a specific order, use the sorted()
method on its keys
or values
property.
Copyright © 2017 Apple Inc. All rights reserved. Terms of Use | Privacy Policy | Updated: 2017-09-19


I am a roboticist interested in stochastic control systems and estimation / filtering theory, with applications to the “joint” design of planning and perception for robotic systems. I am currently a Robotics Research Technologist at NASA’s Jet Propulsion Laboratory (JPL), California Institute of Technology (Caltech).
Before joining NASA, I was a Research Staff Engineer (Roboticist) in Qualcomm Research (2015-2016) where I worked on Quadrotor Autonomy. Prior to that, I was a postdoctoral fellow at MIT (2013-2015) working with Jonathan P. How and I was a member of of LIDS (Laboratory for Information and Decision Systems) and ACL (Aerospace Controls Laboratory). I got my PhD in Computer Engineering from Texas A&M University in 2013.
Lab Coordinator:
Ali-Akbar Aghamohammadi
directions 4800 Oak Grove Drive,
Pasadena, CA 91101.
626-840-9140
aliagha at jpl dot nasa dot gov
CV
Google Scholar
We are looking for passionate new PhD students, Postdocs, and Master students to join the team! (more info).
Ali Agha organizes "POMDPs in Robotics{:} State of The Art, Challenges, and Opportunities" workshop in RSS 2017
14. April 2017Ali Agha organizes "Southern California Robotics Symposium" at USC
18. June 2017Paper titled "Decentralized control of multi-robot partially observable Markov decision processes using belief space macro-actions" a collaborative work with MIT got accpeted in IJRR
15. July 2017Paper titled: Real-Time Stochastic Kinodynamic Motion Planning via Multiobjective Search on GPUs a collaborative work with Marco Pavone in Stanford got accepted to ICRA 2017 (arxiv version )


{{ object.article|safe }}
{{ object.date }}
Latest Posts
{% for intances in latest %}{{ intances.title }}
With supporting text below as a natural lead-in to additional content.
Go somewhere{{ object.article|safe }}
{{ object.date }}
With supporting text below as a natural lead-in to additional content.
Go somewhere


Hey!
So, yes, as we were saying the blogging and such. Well, it's been a fairly quiet time at global BlinkinLabs HQ as we cook up some new, amazing junk. However, we've also been doing just a little in terms of smaller stuff.
Like this! A brandy new audio visualization for your BlinkyTape!
Still reading...that's awesome! The new audio visualizer is called BlinkySpectrogram and, as you might have guessed, it's based on the concept of a spectrogram which is a type of technical visualization of audio. Basically, it does some clever analysis (called an FFT) that organizes the sound into time-based slices, and looks to see what frequencies are present in each slice. This visualization is showing pretty much one slice at a time on yout BlinkyTape, and I like it a lot.
The frequencies are organized into bands, which are arranged in octaves...that means doubling instead of linear, which is closer to the way we hear things, psychoacoustically. Bands with more energy are redder, and those with less are darker and bluer.
Cool right? OH, well, I guess you want to try it first. So grab Processing if you haven't already, then the files, your favorite virtual audio cable (see the README, but basically you'll want SoundFlower on OS X or VB-Cable in Win) and then fire up an example. I suggest LCD Soundsystem's Sound of Silver which should provide a good demo for you.
And as always, let us know what you think on the forum and we'd happily accept some improvements to the code if you're savvy!


My Projects
My first project was making my own poem using code p(paragraph) tags and br(break tags) tag.
Press Here to see my project
My second project was to make a 3x3 squae using css and it really difficult because I never made a square using code before.
Press Here to see my 3x3 square
My third Project was with a group and I was with Andrew and Cole
This let's you go on a spooky adventure


--- layout: template_r_track title: R-Track Program excerpt: The Ultimate Online Data Science Program. ---
Kickstart your Data Science Journey today with the 5-Course R-Track System.
Expert data science instructor, Matt Dancho, shows you how to go from zero-experience to a full-time data scientist step-by-step. In our streamlined 5-course system, you'll learn everything you need to succeed in data science.
{% include r_track_courses_r1.html %}"Because of the R-Track Courses, I landed my first Data Scientist role at a global energy company."
"I picked up quite a few new things that I've been applying at work."
"The most important advantage is the access you have to the instructor, and how fast Matt Dancho replies whenever one of his students needs help."
"I was able to take results from a real project and bring a Shiny App to my bosses in an internal meeting. They loved my Shiny App and now they asked me to present it to the whole company."
"This is how highly I think of Matt Dancho's courses. Right next to my MBA in analytics."
Join our FREE 40-minute webinar to learn our Top 10 Secrets to becoming a data scientist in under 6-months.


29 May 2007
On 25 May 2007, the United Kingdom Health Protection Agency (HPA) announced that influenza A/H7N2 virus infection had been laboratory confirmed in four individuals exposed to infected poultry in Corwen Farm, Conwy, Wales. The poultry outbreak in Wales started on a smallholding, Corwen Farm, Conwy, on 8 May 2007, was laboratory confirmed on 24 May 2007, and notified to the World Organisation for Animal Health on 25 May 2007.


JsTetris is a highly customizable tetris game written in javascript,
full sources available, it is free to modify.
Author: Cezary Tomczak
Site: www.gosu.pl/tetris/
License: BSD revised (free for any use)
Js Tetris 1.19© Cezary Tomczak
|
| Rotate: | 2 | ||
| Move: | 4 | 5 | 6 |
| Fall: | 8 |
| Level: | 1 |
| Score: | 0 |
| Lines: | 0 |
| APM: | 0 |
| Time: | 0 |


Whats Changed?
Step 1 of 3
- The map below contains two images that are different.
- The two images will turn on and off at a regular intervals.
- Click on any boxes where you believe the two images are different.
- The boxes you click on will change orange and will become your answers when you click submit.
- Clicking on an orange box will remove it from your selection.
- Zoom or Pan if you need to.
- Submit your answer.
Step 2 of 3
Submit the selected boxes (in orange) as your answer.


Bee Breeding
问题描述 :
Professor B. Heif is conducting experiments with a species of South American bees that he found during an expedition to the Brazilian rain forest. The honey produced by these bees is of superior quality compared to the honey from European and North American honey bees. Unfortunately, the bees do not breed well in captivity. Professor Heif thinks the reason is that the placement of the different maggots (for workers, queens, etc.) within the honeycomb depends on environmental conditions, which are different in his laboratory and the rain forest.
As a first step to validate his theory, Professor Heif wants to quantify the difference in maggot placement. For this he measures the distance between the cells of the comb into which the maggots are placed. To this end, the professor has labeled the cells by marking an arbitrary cell as number 1, and then labeling the remaining cells in a clockwise fashion, as shown in the following figure.
For example, two maggots in cells 19 and 30 are 5 cells apart. One of the shortest paths connecting the two cells is via the cells 19 – 7 – 6 – 5 – 15 – 30, so you must move five times to adjacent cells to get from 19 to 30.
Professor Heif needs your help to write a program that computes the distance, defined as the number of cells in a shortest path, between any pair of cells.
As a first step to validate his theory, Professor Heif wants to quantify the difference in maggot placement. For this he measures the distance between the cells of the comb into which the maggots are placed. To this end, the professor has labeled the cells by marking an arbitrary cell as number 1, and then labeling the remaining cells in a clockwise fashion, as shown in the following figure.
|
For example, two maggots in cells 19 and 30 are 5 cells apart. One of the shortest paths connecting the two cells is via the cells 19 – 7 – 6 – 5 – 15 – 30, so you must move five times to adjacent cells to get from 19 to 30.
Professor Heif needs your help to write a program that computes the distance, defined as the number of cells in a shortest path, between any pair of cells.
输入:
The input consists of several lines, each containing two integers a and b (a,b <= 10000), denoting numbers of cells. The integers are always positive, except in the last line where a=b=0 holds. This last line terminates the input and should not be processed.
输出:
For each pair of numbers (a,b) in the input file, output the distance between the cells labeled a and b. The distance is the minimum number of moves to get from a to b.
样例输入:
19 30 0 0
样例输出:
The distance between cells 19 and 30 is 5.
解题代码:
import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner scan = new Scanner(System.in); while(true){ int a = scan.nextInt(); int b = scan.nextInt(); if(a==0&&b==0) break; A3 p = new A3(0,0); p = cal(a); A3 p1 = new A3(p.x,p.y); p = cal(b); A3 p2 = new A3(p.x,p.y); int x = p1.x-p2.x; int y = p1.y-p2.y; int ans; if(x*y<=0) ans = Math.max(Math.abs(x), Math.abs(y)); else ans = Math.abs(x+y); System.out.printf("The distance between cells %d and %d is %d.",a,b,ans); System.out.println(); } } public static A3 cal(int a) { if(a == 1){ return new A3(0,0); } int x; int y; int n = 0; while(3*(n-1)*n+1< a) // 3*(n-1)*n+1 为第n圈最后一个数 n++; n--; a -= 3*(n-1)*n+1; if(a<=n){ // 详细注释见我的 poj 2265 x = n; y = -a; }else if(a>n&&a<=2*n){ x = 2*n-a; y = -n; }else if(a>2*n&&a<=3*n){ x = 2*n-a; y = -n-x; }else if(a>3*n&&a<=4*n){ x = -n; y = a-3*n; }else if(a>4*n&&a<=5*n){ x = a-5*n; y = n; }else{ x = a-5*n; y = n-x; } A3 p = new A3(x,y); return p; } } class A3{ int x; int y; public A3(int x, int y) { super(); this.x = x; this.y = y; } }
(adsbygoogle = window.adsbygoogle || []).push({});
Java真是解决大数的利器
这道题目重复了，删掉一个吧
分析的很专业！
第二个解法好像不对
http://www.realoj.com/problem/7如果楼主不介意，以可以在这个oj上做下，按照你的代码是错的。。。直接复制粘贴你的也是错。。不懂错在哪。
I like your publish. It is great to see you verbalize from the coronary heart and clarity on this essential subject matter can be easily noticed.
刚开始学习，为啥会报错了
“可以发现,树将是满二叉树,”这句话不对吧，构造的树应该是“完全二叉树”，而非“满二叉树”。
多谢提醒，是漏掉了
原来的主机不行，目前更换到了国内主机
很好。代码比书上的简练！


After the death of a pregnant Lois Lane by the hands of the Joker, Superman has decided to end all these people, politicians, villains who have terrorized and threatened the human beings. Motivated by the rage of the krypton god, Batman, Wonder Woman, Green Lantern and flash, will help Superman to get rid of all this villains the world has to offer in a radical crusade. Other group of super humans, known as The Avengers, sees Superman’s and his allies cause as an act of vengeance which has to be stopped. Ironman, Thor, Hulk, Captain America and Mrs. Marvel have united to stop them.
Taking advantage of all the panic and wreckage caused by the superheroes, a group of villains leaded by the one and only Joker strike fear and evil in society. The Joker joined the brightest mind of the planet, Lex Luthor and both have succeeded on recruiting villains such as Galactus, Red Skull and Thanos for them to join forces and stop each one of them that once have successfully stopped their plans This time the battle is between life and death.


Structures
The following structures are available globally.
-
Environment Key for Steps
See moreDeclaration
Swift
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) struct StepsKey : EnvironmentKey
-
Environment Key for alignments
See moreDeclaration
Swift
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) struct AlignmentKey : EnvironmentKey
-
Environment Key for Indicators
See moreDeclaration
Swift
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) struct IndicatorKey : EnvironmentKey
-
Environment Key for StepIndicatorMode
See moreDeclaration
Swift
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) struct StepIndicatorModeKey : EnvironmentKey
-
Environment Key for Spacing
See moreDeclaration
Swift
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) struct SpacingKey : EnvironmentKey
-
Environment Key for Auto Spacing
See moreDeclaration
Swift
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) struct AutoSpacingKey : EnvironmentKey
-
Environment Key for Line Options
See moreDeclaration
Swift
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) struct LineOptionsKey : EnvironmentKey
-
Environment Key for pit stop line options.
See moreDeclaration
Swift
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) struct PitStopOptionsKey : EnvironmentKey
-
Environment Key for Line Options
See moreDeclaration
Swift
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) struct PitStopLineOptionsKey : EnvironmentKey
-
Environment Key for pit stop line options.
See moreDeclaration
Swift
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) struct StepAnimationOptionsKey : EnvironmentKey
-
Environment Key for pit stop line options.
See moreDeclaration
Swift
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) struct LoadAnimationOptionsKey : EnvironmentKey
-
Environment Key for pit stop line options.
See moreDeclaration
Swift
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) struct StepLifeCycleKey : EnvironmentKey
-
Environment Key for pit stop line options.
See moreDeclaration
Swift
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) struct StepperEdgeInsetsKey : EnvironmentKey
-
Collects height of all the cells, with reduce takes the maximum value for the given key
See moreDeclaration
Swift
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) struct HeightPreference : PreferenceKey
-
Collects height of all the cells, with reduce takes the maximum value for the given key
See moreDeclaration
Swift
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) struct VerticalHeightPreference : PreferenceKey
-
Collects height of all pistop cells, with reduce takes the maximum value for the given key
See moreDeclaration
Swift
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) struct PitstopHeightPreference : PreferenceKey
-
Collects width of all the cells, with reduce takes the maximum value for the given key
See moreDeclaration
Swift
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) struct WidthPreference : PreferenceKey
-
Collects bound, center coordinates and pass layout data to it’s parent View
See moreDeclaration
Swift
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) public struct BoundsPreferenceKey : PreferenceKey
-
Preference Key for
See moreCGRect
Declaration
Swift
struct CGRectPreferenceKey : PreferenceKey
-
placeholder struct to hold CGRect data.
See moreDeclaration
Swift
struct CGRectData : Equatable, Identifiable
-
Preference Key for
See morewidth
Declaration
Swift
struct WidthKey : PreferenceKey
-
Preference Key for
See moreheight
Declaration
Swift
struct HeightKey : PreferenceKey
-
placeholder to constants
See moreDeclaration
Swift
public struct Utils
-
A
See moreView
for hostign text with properframe
alignment
,lineLimit
modifiersDeclaration
Swift
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) public struct TextView : View
-
A Circled Icon
See moreView
for Step IndicatorDeclaration
Swift
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) public struct CircledIconView : View
-
A
See moreView
for Step IndicatorDeclaration
Swift
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) struct IndicatorView : View
-
Circle view with text inside for Step Indicator
See moreDeclaration
Swift
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) public struct NumberedCircleView : View
-
circles around the border with progress
See moreDeclaration
Swift
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) struct AnimatedCircle : View
-
Horizontal Line View for Step Indictor
See moreDeclaration
Swift
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) struct HorizontalLineView : View
-
pitstop Line View for each of the step indicator
See moreDeclaration
Swift
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) struct PitStopLineView : View
-
Vertical Line View for Step Indictor
See moreDeclaration
Swift
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) struct VerticalLineView : View
-
A View for setting up a pitstop for eg: line with a
See morecircle
orcustom
viewDeclaration
Swift
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) struct PitStopView<PitStop> : View where PitStop : View
-
A Step Indications View in
horizontal
directioncreates step indicator view either in
See morehorizontal
modeDeclaration
Swift
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) struct StepIndicatorHorizontalView<Cell> : View where Cell : View
-
A Step Indications View in
vertical
directioncreates step indicator view either in
See morevertical
modeDeclaration
Swift
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) struct StepIndicatorVerticalView<Cell> : View where Cell : View
-
A View for Step Indications.
You create step indicator view either in
See morevertical
orhorizontal
modeDeclaration
Swift
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) public struct StepperView : View


CoronaFiles.us
Compare
Hotspots
Alerts
Herd Immunity
Intl. Comparison
Forecast
About
All US Counties
Sorted by Covid-19 Cases Per Million
{COUNTY_TABLE}


New release
—
Prototypo Elzevir
One of the many Elzevirs published by French foundry Renaud during the first wave of revivals in the late 19
th century.
Thickness 140
COMES WITH MORE THAN 25 PARAMETERS
Height 700 - Thickness 90 - Width 1
elz
Thickness 80 — Width 1 — Serif Height 15
The web application Prototypo gives anyone the possibility to create personalized fonts and export them to use on their website or desktop application such as Word or InDesign.


mixed print_r ( mixed $expression [, bool $return = false ] )
print_r() displays information about a variable in a way that's readable by humans. print_r(), var_dump() and var_export() will also show protected and private properties of objects with PHP 5. Static class members will not be shown. Remember that print_r() will move the array pointer to the end. Use reset() to bring it back to beginning.
If given a string, integer or float, the value itself will be printed. If given an array, values will be presented in a format that shows keys and elements. Similar notation is used for objects. When the return parameter is TRUE, this function will return a string. Otherwise, the return value is TRUE.


28
1 After the Sabbath ended, on Sunday morning at dawn, Mary from the town of Magdala and the other Mary went to look at the tomb of Jesus.
2 Suddenly there was a strong earthquake. At the same time an angel from God came down from heaven. He went to the tomb and rolled the stone away from the entrance. Then he sat on the stone.
3 His body was as bright as lightning, and his clothes were as white as snow.
4 The guards trembled because they were very afraid, and then they fell down like dead men.
5 The angel said to the two women, "You should not be afraid! I know that you are looking for Jesus, who was nailed to a cross.
6 He is not here!  Come and see the place where his body lay!
7 Then go quickly and tell his disciples, 'He has risen from the dead! He will go ahead of you to the district of Galilee. You will see him there.' Pay attention to what I have told you!"
8 So the women left the tomb quickly. They were afraid, but they were also very joyful. They ran to tell the disciples what had happened.
9 Suddenly, as they were running, Jesus appeared to them. He said, "Peace be to you!" The women came close to him. They knelt down and clasped his feet and worshiped him.
10 Then Jesus said to them, "Do not be afraid! Go and tell all my disciples that they should go to Galilee. They will see me there."
11 While the women were going, some of the soldiers who had been guarding the tomb went into the city. They reported to the chief priests everything that had happened.
12 So the chief priests and Jewish elders met together. They thought of a way to explain why the tomb was empty. They gave the soldiers a lot of money as a bribe.
13 They said, "Tell people, 'His disciples came during the night and stole his body while we were sleeping.'
14 If the governor hears about this, we ourselves will make sure that he does not get angry and punish you. So you will not have to worry."
15 So the soldiers took the money and did as they were told. And this story has been told among the Jews to the very day that I am writing this.
16 Later the eleven disciples went to the district of Galilee. They went to the mountain where Jesus had told them to go.
17 they saw him there and worshiped him. But some doubted that it was really Jesus and that he had become alive again.
18 Then Jesus came close to them and said, "My Father has given me all authority over everything and everyone in heaven and on earth.
19 So go, and use my authority to teach my message to people of all people groups so that they may become my disciples. Baptize them to be under the authority of my Father, of me, his Son, and of the Holy Spirit.
20 Teach them to obey everything that I have commanded you. And remember that I will be with you always, until the end of this age."


| cat_plot | Plot interaction effects between categorical predictors. |
| center_lm | Center variables in fitted regression models |
| draw_key_pointrange_h | ggplot2 extensions |
| draw_key_vpath_h | ggplot2 extensions |
| effect_plot | Plot simple effects in regression models |
| export_summs | Export regression summaries to tables |
| GeomLinerangeh | ggplot2 extensions |
| GeomPointrangeh | ggplot2 extensions |
| geom_linerange_h | ggplot2 extensions |
| geom_pointrange_h | ggplot2 extensions |
| glance.summ.glm | Broom extensions for summ objects |
| glance.summ.lm | Broom extensions for summ objects |
| glance.summ.merMod | Broom extensions for summ objects |
| glance.summ.svyglm | Broom extensions for summ objects |
| gscale | Scale and/or center regression inputs, including from survey designs, by dividing by 2 SD |
| interact_plot | Plot interaction effects in regression models |
| johnson_neyman | Calculate Johnson-Neyman intervals for 2-way interactions |
| j_summ | Regression summaries with options |
| j_summ.glm | Generalized linear regression summaries with options |
| j_summ.lm | Linear regression summaries with options |
| j_summ.merMod | Mixed effects regression summaries with options |
| j_summ.svyglm | Complex survey regression summaries with options |
| pf_sv_test | Test whether sampling weights are needed |
| plot_coefs | Plot Regression Summaries |
| plot_summs | Plot Regression Summaries |
| PositionDodgev | ggplot2 extensions |
| position_dodgev | ggplot2 extensions |
| probe_interaction | Probe interaction effects via simple slopes and plotting |
| scale_lm | Scale variables in fitted regression models |
| sim_slopes | Perform a simple slopes analysis. |
| summ | Regression summaries with options |
| summ.default | Linear regression summaries with options |
| summ.glm | Generalized linear regression summaries with options |
| summ.lm | Linear regression summaries with options |
| summ.merMod | Mixed effects regression summaries with options |
| summ.svyglm | Complex survey regression summaries with options |
| svycor | Calculate Pearson correlations with complex survey data |
| svysd | Calculate standard deviations with complex survey data |
| theme_apa | Format ggplot2 figures in APA style |
| tidy.summ | Broom extensions for summ objects |
| weights_tests | Test whether sampling weights are needed |
| wgttest | Test whether sampling weights are needed |


6.810 Engineering Interactive Technologies (fall 2021)
Lab 5: Spraying Electroluminescent Displays
In this lab, you will create the electrolumiscent display for the interactive mug from scratch using airbrushing.
Steps:
- Decide on Display Design
- Laser Cut Stencil for Copper Layer
- Put on Safety Wear
- Team Member 1: Prepare ITO and Spray Phosphor Layer
- Team Member 2: Spray Dieletric Layer
- Team Member 3: Spray Copper Layer with Stencil
- Remove Stencils and Tape
- Wire up the Display
Deliverables
At the end of the lab, upload to your student google drive:
- a short video (.mov or .mp4, max. 30s) showing how one of your displays turns on
Help us Improve Class Materials for Lab5:
Please let us know if you had any trouble with the design file or spray hardware.
You can add your comments here.
Group Work:
This lab is done in teams of 3 students. Each member of your team will spray one layer (phosphor, dieletric, copper) of the electrolumiscent display. Thus, all steps below should be discussed as a team and then a decision for the entire team should be made. After each layer/material, the airbrush has to be cleaned, which takes about 20 minutes, and the layer has to dry, which takes about 30 minutes. Thus, spraying the entire display will take ca. 3 hours.
Decide Spray Order for your Team: Decide which team member is going to spray what.
Enter the team member's name and spray times here in this google spreadsheet.
Laser Cut Stencil for Last Layer: You need to laser cut the stencil for the last layer (copper) before you can spray it. Thus, while team member 1 is spraying, the other two team members should laser cut the stencil in the mean time. You have about 2 hours to get this done, so there is no super rush but you should get going once you arrive at the IDC.
(1) Decide on Display Design
Making Custom Shaped Displays: To make your display have a particular shape, consider the following: The display will only glow
in the locations that both have a top electrode (ITO sheet)
and bottom electrode (copper).
Any area that only has a top electrode (ITO) but is not covered by the bottom electrode (copper) will not glow. Thus, in order to make our display have a certain shape, we only need to remove material
from either the top OR the bottom electrode, and not both. In our case, we will cover parts of the top layer with a stencil
so that the sprayed copper will only be applied in the areas where the stencil has a cut-out. Thus, as a result, only those area will work as a display and glow.
Download Template Display Design (Coffee Cup): You can download our template design
here. The design is a display shaped as a steaming coffee mug. As you can see, if contains several stencils in a row. This is because you will make 2 displays for each team member (8 in total) to ensure that a good number of them work (spraying a display is not easy, we will call it a success if 50% of your displays work, thus we have you fabricate some extra just in case). You may have noticed that the mugs are mirrored,
i.e. the handle is on the left side not the right side. This is necessary because when we spray the stencil, it will form the bottom layer and the display will be flipped over in the end. Thus, if you forget about this you will have the handle on the wrong side. If you use our template design, move on to step (2) to laser cut the stencil, otherwise you can read below how you can make your own design.
Create Custom Display Designs: If you decide to make a custom display design, we still ask you to make 4 of our standard display designs (i.e. 4 coffee mugs + 4 custom designs)
. By doing this, the chance is higher that some of them will work. To make a new design, download the template design
here and replace 4 of the 8 mugs with our own design while sticking to the following:
- stay within the boundaries (large square) in the design template
- 4 displays per row
- distance between individual displays in a row needs to be 25mm
- distance between display rows need to be 25mm
- your design should not contain delicate, thin elements (width <5mm)
- do not forget to
mirror
your design at the end otherwise your display will not look as expected (e.g. the mug handle will be on the left side not right side where it should be)
Below is a video from last year when a team made their own design:
(2) Laser Cut Stencil for Copper Layer
Pick up Adhesive Sheet for Stencil: You will cut your stencil from an adhesive sheet. The adhesive part will make it easy to attach the stencil to the existing two display layers. We will give you the sheet when you arrive at the IDC.
Check Drawing Size and other Drawing Settings: Open the file in your drawing program and confirm that the stencil design has the right size. The mug should be 48mm x 46mm and the overall design should show 8 little mugs and an outline around them.
Laser Cut the Stencil: The power/speed settings for laser cutting a material depend on the material type and how thick it is. The laser cutter settings for our adhesive sheet are as follows: power: 40%, speed: 100%
(3) Put on Safety Wear
For spraying, you need to wear gloves, a lab coat, and a mask that filters out spray particles.  Please keep them for later use in the semester.
Lab Coat: Put on the lab coat. Make sure to close all the buttons on the lab coat. For use in class, we bought disposable lab coats, so after the semester is over you can dispose it in the trash.
Gloves: Next, put on the gloves. Never touch an ink container, the inks, or a sprayed area directly with your hands. Touching the ink can lead to some particles being taken up through your skin, so we want to avoid this at all times.
Mask: Put on the mask. The mask will protect you so that you don't breath in any flying particles during the spraying process. We will have a disposable mask for each student so you don't have to share.
Safety Glasses: Now also put on your safety glasses so nothing can splash into your eyes.
(4) Team Member 1: Prepare ITO and Spray Phosphor Layer
Before we can spray the phosphor layer onto the ITO sheet, we have to do a few preparation steps.
Cut Cardboard: Cut out a piece of cardboard larger than the ITO sheet. While spraying, you will hold onto the cardboard since you need to cover the entire ITO sheet with spray paint, so make sure the ITO sheet has enough space around it.
Remove Protective Cover from ITO Sheet: Before you tape the ITO onto the cardboard, remove its protective cover foil
. The ITO sheet is sensitive to bending so try to not bend the sheet too much while you pull off the cover foil.
Identify Conductive Side on ITO sheet: The ITO sheet is only conductive on one side
(i.e. the side where we just removed the protective cover foil). We want to spray onto the conductive side, so it needs to face towards you. Use a multimeter to check which side is conductive. Imagine how frustrating it would be if your team mates sprayed the entire display stack just to find out at the end you sprayed on the wrong side of the sheet and nothing will work!
Tape ITO sheet to Cardboard: With the conductive side facing up, attach the ITO sheet with tape to the cardboard. Tape around the entire area of the sheet, it will help you later to see where you already sprayed since you can monitor the marks on the blue area around the ITO. Try to cover about 2cm
of the ITO on each side. Don't cover more than that because you also need enough space for the EL displays. The taped areas will later be used to connect with a wire to the conductive ITO.
Spray Phosphor Layer: Load the phosphor ink into the spray gun and spray the entire area of the ITO with phosphor. While you spray, make sure you have some distance between the airbrush and the object. If you are too close drops will from on the surface leading to uneven coverage. Do a first pass across the entire sheet by moving you hand vertically, i.e. up and down,
and then a second pass horizontally moving your hand left to right
. Make sure the entire area has even coverage. If there is more phosphor in one area than another your display will have some brighter and some darker spots. Once you are done, the layer needs to dry at least 30 minutes before your team mate can spray the dieletric layer.
(5) Team Member 2: Spray Dieletric Layer
Next, we will spray the dieletric layer. Remember that the dieletric layer is super important. If the dieletric layer is not covering every single pixel there will be a short circuit
in this area since the ITO sheet, phosphor layer, and copper layer (last layer) are all conductive and will touch each other and thus the display will not work.
Spray Dieletric Layer: Load the dieletric ink into the spray gun and spray the entire area of the ITO with dieletric ink. While you spray, make sure you have some distance between the airbrush and the object. If you are too close drops will from on the surface leading to uneven coverage
. Do a first pass across the entire sheet by moving the hand vertically, i.e. up and down, then do a second pass horizontally moving the hand left to right. For both passes, you want to make sure the entire area has even coverage. If there is more dieletric in one area than another your display will have some brighter and some darker spots
since there is more resistance in some areas than in others. Once the dieletric layer is done, it needs to dry at least 30 minutes before your team mate can spray the copper layer.
(6) Team Member 3: Spray Copper Layer with Stencil
Before we can spray the copper layer, you need to apply the stencil.
Apply Laser Cut Stencil: Peel the protective layer from the back side of the stencil foil to expose the adhesive side
. Stick the stencil on top of the sprayed layers. Make sure that your stencil covers the entire ITO sheet
and there are no areas not covered by the stencil. When you apply the stencil, don't apply to much pressure so you don't damage the underlying layers.
Spraying the Copper: Load the copper ink into the spray gun and spray the entire area of the ITO with copper. While you spray, make sure you have some distance between the airbrush and the object. If you are too close drops will from on the surface leading to uneven coverage. Do a first pass across the entire sheet by moving you hand vertically, i.e. up and down, and then a second pass horizontally moving your hand left to right. Make sure the entire area has even coverage.
If there is more copper in one area than another your display will have some brighter and some darker spots since some areas are more conductive. Once you are done, the layer needs to dry at least 30 minutes.
(7) Remove Stencils and Tape
You are done with spraying and now need to remove the displays from the cardboard.
Remove the stencil, peel off the blue tape around the ITO sheet, and then take the displays off the cardboard.
(8) Wire up the Display
Connect Display to Circuit: Wiring up your display to see if it actually works takes another 20-30 minutes. In case you have to run out, don't worry, you can test your display in the next class. Only one of your team members has to do the wiring/testing, so if one from your team can stick around to do the next steps that would be best but not required.
Test Conductivity of Copper with Multimeter: Before wiring up the displays, let's test how conductive the copper layer is. This gives a good first estimate if the display will work or not. Use a multimeter and check if the copper layer is conductive. The tips of the multimeter are quite pointy and can damage the layers if you press too harshly on the copper, so be gentle.
A good resistance
would be around 10Ω
. Anything higher than 50Ω
will likely not work.
Wire Connection to ITO and Sprayed Copper Layers: Before we can power up our display, we need to create a wire connection to the ITO and sprayed copper layer that will serve as GND
and power
. For this, we are using copper tape, which can later be connected to a crocodile clamp. Read more below on how to do it.
Attach Copper Tape to ITO sheet: First, attach copper tape to the ITO sheet as shown below.
Attach Copper Tape to Sprayed Copper layer: Cut the display sheet into individual displays, and then attach a copper tape flap. The flap should cover a large area on the display to make a good connection.
Test your Display: Next, attach a crocodile clamp to the copper tape on the ITO and the copper tape on the sprayed copper and see if your display lights up. Once you tested all your displays, you can either leave them with us in a zip bag and we will store them for you on the class shelve or take them home (please be careful during transport to not apply too much pressure to the display and don't squish it in your bag).
Deliverables
At the end of the lab, upload to your student google drive:
- a short video (.mov or .mp4, max. 30s) showing one of your displays turn on
Please let us know if you had any trouble with the design file or spray hardware.
You can add your comments here.
Enter the team member's name and spray times here in this google spreadsheet.
mirror
your design at the end otherwise your display will not look as expected (e.g. the mug handle will be on the left side not right side where it should be)


-
Static + Saleina CMS = 😍
Get the speed, security, and scalability of a static site, while still providing a convenient editing interface for content.
-
An integrated part of your Git workflow
Content is stored in your Git repository alongside your code for easier versioning, multi-channel publishing, and the option to handle content updates directly in Git.
-
Editor friendly user interface
The web based app includes tabbed UI, rich-text editing, and media management.
-
Community driven project
Saleina CMS is built by a community and you can help.


--- layout: post title: live blogging from BarCamp Cambridge, categories: - cool - cambridge - blog - blogging - barcamp - talk ---
I am at Bar Camp Cambridge,
We have had the three word introductions and are just running through themorning talks now. It's pretty cool.
The coffee is good, and cookies are great.
Let's see how the day goes.


Add all the ingredients into a mixing glass with ice, and stir until well-chilled.
Strain into a rocks glass filled with large ice cubes.
Garnish with an orange peel.


Troll (and others now) Quirk Generator 2.0
Generator for Homestuck/Hiveswap typing quirks. Created by /u/CommanderMark.
Want to check out the source or report issues? See the
GitHub
.
Input Text:
Toggle Copy-to-Clipboard:


This page contains the following JavaScript:
// some variables var x = 1; // good y = 2; // bad (always) window.z = 3; // bad (sometimes) window[0] = 4; // bad (sometimes) window.iWantThisOne = 5; // sometimes bad, but we are ok with this one BADGLOBALS.exclude("iWantThisOne", "jQuery"); // exclude the globals we don't mind as properties BADGLOBALS.check(); // do the check console.log("Report is %o", BADGLOBALS.report());


At a Glance
Latest Statistics
15k
Visits
14k
Sales
$15.315
Total Earnings
Income
+31.2%
Expenses
-14.5%
Subscriptions
+11.2%
Savings
$14,500
Notifications View All
Reports from Co-workersView All
Best Seling ProductView All
StickyMobile
Best Mobile Template on Envato


Your Bag
Product
Quantity
Price
Dr.Jart+ Ceramidin Liquid Toner
Price: $25.00
Remove
$25.00
The Ordinary BHA 2% Peeling
Price: $28.00
Remove
$28.00
Bare Minerals Skinlongevity eye cream
Price: $10.40
Remove
$10.40
Total price
$63.40
Delivery
$1.60
Total price
$65.00


Home
About Us
Contact Us
User Sign-Up
First Name
Last Name
Sex
Male
Female
Date of Birth
Phone Number
Email Address
Password
Confirm Password
Submit
Already a user?
sign-in


Floating hotel
location:
design team:
area:
project year:
A project ordered by private client for a new Belgrade boutique hotel. The hotel is located by the banks of Danube River and in the center of Serbian capital city as well.
Building on water is something RA team approaches with great enthusiasm. In this case, thirteen small rooms with great views over the river and cityscape were designed, together with other accommodation utilities.
Positioned within high river vegetation the building gives an ambience and notion of a river shack. It is formed out of four individual buildings with inner corridors and platforms that both connect and separate them. It provides each guest with the feeling that they have their own personal river house. The main staircase and the lobby with a fireplace is a central focal point which overlooks the Danube River through a high glass terrace wall. Additional and a more private terrace on the second floor hosts a sauna and a spa.
The main building material is wood. From frame construction to the wall and floor covering the entire structure over steel raft foundation is made out of wood. The outer side walls are covered in metal, the same way as the roof.


public static class EnumFormatValidator.Builder
extends java.lang.Object
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
EnumFormatValidator |
build()
Build an instance of AdvancedEnumFormatValidator based on the field set
in the FormatValidatorBuilder object.
|
EnumFormatValidator.Builder |
loadData()
Does everything that the loadDataGzip does, except it works for text file instead.
|
EnumFormatValidator.Builder |
loadDataGzip()
Read the gzip file from the given file path, then convert it into an instance of Table
object.
|
EnumFormatValidator.Builder |
setFilePath(java.lang.String filePath)
set the file path of the gzip/txt file
|
EnumFormatValidator.Builder |
setFormatTag(java.lang.String formatName) |
EnumFormatValidator.Builder |
setRules(Rules rules) |
EnumFormatValidator.Builder |
setTableFormat(TableFormat tableFormat)
set the table format of the builder object
|
public EnumFormatValidator.Builder setFormatTag(java.lang.String formatName)
formatName
- The name of our customized format tagpublic EnumFormatValidator.Builder setRules(Rules rules)
rules
- The validation rules: it should be an instance of HashMap. It should contains
at least one of the two keys: 1) "correct", 2) suggestions (which is optional), whose values
need to be an instance of java.util.List. The value of the key "correct" consists of
a list of accepted columns (that is if the user enters an entry that belongs to an entry
in one of the columns, we accept the user's entry), otherwise if the user has entered an
entry in the list of "suggestions" value's column, then the error message will provide
hints that allows the user to enter the value in the corrected columnjava.lang.IllegalArgumentException
- when the input is null or the Rules object does not contain at least
one 'correct' column, which the Validator will accept if the entry comes from that columnpublic EnumFormatValidator.Builder setFilePath(java.lang.String filePath)
filePath:
- the given filepathjava.lang.IllegalArgumentException
- if the file path is null or the file it links to does not existpublic EnumFormatValidator.Builder setTableFormat(TableFormat tableFormat)
tableFormat
- an instance of the tableFormat object specifying how each column is
split and how each entry in each column is separatedjava.lang.IllegalArgumentException
- if the input (tableFormat) is nullpublic EnumFormatValidator.Builder loadDataGzip()
java.lang.RuntimeException
- when any error occurs while reading the text filejava.lang.IllegalArgumentException
- when filePath, rules, tableFormat have not been initialized or the the Rules
object does not contain any 'correct' field, which are used to indicate the column whose entries will be
accepted by the Format Validatorpublic EnumFormatValidator.Builder loadData()
java.lang.RuntimeException
- when any error occurs while reading the text filejava.lang.IllegalArgumentException
- when filePath, rules, tableFormat has not been initialized, or
when the file ends with .gz extension, or the the Rules object does not contain any 'correct columns',
which are used to indicate the column whose entries will be accepted by the Format Validatorpublic EnumFormatValidator build()
java.lang.IllegalArgumentException
- if either formatName, rules, filePath, tableFormat has not been initialized
or the size of the rules object does not specify a column that the Validator should accept


Expand the donor list and attract the next generation of patrons and ensure the endowment is funded and solid for decades to come
Use the 50th anniversary of MCDC as a touchpoint for new programs, performances, collaborations and events
Step out of the MCDC ‘comfort zone’ and collaborate with artists that are on the cutting edge of contemporary music
Increase donor base and create new avenues to reach out to a younger audience.
Work Plan
Music should be 20 minutes in length, no formed percussion and no noticeable vocals; no formed words or lyrics
Can be anything the artists want to do - there will be no merging of the music and choreography until the dress rehearsal/the night before the premiere
Has to be performed live at dress rehearsal and for the premiere
Music has to be recorded for posterity with enough flexibility and variation that no two performances will be the same
We were able to get Sigur Ros and Radiohead to create 20 minutes of original music for Merce’s 50th anniversary.
In order to attract a younger and more diverse audience, we got both groups to perform their original composition live at the world premiere.
Convince the managers and record labels to pay for the performance out their own pocket.
Arranged a private meeting with Thom Yorke and Robert Rauschenberg as a condition to perform.


`
We're glad to know that you're interesTED! What describes you best?
I'm a student
I'm not a student ~ TEDx Enthusiast
Become a Campus Ambassador


{{ page.title }}
{{ page.shortbio }}
{% comment %}Information on position papers, topics, and committee sizes are coming soon!
{% endcomment %} {{ content }}Check out the Delegate Center for information on position papers, research guidelines, and general committee tips.


Isar735.github.io
The Purdue University Online Writing Lab serves writers from around the world and the Purdue University Writing Lab helps writers on Purdue's campus.
HIGHER ED. replace text-only discussions interactive lectures support UDL principles no-schedule office hours professional development. Studying Creative Writing will equip you with an adaptable set of skills that can give entry to a vast range of occupations and career directions.
Turnitin provides instructors with the tools to prevent plagiarism, engage students in the writing process, and provide personalized feedback.
Higher english creative writing prompts.
Have you ever bothered to look at the creative writing careers that are available? Browse these job possibilities, and then go out there and make it happen. Creative Writing Teaching Resources Lesson Plans. Current Exercise Writing Exercises 1-20 are on this page. Exercises 1- 20 Exercises 21- 40 Exercses 41 - 60 Exercises 61-80 Exercises 81-100 Exercises Mother's Day gift that a mother will never forget! An adorable purse filled with honest descriptions about mom! Both purse template and 5 pages of writing templates. Writing Prompts: Prompts and motivation to create - reddit. What is Creative Writing? - Definition, Types Examples. Of all the resources we publish on The Learning Network, perhaps it’s our vast collection of writing prompts that is our most widely used resource.
The best place to buy custom essays online, and how to order your own for colleges and universities. Also known as 'the art of making things up,' creative writing is a vital part of modern society. This lesson will explore what makes writing. Writing Prompts - Language is a Virus. The SAT is typically taken by high school juniors and seniors. The College Board states that the SAT measures literacy, numeracy and writing skills that are needed. The Amazing Story Generator: Creates Thousands of Writing Prompts Jay Sacher on Amazon.com. FREE shipping on qualifying offers. The Amazing Story Generator. MLA Formatting and Style Guide // Purdue Writing. 20 Creative Writing Careers Writing Forward. The 120 Most Helpful Websites For Writers in 2015 - Global. Over the past decade, digital tools and mobile platforms have rocketed journalism to a universe of innovation, interactivity and immediacy once unimaginable.
Metacognition is "cognition about cognition", "thinking about thinking", "knowing about knowing", becoming "aware of one's awareness" and higher-order thinking skills.
What were your favorite April Fools pranks this year? I had a few favorites from the writing world. For instance, this one from Amazon Publishing was pretty spectacular:.
VoiceThread - Conversations in the cloud. 1 Million Story Ideas Writing Prompts for Student. Amazon.com: The Meaningful Writing Project: Learning, Teaching and Writing in Higher Education<PHONE_NUMBER>796): Michele Eodice, Anne Ellen Geller, Neal Lerner: Books. Generate random writing prompts. Language is a Virus. Languageisavirus.com exists to cure writer's block and inspire creativity. Buy custom essays online for all purposes. Writing Exercises I am a veteran teacher of writing from university level to little kids. I offer these writing exercises in the spirit of the Internet as a place. Writing Exercises - Meredith Sue Willis Author and Teacher. Weekly Writing Prompt: Pranks and Perspective Writer's.
Reddit gives you the best of the internet in one place. Get a constantly updating feed of breaking news, fun stories, pics, memes, and videos just for you. Passionate.
The Amazing Story Generator: Creates Thousands of Writing. There are many fantastic websites about writing on the internet, but it’s time consuming to sort the decent from the mind-bendingly awesome. After all, writers. Free writing exercises 1 -20 - Meredith Sue Willis. 401 Prompts for Argumentative Writing - The New York Times. The Meaningful Writing Project: Learning, Teaching. A802 - MA Creative Writing part 1 - Open University Course.


I am a student of course Mathematics and computing at Banaras Hindu University,Varanasi.I have completed my Graduation from VSSD College,CSJM University,Kanpur.I am also a member of ACM(Association for Computing Machinery).
Contact info.
Mobile:<PHONE_NUMBER>
Email<EMAIL_ADDRESS>Linkedin Profile
Academic Details
| Year of Passing |
Qualifications |
Board/College |
| 2015 |
Highschool |
UP Board |
| 2017 |
Intermediate |
UP Board |
| 2020 |
Graduation |
VSSD College |
| Appearing |
Masters |
BHU,Varanasi |
My Subjects
-
Mathematics
-
Statistics
-
Computer Science
Hobbies
-
Playing Cricket
-
Reading Novels
-
Singing and Listening Music
Skills
|
C Programming
|
❤❤❤❤
|
|
Core Python
|
❤❤❤
|
|
Web developement
|
❤❤❤❤❤
|
My Projects


Custom Form Validation
Please provide your name, email address (won't be published) and a comment
Name (required, at least 2 characters)
E-Mail (required)
URL (optional)
Your comment (required)


Motivation
Mining pools centralisation, which can lead to censorship and 51% attacks.
Verifiable random functions
Verifiable Random Function (VRF) is a public-key version of cryptographic hash function, and requires a secret key to Hash and Prove, the correspoing public key and proof to Verify.
VRF should satisfy the following properties:
VRF-based mining
Non-outsourceability analysis
Types of non-outsourceability:
VRF-based mining satisfies punish-mining-reward (miners can still steal reward), but not stealing-unlinkability (stealing is anonymous): a pool operator can outsource different block templates with different secret keys to each miner, and can identify the stealer by the secret key in the transaction stealing the reward.
Related work
Other non-outsourceable mining protocols
Comparison between mining protocols. NSP is short for Non-outsourceable scratch-off puzzle2.| VRF-based mining | NSP-1 | NSP-2 | 2P-PoW3 | |
|---|---|---|---|---|
| Punish-mining-reward | ✓ | ✓ | ✓ | ✓ |
| Stealing-unlinkability | ✗$^\dagger$ | ✗ | ✓ | ✗ |
| No partial outsourcing | ✓ | ✓ | ✓ | ✗ |
| Support randomised signatures | ✓ | ✓ | ✓ | ✗ |
| No complex cryptography | ✓ | ✓ | ✗ | ✓ |
Decentralised mining protocols
Comparison with decentralised mining pools.| VRF-based mining | P2Pool4 | SmartPool5 | BetterHash6 | |
|---|---|---|---|---|
| Complexity | - | Blockchain | Smart contract | - |
| Decentralisation | Mining | Mining | Mining | Select txs |
1. Micali, S., Rabin, M., Vadhan, S.: Verifiable random functions. In: 40th Annual Symposium on Foundations of Computer Science (Cat. No. 99CB37039). pp. 120–130. IEEE (1999). ↩
2. Miller, A., Kosba, A., Katz, J., Shi, E.: Nonoutsourceable scratch-off puzzles to discourage bitcoin mining coalitions. In: Proceedings of the 22nd ACM SIGSAC Conference on Computer and Communications Security. pp. 680–691. ACM (2015). ↩
3. “How to disincentivize large bitcoin mining pools” hackingdistributed.com, Ittay Eyal and Emin Gün Sirer, https://hackingdistributed.com/2014/06/18/how-to-disincentivize-large-bitcoin-mining-pools/. Accessed 27 Aug. 2020. ↩
4. “p2pool: Decentralized, DoS-resistant, Hop-Proof pool” Bitcoin Forum, forrestv, https://bitcointalk.org/index.php?topic=18313. Accessed 27 Aug. 2020. ↩
5. Luu, L., Velner, Y., Teutsch, J., Saxena, P.: Smartpool: Practical decentralized pooled mining. In: 26th {USENIX} Security Symposium ({USENIX} Security 17). pp. 1409–1426 (2017). ↩
6. “BetterHash Mining Protocol(s)” BIPs, Matt Corallo, https://github.com/TheBlueMatt/bips/blob/betterhash/bip-XXXX.mediawiki. Accessed 27 Aug. 2020. ↩


Announcement: NetworkX 2.0¶
We’re happy to announce the release of NetworkX 2.0! NetworkX is a Python package for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks.
For more information, please visit our website and our gallery of examples. Please send comments and questions to the networkx-discuss mailing list.
Highlights¶
This release is the result of over two years of work with 1212 commits and 193 merges by 86 contributors. Highlights include:
- We have made major changes to the methods in the Multi/Di/Graph classes. There is a migration guide for people moving from 1.X to 2.0.
- We updated the documentation system.
API Changes¶
Base Graph Class Changes With the release of NetworkX 2.0 we are moving towards a view/iterator reporting API. We used to have two methods for the same property of the graph, one that returns a list and one that returns an iterator. With 2.0 we have replaced them with a view. A view is a read-only object that is quick to create, automatically updated, and provides basic access like iteration, membership and set operations where appropriate. For example,
G.nodes()
used to return a list andG.nodes_iter()
an iterator. NowG.nodes()
returns a view andG.nodes_iter()
is removed.G.degree()
returns a view with(node, degree)
iteration, so thatdict(G.degree())
returns a dict keyed by node with degree as value. The old behavior>>> G = nx.complete_graph(5) >>> G.nodes() [0, 1, 2, 3, 4] >>> G.nodes_iter() <dictionary-keyiterator at ...>
has changed to
>>> G = nx.complete_graph(5) >>> G.nodes() NodeView((0, 1, 2, 3, 4)) >>> list(G.nodes()) [0, 1, 2, 3, 4]
New feature include lookup of node and edge data from the views, property access without parentheses, and set operations.
>>> G.add_node(3, color='blue') >>> G.nodes[3] {'color': 'blue'} >>> G.nodes & {3, 4, 5} set([3, 4])
The following methods have changed:
- Graph/MultiGraph
G.nodes()
G.edges()
G.neighbors()
G.adjacency_list()
andG.adjacency_iter()
toG.adjacency()
G.degree()
G.subgraph()
G.copy()
G.__class__()
should be replaced withG.fresh_copy()
- DiGraph/MultiDiGraph
G.nodes()
G.edges()
G.in_edges()
G.out_edges()
G.degree()
G.in_degree()
G.out_degree()
G.reverse()
- The following deprecated methods will be removed in a future release (3.0?).
G.node
,G.edge
(replaced by G.nodes, G.edges)G.add_path
,G.add_cycle
,G.add_star
(Nownx.add_path(G,...
)G.selfloop_edges
,G.nodes_with_selfloops
,G.number_of_selfloops
(Nownx.selfloop_edges(G)
, etc)
- Many subclasses have been changed accordingly such as:
- AntiGraph
- OrderedGraph and friends
- Examples such as ThinGraph that inherit from Graph
- Graph/MultiGraph
[#2107] The Graph class methods
add_edge
andadd_edges_from
no longer allow the use of theattr_dict
parameter. Instead use keyword arguments. ThusG.add_edge(1, 2, {'color': 'red'})
becomesG.add_edge(1, 2, color='red')
. Note that this only works if the attribute name is a string. For non-string attributes you will need to add the edge and then update manually using e.g.G.edges[1, 2].update({0: "zero"})
[#1577] In addition to minimum spanning trees, a new function for calculating maximum spanning trees is now provided. The new API consists of four functions:
minimum_spanning_edges
,maximum_spanning_edges
,minimum_spanning_tree
, andmaximum_spanning_tree
. All of these functions accept analgorithm
parameter which specifies the algorithm to use when finding the minimum or maximum spanning tree. Currently, Kruskal’s and Prim’s algorithms are implemented, defined as ‘kruskal’ and ‘prim’, respectively. If nothing is specified, Kruskal’s algorithm is used. For example, to calculate the maximum spanning tree of a graph using Kruskal’s algorithm, the functionmaximum_spanning_tree
has to be called like:>>> nx.maximum_spanning_tree(G, algorithm='kruskal')
The
algorithm
parameter is new and appears before the existingweight
parameter. So existing code that did not explicitly name the optionalweight
parameter will need to be updated:>>> nx.minimum_spanning_tree(G, 'mass') # old >>> nx.minimum_spanning_tree(G, weight='mass') # new
In the above, we are still relying on the the functions being imported into the top-level namespace. We do not have immediate plans to deprecate this approach, but we recommend the following instead:
>>> from networkx.algorithms import tree # recommended >>> tree.minimum_spanning_tree(G, algorithm='kruskal', weight='mass') >>> tree.minimum_spanning_edges(G, algorithm='prim', weight='mass')
[#1445] Most of the
shortest_path
algorithms now raise aNodeNotFound
exception when a source or a target are not present in the graph.[#2326] Centrality algorithms were harmonized with respect to the default behavior of the weight parameter. The default value of the
weight
keyword argument has been changed fromweight
toNone
. This affects the following centrality functions:approximate_current_flow_betweenness_centrality()
current_flow_betweenness_centrality()
current_flow_betweenness_centrality_subset()
current_flow_closeness_centrality()
edge_current_flow_betweenness_centrality()
edge_current_flow_betweenness_centrality_subset()
eigenvector_centrality()
eigenvector_centrality_numpy()
katz_centrality()
katz_centrality_numpy()
[#2420] New community detection algorithm provided. Fluid Communities is an asynchronous algorithm based on the simple idea of fluids interacting in an environment, expanding and pushing each other. The algorithm is completely described in “Fluid Communities: A Competitive and Highly Scalable Community Detection Algorithm”.
[#2510 and #2508]
single_source_dijkstra
,multi_source_dijkstra
and functions that use these now have new behavior whentarget
is specified. Instead of returning dicts for distances and paths a 2-tuple of(distance, path)
is returned. Whentarget
is not specified the return value is still 2 dicts.[#2553]
set_node_attributes()
andset_edge_attributes()
now accept dict-of-dict input of shape{node/edge: {name: value}}
in addition to previous valid inputs:{node/edge: value}
andvalue
. The order of the parameters changed also: The second parameter “values” is the value argument and the third parameter “name” is the name of the attribute. “name” has default valueNone
in which case “values” must be the newly allowed form containing names. Previously “name” came second without default, and “values” came third.[#2604] Move selfloop methods out of base classes to networkx functions.
G.number_of_selfloops()
,G.selfloop_edges()
,G.nodes_with_selfloops()
are nownx.number_of_selfloops(G)
,nx.selfloop_edges(G)
,nx.nodes_with_selfloops(G)
.G.node
andG.edge
are removed. Their functionality are replaced byG.nodes
andG.edges
.[#2558] Previously, the function
from_pandas_dataframe
assumed that the dataframe has edge-list like structures, butto_pandas_dataframe
generates an adjacency matrix. We now provide four functionsfrom_pandas_edgelist
,to_pandas_edgelist
,from_pandas_adjacency
, andto_pandas_adjacency
.[#2620] Removed
draw_nx
, please usedraw
ordraw_networkx
.[#1662] Rewrote
topolgical_sort
as a generator. It no longer acceptsreverse
ornbunch
arguments and is slightly faster. Addedlexicographical_topological_sort
, which accepts a key.
Deprecations¶
The following deprecated functions will be removed in 2.1.
- The function
bellman_ford
has been deprecated in favor ofbellman_ford_predecessor_and_distance
. - The functions
to_pandas_dataframe
andfrom_pandas_dataframe
have been deprecated in favor ofto_pandas_adjacency
,from_pandas_adjacency
,to_pandas_edgelist
, andfrom_pandas_edgelist
.
Contributors to this release¶
- Niels van Adrichem
- Kevin Arvai
- Ali Baharev
- Moritz Emanuel Beber
- Livio Bioglio
- Jake Bogerd
- Moreno Bonaventura
- Raphaël Bournhonesque
- Matthew Brett
- James Clough
- Marco Cognetta
- Jamie Cox
- Jon Crall
- Robert Davidson
- Nikhil Desai
- DonQuixoteDeLaMancha
- Dosenpfand
- Allen Downey
- Enrico
- Jens Erat
- Jeffrey Finkelstein
- Minas Gjoka
- Aravind Gollakota
- Thomas Grainger
- Aric Hagberg
- Harry
- Yawara ISHIDA
- Bilal AL JAMMAL
- Ryan James
- Omer Katz
- Janis Klaise
- Valentin Lorentz
- Alessandro Luongo
- Francois Malassenet
- Arya McCarthy
- Michael-E-Rose
- Peleg Michaeli
- Jarrod Millman
- Chris Morin
- Sanggyu Nam
- Nishant Nikhil
- Rhile Nova
- Ramil Nugmanov
- Juan Nunez-Iglesias
- Pim Otte
- Ferran Parés
- Richard Penney
- Phobia
- Tristan Poupard
- Sebastian Pucilowski
- Alexander Rodriguez
- Michael E. Rose
- Alex Ryan
- Zachary Sailer
- René Saitenmacher
- Felipe Schneider
- Dan Schult
- Scinawa
- Michael Seifert
- Mohammad Hossein Sekhavat
- Mridul Seth
- SkyTodInfi
- Stacey Smolash
- Jordi Torrents
- Martin Törnwall
- Jannis Vamvas
- Luca Verginer
- Prayag Verma
- Peter Wills
- Ianto Lin Xi
- Heqing Ya
- aryamccarthy
- chebee7i
- definitelyuncertain
- jfinkels
- juliensiebert
- leotrs
- leycec
- mcognetta
- numpde
- root
- salotz
- scott-vsi
- thegreathippo
- vpodpecan
- yash14123
- Neil Girdhar
Pull requests merged in this release¶
- Gml read fix. (#1962)
- Small changes leftover from #1847 (#1966)
- Fix k_core for directed graphs. Add tests (#1963)
- Communicability fix (#1958)
- Allows weight functions in shortest path functions (#1690)
- minor doc changes on weighted.py (#1969)
- Fix minimum_st_edge_cut documentation. (#1977)
- Fix all_node_cuts corner cases: cycle and complete graphs. (#1976)
- Change add_path/star/cycle from methods to functions (#1970)
- branch ‘edge-subgraph’ from @jfinkels (#1740)
- Corrected eppstein matching (#1955)
- Nose ignore docstrings (#1980)
- Edited Doc Makefile so clean doesn’t delete the examples folder (#1967)
- bug fix in convert_matrix.py (#1983)
- Avoid unnecessary eigenval sort in pagerank_numpy (#1986)
- Fix a typo in install.rst (#1991)
- Adds unorderable nodes test for dag_longest_path. (#1999)
- Improve drawing test scripts (typos, newlines, methods) (#1992)
- Improves test coverage for A* shortest path. (#1988)
- Improves test coverage for avg degree connectivity (#1987)
- Fix Graph() docstring to reflect input flexibility (#2006)
- Fix sphinx autosummary doc generation errors. (#2026)
- Improve gexf.py (#2010)
- Readme.rst should mention Decorator package is required. (#2009)
- fix_duplicate_kwarg: Fix a duplicate kwarg that was causing to_agraph… (#2005)
- Cleans documentation for graph6 and sparse6 I/O. (#2002)
- Remove http server example (#2001)
- Generalize and improve docstrings of node_link.py (#2000)
- fix issue #1948 and PEP8 formatting (#2031)
- Uses weight function for dijkstra_path_length. (#2033)
- Change default role for sphinx to ‘obj’ (#2027)
- fixed typo s/abritrary/arbitrary/ (#2035)
- Fix bug in dtype-valued matrices (#2038)
- Adds example for using Graph.nodes() with default (#2040)
- Clarifies some examples for relabel_nodes(). (#2041)
- Cleans code and documentation for graph power. (#2042)
- Cleans the classes.function module. (#2043)
- UnboundLocalError if called with an empty graph (#2047)
- Standardized Bellman-Ford function calls (#1910)
- Nobody is in IRC (#2059)
- Uses add_weighted_edges_from function in MST test. (#2061)
- Adds multi-source Dijkstra’s algorithm (#2073)
- Adds Voronoi cells algorithm (#2074)
- Fixes several issues with the Girvan-Newman partitioning function. Fixes #1703, #1725, #1799 (#1972)
- Moves is_path from utils to simple_paths. (#1921)
- add max_iter and tol parameter for numpy version (#2013)
- Remove draw_graphviz function. Fixes #1997 (#2077)
- Fixes #1998 edge_load function needs documentation. (#2075)
- Update fixcoverage.py (#2080)
- Support digraphs in approximate min vertex cover (#2039)
- Simplifies code in functions for greedy coloring. (#1680)
- Allows arbitrary metric in geometric generators. (#1679)
- Fix spring_layout for single node graph. (#2081)
- Updates set_{node,edge}_attributes and docs. (#1935)
- Fixes tests for maximal matching. (#1919)
- Adds LFM benchmark graph generator for communities (#1727)
- Adds global and local efficiency functions. (#1521)
- Apply alphas to individual nodes (#1289)
- Code and tests for temporal VF2 (#1653)
- extend convert_bool in gexf.py and graphml.py to all valid boolean (#1063)
- Remove encoded … to plain ascii (#2086)
- Use not_implemented_for() for in_degree_centrality() and out_degree_centrality() (#2084)
- Issue 2072 weighted modularity (#2088)
- Simplifies eigenvector centrality implementation. (#1708)
- Fjmalass nodes as tuples (#2089)
- Generator rename (#2090)
- Ensure links in doc
`See also`
sections (#2082) - Document integer-only numeric mixing (#2085)
- doc sphinx error removal (#2091)
- Correct see also links (#2095)
- Adjust layout.py function signatures, docs, exposure (#2096)
- Adds missing __all__ attributes. (#2098)
- Fixes 2 bugs in dominance frontier code (#2092)
- Created two new files: joint_degree_seq.py and test_joint_degree_seq.… (#2011)
- Adds Borůvka’s minimum spanning tree algorithm. (#1873)
- Adds global/local reaching centrality functions. (#2099)
- Remove conflicts from #1894 (Update Exception Classes) (#2100)
- Add Exceptions for missing source in shortest_path (#2102)
- Docs for compose now warn about MultiGraph edgekeys (#2101)
- Improve Notes section on simplex and friends docs. (#2104)
- Add Dinitz’ algorithm for maximum flow problems. (#1978)
- Removed duplicated method/doc (add_edges_from) (#1)
- Bugfix for generic_multiedge_match (Issue #2114) (#2124)
- Fix for 2015. (#2)
- add_node, add_edge attr_dict change. (#2132)
- Handle graph name attribute in relabel_nodes (#2136)
- Fix fruchterman reingold bug and add more tests to layouts. (#2141)
- Adds exception: failed power iteration convergence (#2143)
- Tweak iteration logic of HITS (#2142)
- Fix PageRank personalize docstring (#2148)
- Set default source=None for dfs_tree (#2149)
- Fix docs for maximal_matching and tensor_product (#2158)
- Isolate edge key generation in multigraphs (#2150)
- Sort centralities together and outsource dispersion (#2083)
- Changed classic generators to use generators instead of lists (#2167)
- Adds beam search traversal algorithm with example (#2129)
- Turan graph (#2172)
- Removes irrelevant Notes section from docstring (#2178)
- Corrects logarithm base in example (#2179)
- Minor correction in documentation (#2180)
- Add Boykov Kolmogorov algorithm for maximum flow problems. (#2122)
- Remove temporary files after tests are run. (#2202)
- Add support for subgraphs with no edges in convert_matrix.to_scipy_sparse_matrix. (#2199)
- Add support for reading adjacency matrix in readwrite.pajek.parse_pajek. (#2200)
- Moves Graph Atlas to data file. (#2064)
- Refactor Dinitz’ algorithm implementation. (#2196)
- Use arrays instead of matrices in scipy.linalg.expm() (#2208)
- Making in_edges equivalent to out_edges (#2206)
- Fix tests failing because of ordering issues. (#2207)
- Fix code escaping. (#2214)
- Add adjlist_outer_dict_factory. (#2222)
- Typo in scale free network generator documentation (#2225)
- Add link to nx.drawing.layout instead of mentionning nx.layout. (#2224)
- Example not working in tutorial (#2230)
- don’t assume nodes are sortable when running dag_longest_path (#2228)
- Correct typo (#2236)
- Use ego graph when computing local efficiency (#2246)
- Make harmonic centrality more memory-efficient (#2247)
- have dag_longest_path_length return path length, not edge count (#2237)
- Added transitive_reduction in dag (#2215)
- alpha kwarg not used in pylab label drawing, added it here. (#2269)
- Make PyDot Support Great Again (#2272)
- Unnecessary array copying in katz_centrality_numpy ? (#2287)
- Switch to faster smallest-last algorithm implementation. (#2268)
- Adds example for getting all simple edge paths. Fixes #718 (#2260)
- Remove obsolete testing tools. (#2303)
- Correct error in minimum_spanning_arborescence (#2285)
- Yield string, not dict, in dfs_labeled_edges. (#2277)
- Removes unnecessary convert_to_(un)directed func (#2259)
- Complete multipartite graph docs (#2221)
- fix LPA bug, see issues/2219 (#2227)
- Generalized degree (#2220)
- Turan docs (#2218)
- Fix broken link to the description of the P2G format. (#2211)
- Test ordering (#2209)
- add example of node weights (#2250)
- added paramether nbunch (#2253)
- Adds unit tests for using dtype with to_numpy_matrix (#2257)
- Adds chain decomposition algorithm. (#2284)
- add the Hoffman-Singleton graph (#2275)
- Allow grid_graph generator to accept tuple dim argument (#2320)
- psuedo -> pseudo (fixing typo) (#2322)
- Corrects navigable small world graph param docs (#2321)
- Fix bug in find_cycle. (#2324)
- flip source target (#2309)
- Simpler version of digitsrep(..) function (#2330)
- change articulation_points so that it only returns every vertex once (#2333)
- Use faster random geometric graph implementation. (#2337)
- Allow community asyn_lpa test to have two answers (#2339)
- Fix broken links and remove pdf files from Makefile (#2344)
- Documents orderable node requirement for isom. (#2302)
- Adds modularity measure for communities. (#1729)
- Simplifies degree sequence graph generators. (#1866)
- Adds tree encoding and decoding functions. (#1874)
- Corrects number_of_edges docs for directed graphs (#2360)
- Adds multigraph keys to Eulerian circuits (#2359)
- Update predecessors/successors in edge subgraph (#2373)
- Fix for #2364 (#2372)
- Raise an Exception for disconnected Graphs in bipartite.sets (#2375)
- fixes typo in NetworkXNotImplemented (#2385)
- Check alternating paths using iterative DFS in to_vertex_cover. (#2386)
- Fix typos in generating NXError in networkx.linalg.graphmatrix.incidence_matrix (#2395)
- [Fixes #2342] remove calls to plt.hold(), deprecated in mpl2.0 (#2397)
- Fix broken links (#2414)
- Fix all tests for 3.6 (#2413)
- Improve bipartite documentation. (#2402)
- correct logic in GEXFWriter (#2399)
- list optional dependencies in setup.py (#2398)
- Gitwash update (#2371)
- Added cytoscape JSON handling (#2351)
- Fix for issues #2328 and #2332 (#2366)
- Workaround for gdal python3.6 at travis and more doctests fixes (#2416)
- Fixed bug on custom attrs usage: unavailable iteritems method for dict. (#2461)
- Fix sphinx errors and class outlines (#2480)
- Note the precondition that graphs are directed and acyclic (#2500)
- Add CONTRIBUTE file (#2501)
- Remove external module (#2521)
- Ensure
make html
doesn’t fail build on exit (#2530) - Cherry pick missing commits (#2535)
- Document release process (#2539)
- Update copyright (#2551)
- Remove deprecated code (#2536)
- Improve docs (#2555)
- WIP: Add note on how to estimate appropriate values for alpha (#2583)
- Travis refactor (#2596)
- Create separate functions for df as edge-lists and adjacency matrices (#2558)
- Use texext for math_dollar (#2609)
- Add drawing tests (#2617)
- Add threshold tests (#2622)
- Update docs (#2623)
- Prep beta release (#2624)
- Refactor travis tests and deploy docs with travis (#2647)
- matplotlib 2.1 deprecated is_string_like (#2659)
- topolgical_sort, lexicographical_topological_sort (#1662)


Title level 1
Title level Auto (2)
Title level 2
Title level 3
Title level 4
Title level 5
Title level 6
Very long long long text of title title with level two


BumbleBee is a 3D printer myself and 3 other students built for our Junior Design class at UNCA.
The goal of the class was to introduce and teach students about 3D printers and also inprove our planning and team working skills.
In the beginning of the class we learned about different types of 3D printers and their advantages and disadvantages.
We were then split into teams of 4 to build and design a 3D and would be graded on how accurate we could print a 1 inch cube, an Elephant, and Boaty.
After brainstorming with my partners we decided that our printer design would focus on speed and accuracy
Our design utilized a bowden extruder and mono-filament line to redue the mass and momentum in the extruder carraige.
By reducing the mass of the carraige it allowed us to run the printer at a faster speed and the mono-filament line's inductileness it provided a much more accurate movement system then the belts used by the Prusa printer we were originally given.
In addition to using prefabricated parts we also used a Prusa-3 where we printed custom parts for our printer.
After many test prints to see how far we could push our printer and found that it could print parts about 30% faster than the Prusa printer while maintaining a higher level of accuracy.


Next: char-upcase, Previous: graphic-char-p, Up: Characters Dictionary
standard-char-p
character ⇒ generalized-boolean
character—a character.
generalized-boolean—a generalized boolean.
Returns true if character is of type standard-char; otherwise, returns false.
(standard-char-p #\Space) ⇒ true (standard-char-p #\~) ⇒ true ;; This next example presupposes an implementation ;; in which #\Bell is a defined character. (standard-char-p #\Bell) ⇒ false
Should signal an error of type type-error if character is not a character.