Snipt API - discussion notes
Overview:
- encoding → force UTF-8
- Flickr method: if not UTF-8, assume it’s ISO-8859-1 & convert
- Auth API, too
- dates, tags, urls, snippets are key
- don’t forget documentation (terms of use, etc.)
- Request formats (start w/rest-in,rest-out?)
- REST
- XML-RPC
- Response formats
- REST
- JSON
- PHP
- ?
- Build kits (this = open source arena)
- Python
- PHP
- Ruby/Rails
- etc.
- Don’t forget error handling!
- Codes for bad auth, snipt not found, bad date range, missing token, etc.
- Oauth.
Based on an authentication key/token/frob/etc. the API (in it’s most basic form) has hooks to create/edit/delete/select snippets. Ideally, though, the hooks match user actions, like give me my latest public snipts, give me the embed code for snipt with ID 283, or, for that matter, give me the permalink for snipt with slug ‘I-like-to-party’ owned by me. See the difference between that API and a CRUD API?
Draft API outline
- Auth
- snipt.auth.checkToken – allows you to check your token. SNAP!
- .getFrob – used as session identified for desktop apps, etc.
- .getToken – used by Oauth
- Snippets
- snipt.snippets.getlist – (token, howMany=’10’, tag=’’, filter_by=’search phrase’, order_by=’-pubdate/comment_count/popularity’)
- .getPublicList – (token, howMany=’10’, tag=’’, filter_by=’search phrase’, order_by=’-pubdate/comment_count/popularity’)
- .getSnippet – (token, id/slug)
- .getSnippets – (token, set=(‘id’,’id’,’id’,...)
- ex: set=(239,23,42,15,1)
- .getPublicSnippets – (token, howMany=’10’)
- .addSnippet – (token, public=’no’, desc=’description’, tags=’tag, list, comma-delim’, code=’code() { goes=\’here\’ }’, lexer=’php’)
- .updateSnippet – (token, id/slug, desc=”new description”, addtag=’additional-tag’, ‘tags=’replace, all, tags’)
- .getEmbedCode – (token, id/slug)
- .deleteSnippet – (token, id/slug)
- .suggestSnippets – (token, tag/keyword, howMany=’10’)
- return popular/controversial snippets based on a keyword
- Tags
- snipt.tags.getList
- .getPublicList
- .renameTag – (token, origin=’tag-name’, target=’new-tag-name’)
- your tags only, this may be dangerous
- .mergeTags – (token, tag_set=(‘tag1’,’tag2’,’tag3’,...)
- this also may be dangerous & tough…


TimesheetAPI is used to:
Get list of time logs.
Add new task log.
update the details of a task log.
Delete an existing task log.
Add new bug log.
Update the details of a bug log.
Delete an existing bug log.
Add new general log.
Update the details of a general log.
Delete an existing general log.
Construct a new TimesheetsAPI using User's authToken and portalId.
User's authToken.
User's portalId.
# File projects/api/TimesheetsAPI.rb, line 46 def initialize(authToken,portalId) super(authToken,portalId) end
Add a new bug log for the project.
ID of the project.
Buglog object.
Buglog object.
# File projects/api/TimesheetsAPI.rb, line 136 def addBuglog(projectId, buglog) url = getBaseURL+"projects/"+String(projectId)+"/bugs/"+String(buglog.getBugId)+"/logs/" response = ZohoHTTPClient.post(url, getQueryMap, buglog.toParamMAP) return $timesheetParser.getBuglog(response) end
Add a new general log for the project.
ID of the project.
Generallog object.
Generallog object.
# File projects/api/TimesheetsAPI.rb, line 192 def addGenerallog(projectId, generallog) url = getBaseURL+"projects/"+String(projectId)+"/logs/" requestBody = generallog.toParamMAP requestBody["name"] = generallog.getName response = ZohoHTTPClient.post(url, getQueryMap, requestBody) return $timesheetParser.getGenerallog(response) end
Add a new task log for the project.
ID of the project.
Tasklog object.
Tasklog object.
# File projects/api/TimesheetsAPI.rb, line 80 def addTasklog(projectId, tasklog) url = getBaseURL+"projects/"+String(projectId)+"/tasks/"+String(tasklog.getTaskId)+"/logs/" response = ZohoHTTPClient.post(url, getQueryMap, tasklog.toParamMAP) return $timesheetParser.getTasklog(response) end
Delete an existing bug log for the project.
ID of the project.
ID of the bug.
ID of the log.
String object.
# File projects/api/TimesheetsAPI.rb, line 174 def deleteBuglog(projectId, bugId, logId) url = getBaseURL+"projects/"+String(projectId)+"/bugs/"+String(bugId)+"/logs/"+String(logId)+"/" response = ZohoHTTPClient.delete(url, getQueryMap) return $timesheetParser.getResult(response) end
Delete an existing general log for the project.
ID of the project.
ID of the log.
String object.
# File projects/api/TimesheetsAPI.rb, line 232 def deleteGenerallog(projectId, logId) url = getBaseURL+"projects/"+String(projectId)+"/logs/"+String(logId)+"/" response = ZohoHTTPClient.delete(url, getQueryMap) return $timesheetParser.getResult(response) end
Delete an existing task log for the project.
ID of the project.
ID of the task.
ID of the log.
String object.
# File projects/api/TimesheetsAPI.rb, line 118 def deleteTasklog(projectId, taskId, logId) url = getBaseURL+"projects/"+String(projectId)+"/tasks/"+String(taskId)+"/logs/"+String(logId)+"/" response = ZohoHTTPClient.delete(url, getQueryMap) return $timesheetParser.getResult(response) end
Get list of time logs for the project.
ID 0f the project.
This queryMap contains the filters in the form of key-value pair.
TimelogList object.
# File projects/api/TimesheetsAPI.rb, line 62 def getTimeLogs(projectId, queryMap) url = getBaseURL+"projects/"+String(projectId)+"/logs/" response = ZohoHTTPClient.get(url, getQueryMap(queryMap)) return $timesheetParser.getTimeLogs(response) end
Update the details of a bug log.
ID of the project.
Buglog object.
Buglog object.
# File projects/api/TimesheetsAPI.rb, line 154 def updateBuglog(projectId, buglog) url = getBaseURL+"projects/"+String(projectId)+"/bugs/"+String(buglog.getBugId)+"/logs/"+String(buglog.getId)+"/" response = ZohoHTTPClient.post(url, getQueryMap, buglog.toParamMAP) return $timesheetParser.getBuglog(response) end
Update the details of a general log.
ID of the project.
Generallog object.
Generallog object.
# File projects/api/TimesheetsAPI.rb, line 212 def updateGenerallog(projectId, generallog) url = getBaseURL+"projects/"+String(projectId)+"/logs/"+String(generallog.getId)+"/" requestBody = generallog.toParamMAP requestBody["name"] = generallog.getName response = ZohoHTTPClient.post(url, getQueryMap, requestBody) return $timesheetParser.getGenerallog(response) end
Update the details of a task log.
projectId ID of the project.
Tasklog object.
Tasklog object.
# File projects/api/TimesheetsAPI.rb, line 98 def updateTasklog(projectId, tasklog) url = getBaseURL+"projects/"+String(projectId)+"/tasks/"+String(tasklog.getTaskId)+"/logs/"+String(tasklog.getId)+"/" response = ZohoHTTPClient.post(url, getQueryMap, tasklog.toParamMAP) return $timesheetParser.getTasklog(response) end


Tab Creation Delay:
Automatically open lists:
Default list to display:
Enable night theme:
Custom theme:
Currently opened tabs display:
How to handle non-urls:
Search Engine Selection:


List
public final class List<Element> : ListBase where Element : RealmCollectionValue
extension List: RealmCollection
extension List: MutableCollection
List
is the container type in Realm used to define to-many relationships.
Like Swift’s Array
, List
is a generic type that is parameterized on the type it stores. This can be either an Object
subclass or one of the following types: Bool
, Int
, Int8
, Int16
, Int32
, Int64
, Float
, Double
, String
, Data
,
and Date
(and their optional versions)
Unlike Swift’s native collections, List
s are reference types, and are only immutable if the Realm that manages them
is opened as read-only.
Lists can be filtered and sorted with the same predicates as Results<Element>
.
Properties of List
type defined on Object
subclasses must be declared as let
and cannot be dynamic
.
-
The Realm which manages the list, or
nil
if the list is unmanaged.Declaration
Swift
public var realm: Realm? { get }
-
Indicates if the list can no longer be accessed.
Declaration
Swift
public var isInvalidated: Bool { get }
-
Creates a
List
that holds Realm model objects of typeElement
.Declaration
Swift
public override init()
-
Returns the index of an object in the list, or
nil
if the object is not present.Declaration
Swift
public func index(of object: Element) -> Int?

-
Returns the index of the first object in the list matching the predicate, or
nil
if no objects match.Declaration
Swift
public func index(matching predicate: NSPredicate) -> Int?
Parameters
predicate
The predicate with which to filter the objects.
-
Returns the index of the first object in the list matching the predicate, or
nil
if no objects match.Declaration
Swift
public func index(matching predicateFormat: String, _ args: Any...) -> Int?
Parameters
predicateFormat
A predicate format string, optionally followed by a variable number of arguments.
-
Returns the object at the given index (get), or replaces the object at the given index (set).
Warning
You can only set an object during a write transaction.
Declaration
Swift
public subscript(position: Int) -> Element { get set }
Parameters
index
The index of the object to retrieve or replace.
-
Returns the first object in the list, or
nil
if the list is empty.Declaration
Swift
public var first: Element? { get }
-
Returns the last object in the list, or
nil
if the list is empty.Declaration
Swift
public var last: Element? { get }
-
Returns an
Array
containing the results of invokingvalueForKey(_:)
usingkey
on each of the collection’s objects.Declaration
Swift
@nonobjc public func value(forKey key: String) -> [AnyObject]
-
Returns an
Array
containing the results of invokingvalueForKeyPath(_:)
usingkeyPath
on each of the collection’s objects.Declaration
Swift
@nonobjc public func value(forKeyPath keyPath: String) -> [AnyObject]
Parameters
keyPath
The key path to the property whose values are desired.
-
Invokes
setValue(_:forKey:)
on each of the collection’s objects using the specifiedvalue
andkey
.Warning
This method can only be called during a write transaction.
Declaration
Swift
public override func setValue(_ value: Any?, forKey key: String)
Parameters
value
The object value.
key
The name of the property whose value should be set on each object.
-
Returns a
Results
containing the objects in the list, but sorted.Objects are sorted based on the values of the given key path. For example, to sort a list of
Student
s from youngest to oldest based on theirage
property, you might callstudents.sorted(byKeyPath: "age", ascending: true)
.Warning
Lists may only be sorted by properties of boolean,
Date
,NSDate
, single and double-precision floating point, integer, and string types.Declaration
Swift
public func sorted(byKeyPath keyPath: String, ascending: Bool = true) -> Results<Element>
Parameters
keyPath
The key path to sort by.
ascending
The direction to sort in.
-
Returns a
Results
containing the objects in the list, but sorted.Warning
Lists may only be sorted by properties of boolean,
Date
,NSDate
, single and double-precision floating point, integer, and string types.Declaration
Swift
public func sorted<S: Sequence>(by sortDescriptors: S) -> Results<Element> where S.Iterator.Element == SortDescriptor
-
Returns the minimum (lowest) value of the given property among all the objects in the list, or
nil
if the list is empty.Warning
Only a property whose type conforms to the
MinMaxType
protocol can be specified.Declaration
Swift
public func min<T>(ofProperty property: String) -> T? where T : MinMaxType
Parameters
property
The name of a property whose minimum value is desired.
-
Returns the maximum (highest) value of the given property among all the objects in the list, or
nil
if the list is empty.Warning
Only a property whose type conforms to the
MinMaxType
protocol can be specified.Declaration
Swift
public func max<T>(ofProperty property: String) -> T? where T : MinMaxType
Parameters
property
The name of a property whose maximum value is desired.
-
Returns the sum of the values of a given property over all the objects in the list.
Warning
Only a property whose type conforms to the
AddableType
protocol can be specified.Declaration
Swift
public func sum<T>(ofProperty property: String) -> T where T : AddableType
Parameters
property
The name of a property whose values should be summed.
-
Returns the average value of a given property over all the objects in the list, or
nil
if the list is empty.Warning
Only a property whose type conforms to the
AddableType
protocol can be specified.Declaration
Swift
public func average(ofProperty property: String) -> Double?
Parameters
property
The name of a property whose average value should be calculated.
-
Appends the given object to the end of the list.
If the object is managed by a different Realm than the receiver, a copy is made and added to the Realm managing the receiver.
Warning
This method may only be called during a write transaction.
Declaration
Swift
public func append(_ object: Element)
Parameters
object
An object.
-
Appends the objects in the given sequence to the end of the list.
Warning
This method may only be called during a write transaction.Declaration
Swift
public func append<S>(objectsIn objects: S) where Element == S.Element, S : Sequence
-
Inserts an object at the given index.
Warning
This method may only be called during a write transaction.
Warning
This method will throw an exception if called with an invalid index.
Declaration
Swift
public func insert(_ object: Element, at index: Int)
Parameters
object
An object.
index
The index at which to insert the object.
-
Removes an object at the given index. The object is not removed from the Realm that manages it.
Warning
This method may only be called during a write transaction.
Warning
This method will throw an exception if called with an invalid index.
Declaration
Swift
public func remove(at index: Int)
Parameters
index
The index at which to remove the object.
-
Removes all objects from the list. The objects are not removed from the Realm that manages them.
Warning
This method may only be called during a write transaction.Declaration
Swift
public func removeAll()
-
Replaces an object at the given index with a new object.
Warning
This method may only be called during a write transaction.
Warning
This method will throw an exception if called with an invalid index.
Declaration
Swift
public func replace(index: Int, object: Element)
Parameters
index
The index of the object to be replaced.
object
An object.
-
Moves the object at the given source index to the given destination index.
Warning
This method may only be called during a write transaction.
Warning
This method will throw an exception if called with invalid indices.
Declaration
Swift
public func move(from: Int, to: Int)
Parameters
from
The index of the object to be moved.
to
index to which the object at
from
should be moved. -
Exchanges the objects in the list at given indices.
Warning
This method may only be called during a write transaction.
Warning
This method will throw an exception if called with invalid indices.
Declaration
Swift
public func swapAt(_ index1: Int, _ index2: Int)
Parameters
index1
The index of the object which should replace the object at index
index2
.index2
The index of the object which should replace the object at index
index1
.
-
Registers a block to be called each time the collection changes.
The block will be asynchronously called with the initial results, and then called again after each write transaction which changes either any of the objects in the collection, or which objects are in the collection.
The
change
parameter that is passed to the block reports, in the form of indices within the collection, which of the objects were added, removed, or modified during each write transaction. See theRealmCollectionChange
documentation for more information on the change information supplied and an example of how to use it to update aUITableView
.At the time when the block is called, the collection will be fully evaluated and up-to-date, and as long as you do not perform a write transaction on the same thread or explicitly call
realm.refresh()
, accessing it will never perform blocking work.Notifications are delivered via the standard run loop, and so can’t be delivered while the run loop is blocked by other activity. When notifications can’t be delivered instantly, multiple notifications may be coalesced into a single notification. This can include the notification with the initial collection.
For example, the following code performs a write transaction immediately after adding the notification block, so there is no opportunity for the initial notification to be delivered first. As a result, the initial notification will reflect the state of the Realm after the write transaction.
let results = realm.objects(Dog.self) print("dogs.count: \(dogs?.count)") // => 0 let token = dogs.observe { changes in switch changes { case .initial(let dogs): // Will print "dogs.count: 1" print("dogs.count: \(dogs.count)") break case .update: // Will not be hit in this example break case .error: break } } try! realm.write { let dog = Dog() dog.name = "Rex" person.dogs.append(dog) } // end of run loop execution context
You must retain the returned token for as long as you want updates to be sent to the block. To stop receiving updates, call
invalidate()
on the token.Warning
This method cannot be called during a write transaction, or when the containing Realm is read-only.
Declaration
Swift
public func observe(_ block: @escaping (RealmCollectionChange<List>) -> Void) -> NotificationToken
Parameters
block
The block to be called whenever a change occurs.
Return Value
A token which must be held for as long as you want updates to be delivered.
-
The type of the objects stored within the list.
Declaration
Swift
public typealias ElementType = Element
-
Returns a
RLMIterator
that yields successive elements in theList
.Declaration
Swift
public func makeIterator() -> RLMIterator<Element>
-
Replace the given
subRange
of elements withnewElements
.Declaration
Swift
public func replaceSubrange<C: Collection, R>(_ subrange: R, with newElements: C) where C.Iterator.Element == Element, R: RangeExpression, List<Element>.Index == R.Bound
Parameters
subrange
The range of elements to be replaced.
newElements
The new elements to be inserted into the List.
-
Replace the given
subRange
of elements withnewElements
. -
The position of the first element in a non-empty collection. Identical to endIndex in an empty collection.
Declaration
Swift
public var startIndex: Int { get }
-
The collection’s “past the end” position. endIndex is not a valid argument to subscript, and is always reachable from startIndex by zero or more applications of successor().
Declaration
Swift
public var endIndex: Int { get }
-
Declaration
Swift
public func index(after i: Int) -> Int
-
Declaration
Swift
public func index(before i: Int) -> Int
-
Declaration
Swift
public typealias SubSequence = Slice<List>
-
-
Returns the objects at the given range (get), or replaces the objects at the given range with new objects (set).
Warning
Objects may only be set during a write transaction.
Declaration
Swift
public subscript(bounds: Range<Int>) -> SubSequence { get set }
Parameters
index
The index of the object to retrieve or replace.
-
Removes the specified number of objects from the beginning of the list. The objects are not removed from the Realm that manages them.
Warning
This method may only be called during a write transaction.Declaration
Swift
public func removeFirst(_ number: Int = 1)
-
Removes the specified number of objects from the end of the list. The objects are not removed from the Realm that manages them.
Warning
This method may only be called during a write transaction.Declaration
Swift
public func removeLast(_ number: Int = 1)
-
Inserts the items in the given collection into the list at the given position.
Warning
This method may only be called during a write transaction.Declaration
Swift
public func insert<C>(contentsOf newElements: C, at i: Int) where Element == C.Element, C : Collection
-
Removes objects from the list at the given range.
Warning
This method may only be called during a write transaction.Declaration
Swift
public func removeSubrange<R>(_ boundsExpression: R) where R : RangeExpression, R.Bound == List<Element>.Index
-
Removes objects from the list at the given range.
Warning
This method may only be called during a write transaction.
-
Returns the minimum (lowest) value in the list, or
nil
if the list is empty.Declaration
Swift
public func min() -> Element?
-
Returns the maximum (highest) value in the list, or
nil
if the list is empty.Declaration
Swift
public func max() -> Element?
-
Returns the sum of the values in the list.
Declaration
Swift
public func sum() -> Element
-
Returns the average of the values in the list, or
nil
if the list is empty.Declaration
Swift
public func average() -> Double?
-
Returns the Permission object for the named Role in this List, creating it if needed.
This function should be used in preference to manually querying the List for the applicable Permission as it ensures that there is exactly one Permission for the given Role, merging duplicates and inserting new ones as needed.
Warning
This can only be called on a managed List. Warning
The managing Realm must be in a write transaction.
Declaration
Swift
public func findOrCreate(forRoleNamed roleName: String) -> Permission
Parameters
roleName
The name of the Role to obtain the Permission for.
Return Value
A Permission object contained in this List for the named Role.
-
Returns the Permission object for the named Role in this List, creating it if needed.
This function should be used in preference to manually querying the List for the applicable Permission as it ensures that there is exactly one Permission for the given Role, merging duplicates and inserting new ones as needed.
Warning
This can only be called on a managed List. Warning
The managing Realm must be in a write transaction.
Declaration
Swift
public func findOrCreate(forRole role: PermissionRole) -> Permission
Parameters
roleName
The name of the Role to obtain the Permission for.
Return Value
A Permission object contained in this List for the named Role.


CTO Lecture Series
SQL 101
Created by
James Robinson
for
Hamilton Re
Lectures
Introduction
How to filter data
How to persist data
How to aggregate data
How to sort data
How to combine data


--- layout: post title: Breakdown of Bootstrap Plugin date: 2015-01-18 16:41:04.000000000 -05:00 categories: - Javascript tags: - bootstrap status: publish type: post published: true comments: true meta: _edit_last: '1' _s2mail: 'yes' _syntaxhighlighter_encoded: '1' author: login: amunda email<EMAIL_ADDRESS>display_name: Abdul Munda first_name: '' last_name: '' ---
Most of the Bootstrap javascript plugins like Modal, Dropdown and others, share the same basic template. I wanted to extract that template out from their js plugin and explain each part individually. Here is the basic template extracted from modal.js.
{% highlight js %} +function ($) { 'use strict'; // MODAL CLASS DEFINITION // ====================== var Modal = function (element, options) { this.options = options this.$body = $(document.body) ... } Modal.VERSION = '3.2.0' Modal.DEFAULTS = { backdrop: true, keyboard: true, show: true } Modal.prototype.show = function (_relatedTarget) { .... } // MODAL PLUGIN DEFINITION // ======================= function Plugin(option, _relatedTarget) { return this.each(function () { var $this = $(this) var data = $this.data('bs.modal') var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option) if (!data) $this.data('bs.modal', (data = new Modal(this, options))) if (typeof option == 'string') data[option](_relatedTarget) else if (options.show) data.show(_relatedTarget) }) } var old = $.fn.modal $.fn.modal = Plugin $.fn.modal.Constructor = Modal // MODAL NO CONFLICT // ================= $.fn.modal.noConflict = function () { $.fn.modal = old return this } .... }(jQuery); {% endhighlight %}Let's break this template further and look at each of the parts separately:
Self-invoking functions are the functions which get invoked as soon as it gets defined. They create a scope for all the variables and functions defined within the function so they don't leak to global scope.
Another interesting thing about this function is that it is starting with the plus sign '+'. The reason for this is to make parser think that it is the function expression instead of the function statement. Whenever javascript parser sees 'function' at the start of the line, it considers that as a function statement. A function statement requires that the function should have a name and it also cannot end the statement with parenthesis like '(jquery)'.
A function expression on the other-hand, can be anonymous, and you can invoke them right away by putting parenthesis at the end. Putting any operator, like +, -, ! etc., in front of the function will make the parser think that it's a function expression.
Lastly, you may have noticed that we actually pass 'jQuery' to the function and make '$' the parameter name. This way we can reference jQuery within function with '$'. Outside the scope of the function, you can continue to use '$' for other libraries. This avoids any conflict between jQuery and other libraries which share '$'.
By switching on the strict mode of javascript, you opt into a better, more secure and a restricter version of javascript. In this mode, for example, you cannot use undeclared variables. This way you cannot add variables to global scope by mistake, for example:
{% highlight js %}function test() { "use strict"; x = 10; /* throws syntax error - Uncaught ReferenceError: x ... */ }{% endhighlight %}Similarly, assigning a value to a non-writable or getter-only property will throw error as well. MDN and w3schools have great explanation on what's allowed and disallowed in the strict mode.
Modal is a constructor function which gets executed when 'new Modal()' is called. The important thing to note is that 'this' in modal function can change references based on how it is called.
If it's executed with the new operator like, 'new Modal()", then 'this' is bound to a newly created object and all the properties like 'options' are set on that object and everything works as expected.
However, if this function is called without the 'new' operator like 'Modal();' then 'this' is bound to the global object and it can clobber the global namespace. In this case, 'this.options' will be same as calling 'window.options'. Take a look at the example below which shows how the references of 'this' changes:
{% highlight js %}var Tester = function() { console.log(this); } Tester(); /* outputs: Window */ new Tester(); /* outputs: Tester {} */{% endhighlight %}This plugin function is the method which gets exposed to jQuery's prototype ($.fn). This is the method which gets called when you call '$('.my_modal').modal();'.
Interesting part about this method is how it puts the Modal object in the data params.
{% highlight js %}var data = $this.data('bs.modal') ... if (!data) $this.data('bs.modal', (data = new Modal(this, options))){% endhighlight %}This enables the re-use of the same Modal object, if you show or hide the same modal multiple times on the page. Its an interesting technique to memorize object by using data attribute.
Another thing to note is that you can also pass string to call specific methods eg. $('.my_modal).modal('show'). This is done by using this line.
{% highlight js %}if (typeof option == 'string') data[option](_relatedTarget){% endhighlight %}Finally, the Constructor property which exposes the main Modal function object. This is useful for extending Modal or for changing the default settings e.g '$.fn.modal.Constructor.DEFAULTS.show = false;'. This will change the default settings for all the instances of the Modal.
There are some of the lessons I learned from this plugin pattern and it gives a great boiler plate for writing jQuery plugins. If you have learned some other things from this pattern, please share in the comments.


Reason for contact(check all that applys)
General information about YSB programs(NOT a reuest for shelter)
Report of child abuse/neglect
Request for resources other than shelter(procced to SECTION 2)
Request for shelter(proced to SECTION 3)
other


1
Mom put the
(dish) away after washing them.
dishes
2
The sack of
(potato) was ripped open by the
(mouse).
potatoes
mice
3
There is a row of
(bench) in the garden for people to sit.
benches
4
Children
feet
5
At the day care center,
(baby) were looked after well.
babies
6
In autumn, the
(leaf) turn brown and yellow before they fall.
leaves
7
There are many beautiful
(church) in the city of Rome.
churches
8
Billy has won many
(trophy) for his skills in art.
trophies


WWW Access Statistics for the last 12 months
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
Main Page
/
Close navigation window


name: inverse layout: true class: center, middle, inverse --- #remark [ri-mahrk] .footnote[Go to directly to [project site](https://github.com/gnab/remark)] --- ## What is it and why should I be using it? --- layout: false .left-column[ ## What is it? ] .right-column[ A simple, in-browser, Markdown-driven slideshow tool targeted at people who know their way around HTML and CSS, featuring: - Markdown formatting, with smart extensions - Presenter mode, with cloned slideshow view - Syntax highlighting, supporting a range of languages - Slide scaling, thus similar appearance on all devices / resolutions .red[*] - Touch support for smart phones and pads, i.e. swipe to navigate slides .footnote[.red[*] At least browsers try their best] ] --- .left-column[ ## What is it? ## Why use it? ] .right-column[ If your ideal slideshow creation workflow contains any of the following steps: - Just write what's on your mind - Do some basic styling - Easily collaborate with others - Share with and show to everyone Then remark might be perfect for your next.red[*] slideshow! .footnote[.red[*] You probably want to convert existing slideshows as well] ] --- .left-column[ ## What is it? ## Why use it? ] .right-column[ As the slideshow is expressed using Markdown, you may: - Focus on the content, expressing yourself in next to plain text not worrying what flashy graphics and disturbing effects to put where As the slideshow is actually an HTML document, you may: - Display it in any decent browser - Style it using regular CSS, just like any other HTML content - Use it offline! As the slideshow is contained in a plain file, you may: - Store it wherever you like; on your computer, hosted from your Dropbox, hosted on Github Pages alongside the stuff you're presenting... - Easily collaborate with others, keeping track of changes using your favourite SCM tool, like Git or Mercurial ] --- template: inverse ## How does it work, then? --- name: how .left-column[ ## How does it work? ### - Markdown ] .right-column[ A Markdown-formatted chunk of text is transformed into individual slides by JavaScript running in the browser: ```remark # Slide 1 This is slide 1 --- # Slide 2 This is slide 2 ``` .slides[ .first[ ### Slide 1 This is slide 1 ] .second[ ### Slide 2 This is slide 2 ] ] Regular Markdown rules apply with only a single exception: - A line containing three dashes constitutes a new slide (not a horizontal rule, `<hr />`) Have a look at the [Markdown website](http://daringfireball.net/projects/markdown/) if you're not familiar with Markdown formatting. ] --- .left-column[ ## How does it work? ### - Markdown ### - Inside HTML ] .right-column[ A simple HTML document is needed for hosting the styles, Markdown and the generated slides themselves: ```xml *
</textarea> * ``` You may download remark to have your slideshow not depend on any online resources, or reference the [latest version](http://remarkjs.com/downloads/remark-latest.min.js) online directly. ] --- template: inverse ## Of course, Markdown can only go so far. --- .left-column[ ## Markdown extensions ] .right-column[ To help out with slide layout and formatting, a few Markdown extensions have been included: - Slide properties, for naming, styling and templating slides - Content classes, for styling specific content - Syntax highlighting, supporting a range of languages ] --- .left-column[ ## Markdown extensions ### - Slide properties ] .right-column[ Initial lines containing key-value pairs are extracted as slide properties: ```remark name: agenda class: middle, center # Agenda The name of this slide is {{ name }}. ``` Slide properties serve multiple purposes: * Naming and styling slides using properties `name` and `class` * Using slides as templates using properties `template` and `layout` * Expansion of `{{ property }}` expressions to property values See the [complete list](https://github.com/gnab/remark/wiki/Slide-Properties) of slide properties. ] --- .left-column[ ## Markdown extensions ### - Slide properties ### - Content classes ] .right-column[ Any occurences of one or more dotted CSS class names followed by square brackets are replaced with the contents of the brackets with the specified classes applied: ```remark .footnote[.red.bold[*] Important footnote] ``` Resulting HTML extract: ```xml
*
Important footnote
``` ] --- .left-column[ ## Markdown extensions ### - Slide properties ### - Content classes ### - Syntax Highlighting ] .right-column[ Code blocks can be syntax highlighted by specifying a language from the set of [supported languages](https://github.com/gnab/remark/wiki/Configuration-Options#wiki-highlighting). Using [GFM](http://github.github.com/github-flavored-markdown/) fenced code blocks you can easily specify highlighting language: .pull-left[
```javascript function add(a, b) return a + b end ```
] .pull-right[
```ruby def add(a, b) a + b end ```
] A number of highlighting [styles](https://github.com/gnab/remark/wiki/Configuration-Options#wiki-highlighting) are available, including several well-known themes from different editors and IDEs. ] --- .left-column[ ## Presenter mode ] .right-column[ To help out with giving presentations, a presenter mode comprising the following features is provided: - Display of slide notes for the current slide, to help you remember key points - Display of upcoming slide, to let you know what's coming - Cloning of slideshow for viewing on extended display ] --- .left-column[ ## Presenter mode ### - Inline notes ] .right-column[ Just like three dashes separate slides, three question marks separate slide content from slide notes: ``` Slide 1 content *??? Slide 1 notes --- Slide 2 content *??? Slide 2 notes ``` Slide notes are also treated as Markdown, and will be converted in the same manner slide content is. Pressing __P__ will toggle presenter mode. ] ??? Congratulations, you just toggled presenter mode! Now press __P__ to toggle it back off. --- .left-column[ ## Presenter mode ### - Inline notes ### - Cloned view ] .right-column[ Presenter mode of course makes no sense to the audience. Creating a cloned view of your slideshow lets you: - Move the cloned view to the extended display visible to the audience - Put the original slideshow in presenter mode - Navigate as usual, and the cloned view will automatically keep up with the original Pressing __C__ will open a cloned view of the current slideshow in a new browser window. ] --- template: inverse ## It's time to get started! --- .left-column[ ## Getting started ] .right-column[ Getting up and running is done in only a few steps: 1. Visit the [project site](http://github.com/gnab/remark) 2. Follow the steps in the Getting Started section For more information on using remark, please check out the [wiki](https://github.com/gnab/remark/wiki) pages. ] --- name: last-page template: inverse ## That's all folks (for now)! Slideshow created using [remark](http://github.com/gnab/remark).


Compares the equality of this ObjectId with [otherID].
ObjectId instance to compare against.
The result of comparing two ObjectId"s
Generate a 12 byte id string used in ObjectId"s
The 12 byte id binary string.
Update the ObjectId index used in generating new ObjectId"s on the driver
Next index value.
Returns the generation time in seconds that this ID was generated.
Number of seconds in the timestamp part of the 12 byte id.
Return the ObjectId id as a 24 byte hex string representation
The 24 byte hex string representation.
Alias for {@link ObjectId#toHexString}
Alias for {@link ObjectId#toHexString}
Creates an ObjectId from a hex string representation of an ObjectId.
An ObjectId 24 byte hexstring representation.
The created ObjectId
Creates an ObjectId from a second based number, with the rest of the ObjectId zeroed out. Used for comparisons or sorting the ObjectId.
A number of seconds.
The created ObjectId
Creates an ObjectId from a second based number, with the rest of the ObjectId zeroed out. Used for comparisons or sorting the ObjectId.
return the created ObjectId
Generated using TypeDoc
ObjectId
ObjectId
0.0.1
Eduardo Astolfi<EMAIL_ADDRESS>2016 Eduardo Astolfi<EMAIL_ADDRESS>MIT Licensed
Represents the BSON ObjectId type
Can be a 24 byte hex string, a 12 byte binary string or a Number.


|
psl1ght
A free SDK for Sony's PS3 console
|
Debugging management library. More...
Go to the source code of this file.
Data Structures | |
| union | sys_dbg_vr_t |
| contents of a PPU VR register More... | |
| union | sys_dbg_spu_gpr_t |
| contents of a SPU GPR register More... | |
| struct | _sys_dbg_ppu_thread_context |
| PPU thread context. More... | |
| struct | _sys_dbg_spu_thread_context |
| SPU thread context. More... | |
Macros | |
| #define | SYS_DBG_PPU_NUM_GPR 32 |
| number of PPU GPR registers | |
| #define | SYS_DBG_PPU_NUM_FPR 32 |
| number of PPU FPR registers | |
| #define | SYS_DBG_PPU_NUM_VR 32 |
| number of PPU VR registers | |
| #define | SYS_DBG_PPU_VR_WIDTH 16 |
| size (in bytes) of a PPU VR register | |
| #define | SYS_DBG_SPU_NUM_GPR 128 |
| number of SPU GPR registers | |
| #define | SYS_DBG_SPU_NUM_MFC_CQ_SR 96 |
| number of SPU MFC/CQ/SR registers | |
| #define | SYS_DBG_SPU_GPR_WIDTH 16 |
| size (in bytes) of a SPU GPR register | |
| #define | SYS_DBG_SPU_NUM_MB 4 |
| number of SPU inbound MB entries | |
Typedefs | |
| typedef struct _sys_dbg_ppu_thread_context | sys_dbg_ppu_thread_context_t |
| PPU thread context. | |
| typedef struct _sys_dbg_spu_thread_context | sys_dbg_spu_thread_context_t |
| SPU thread context. | |
| typedef void(* | dbg_exception_handler_t) (u64 cause, sys_ppu_thread_t tid, u64 dar) |
| Function pointer to a PPU exception handler. | |
Enumerations | |
| enum | sys_dbg_ppu_thread_status_t { PPU_THREAD_STATUS_IDLE, PPU_THREAD_STATUS_RUNNABLE, PPU_THREAD_STATUS_ONPROC, PPU_THREAD_STATUS_SLEEP, PPU_THREAD_STATUS_STOP, PPU_THREAD_STATUS_ZOMBIE, PPU_THREAD_STATUS_DELETED, PPU_THREAD_STATUS_UNKNOWN } |
| Possible statuses for PPU threads. | |
| enum | sys_dbg_spu_thread_group_status_t { SPU_THREAD_GROUP_STATUS_NOTINITIALIZED, SPU_THREAD_GROUP_STATUS_INITIALIZED, SPU_THREAD_GROUP_STATUS_READY, SPU_THREAD_GROUP_STATUS_WAITING, SPU_THREAD_GROUP_STATUS_SUSPENDED, SPU_THREAD_GROUP_STATUS_WAITING_AND_SUSPENDED, SPU_THREAD_GROUP_STATUS_RUNNING, SPU_THREAD_GROUP_STATUS_STOPPED, SPU_THREAD_GROUP_STATUS_UNKNOWN } |
| Possible statuses for PPU thread groups. | |
Functions | |
| s32 | sysDbgSetStacksizePPUExceptionHandler (size_t stacksize) |
| Set stack size of PPU thread exception handler. More... | |
| s32 | sysDbgGetSPUThreadGroupIds (u32 *group_ids, u64 *num_ids, u64 *num_all_ids) |
| Get the list of SPU thread group ids. More... | |
| s32 | sysDbgGetPPUThreadIds (sys_ppu_thread_t *ids, u64 *num_ids, u64 *num_all_ids) |
| Get the list of PPU thread ids. More... | |
| s32 | sysDbgGetSPUThreadIds (u32 group_id, u32 *thread_ids, u64 *num_ids, u64 *num_all_ids) |
| Get the list of SPU thread ids in a SPU thread group. More... | |
| s32 | sysDbgRegisterPPUExceptionHandler (dbg_exception_handler_t handler, u64 flags) |
| Register a PPU exception handler. More... | |
| s32 | sysDbgGetPPUThreadName (sys_ppu_thread_t id, char *name) |
| Get PPU thread name. More... | |
| s32 | sysDbgGetSPUThreadName (u32 thread_id, char *name) |
| Get SPU thread name. More... | |
| s32 | sysDbgGetPPUThreadStatus (sys_ppu_thread_t id, sys_dbg_ppu_thread_status_t *status) |
| Get PPU thread status. More... | |
| s32 | sysDbgGetGetSPUThreadGroupStatus (u32 group_id, sys_dbg_spu_thread_group_status_t *status) |
| Get SPU thread group status. More... | |
| s32 | sysDbgGetSPUThreadGroupName (u32 group_id, char *name) |
| Get SPU thread group name. More... | |
| s32 | sysDbgFinalizePPUExceptionHandler () |
| s32 | sysDbgReadSPUThreadContext (u32 thread_id, sys_dbg_spu_thread_context_t *context) |
| Read a SPU thread context. More... | |
| s32 | sysDbgInitializePPUExceptionHandler (s32 prio) |
| Initialization of the PPU thread exception handler. More... | |
| s32 | sysDbgReadPPUThreadContext (sys_ppu_thread_t id, sys_dbg_ppu_thread_context_t *context) |
| Read a PPU thread context. More... | |
| s32 | sysDbgUnregisterPPUExceptionHandler () |
| Unregister the PPU thread exception handler. More... | |
Debugging management library.
| s32 sysDbgFinalizePPUExceptionHandler | ( | ) |
Finalize the PPU exception handler.
| s32 sysDbgGetGetSPUThreadGroupStatus | ( | u32 | group_id, |
| sys_dbg_spu_thread_group_status_t * | status | ||
| ) |
Get SPU thread group status.
| group_id | SPU thread group id. |
| status | Pointer to storage for the SPU thread group status. |
| s32 sysDbgGetPPUThreadIds | ( | sys_ppu_thread_t * | ids, |
| u64 * | num_ids, | ||
| u64 * | num_all_ids | ||
| ) |
Get the list of PPU thread ids.
| ids | Pointer to storage for the PPU thread ids. | |
| [in] | num_ids | Pointer to the number of available elements in ids array. |
| [out] | num_ids | Number of PPU thread ids stored into the array. |
| num_all_ids | Pointer to storage for the total number of PPU threads. |
| s32 sysDbgGetPPUThreadName | ( | sys_ppu_thread_t | id, |
| char * | name | ||
| ) |
Get PPU thread name.
| id | PPU thread id. |
| name | Pointer to storage for the PPU thread name. |
| s32 sysDbgGetPPUThreadStatus | ( | sys_ppu_thread_t | id, |
| sys_dbg_ppu_thread_status_t * | status | ||
| ) |
Get PPU thread status.
| id | PPU thread id. |
| status | Pointer to storage for the PPU thread status. |
| s32 sysDbgGetSPUThreadGroupIds | ( | u32 * | group_ids, |
| u64 * | num_ids, | ||
| u64 * | num_all_ids | ||
| ) |
Get the list of SPU thread group ids.
| group_ids | Pointer to storage for the SPU thread group ids. | |
| [in] | num_ids | Pointer to the number of available elements in group_ids array. |
| [out] | num_ids | Number of SPU thread group ids stored into the array. |
| num_all_ids | Pointer to storage for the total number of SPU thread groups. |
| s32 sysDbgGetSPUThreadGroupName | ( | u32 | group_id, |
| char * | name | ||
| ) |
Get SPU thread group name.
| group_id | SPU thread group id. |
| name | Pointer to storage for the SPU thread group name. |
| s32 sysDbgGetSPUThreadIds | ( | u32 | group_id, |
| u32 * | thread_ids, | ||
| u64 * | num_ids, | ||
| u64 * | num_all_ids | ||
| ) |
Get the list of SPU thread ids in a SPU thread group.
| group_id | SPU thread group id. | |
| thread_ids | Pointer to storage for the SPU thread ids. | |
| [in] | num_ids | Pointer to the number of available elements in thread_ids array. |
| [out] | num_ids | Number of SPU thread ids stored into the array. |
| num_all_ids | Pointer to storage for the total number of SPU threads in the group. |
| s32 sysDbgGetSPUThreadName | ( | u32 | thread_id, |
| char * | name | ||
| ) |
Get SPU thread name.
| thread_id | SPU thread id. |
| name | Pointer to storage for the SPU thread name. |
| s32 sysDbgInitializePPUExceptionHandler | ( | s32 | prio | ) |
Initialization of the PPU thread exception handler.
| prio | Priority of the PPU thread exception handler. |
| s32 sysDbgReadPPUThreadContext | ( | sys_ppu_thread_t | id, |
| sys_dbg_ppu_thread_context_t * | context | ||
| ) |
Read a PPU thread context.
| id | PPU thread id. |
| context | Pointer to storage for PPU thread context. |
| s32 sysDbgReadSPUThreadContext | ( | u32 | thread_id, |
| sys_dbg_spu_thread_context_t * | context | ||
| ) |
Read a SPU thread context.
| thread_id | SPU thread id. |
| context | Pointer to storage for SPU thread context. |
| s32 sysDbgRegisterPPUExceptionHandler | ( | dbg_exception_handler_t | handler, |
| u64 | flags | ||
| ) |
Register a PPU exception handler.
| handler | Pointer to the exception handler function. |
| flags | Flags. |
| s32 sysDbgSetStacksizePPUExceptionHandler | ( | size_t | stacksize | ) |
Set stack size of PPU thread exception handler.
| stacksize | New stack size. |
| s32 sysDbgUnregisterPPUExceptionHandler | ( | ) |
Unregister the PPU thread exception handler.


During the chaos of the ninth century B.C., Jezebel, wife to Israel's ruler, orders the execution of all prophets who refuse to worship the pagan god Baal. The young prophet Elijah, commanded by an angel of God to flee Israel, seeks safety in the land of Zarephath, where he unexpectedly finds true love with a young widow. But this new-found rapture is to be cut short, and Elijah sees all of his hopes and dreams irrevocably erased.


My cards
New card
Checks
Order checks
Order check not found
ID
order id
price
user id
bankCard id
creation date
ID
id
price
user id
bankCard id
creation date


On Model-Based vs. Model-Free AI
An interesting debate has arisen lately in the machine learning community concerning two competing (?) approaches to ML and (more generally) AI. The debate is rather high-level, but in my opinion touches upon something that is at the very core of research in the field. In this post I will lay out the fundamental aspects of the debate as I see them, and try and give my personal perspective on the issue.
Connectionist, Gradient Based Learning
Undoubtably the most dominant trend in ML at the moment is deep learning - i.e., learning that is based on neural networks and their offspring achieved by applying gradient-based methods (error-back propagation, a.k.a backprop). DL has led to some undeniably outstanding successes, achieving human-level (or better) performance in specific tasks such as object recognition, speech (recognition and synthesis), and game-playing. This in turn has led to wide-spread adoption and integration of DL technologies in many leading tech companies, and has generated a lot of media hype and public recognition.
Despite these impressive successes, there are major drawbacks to DL. The obvious problems are terrible data-efficiency and an inability to generalize across tasks or domains. Both of these characteristics arise from the fact that neural networks are at their core pattern matching machines. Essentially, they find complex patterns in massive datasets that correlate with a desired output. Often, these patterns may correspond to interesting notions of underlying structure in the data (i.e., edges in an image), lending to the notion of representation learning. However, these representations are highly specified for specific tasks, and training a network for a new task must be done from scratch. This can be frustrating since we often intuitively know there must be transferable knowledge between the tasks. An example of this is the phenomenon known as catastrophic forgetting1, where performance of a trained network on task A will deteriorate significantly when trained for related task B. Essentially, every time we train a neural network we must do so (pretty much) from scratch, even if there are many shared components that should be leveraged.
A Real-World Counter Example
Given the recent successes of DL and gradient-based learning, and the impressive ability of generic neural networks to learn meaningful representations, should we in fact consider alternative approaches? Well, we have a biological counter-example of general intelligence that works - humans. As many have pointed out, artificial flight was achieved when humans moved away from biological inspirations. This is a valid point, and I do not believe we should limit our investigation of intelligent systems to mimicking human intelligence. On the other hand, human intelligence provides an excellent benchmark for measuring performance of artificial systems and a source from which to draw aspirations.
In context of this post, we observe that humans learn rich representations that generalize across complex tasks from very few examples. For instance, given a single visual example of a new object, humans easily infer high level traits such as its purpose, decomposition into parts and the relations between them, and how it may interact with different environments (image and motivation taken from2). They can then use these traits to classify new visual examples of the object, draw (or imagine) variations on the object, or think of uses for it. All of this from observing a single example.
The presence of these traits in human intelligence serves both to highlight the drawbacks of neural-network based learning and perhaps indicate that DL alone will not be sufficient to achieve significant progress towards more general intelligence. Further, (though I am no neuroscientist), there seems to be sufficient evidence it is highly unlikely the brain is composed of sets of generic, single purpose neural networks3.
Lake et al.3 argue that the ability of humans to learn such complex representations of new concepts given little data is due to the existence of models that allow humans to leverage their past experiences to do so. They go on to argue that important characteristics of these models are the presence of fundamental learning structures from early age (e.g., intuitive physical and psychological knowledge), causality, and compositionality. Importantly, none of these are characteristics of DL.
The Heart of the Debate
Given what is discussed above, we can now ask the central question, which is exemplified in two recent papers34: how much emphasis should we place on encoding knowledge into our models?
The Case for Model-Free ML
Among the main proponents of learning from scratch and largely model free ML are researchers at Google DeepMind, who authored [4]. DeepMind are responsible for some of the most noteworthy successes of DL such as mastering Atari games5 and Go6. These successes have been achieved with advances in model-free systems. Indeed, the only inductive biases introduced in these systems is that of standard convolutional nets for parsing images. As discussed in [4], there are (at least) two significant arguments against incoporating and encoding prior knowledge into our models.
The first has to do with the notion of generality (not generalization). For many domains, prior or expert knowledge may not be available, or may be intractable to encode. For instance, physical laws can provide important prior knowledge in domains such as robotic movement, and the model-based approach justifies leveraging that knowledge. This may indeed improve performance of deployed systems. However, in many domains (e.g., healthcare, dialogue systems) such knowledge may not be so straight-forward to include. How would a general model-based approach towards intelligence then deal with these domains? To quote Botvinick et al.4:
“… it is not clear that detailed knowledge engineering will be realistically attainable in all areas we will want our agents to tackle".
With this in mind, generic models that make no prior assumptions on the domain and “learn from scratch” may be more generally applicable to a wider range of areas.
The second point has to do with avoiding encoding our own biases into intelligent agents. The knowledge and inductive biases that Lake et al.3 argue should be included in our intelligent models are specifically human. There is no reason to believe that these principles are required (let alone optimal) for machines to be intelligent. Indeed, encoding incomplete notions of inductive biases in an attempt to mimick the human brain may hinder progress, much as attempting to achieve artificial flight by mimicking birds proved unproductive. Proponents of model-free learning argue that by starting from a ‘blank slate’, machines generate representations and inductive biases that are useful to them for the specified task. From this view, learning from scratch is a feature rather than a bug.
Proponents of the model free approach argue that in fact we should avoid encoding knowledge into our models for the reasons specified above. Existing problems in neural networks, such as data efficiency and transferability, can be solved within the context of DL and do not require prior/expert knowledge. Recent advances in DL (such as memory or attention mechanisms, deep generative models) are indeed steps in these directions, though it is not clear that these will solve the core issues.
How Much is Really Gained by Models?
The main motivation for heavily engineered models is achieving human-like learning: rich, generalizable representations of complex concepts with little examples. However, is it clear that encoding knowledge into models can actually achieve this? Below I discuss an example that shows how heavily engineered models can indeed get around some of the major difficulties of DL.
Game-Playing with Minor Environmental Variations
Mnih et al.5 famously show that a single deep RL algorithm can achieve human-level performance on a wide range of Atari games using only the screen pixels as input. This is a very impressive achievement, and one that has been subsequently improved upon. However, Kansky et al.7 point out a major flaw of those deep RL agents: minor variations in the environment completely break performance.
In other words, the “knowledge” gained by the agent while learning to play the original version of the game is so specific that any variation to the environment (including ones that humans easily adapt to) is a completely new domain and the agent must be retrained. Clearly, this is unsatisfying, and we desire our agents to be more general than this.
The authors go on to propose schema networks; complex graphical models that model objects, their movements and attributes, and causal relations between actions/objects/reward. This allows the agent to perform long term planning (phrased as inference) after training. The paper then details experiments showing that schema networks easily adapt to the variations in environment that break the deep RL agents.
Beside causal relations, the schema network model encodes knowledge on intuitive physics, namely that objects are smooth, and contain physical attributes relating to movement, size, etc. This paper demonstrates how encoding fundamental principles of causality and physics can enable models to be more robust to changes (as well as learn more efficiently).
For interested readers, other excellent examples of how models improve both data-efficiency and generalization can be found in [2, 8].
My Own Two Cents
Personally, I find this debate fascinating, and at the very core of what AI and ML research are all about. Both sides make compelling points, and it is not clear to me that one is correct. My natural inclination leans more towards the modeling perspective: I believe that intelligence has much to do with (probabilistic) models, and whether or not these draw inspitation from human intelligence, I cannot imagine an intelligent agent that is completely model free.
However, I see no reason for the two approaches to be mutually exclusive (this notion is also emphasized by Lake et al.3). Much of the most interesting recent work has been on teaching neural networks to perform probabilistic inference. This is where I believe the most interesting and promising work currently lies: bridging the gap between DL and model-based ML. Neural networks are incredibly powerful tools, and integrating them into the toolbox of probabilistic modelling holds enormous potential.
Further, a potential goal is to merge model-based and model-free ML. My opinion is that, where possible, we should encode (fundamental) notions such as physics and theory of mind into our models, and neural networks can provide flexible mappings for complex relations. Where no such expert knowledge exists, latent variable models with neural network parameterizations can provide a powerful avenue to allow systems to learn abstract concepts from scratch. Ideally, these notions can co-exist within single systems.
As in many debates, my hunch is that the most progress can be made by integrating both sides, trying to take the best of both worlds.
References
-
Goodfellow J., Ian, et al. An Emprical Investigation of Catastrophic Forgetting in Gradient-Based Neural Networks. 2013 ↩
-
Lake M., Brenden, Salakhutdinov, Ruslan, and Tenenbaum B. Joshua. Human-level Concept Learning Through Probabilistic Program Induction. 2015 ↩
-
Lake M., Brenden, et al. Building Machines that Learn and Think Like People. 2017 ↩
-
Botvinick, Matthew, et al. Building Machines that Learn and Think for Themselves: Commentary on Lake, Ullman, Tenebaum, and Gershamn. 2017 ↩
-
Mnih, Volodymyr, et al. Human-Level Control Through Deep Reinforcement Learning. 2015 ↩
-
Silver, David, et al. Mastering the Game of Go Without Human Knowledge. 2017 ↩
-
Kansky, Ken, et al. Schema Networks: Zero-Shot Transfer with a Generative Causal Model of Intuitive Physics. 2017 ↩
-
George, Dileep, et al. A Generative Vision Model that Trains with High Data-Efficiency and Breaks Text-Based CAPTCHAs. 2017 ↩


|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
| Class Summary | |
| AbstractCalendarValidator | Abstract class for Date/Time/Calendar validation. |
| AbstractFormatValidator | Abstract class for Format based Validation. |
| AbstractNumberValidator | Abstract class for Number Validation. |
| BigDecimalValidator | BigDecimal Validation and Conversion routines (java.math.BigDecimal ). |
| BigIntegerValidator | BigInteger Validation and Conversion routines (java.math.BigInteger ). |
| ByteValidator | Byte Validation and Conversion routines (java.lang.Byte ). |
| CalendarValidator | Calendar Validation and Conversion routines (java.util.Calendar ). |
| CurrencyValidator | Currency Validation and Conversion routines (java.math.BigDecimal ). |
| DateValidator | Date Validation and Conversion routines (java.util.Date ). |
| DoubleValidator | Double Validation and Conversion routines (java.lang.Double ). |
| FloatValidator | Float Validation and Conversion routines (java.lang.Float ). |
| IntegerValidator | Integer Validation and Conversion routines (java.lang.Integer ). |
| LongValidator | Long Validation and Conversion routines (java.lang.Long ). |
| PercentValidator | Percentage Validation and Conversion routines (java.math.BigDecimal ). |
| ShortValidator | Short Validation and Conversion routines (java.lang.Short ). |
| TimeValidator | Time Validation and Conversion routines (java.util.Calendar ). |
This package contains independant validation routines.
Commons Validator serves two purposes:
This package has been created, since version 1.3.0, in an attempt to clearly separate these two concerns and is the location for the standard, independant validation routines/functions in Commons Validator.
The contents of this package have no dependencies on the framework aspect of Commons Validator and can be used on their own.
The date and time validators either validate according to a specified format
or use a standard format for a specified Locale
.
java.util.Date
type.java.util.Calendar
type.java.util.Calendar
type.
You can either use one of the isValid()
methods to just determine
if a date is valid, or use one of the validate()
methods to
validate a date and convert it to a java.util.Date
...
// Get the Date validator DateValidator validator = DateValidator.getInstance(); // Validate/Convert the date Date fooDate = validator.validate(fooString, "dd/MM/yyyy"); if (fooDate == null) { // error...not a valid date return; }
The following methods are provided to validate a date/time (return a boolean result):
isValid(value)
isValid(value, pattern)
isValid(value, Locale)
isValid(value, pattern, Locale)
The following methods are provided to validate a date/time and convert it to either a
java.util.Date
or java.util.Calendar
:
validate(value)
validate(value, pattern)
validate(value, Locale)
validate(value, pattern, Locale)
Formatting and validating are two sides of the same coin. Typically input values which are converted from Strings according to a specified format also have to be rendered for output in the same format. These validators provide the mechanism for formatting from date/time objects to Strings. The following methods are provided to format date/time values as Strings:
format(date/calendar)
format(date/calendar, pattern)
format(date/calendar, Locale)
format(date/calendar, pattern, Locale)
If the date being parsed relates to a different time zone than the
system default, you can specify the TimeZone
to use when
validating/converting:
// Get the GMT time zone TimeZone GMT = TimeZone.getInstance("GMT"); // Validate/Convert the date using GMT Date fooDate = validator.validate(fooString, "dd/MM/yyyy", GMT);
The followng Time Zone flavours of the Validation/Conversion methods are provided:
validate(value, TimeZone)
validate(value, pattern, TimeZone)
validate(value, Locale, TimeZone)
validate(value, pattern, Locale, TimeZone)
As well as validating that a value is a valid date or time, these validators
also provide date comparison functions. The DateValidator
and CalendarValidator
provide functions for comparing years,
quarters, months, weeks and dates and the TimeValidator
provides
functions for comparing hours, minutes, seconds and milliseconds.
For example, to check that a date is in the current month, you could use
the compareMonths()
method, which compares the year and month
components of a date:
// Check if the date is in the current month int compare = validator.compareMonths(fooDate, new Date(), null); if (compare == 0) { // do current month processing return; } // Check if the date is in the previous quarter compare = validator.compareQuarters(fooDate, new Date(), null); if (compare < 0) { // do previous quarter processing return; } // Check if the date is in the next year compare = validator.compareYears(fooDate, new Date(), null); if (compare > 0) { // do next year processing return; }
The numeric validators either validate according to a specified format
or use a standard format for a specified Locale
or use
a custom format for a specified Locale
.
java.lang.Byte
type.java.lang.Short
type.java.lang.Integer
type.java.lang.Long
type.java.lang.Float
type.java.lang.Double
type.java.math.BigInteger
type.java.math.BigDecimal
type.
You can either use one of the isValid()
methods to just determine
if a number is valid, or use one of the validate()
methods to
validate a number and convert it to an appropriate type.
The following example validates an integer against a custom pattern for the German locale. Please note the format is specified using the standard symbols for java.text.DecimalFormat so although the decimal separator is indicated as a period (".") in the format, the validator will check using the German decimal separator - which is a comma (",").
// Get the Integer validator IntegerValidator validator = IntegerValidator.getInstance(); // Validate/Convert the number Integer fooInteger = validator.validate(fooString, "#,##0.00", Locale.GERMAN); if (fooInteger == null) { // error...not a valid Integer return; }
The following methods are provided to validate a number (return a boolean result):
isValid(value)
isValid(value, pattern)
isValid(value, Locale)
isValid(value, pattern, Locale)
The following methods are provided to validate a number and convert it one of
the java.lang.Number
implementations:
validate(value)
validate(value, pattern)
validate(value, Locale)
validate(value, pattern, Locale)
Formatting and validating are two sides of the same coin. Typically input values which are converted from Strings according to a specified format also have to be rendered for output in the same format. These validators provide the mechanism for formatting from numeric objects to Strings. The following methods are provided to format numeric values as Strings:
format(number)
format(number, pattern)
format(number, Locale)
format(number, pattern, Locale)
As well as validating that a value is a valid number, these validators also provide functions for validating the minimum, maximum and range of a value.
// Check the number is between 25 and 75 if (validator.isInRange(fooInteger, 25, 75) { // valid...in the specified range return; }
A default Currency Validator
implementation is provided, although all the numeric validators
support currency validation. The default implementation converts
currency amounts to a java.math.BigDecimal
and additionally
it provides lenient currency symbol validation. That is, currency
amounts are valid with or without the currency symbol.
BigDecimalValidator validator = CurrencyValidator.getInstance(); BigDecimal fooAmount = validator.validate("$12,500.00", Locale.US); if (fooAmount == null) { // error...not a valid currency amount return; } // Check the amount is a minimum of $1,000 if (validator.minValue(fooAmount, 1000) { // valid...in the specified range return; }
If, for example, you want to use the Integer Validator to validate a currency, then you can simply create a new instance with the appropriate format style. Note that the other validators do not support the lenient currency symbol validation.
IntegerValidator validator = new IntegerValidator(true, IntegerValidator.CURRENCY_FORMAT); String pattern = "#,###" + '\u00A4' + '\u00A4'; // Use international symbol Integer fooAmount = validator.validate("10.100EUR", pattern, Locale.GERMAN); if (fooAmount == null) { // error...not a valid currency amount return; }
A default Percent Validator
implementation is provided, although the Float,
Double and BigDecimal validators also support
percent validation. The default implementation converts
percent amounts to a java.math.BigDecimal
and additionally
it provides lenient percent symbol validation. That is, percent
amounts are valid with or without the percent symbol.
BigDecimalValidator validator = PercentValidator.getInstance(); BigDecimal fooPercent = validator.validate("20%", Locale.US); if (fooPercent == null) { // error...not a valid percent return; } // Check the percent is between 10% and 90% if (validator.isInRange(fooPercent, 0.1, 0.9) { // valid...in the specified range return; }
If, for example, you want to use the Float Validator to validate a percent, then you can simply create a new instance with the appropriate format style. Note that the other validators do not support the lenient percent symbol validation.
FloatValidator validator = new FloatValidator(true, FloatValidator.PERCENT_FORMAT); Float fooPercent = validator.validate("20%", "###%"); if (fooPercent == null) { // error...not a valid percent return; }
Note: in theory the other numeric validators besides Float, Double and BigDecimal (i.e. Byte, Short, Integer, Long and BigInteger) also support percent validation. However, since they don't allow fractions they will only work with percentages greater than 100%.
|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |


2022 FIFA World Cup Qualifiers: Top of the table clash between Iraq and Bahrain ends in stalemate
by Adwaidh RajanThe top of the table clash between Iraq and Bahrain in Group C of the 2022 FIFA World Cup Qualifiers have ended in a goalless draw at the Amman International Stadium in Jordan on Tuesday.
While the Iraqis were coming into the game on the back of a dramatic win over early favourites IR Iran last week, Bahrain had also created an upset of Team Melli last month putting them only two points behind group leaders Iraq.
However, the game which was moved to a neutral venue from Iraq lacked in creativity as both the sides played with caution and ended the game with zero shots on target splitting the points among them in the process.
The two sides had played out a 1-1 draw in Riffa in their qualifiers opener back in September.
The Lions of Mesopotamia remain top of the group with 11 points after five matches while Bahrain are second with nine points. Iran are third with six points from four matches and will have a mountain to climb when the World Cup Qualifiers resume in March 2020.
IRAQ: Mohammed Hameed, Ahmad Ibrahim Al-Qafaje, Dhurgham Ismail, Saad Natiq, Rebin Sulaka Adhamat, Alaa Ali Mhawi, Humam Tariq, Bashar Rasan (Alaa Abbas 76′), Amjad Attwan, Ibraheem Bayesh (Safa Abdullah 46′), Mohanad Ali
BAHRAIN: Sayed Jaafar, Abdulla Al Hazaa, Waleed Al Hayam, Ahmed Bughammar, Sayed Baqer, Sayed Dhiya (Ali Madan 90+3′), Mohammed Al Hardan, Mahdi Al Humaidan, Abdulwahab Al Malood, Abdulla Yusuf Helal (Ismail Abdullatif 83′), Jassim Al Shaikh
(Photo credit: Asian Football Confederation)


Demo notes: The user is logged in. They are now on your site and your branding would be displayed. If you need more information than provided by BC Services Card, you'd ask additional questions to the user to complete enrollment.
Complete Your Enrollment
Name of Individual Logged In
Your additional questions to the user would be here...


You don't have to answer all of these questions, and the information you provide will be used only for research purposes by the Government Digital Service’s research team.
{% endblock %}


Brown, Rose Hannah May
| Birth Name | Brown, Rose Hannah May |
| Gender | female |
| Age at Death | 26 years, 16 days |
Narrative
SMH -- Rose SHUTTLEWORTH, 17 January, 1945, at her residence, 33 Roslyn St, Mascot, dear wife of Leonard, & mother of Leonard, Beryl, Walter & Keith, aged 46 years.
The relatives & friends of Mr. Leonard Shuttleworth & family are invited to attend the funeral of ROSE HANNAH MAY SHUTTLEWORTH, to leave her late residence this afternoon, for the Congregational Cemetery, Botany.
The relatives & friends of Mr.R.Brown, Mrs.Lewis(dec), Mr.W.Brown, Mr.A.Brown, Mr.Eric Brown, Miss F.Brown, Mrs.G.Graham, Mr.W. & Mr.G.Shuttleworth, Mr.R.Holmes, & their families, & Mrs.Pritchard & Mrs.Woolley, are invited to the funeral of their dear daughter, daughter-in-law, sister, sister-in-law, & dear friend, ROSE HANNAH MAY SHUTTLEWORTH. (see family notice)
Events
| Event | Date | Place | Description | Sources |
|---|---|---|---|---|
| Birth | 1919 | Petersham NSW #12051 | ||
|
|
||||
| Death | 1945-01-17 | Redfern NSW #5264 | ||
|
|
||||
| Burial | 1945-01-20 | Congregational Cemetery, Botany | ||
|
|
Parents
| Relation to main person | Name | Birth date | Death date | Relation within this family (if not by birth) |
|---|---|---|---|---|
| Father | Brown, Charles & Clara | |||
| Brown, Rose Hannah May | 1919 | 1945-01-17 |
Families
Family of Shuttleworth, Leonard Walter and Brown, Rose Hannah May |
|||||||||||||||||
| Married | Husband | Shuttleworth, Leonard Walter ( * 1898 + ... ) | |||||||||||||||
|
|||||||||||||||||
| Children |
| Name | Birth Date | Death Date |
|---|---|---|
| Shuttleworth, Leonard George | c1921 | 1977-03-02 |
| Shuttleworth, Beryl Jean | 1918-10-15 | 2005-07-28 |
| Shuttleworth, Walter Charles | c1924 | 1988-12-05 |
| Shuttleworth, Keith Eric | c1926 |
| Type | Value | Notes | Sources |
|---|---|---|---|
| _UID | 83B492FFACF0F642B372FD5D7FC13030BB3D |
Attributes
| Type | Value | Notes | Sources |
|---|---|---|---|
| _UID | 2FF07A176E14CD469009DD23A292708D0F9A |


codeDoc/index.html
contains
sample Tydoc output.
Tydoc consists of two main parts:
DocSys
,
DocClass
, ListDocSys
and
HTMLDocSys
. These classes are defined in
$TYCHO/util/tydoc/TyDocMain.itcl
The Itcl Editor can load these classes to generate HTML documentation
from an Itcl file.
tydoc
tydoc TyDoc.itcl
would
convert TyDoc.itcl
into four files, one for each class in the
doc/codeDoc
directory. If the
doc/codeDoc
directory does not exist, it is
created. A index.html
file is
also created in the doc/codeDoc
directory. The
index.html
file contains a menu with links to all
of the class HTML files.
To produce output in different formats, we have all of the format specific information in a child class. Currently, we only generate HTML output, but it could be possible to write an Itcl pretty printer that would read in Itcl and output a cleaned up version.
Tydoc depends on certain formatting conventions to grab comment information.
#
as the
first non-blank character. The symbol #
is usually
referred to as a hashmark, a poundsign or an octothorpe. In this
document we refer to #
as a hashmark.
Lines that contain more than one hashmark are not copied
into the tydoc
output.
A doc comment is a block of comments associated with a Itcl construct. For a block of comments to be associated with a construct, there must be no blank lines between the block of comments and the construct.
A doc comment may contain doc tags, which consist of a tag and a value. For example, if we had a doc comment that looked like:
# @Author Tycho Brahe, Claudius PtolemausThen
@Author
would be the tag, and
Tycho Brahe, Claudius Ptolemaus
would be the value.
The value of a doc tag consists of all text up to the next doc tag, or until the comment ends.
There are two types of doc tags, those that are file wide, and those that are only for one particular doc comment. (Note that much of the tag support is currently incomplete).
The text associated with a doc tag is assumed to be HTML source. However, to make writing comments a little simpler, tydoc applies some simple conversion rules to the text:

).
_I_ think this is a _perfectly reasonable convention_!will be converted into
I think this is a perfectly reasonable convention!Which is rendered as
The method fred{} uses the global variable *rightSaid*.will be converted into
The method fred uses the global variable rightSaid.Which is rendered as
fred
uses the global
variable rightSaid
.
@Author
@Version
@Copyright
@desc
desc
tag is
optional if a doc comment has no tag, then the text is assumed
to be a description.
@expl
expl
doc tag in either doc comment, then we
assume the above.
Constructs such as proc
s that are not part of a class end
up in a file named ClassName_rel.html
, where
ClassName is the name of the class defined in the file.
tydoc
script takes a -v
argument which will
cause tydoc
to generate output for all constructs in the file.
If the -v
option is not present, then the following constructs
are not written to the HTML file:
Another optimization that always happens is that only the first line of the @copyright
doc comment is present in the HTML file.
tydoc
uses the codeDoc.idx
file.
However, this represents a bit of a chicken-and-egg problem, as
codeDoc.idx
is based upon the tydoc
output.
The best solution is to create the tydoc
output, then
create codeDoc.idx
and then recreate the
tydoc
output, which will use the codeDoc.idx
to fix cross references. The following commands will do this for you:
cd $TYCHO make install
The BuilderDialog can also rebuild these indices.


We are splitting the caligraphic path of the stroke into various quads ... Here's a programmatic example made of four stroke parts.


[filmcritic.com presents a review from guest writer Aileo Weinmann. You can find the review with full credits at http://www.filmcritic.com/misc/emporium.nsf/2a460f93626cd4678625624c007f2b46/03095c15a1e715098825682d0020b9fa?OpenDocument
L5: First City In Space
A film review by Aileo Weinmann – Copyright ? Aileo Weinmann
Director: Toni Myers Producer: Toni Myers Screenwriter: Toni Myers Stars: Rachel Walker, Denis Akiyama, Colin Fox, Genevieve Mori MPAA Rating: N/A Year of Release: 1999
What should you expect from an IMAX? 3D film about a future space colony where 10,000 people live while orbiting Earth? Turns out, very little. Hokey animation, overdone and often-pointless sound effects, and a story that feels like an after-school special combine to create an overall waste of time and the IMAX? experience. In short, this is a huge disappointment for anyone expecting a realistic glimpse into the future of space colonization. Although publicity promises wildly creative computer graphics combined with data from NASA, L5 delivers more like Buck Rogers meets Nickelodeon.
Set 100 years in the future, the film is narrated in by Chieko (voice of Martha Henry), a seven year-old girl (played by Rachel Walker) native to the flourishing colony. A brief history of space exploration includes the sole thrill of a slow motion shuttle launch from the Kennedy Space Center as only IMAX? can deliver. After an overview of L5 that is devoid of any detail or serious scientific facts/processes, the story quickly turns to a mission to save the colony from a water shortage. Sound disjointed? Yep.
Chieko's grandfather (Colin Fox) plans to solve the crisis by attaching a rocket to a water-filled comet that can be used as a reservoir once its path is altered to orbit L5. When the rocket jams, however, Chieko's father (Denis Akiyama) must embark on a daring – maybe absurd is more accurate – voyage to land on the comet and fix the problem. Mind numbing suspense, happy ending, cheesy last words, yawn, `Glad that's finally over' as the lights come up.
Basically, L5 is a children's movie pitched to an older crowd in the hopes that space enthusiasts will be sucked in by the gravity of IMAX?'s enormous screen. Unfortunately, neither audience will be satisfied by this half-baked attempt to stretch 45 out of maybe 10 minutes of worthwhile material.
*1/2 -- Christopher Null -<EMAIL_ADDRESS>- http://www.filmcritic.com Check out the G-Rex Personal Shopper at http://www.g-rex.com
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


|
Vkx
0.1.0
Vulkan C++ extensions
|
A LCG pseudo-random number generator that generates orientations. More...
#include <Vkx/Random.h>
Public Member Functions | |
| RandomOrientation (float phi=0.0f, float theta=0.0f, float psi=glm::pi< float >()) | |
| Constructor. More... | |
| glm::quat | operator() (std::minstd_rand &rng) |
| Returns a limited random orientation . More... | |
A LCG pseudo-random number generator that generates orientations.
| Vkx::RandomOrientation::RandomOrientation | ( | float | phi = 0.0f , |
| float | theta = 0.0f , |
||
| float | psi = glm::pi<float>() |
||
| ) |
Constructor.
If both phi and theta are 0, then unlimited directions are generated.
If theta is 0, then directions within phi radians from the X axis are generated. If both phi and theta are not 0, then directions within phi radians from X in the XY plane and within theta radians from X in the XZ plane are generated.
| phi | Max angle from X axis (Valid range is [0, pi], default: 0) |
| theta | Max angle from X axis in radians in the XZ plane (Valid range is [0, pi], default: 0) |
| psi | Max angle in radians around the axis in each direction (Valid range is [0, pi], default: 0) |
| glm::quat Vkx::RandomOrientation::operator() | ( | std::minstd_rand & | rng | ) |
Returns a limited random orientation .
| rng | Source of entropy |


How do they agree?
Mining
The Blockchain
- Distributed
- Time-stamped
- Public & Verifiable
- Persistent
What's the fuzz about?
- Contracts
- Shares & dividend payments
- Intellectual property
- Voting
- Distributed web apps
- Smart contracts
- ...
Proof of Work
- First transaction: Block reward
- Add a random number
- Proof of Work: HASH(Block) < Difficulty
Proof of Stake
- First transaction: Block reward
- Add timestamp in seconds
- Proof of Stake: HASH(Block) * Stake > Difficulty
My coins
- Bitcoin: The original
- Peercoin: PoS
- Ethereum: Programmable Blockchain
In depth topics
- Pegged side-chains
- Distributed Autonomous Organisations (DAO)
- Distributed web apps (Dapps)
- M-of-N oracles
- Multi-step contracts
- Blockchain as a Service
References
- http://www.ybrikman.com/writing/2014/04/24/bitcoin-by-analogy/


The next iPhone is retailing at almost $1000. With expensive smart phones nowadays you want a good deal on your next smart phone. Buy a used phone and use our app to find out the best time to buy or even sell your next smart phone. Currently we support the two most popular phones, the iPhone 7 and Galaxy S7. More phones to be supported in the future.
We built our app using Ember.
Charts are updated with new data!
We use data that is reliable.
Ember-babel-cli build failure
Lack of MVC knowledge
Combining individual works into main project
Inconsistent loading of HTML/CSS
Getting Chart.js to load data
Integrating Facebook Login with Ember


Macropad Building Instructions
Written on Solar GrammarsSU120 appears to be an extremely flexible PCB for unleashing our creativity in terms of mechanical keyboard crafting. Here I will quickly summarize the steps I followed to build a very basic macropad, just scratching the surface of what seems to be possible.
I got the necessary components from TALP, which included the SU120 PCB, a Pro Micro, diodes, Kaih PCB sockets, a rotary encoder and a tact switch button.
The first step is to solder the diodes.
Try to blend them in a uniform way.
The black mark of the diode needs to be aligned to the diagram in the PCB.
Add some tape to fix them before soldering.
Solder them and cut (here they are still long, as I didnt know how much you could go).
Next, we solder the Kaih sockets. These will allow to make the PCB hot swappable so we can replace the switches more easlily.
When soldering, try to keep it as aligned as possible, otherwise it will impact onthe arragement of the switches.
Next,the tact switch button, which will be used as reset button for the PCB. No much to do here.
Almost there, the Pro Micro.
The rotary encoder has its own position, and can be soldered in the same way a normal switch
Now the switches. For this one, I combined some Creams with Gateron reds
And finally some keycaps
To protect the PCB, you can put some rubber feet
Or, like in my case, make a quick wooden case
Having finshed the hardware part, let’s move to cofigure the actions associated to each key. For this, we will rely on QMK.
On a mac, installation is mostly reduced to
brew install qmk/qmk/qmkeee
qmk setup
…
On the rules.mk
, make sure to add support for the rotary encoder:
...
ENCODER_ENABLE = yes
...
Another important setting needs to be done on the config.h
file, where we need to define
the position of the encoder:
#define ENCODERS_PAD_A { F5, B5 }
#define ENCODERS_PAD_B { F4, B4 }
and also set the resolution :
#define ENCODER_RESOLUTION 4
As a basic functionality for the encoder, lets associate it with the sound volume. To do that,
we need to define a custom function in the keymaps/keymap.c
file:
void encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { // Considers one encoder, you can add more
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
}
}
Once you are done with the settings, it is time to compile and write. Execute the following command:
make handwired/su120/rev1_4knob:avrdude
You should see some output like this:
(base) ➜ qmk_firmware git:(master) ✗ make handwired/su120/rev1_4knob:avrdude
QMK Firmware 0.9.10
Making handwired/su120/rev1_4knob with keymap default and target avrdude
avr-gcc (Homebrew AVR GCC 8.4.0) 8.4.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Size before:
text data bss dec hexfilename
0 24770 0 24770 60c2.build/handwired_su120_rev1_4knob_default.hex
Compiling: keyboards/handwired/su120/rev1_4knob/rev1_4knob.c [OK]
Compiling: keyboards/handwired/su120/rev1_4knob/keymaps/default/keymap.c [OK]
Compiling: quantum/quantum.c [OK]
Compiling: quantum/keymap_common.c [OK]
Compiling: quantum/keycode_config.c [OK]
Compiling: quantum/matrix_common.c [OK]
Compiling: quantum/matrix.c [OK]
Compiling: quantum/debounce/sym_g.c [OK]
Compiling: quantum/color.c [OK]
Compiling: quantum/rgblight.c [OK]
Compiling: quantum/process_keycode/process_rgb.c [OK]
Compiling: drivers/avr/ws2812.c [OK]
Compiling: quantum/led_tables.c [OK]
Compiling: quantum/encoder.c [OK]
Compiling: quantum/process_keycode/process_unicodemap.c [OK]
Compiling: quantum/process_keycode/process_unicode_common.c [OK]
Compiling: quantum/process_keycode/process_space_cadet.c [OK]
Compiling: quantum/process_keycode/process_magic.c [OK]
Compiling: quantum/process_keycode/process_grave_esc.c [OK]
Compiling: tmk_core/common/host.c [OK]
Compiling: tmk_core/common/keyboard.c [OK]
Compiling: tmk_core/common/action.c [OK]
Compiling: tmk_core/common/action_tapping.c [OK]
Compiling: tmk_core/common/action_macro.c [OK]
Compiling: tmk_core/common/action_layer.c [OK]
Compiling: tmk_core/common/action_util.c [OK]
Compiling: tmk_core/common/print.c [OK]
Compiling: tmk_core/common/debug.c [OK]
Compiling: tmk_core/common/sendchar_null.c [OK]
Compiling: tmk_core/common/util.c [OK]
Compiling: tmk_core/common/eeconfig.c [OK]
Compiling: tmk_core/common/report.c [OK]
Compiling: tmk_core/common/avr/suspend.c [OK]
Compiling: tmk_core/common/avr/timer.c [OK]
Compiling: tmk_core/common/avr/bootloader.c [OK]
Assembling: tmk_core/common/avr/xprintf.S [OK]
Compiling: tmk_core/common/magic.c [OK]
Compiling: tmk_core/common/command.c [OK]
Compiling: tmk_core/protocol/lufa/lufa.c [OK]
Compiling: tmk_core/protocol/usb_descriptor.c [OK]
Compiling: tmk_core/protocol/lufa/outputselect.c [OK]
Compiling: lib/lufa/LUFA/Drivers/USB/Class/Common/HIDParser.c [OK]
Compiling: lib/lufa/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.c [OK]
Compiling: lib/lufa/LUFA/Drivers/USB/Core/AVR8/EndpointStream_AVR8.c [OK]
Compiling: lib/lufa/LUFA/Drivers/USB/Core/AVR8/Endpoint_AVR8.c [OK]
Compiling: lib/lufa/LUFA/Drivers/USB/Core/AVR8/Host_AVR8.c [OK]
Compiling: lib/lufa/LUFA/Drivers/USB/Core/AVR8/PipeStream_AVR8.c [OK]
Compiling: lib/lufa/LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.c [OK]
Compiling: lib/lufa/LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.c [OK]
Compiling: lib/lufa/LUFA/Drivers/USB/Core/AVR8/USBInterrupt_AVR8.c [OK]
Compiling: lib/lufa/LUFA/Drivers/USB/Core/ConfigDescriptors.c [OK]
Compiling: lib/lufa/LUFA/Drivers/USB/Core/DeviceStandardReq.c [OK]
Compiling: lib/lufa/LUFA/Drivers/USB/Core/Events.c [OK]
Compiling: lib/lufa/LUFA/Drivers/USB/Core/HostStandardReq.c [OK]
Compiling: lib/lufa/LUFA/Drivers/USB/Core/USBTask.c [OK]
Linking: .build/handwired_su120_rev1_4knob_default.elf [OK]
Creating load file for flashing: .build/handwired_su120_rev1_4knob_default.hex [OK]
Copying handwired_su120_rev1_4knob_default.hex to qmk_firmware folder [OK]
Checking file size of handwired_su120_rev1_4knob_default.hex [OK]
* The firmware size is fine - 25098/28672 (87%, 3574 bytes free)
Detecting USB port, reset your controller now...................
Device /dev/tty.usbmodem1421 has appeared; assuming it is the controller.
Waiting for /dev/tty.usbmodem1421 to become writable.
Connecting to programmer: .
Found programmer: Id = "CATERIN"; type = S
Software Version = 1.0; No Hardware Version given.
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize=128 bytes.
Programmer supports the following devices:
Device code: 0x44
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9587 (probably m32u4)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file ".build/handwired_su120_rev1_4knob_default.hex"
avrdude: input file .build/handwired_su120_rev1_4knob_default.hex auto detected as Intel Hex
avrdude: writing flash (25098 bytes):
Writing | ################################################## | 100% 1.93s
avrdude: 25098 bytes of flash written
avrdude: verifying flash memory against .build/handwired_su120_rev1_4knob_default.hex:
avrdude: load data flash data from input file .build/handwired_su120_rev1_4knob_default.hex:
avrdude: input file .build/handwired_su120_rev1_4knob_default.hex auto detected as Intel Hex
avrdude: input file .build/handwired_su120_rev1_4knob_default.hex contains 25098 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.24s
avrdude: verifying ...
avrdude: 25098 bytes of flash verified
avrdude: safemode: Fuses OK (E:FB, H:D8, L:FF)
avrdude done. Thank you.


Businesses in {{ neighbourhood.name }} Estate
{%if businesses%}
{%for business in businesses%}
Business Name: {{business.name}}
Description: {{business.description}}
Contact: {{business.email}}
{%endfor%}
{%else%}
No businesses posted in {{ neighbourhood.name }} Estate at the moment
{%endif%}
Posts in {{ neighbourhood.name }} Estate
{%if posts%}
{%for post in posts%}
Post by {{post.user}}
Post Details: {{post.post}}
{%endfor%}
{%else%}
There are no post(s) in {{ neighbourhood.name }} Estate at the moment
{%endif%}


TECH(K)NOW Day on International Women's Day
We are looking for women (cis, trans, and non-binary) who can give talks on technical, creative, business, and personal development topics. Share your experience and inspire others in tech!
Learn more and apply today →
Sponsor


cfb_metrics_ppa_players_games.Rd
Get player game averages for Predicted Points Added (PPA)
cfb_metrics_ppa_players_games( year = NULL, week = NULL, team = NULL, position = NULL, athlete_id = NULL, threshold = NULL, excl_garbage_time = FALSE )
| year | (Integer required): Year, 4 digit format (YYYY) |
|---|---|
| week | (Integer optional): Week - values range from 1-15, 1-14 for seasons pre-playoff, i.e. 2013 or earlier |
| team | (String optional): D-I Team |
| position | (string optional): Position abbreviation of the player you are searching for. |
| athlete_id | (Integer optional): Athlete ID filter for querying a single athlete |
| threshold | (Integer optional): Minimum threshold of plays. |
| excl_garbage_time | (Logical default FALSE): Select whether to exclude Garbage Time (TRUE or FALSE) |
https://api.collegefootballdata.com/ppa/players/games
A data frame with 9 variables:
season
integer.
week
integer.
name
character.
position
character.
team
character.
opponent
character.
avg_PPA_all
double.
avg_PPA_pass
double.
avg_PPA_rush
double.
cfb_metrics_ppa_players_games(year = 2019,week=3, team = 'TCU')#>#> season week name position team opponent avg_PPA_all avg_PPA_pass #> 1 2019 3 Alex Delton QB TCU Purdue -0.861 -1.052 #> 2 2019 3 Max Duggan QB TCU Purdue -0.184 -0.234 #> 3 2019 3 Emari Demercado RB TCU Purdue -0.080 NA #> 4 2019 3 Jalen Reagor WR TCU Purdue 0.008 0.164 #> 5 2019 3 Pro Wells TE TCU Purdue 0.129 0.129 #> 6 2019 3 Sewo Olonilua RB TCU Purdue 0.378 -0.471 #> 7 2019 3 Darius Anderson RB TCU Purdue 0.629 -0.451 #> 8 2019 3 Al'Dontre Davis WR TCU Purdue 3.183 3.183 #> avg_PPA_rush #> 1 -0.192 #> 2 -0.085 #> 3 -0.080 #> 4 -0.201 #> 5 NA #> 6 0.478 #> 7 0.764 #> 8 NA


{% extends 'base.html' %} {% block nombre_seccion %}Login{% endblock %} {% block contenido %} Already have an account? There are advances being made in science and technology everyday, and a good example of this is the Login Now Crear una cuenta {% csrf_token %} {{form.errors.username}} {{form.errors.first_name}} {{form.errors.last_name}} {{form.errors.email}} {{form.errors.password2}} {{form.errors.password2}} Keep me logged in Registrar {% endblock %}
There are advances being made in science and technology everyday, and a good example of this is the


from typing import Dict, List, Tuple
import attr
from dialogy.plugin import Plugin
from dialogy.types.entity import BaseEntity
from dialogy.types.intent import Intent
from dialogy.types.plugin import PluginFn
from dialogy.types.slots import Rule
from dialogy.workflow import Workflow
@attr.s
class RuleBasedSlotFillerPlugin(Plugin):
An instance of this class is used for generating a slot-filler.
Schema for rules looks like:
{
"<intent_name>": {
"<slot_name>":"<entity_name>"
}
}
Plugin signature:
access(workflow) -> (Intent, List[BaseEntity])
mutate
not required since the mutation is implied through Intent structure change.Irrespective of the entities that are found, only the listed type in the slot shall be present in values
.
rules
A Dict
where each key is an intent name, and each value is another Dict
,
in which, each key is an entity and value contains the slot_name
and entity_type.
example:
rules = {"intent": {"slot_name": "entity_type"}}
rules = attr.ib(type=Rule, default=attr.Factory(Dict))
fill_multiple A boolean value that commands the slot filler to add multiple values of the same entity type within a slot.
fill_multiple = attr.ib(type=bool, default=False)
def filler(self, workflow: Workflow) -> None:
Update an intent slot with compatible entity.
access(workflow)
should return a tuple. Intent
, List[BaseEntity]
.Args: workflow (Workflow)
Raises: TypeError: self.access should be a Callable.
if self.access is not None:
try:
intent_and_entities: Tuple[Intent, List[BaseEntity]] = self.access(
workflow
)
intent, entities = intent_and_entities
intent.apply(self.rules)
for entity in entities:
intent.fill_slot(entity, fill_multiple=self.fill_multiple)
intent.cleanup()
except TypeError as type_error:
raise TypeError(
f"`access` passed to {self.__class__.__name__}"
f" is not a Callable. Received {type(self.access)} instead."
) from type_error
else:
raise TypeError(
f"`access` passed to {self.__class__.__name__}"
f" is not a Callable. Received {type(self.access)} instead."
)
def __call__(self) -> PluginFn:
return self.filler


|
OR-Tools
7.1
Google Optimization software suite
|
#include <hamiltonian_path.h>
Public Types | |
| typedef Integer | IntegerType |
Public Member Functions | |
| Set (Integer n) | |
| Integer | value () const |
| Set | AddElement (int n) const |
| Set | RemoveElement (int n) const |
| bool | Contains (int n) const |
| bool | Includes (Set other) const |
| int | Cardinality () const |
| int | SmallestElement () const |
| Set | RemoveSmallestElement () const |
| int | ElementRank (int n) const |
| Set | SmallestSingleton () const |
| int | SingletonRank (Set singleton) const |
| ElementIterator< Set > | begin () const |
| ElementIterator< Set > | end () const |
| bool | operator!= (const Set &other) const |
| template<> | |
| int | SmallestElement () const |
| template<> | |
| int | Cardinality () const |
Static Public Member Functions | |
| static Set | FullSet (Integer card) |
| static Set | Singleton (Integer n) |
Static Public Attributes | |
| static const Integer | One = static_cast<Integer>(1) |
| static const Integer | Zero = static_cast<Integer>(0) |
| static const int | MaxCardinality = 8 * sizeof(Integer) |
Definition at line 127 of file hamiltonian_path.h.
| typedef Integer operations_research::Set< Integer >::IntegerType |
Definition at line 130 of file hamiltonian_path.h.
|
inlineexplicit |
Definition at line 138 of file hamiltonian_path.h.
|
inline |
Definition at line 144 of file hamiltonian_path.h.
|
inlinestatic |
Definition at line 146 of file hamiltonian_path.h.
|
inlinestatic |
Definition at line 151 of file hamiltonian_path.h.
|
inline |
Definition at line 155 of file hamiltonian_path.h.
|
inline |
Definition at line 159 of file hamiltonian_path.h.
|
inline |
Definition at line 162 of file hamiltonian_path.h.
|
inline |
Definition at line 165 of file hamiltonian_path.h.
|
inline |
Definition at line 171 of file hamiltonian_path.h.
|
inline |
Definition at line 175 of file hamiltonian_path.h.
|
inline |
Definition at line 179 of file hamiltonian_path.h.
|
inline |
Definition at line 183 of file hamiltonian_path.h.
|
inline |
Definition at line 189 of file hamiltonian_path.h.
|
inline |
Definition at line 192 of file hamiltonian_path.h.
|
inline |
Definition at line 198 of file hamiltonian_path.h.
|
inline |
Definition at line 201 of file hamiltonian_path.h.
|
inline |
Definition at line 202 of file hamiltonian_path.h.
|
inline |
Definition at line 210 of file hamiltonian_path.h.
|
inline |
Definition at line 215 of file hamiltonian_path.h.
|
static |
Definition at line 133 of file hamiltonian_path.h.
|
static |
Definition at line 134 of file hamiltonian_path.h.
|
static |
Definition at line 135 of file hamiltonian_path.h.


| Project name | juicycoin |
| Project version | 3a84a49 |
| Tree path | . |
| Generated at | February 26, 2016 00:04 |
| Generator | GitStats 1.0.14 |
| Report period | July 10, 2013 23:46 .. January 03, 2014 18:42 |
| Total files | 371 (Binary: 34, Text: 337) |
| Total lines | 28280 Lines (45136 Lines added, 16754 Lines deleted) |
| Total commits | 337 |
| Authors | 2 |