Folders and files under "My Files" tab are associated to your Google Account. Create as many folder and files you need.
Edit your files using rich code editor with out of the box support for Suitescript Files. IntelliSense is also available (Press Ctrl-Space anytime to get code hints). You can disable the rich code editor from Setting menu on Navigation menu.
Keep saving your files by pressing the "Save File" button just above the editor. You can also save the file by pressing Ctrl-S keys from the editor.
Connect to your NetSuite account any time to edit and save files directly to your account. Click "Account Files" tab. Enter your NetSuite credentials. After logging in All your folders will be displayed. Click on any folder to get the list of files.
SuiteCoder uses Netsuite Webservices. Please make sure that your role has sufficient webservice permissions. Don't forget to tick the Sandbox checkbox if you are using a sandbox account.
Each time you save the file a revision is saved. Click on "File History" button (Just above the code editor) to view all the revisions. Click on any date to compare that revision with current version in your editor


A message sender is required.
A message recipient is required.
Please enter a valid set of phone numbers.
{{data.msg.body.text.length}} Characters [ {{app.countSMS(data.msg.body.text)}} Message{{(app.countSMS(data.msg.body.text)>1)?'s ':' '}}]
A message is required.
Please enter a longer message.


{% extends "templates/partials/base.html" %} {% block title %}{% parent %} - Everywhere{% endblock %} {% block content %}
In 2013 we launched our programme to take YRS events outside of the UK: ‘YRS Everywhere’. To date, we’ve held weekend events in New York City, San Francisco, Berlin, Kosovo and Singapore, each with our ‘founding 50’ young coders in the region!
The fantastic thing about working in the digital space is that geographical boundaries just don’t matter! This enables us to form a truly global network of young coders, one event at a time. During all of our events we encourage our entire community, wherever they are, to participate online by sharing skills with the young coders taking part on our protected forums or on Twitter/
Additionally, attendees of YRS Everywhere events are invited to participate in our annual Festival of Code in the UK. They can either fly over to the residential ‘international centre’ for the week, and build projects with other young coders from around the world, or they can participate remotely from their home country. This scheme was piloted at the Festival of Code 2014 and resulted in the ‘Best Example of Code’ prize being won by a team from Germany, and the popular ‘people’s vote’ prize being won by a team participating remotely from Kosovo!


--- layout: archive title: Zulip Chat Archive permalink: /stream/113489-new-members/topic/uncurry.html ---
i have been trying to write the uncurry function from exercise 2.10 and i'm having problems with it. I can understand what's wrong with it butI have no idea about what to do. Any help is appreciated.
Code :
def curry {alpha beta gamma : Type}
(f : (prod alpha beta) -> gamma) : alpha -> beta -> gamma
:= fun (x : alpha) (y : beta), f (x,y)
#check curry add1
def uncurry {alpha beta gamma : Type}
(f : alpha -> beta -> gamma) : (prod alpha beta) -> gamma
:= fun (x : alpha) (y : beta), f x y
Error:
type mismatch, term
λ (x : alpha) (y : beta), f x y
has type
alpha → beta → gamma
but is expected to have type
alpha × beta → gamma
put code in triple backticks for formatting
The function uncurry f
takes a single argument of type prod alpha beta
, so you should have fun p : prod alpha beta, ...
to start. After that, you can use the projections p.fst
and p.snd
to extract the parts of type alpha
and beta
to pass to f
Thanks you so much. It worked.
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


Alias
Format:
/alias {shortcut} {commands} {group name}
Description:
An alias lets you define some "shortcut" text to execute a command or
commands. Your alias list is checked each time you press enter to send some
text to the mud. If the text you typed is found in your alias list the text
from the commands side of the alias is sent instead. An alias is only
replaced if it is the first text typed on a line.
Typing /alias by itself will list your current aliases on the screen.
Arguments:
- {alias name} This is the shortcut text you want to be able to type to execute commands.
- {commands} The commands to execute when the alias name is typed.
- {group name} This is an optional parameter. See the user guide on groups for help.
Examples:
/alias {eat} {take food bag;eat food}
If you typed "eat" on the input line the commands "take food bag" and "eat food" would be sent to the mud instead.
/alias {targ %0} {/var Target $0}
You can also use the variable %0 to represent the text typed after the alias
shortcut. In this case the alias is used to quickly set a targeting variable.
Typing "targ Vecna" would set a variable called "Target" to "Vecna"
Related Commands:
/disablealias,
/enablealias,
/groupalias,
/sendalias,
/unalias
Click here to return to previous page.


Flawless (1999) 2 stars out of 4. Starring Robert De Niro, Philip Seymour Hoffman and Barry Miller. Directed by Joel Shumacher.
"Flawless" is one of those flawed movies about opposite worlds colliding, but ultimately coming to understand and like each other.
Robert De Niro plays Walter Koontz, a macho, homophobic ex-cop-turned-security guard who suffers a stroke.
Philip Seymour Hoffman plays Rusty, a flamboyant drag queen and Koontz's neighbor. They despise each other, hurling invectives back and force through their respective apartment windows.
But after Koontz's stroke, he turns to Rusty for help. Koontz asks Rusty to give him singing lessons in an effort to regain the use of his vocal cords.
Director Joel Shumacher - who ruined the Batman franchise with his "Batman Forever" and "Batman and Robin" - does not spare us one cliché here.
Rusty, to put it kindly, is an over-the-top flaming drag queen, whose only wish is to save enough money to have an operation that will transform him into a woman.
He and his fellow drag queen friends are loud, colorful and witty. Koontz on the other hand, is dull, plodding and bigoted.
The movie is not helped by a nasty subplot concerning a low-life drug dealer and his stolen money.
The movie's main asset is Hoffman's performance. Hoffman, best remembered as the young crew member with a crush on Mark Wahlberg's Dirk in "Boogie Nights," takes what could have been a caricature and transforms him into a fully-developed human being.
Despite how you may feel about the kind of life Rusty leads, you come to respect him.
De Niro on the other hand seems to be reprising some of his moves from "Awakenings" as the stroke-impaired Koontz.
He does a fine job at showing the frustrations of a man who can no longer function at 100 percent. But he adds nothing more.
 Both are prostitutes, but one ditches him after his stroke, while the other, with the proverbial "heart of gold," loves only him and doesn't care whether or not he has a nickel.
The entire enterprise feels contrived.
"Flawless" will not do much to advance the cause of gay rights.
The difference between them, Rusty explains, is that the Republicans are ashamed of being gay, while Rusty and her friends feel nothing but pride.
"Flawless" is a bit too violent for the subject at hand, and that adds a disquieting note to the proceedings.
Overall, though, "Flawless" is carried on the shoulders of Hoffman. And it is his performance, worthy of an Oscar nomination, alone that makes this a movie you may want to see.
Bob Bloom is the film critic at the Journal and Courier in Lafayette, IN. He can be reached by e-mail at<EMAIL_ADDRESS>or at<EMAIL_ADDRESS>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


Get intensive training for a career in artificial intelligence and machine learning.
Learn the fundamentals of frontend, backend, servers, databases, APIs, and more.
Create powerful iPhone and iPad apps with Swift, Objective-C, and Cocoa Touch.
Master the entire UX design process and learn the basics of building for web and mobile.
Sign up for Lambda today and start the path towards a better career. With 4 paths to schoose from, Lambda has a path for everyone. We offer full-time and part-time schedules. It doesn't matter if you have some full-time or all the time in the world, Lambda offers a pace that is right for you. Start your journey to a better career today!


class Sass::Selector::Sequence
An operator-separated sequence of {SimpleSequence simple selector sequences}.
Attributes
The array of {SimpleSequence simple selector sequences}, operators, and newlines. The operators are strings such as `“+”` and `“>”` representing the corresponding CSS operators, or interpolated SassScript. Newlines are also newline strings; these aren’t semantically relevant, but they do affect formatting.
@return [Array<SimpleSequence, String|Array<Sass::Tree::Node, String>>]
Public Class Methods
@param seqs_and_ops [Array<SimpleSequence, String|Array<Sass::Tree::Node, String>>]
See \{#members}
# File lib/sass/selector/sequence.rb, line 38 def initialize(seqs_and_ops) @members = seqs_and_ops end
Public Instance Methods
Add to the {SimpleSequence#sources} sets of the child simple sequences. This destructively modifies this sequence’s members array, but not the child simple sequences.
@param sources [Set<Sequence>]
# File lib/sass/selector/sequence.rb, line 140 def add_sources!(sources) members.map! {|m| m.is_a?(SimpleSequence) ? m.with_more_sources(sources) : m} end
Non-destructively extends this selector with the extensions specified in a hash (which should come from {Sass::Tree::Visitors::Cssize}).
@overload #do_extend(extends, parent_directives)
@param extends [Sass::Util::SubsetMap{Selector::Simple => Sass::Tree::Visitors::Cssize::Extend}] The extensions to perform on this selector @param parent_directives [Array<Sass::Tree::DirectiveNode>] The directives containing this selector.
@return [Array<Sequence>] A list of selectors generated
by extending this selector with `extends`. These correspond to a {CommaSequence}'s {CommaSequence#members members array}.
@see Sass::Selector::CommaSequence#do_extend
# File lib/sass/selector/sequence.rb, line 91 def do_extend(extends, parent_directives, seen = Set.new) extended_not_expanded = members.map do |sseq_or_op| next [[sseq_or_op]] unless sseq_or_op.is_a?(SimpleSequence) extended = sseq_or_op.do_extend(extends, parent_directives, seen) choices = extended.map {|seq| seq.members} choices.unshift([sseq_or_op]) unless extended.any? {|seq| seq.superselector?(sseq_or_op)} choices end weaves = Sass::Util.paths(extended_not_expanded).map {|path| weave(path)} trim(weaves).map {|p| Sequence.new(p)} end
Sets the name of the file in which this selector was declared, or `nil` if it was not declared in a file (e.g. on stdin). This also sets the filename for all child selectors.
@param filename [String, nil] @return [String, nil]
# File lib/sass/selector/sequence.rb, line 22 def filename=(filename) members.each {|m| m.filename = filename if m.is_a?(SimpleSequence)} filename end
Returns a string representation of the sequence. This is basically the selector string.
@return [String]
# File lib/sass/selector/sequence.rb, line 131 def inspect members.map {|m| m.inspect}.join(" ") end
Sets the line of the Sass template on which this selector was declared. This also sets the line for all child selectors.
@param line [Fixnum] @return [Fixnum]
# File lib/sass/selector/sequence.rb, line 11 def line=(line) members.each {|m| m.line = line if m.is_a?(SimpleSequence)} line end
Resolves the {Parent} selectors within this selector by replacing them with the given parent selector, handling commas appropriately.
@param super_cseq [CommaSequence] The parent selector @param implicit_parent [Boolean] Whether the the parent
selector should automatically be prepended to the resolved selector if it contains no parent refs.
@return [CommaSequence] This selector, with parent references resolved @raise [Sass::SyntaxError] If a parent selector is invalid
# File lib/sass/selector/sequence.rb, line 52 def resolve_parent_refs(super_cseq, implicit_parent) members = @members.dup nl = (members.first == "\n" && members.shift) contains_parent_ref = members.any? do |seq_or_op| seq_or_op.is_a?(SimpleSequence) && seq_or_op.members.first.is_a?(Parent) end return CommaSequence.new([self]) if !implicit_parent && !contains_parent_ref unless contains_parent_ref old_members, members = members, [] members << nl if nl members << SimpleSequence.new([Parent.new], false) members += old_members end CommaSequence.new(Sass::Util.paths(members.map do |sseq_or_op| next [sseq_or_op] unless sseq_or_op.is_a?(SimpleSequence) sseq_or_op.resolve_parent_refs(super_cseq).members end).map do |path| Sequence.new(path.map do |seq_or_op| next seq_or_op unless seq_or_op.is_a?(Sequence) seq_or_op.members end.flatten) end) end
Returns whether or not this selector matches all elements that the given selector matches (as well as possibly more).
@example
(.foo).superselector?(.foo.bar) #=> true (.foo).superselector?(.bar) #=> false (.bar .foo).superselector?(.foo) #=> false
@param sseq [SimpleSequence] @return [Boolean]
# File lib/sass/selector/sequence.rb, line 112 def superselector?(sseq) return false unless members.size == 1 members.last.superselector?(sseq) end
@see Sass::Selector::Simple#to_a
# File lib/sass/selector/sequence.rb, line 118 def to_a ary = @members.map do |seq_or_op| seq_or_op.is_a?(SimpleSequence) ? seq_or_op.to_a : seq_or_op end ary = Sass::Util.intersperse(ary, " ").flatten.compact ary = Sass::Util.replace_subseq(ary, ["\n", " "], ["\n"]) Sass::Util.replace_subseq(ary, [" ", "\n"], ["\n"]) end
Private Instance Methods
# File lib/sass/selector/sequence.rb, line 497 def _eql?(other) other.members.reject {|m| m == "\n"}.eql?(members.reject {|m| m == "\n"}) end
# File lib/sass/selector/sequence.rb, line 493 def _hash members.reject {|m| m == "\n"}.hash end
# File lib/sass/selector/sequence.rb, line 514 def _sources(seq) s = Set.new seq.map {|sseq_or_op| s.merge sseq_or_op.sources if sseq_or_op.is_a?(SimpleSequence)} s end
Given two selector sequences, returns whether `seq1` is a superselector of `seq2`; that is, whether `seq1` matches every element `seq2` matches.
@param seq1 [Array<SimpleSequence or String>] @param seq2 [Array<SimpleSequence or String>] @return [Boolean]
# File lib/sass/selector/sequence.rb, line 406 def _superselector?(seq1, seq2) seq1 = seq1.reject {|e| e == "\n"} seq2 = seq2.reject {|e| e == "\n"} # Selectors with leading or trailing operators are neither # superselectors nor subselectors. return if seq1.last.is_a?(String) || seq2.last.is_a?(String) || seq1.first.is_a?(String) || seq2.first.is_a?(String) # More complex selectors are never superselectors of less complex ones return if seq1.size > seq2.size return seq1.first.superselector?(seq2.last) if seq1.size == 1 _, si = Sass::Util.enum_with_index(seq2).find do |e, i| return if i == seq2.size - 1 next if e.is_a?(String) seq1.first.superselector?(e) end return unless si if seq1[1].is_a?(String) return unless seq2[si + 1].is_a?(String) # .foo ~ .bar is a superselector of .foo + .bar return unless seq1[1] == "~" ? seq2[si + 1] != ">" : seq1[1] == seq2[si + 1] return _superselector?(seq1[2..-1], seq2[si + 2..-1]) elsif seq2[si + 1].is_a?(String) return unless seq2[si + 1] == ">" return _superselector?(seq1[1..-1], seq2[si + 2..-1]) else return _superselector?(seq1[1..-1], seq2[si + 1..-1]) end end
Takes initial subsequences of `seq1` and `seq2` and returns all orderings of those subsequences. The initial subsequences are determined by a block.
Destructively removes the initial subsequences of `seq1` and `seq2`.
For example, given `(A B C | D E)` and `(1 2 | 3 4 5)` (with `|` denoting the boundary of the initial subsequence), this would return `[(A B C 1 2), (1 2 A B C)]`. The sequences would then be `(D E)` and `(3 4 5)`.
@param seq1 [Array] @param seq2 [Array] @yield [a] Used to determine when to cut off the initial subsequences.
Called repeatedly for each sequence until it returns true.
@yieldparam a [Array] A final subsequence of one input sequence after
cutting off some initial subsequence.
@yieldreturn [Boolean] Whether or not to cut off the initial subsequence
here.
@return [Array<Array>] All possible orderings of the initial subsequences.
# File lib/sass/selector/sequence.rb, line 366 def chunks(seq1, seq2) chunk1 = [] chunk1 << seq1.shift until yield seq1 chunk2 = [] chunk2 << seq2.shift until yield seq2 return [] if chunk1.empty? && chunk2.empty? return [chunk2] if chunk1.empty? return [chunk1] if chunk2.empty? [chunk1 + chunk2, chunk2 + chunk1] end
# File lib/sass/selector/sequence.rb, line 520 def extended_not_expanded_to_s(extended_not_expanded) extended_not_expanded.map do |choices| choices = choices.map do |sel| next sel.first.to_s if sel.size == 1 "#{sel.join ' '}" end next choices.first if choices.size == 1 && !choices.include?(' ') "(#{choices.join ', '})" end.join ' ' end
Groups a sequence into subsequences. The subsequences are determined by strings; adjacent non-string elements will be put into separate groups, but any element adjacent to a string will be grouped with that string.
For example, `(A B “C” D E “F” G “H” “I” J)` will become `[(A) (B “C” D) (E “F” G “H” “I” J)]`.
@param seq [Array] @return [Array<Array>]
# File lib/sass/selector/sequence.rb, line 386 def group_selectors(seq) newseq = [] tail = seq.dup until tail.empty? head = [] begin head << tail.shift end while !tail.empty? && head.last.is_a?(String) || tail.first.is_a?(String) newseq << head end newseq end
Extracts final selector combinators (`“+”`, `“>”`, `“~”`) and the selectors to which they apply from two sequences and merges them together into a single array.
@param seq1 [Array<SimpleSequence or String>] @param seq2 [Array<SimpleSequence or String>] @return [Array<SimpleSequence or String or
Array<Array<SimpleSequence or String>>] If there are no trailing combinators to be merged, this will be the empty array. If the trailing combinators cannot be merged, this will be nil. Otherwise, this will contained the merged selector. Array elements are [Sass::Util#paths]-style options; conceptually, an "or" of multiple selectors.
@comment
rubocop:disable MethodLength
# File lib/sass/selector/sequence.rb, line 262 def merge_final_ops(seq1, seq2, res = []) ops1, ops2 = [], [] ops1 << seq1.pop while seq1.last.is_a?(String) ops2 << seq2.pop while seq2.last.is_a?(String) # Not worth the headache of trying to preserve newlines here. The most # important use of newlines is at the beginning of the selector to wrap # across lines anyway. ops1.reject! {|o| o == "\n"} ops2.reject! {|o| o == "\n"} return res if ops1.empty? && ops2.empty? if ops1.size > 1 || ops2.size > 1 # If there are multiple operators, something hacky's going on. If one # is a supersequence of the other, use that, otherwise give up. lcs = Sass::Util.lcs(ops1, ops2) return unless lcs == ops1 || lcs == ops2 res.unshift(*(ops1.size > ops2.size ? ops1 : ops2).reverse) return res end # This code looks complicated, but it's actually just a bunch of special # cases for interactions between different combinators. op1, op2 = ops1.first, ops2.first if op1 && op2 sel1 = seq1.pop sel2 = seq2.pop if op1 == '~' && op2 == '~' if sel1.superselector?(sel2) res.unshift sel2, '~' elsif sel2.superselector?(sel1) res.unshift sel1, '~' else merged = sel1.unify(sel2.members, sel2.subject?) res.unshift [ [sel1, '~', sel2, '~'], [sel2, '~', sel1, '~'], ([merged, '~'] if merged) ].compact end elsif (op1 == '~' && op2 == '+') || (op1 == '+' && op2 == '~') if op1 == '~' tilde_sel, plus_sel = sel1, sel2 else tilde_sel, plus_sel = sel2, sel1 end if tilde_sel.superselector?(plus_sel) res.unshift plus_sel, '+' else merged = plus_sel.unify(tilde_sel.members, tilde_sel.subject?) res.unshift [ [tilde_sel, '~', plus_sel, '+'], ([merged, '+'] if merged) ].compact end elsif op1 == '>' && %w[~ +].include?(op2) res.unshift sel2, op2 seq1.push sel1, op1 elsif op2 == '>' && %w[~ +].include?(op1) res.unshift sel1, op1 seq2.push sel2, op2 elsif op1 == op2 merged = sel1.unify(sel2.members, sel2.subject?) return unless merged res.unshift merged, op1 else # Unknown selector combinators can't be unified return end return merge_final_ops(seq1, seq2, res) elsif op1 seq2.pop if op1 == '>' && seq2.last && seq2.last.superselector?(seq1.last) res.unshift seq1.pop, op1 return merge_final_ops(seq1, seq2, res) else # op2 seq1.pop if op2 == '>' && seq1.last && seq1.last.superselector?(seq2.last) res.unshift seq2.pop, op2 return merge_final_ops(seq1, seq2, res) end end
Extracts initial selector combinators (`“+”`, `“>”`, `“~”`, and `“n”`) from two sequences and merges them together into a single array of selector combinators.
@param seq1 [Array<SimpleSequence or String>] @param seq2 [Array<SimpleSequence or String>] @return [Array<String>, nil] If there are no operators in the merged
sequence, this will be the empty array. If the operators cannot be merged, this will be nil.
# File lib/sass/selector/sequence.rb, line 231 def merge_initial_ops(seq1, seq2) ops1, ops2 = [], [] ops1 << seq1.shift while seq1.first.is_a?(String) ops2 << seq2.shift while seq2.first.is_a?(String) newline = false newline ||= !!ops1.shift if ops1.first == "\n" newline ||= !!ops2.shift if ops2.first == "\n" # If neither sequence is a subsequence of the other, they cannot be # merged successfully lcs = Sass::Util.lcs(ops1, ops2) return unless lcs == ops1 || lcs == ops2 (newline ? ["\n"] : []) + (ops1.size > ops2.size ? ops1 : ops2) end
Like {#_superselector?}, but compares the selectors in the context of parent selectors, as though they shared an implicit base simple selector. For example, `B` is not normally a superselector of `B A`, since it doesn’t match `A` elements. However, it is a parent superselector, since `B X` is a superselector of `B A X`.
@param seq1 [Array<SimpleSequence or String>] @param seq2 [Array<SimpleSequence or String>] @return [Boolean]
# File lib/sass/selector/sequence.rb, line 447 def parent_superselector?(seq1, seq2) base = Sass::Selector::SimpleSequence.new([Sass::Selector::Placeholder.new('<temp>')], false) _superselector?(seq1 + [base], seq2 + [base]) end
# File lib/sass/selector/sequence.rb, line 503 def path_has_two_subjects?(path) subject = false path.each do |sseq_or_op| next unless sseq_or_op.is_a?(SimpleSequence) next unless sseq_or_op.subject? return true if subject subject = true end false end
This interweaves two lists of selectors, returning all possible orderings of them (including using unification) that maintain the relative ordering of the input arrays.
For example, given `.foo .bar` and `.baz .bang`, this would return `.foo .bar .baz .bang`, `.foo .bar.baz .bang`, `.foo .baz .bar .bang`, `.foo .baz .bar.bang`, `.foo .baz .bang .bar`, and so on until `.baz .bang .foo .bar`.
Semantically, for selectors A and B, this returns all selectors `AB_i` such that the union over all i of elements matched by `AB_i X` is identical to the intersection of all elements matched by `A X` and all elements matched by `B X`. Some `AB_i` are elided to reduce the size of the output.
@param seq1 [Array<SimpleSequence or String>] @param seq2 [Array<SimpleSequence or String>] @return [Array<Array<SimpleSequence or String>>]
# File lib/sass/selector/sequence.rb, line 191 def subweave(seq1, seq2) return [seq2] if seq1.empty? return [seq1] if seq2.empty? seq1, seq2 = seq1.dup, seq2.dup init = merge_initial_ops(seq1, seq2) return unless init fin = merge_final_ops(seq1, seq2) return unless fin seq1 = group_selectors(seq1) seq2 = group_selectors(seq2) lcs = Sass::Util.lcs(seq2, seq1) do |s1, s2| next s1 if s1 == s2 next unless s1.first.is_a?(SimpleSequence) && s2.first.is_a?(SimpleSequence) next s2 if parent_superselector?(s1, s2) next s1 if parent_superselector?(s2, s1) end diff = [[init]] until lcs.empty? diff << chunks(seq1, seq2) {|s| parent_superselector?(s.first, lcs.first)} << [lcs.shift] seq1.shift seq2.shift end diff << chunks(seq1, seq2) {|s| s.empty?} diff += fin.map {|sel| sel.is_a?(Array) ? sel : [sel]} diff.reject! {|c| c.empty?} Sass::Util.paths(diff).map {|p| p.flatten}.reject {|p| path_has_two_subjects?(p)} end
Removes redundant selectors from between multiple lists of selectors. This takes a list of lists of selector sequences; each individual list is assumed to have no redundancy within itself. A selector is only removed if it’s redundant with a selector in another list.
“Redundant” here means that one selector is a superselector of the other. The more specific selector is removed.
@param seqses [Array<Array<Array<SimpleSequence or String>>>] @return [Array<Array<SimpleSequence or String>>]
# File lib/sass/selector/sequence.rb, line 464 def trim(seqses) # Avoid truly horrific quadratic behavior. TODO: I think there # may be a way to get perfect trimming without going quadratic. return Sass::Util.flatten(seqses, 1) if seqses.size > 100 # Keep the results in a separate array so we can be sure we aren't # comparing against an already-trimmed selector. This ensures that two # identical selectors don't mutually trim one another. result = seqses.dup # This is n^2 on the sequences, but only comparing between # separate sequences should limit the quadratic behavior. seqses.each_with_index do |seqs1, i| result[i] = seqs1.reject do |seq1| max_spec = _sources(seq1).map {|seq| seq.specificity}.max || 0 result.any? do |seqs2| next if seqs1.equal?(seqs2) # Second Law of Extend: the specificity of a generated selector # should never be less than the specificity of the extending # selector. # # See https://github.com/nex3/sass/issues/324. seqs2.any? {|seq2| _specificity(seq2) >= max_spec && _superselector?(seq2, seq1)} end end end Sass::Util.flatten(result, 1) end
Conceptually, this expands “parenthesized selectors”. That is, if we have `.A .B {@extend .C}` and `.D .C {…}`, this conceptually expands into `.D .C, .D (.A .B)`, and this function translates `.D (.A .B)` into `.D .A .B, .A .D .B`. For thoroughness, `.A.D .B` would also be required, but including merged selectors results in exponential output for very little gain.
@param path [Array<Array<SimpleSequence or String>>]
A list of parenthesized selector groups.
@return [Array<Array<SimpleSequence or String>>] A list of fully-expanded selectors.
# File lib/sass/selector/sequence.rb, line 156 def weave(path) # This function works by moving through the selector path left-to-right, # building all possible prefixes simultaneously. prefixes = [[]] path.each do |current| current = current.dup last_current = [current.pop] prefixes = Sass::Util.flatten(prefixes.map do |prefix| sub = subweave(prefix, current) next [] unless sub sub.map {|seqs| seqs + last_current} end, 1) end prefixes end


By Andrea Vedaldi, Karel Lenc, and Joao Henriques
This is an Oxford Visual Geometry Group computer vision practical (Release 2016a).
Convolutional neural networks are an important class of learnable representations applicable, among others, to numerous computer vision problems. Deep CNNs, in particular, are composed of several layers of processing, each involving linear as well as non-linear operators, that are learned jointly, in an end-to-end manner, to solve a particular tasks. These methods are now the dominant approach for feature extraction from audiovisual and textual data.
This practical explores the basics of learning (deep) CNNs. The first part introduces typical CNN building blocks, such as ReLU units and linear filters. The second part explores backpropagation, including designing custom layers and verifying them numerically. The last part demonstrates learning a CNN for text deblurring; this differs from the usual problem of image classification and demonstrates the flexibility of these techniques.
This practical is based on MATLAB and the MatConvNet library. The practical demonstrates how easy it is to use this environment to prototype new network components and architectures. By only using familar MATLAB syntax, you will be able to implement new layers and take advantage of the GPU for faster computation.
If you are running this in the iV&L Summer School, please refer to the instructions at the end of the document.
Read and understand the requirements and installation instructions. The download links for this practical are:
You can either unpack the archive manually, or use the following MATLAB one-liner:
untar('http://www.robots.ox.ac.uk/~vgg/share/practical-cnn-reg-2016a.tar.gz')
cd practical-cnn-reg-2016a
After the installation is complete, open and edit the script exercise1.m
in the MATLAB editor. The script contains commented code and a description for all steps of this exercise, for Part I of this document. You can cut and paste this code into the MATLAB window to run it, or use the shortcut Ctrl+Enter
to run a code section. You will need to modify it as you go through the session. Other files exercise2.m
, and exercise3.m
, are given for Part II and III.
Each part contains several Questions (that may require pen and paper) and Tasks (that require experimentation or coding) to be answered/completed before proceeding further in the practical.
In this part we will explore two fundamental building blocks of CNNs, linear convolution and non-linear activation functions. Open exercise1.m
and run up to the setup()
command, which initializes the MATLAB environment to use MatConvNet.
A convolutional neural network (CNN) is a sequence of linear and non-linear convolution-like operators. The most important example of such operators is linear convolution. In this part, we will explore linear convolution and see how to use it in MatConvNet.
Recall that linear convolution applies one (or more) filters
Start by identifying and then running the following code fragment in exercise1.m
:
% Load an image and convert it to gray scale and single precision
x = im2single(rgb2gray(imread('data/ray.jpg'))) ;
% Define a filter
w = single([
0 -1 -0
-1 4 -1
0 -1 0]) ;
% Apply the filter to the image
y = vl_nnconv(x, w, []) ;
The code loads the image data/ray.jpg
and applies to it a linear filter using the linear convolution operator. The latter is implemented by the MatConvNet function vl_nnconv()
. Note that all variables x
, w
, and y
are in single precision; while MatConvNet supports double precision arithmetic too, single precision is usually preferred in applications as memory is often a bottleneck. The result can be visualized as follows:
% Visualize the results
figure(11) ; clf ; colormap gray ;
set(gcf, 'name', 'Part 1.1: convolution') ;
subplot(2,2,1) ;
imagesc(x) ;
axis off image ;
title('Input image x') ;
subplot(2,2,2) ;
imagesc(w) ;
axis off image ;
title('Filter w') ;
subplot(2,2,3) ;
imagesc(y) ;
axis off image ;
title('Output image y') ;
Task: Run the code above and examine the result, which should look like the following image:
The input
Questions:
- If
$H \times W$ is the size of the input image,$H' \times W'$ the size of the filter, what is the size$H'' \times W''$ of the output image?- The filter
$\bw$ given above is a discretized Laplacian operator. Which type of visual structures (corners, bars, ...) do you think may excite this filter the most?
In neural networks, one usually operates with filter banks instead of individual filters. Each filter can be though of as computing a different feature channel, characterizing a particular statistical property of the input image.
To see how to define and use a filter bank, create a bank of three filters as follows:
% Concatenate three filters in a bank
w1 = single([
0 -1 0
-1 4 -1
0 -1 0]) ;
w2 = single([
-1 0 +1
-1 0 +1
-1 0 +1]) ;
w3 = single([
-1 -1 -1
0 0 0
+1 +1 +1]) ;
wbank = cat(4, w1, w2, w3) ;
The first filter vl_nnconv(x, wbank, [])
then applies all the filters in the bank to the input image x
. Note that the output y
is not just a matrix, but a 3D array (often called a tensor in the CNN jargon). This tensor has dimensions
Question: What is the number of feature channels
$C$ in this example? Why?Task: Run the code above and visualize the individual feature channels in the tensor
y
by using the provided functionshowFeatureChannels()
. Do the channel responses make sense given the filter used to generate them?
In a CNN, not only the output tensor, but also the input tensor x
and the filters wbank
can have multiple feature channels. In this case, the convolution formula becomes:
Questions:
- If the input tensor
$\bx$ has$C$ feature channels, what should be the third dimension of$\bw$ ?- In the code above, the command
wbank = cat(4, w1, w2, w3)
concatenates the tensorsw1
,w2
, andw3
along the fourth dimension. Why is that given that filters should have three dimensions?
Finally, in training CNNs it is often important to be able to work efficiently with batches of data. MatConvNet allows packing more than one instance of the tensor x
by stacking the different instances along the fourth dimension of the array:
x1 = im2single(rgb2gray(imread('data/ray.jpg'))) ;
x2 = im2single(rgb2gray(imread('data/crab.jpg'))) ;
x = cat(4, x1, x2) ;
y = vl_nnconv(x, wbank, []) ;
Task: Run the code above and visualize the result. Convince yourself that each filter is applied to each image.
CNNs are obtained by composing several operators, individually called layers. In addition to convolution and other linear layers, CNNs should contain non-linear layers as well.
Question: What happens if all layers are linear?
The simplest non-linearity is given by scalar activation functions, which are applied independently to each element of a tensor. Perhaps the simplest and one of the most useful examples is the Rectified Linear Unit (ReLU) operator:
In MatConvNet, ReLU is implemented by the vl_nnrelu
function. To demonstrate its use, we convolve the test image with the negated Laplacian, and then apply ReLU to the result:
% Convolve with the negated Laplacian
y = vl_nnconv(x, - w, []) ;
% Apply the ReLU operator
z = vl_nnrelu(y) ;
Task: Run this code and visualize images
x
,y
, andz
.Questions:
- Which kind of image structures are preferred by this filter?
- Why did we negate the Laplacian?
ReLU has a very important effect as it implicitly sets to zero the majority of the filter responses. In a certain sense, ReLU works as a detector, with the implicit convention that a certain pattern is detected when a corresponding filter response is large enough (greater than zero).
In practice, while signals are usually centered and therefore a threshold of zero is reasonable, there is no particular reason why this should always be appropriate. For this reason, the convolution operator allows to specify a bias term for each filter response. Let us use this term to make the response of ReLU more selective:
bias = single(- 0.2) ;
y = vl_nnconv(x, - w, bias) ;
z = vl_nnrelu(y) ;
There is only one bias
term because there is only one filter in the bank (note that, as for the rest of the data, bias
is a single precision quantity). The bias is applied after convolution, effectively subtracting 0.2 from the filter responses. Hence, now a response is not suppressed by the subsequent ReLU operator only if it is at least 0.2 after convolution.
Task: Run this code and visualize images
x
,y
, andz
.Question: Is the response now more selective?
Remark: There are many other building blocks used in CNNs, the most important of which is perhaps max pooling. However, convolution and ReLU can solve already many problems, as we will see in the remainder of the practical.
Training CNNs is normally done using a gradient-based optimization method. The CNN
The gradient is easily computed using using the chain rule. If all network variables and parameters are scalar, this is given by2:
Note that all intermediate derivatives in the chain rule may be affected by this size explosion except for the derivative of the network output that, being the loss, is a scalar.
Question: The output derivatives have the same size as the parameters in the network. Why?
Back-propagation allows computing the output derivatives in a memory-efficient manner. To see how, the first step is to generalize the equation above to tensors using a matrix notation. This is done by converting tensors into vectors by using the
Some might have noticed that, while projections remain small, each factor \eqref{e:factor} does contain one of the large derivatives that we cannot compute explicitly. The trick is that CNN toolboxes contain code that can compute the projected derivatives without explicitly computing this large factor. In particular, for any building block function
For example, this is how this looks for the convolution operator:
y = vl_nnconv(x,w,b) ; % forward mode (get output)
p = randn(size(y), 'single') ; % projection tensor (arbitrary)
[dx,dw,db] = vl_nnconv(x,w,b,p) ; % backward mode (get projected derivatives)
and this is how it looks for ReLU operator:
y = vl_nnrelu(x) ;
p = randn(size(y), 'single') ;
dx = vl_nnrelu(x,p) ;
Implementing new layers in a network is conceptually simple, but error prone. A simple way of testing a layer is to check whether the derivatives computed using the backward mode approximately match the derivatives computed numerically using the forward mode. The next example, contained in the file exercise2.m
, shows how to do this:
% Forward mode: evaluate the convolution
y = vl_nnconv(x, w, []) ;
% Pick a random projection tensor
p = randn(size(y), 'single') ;
% Backward mode: projected derivatives
[dx,dw] = vl_nnconv(x, w, [], p) ;
% Check the derivative numerically
figure(21) ; clf('reset') ;
set(gcf,'name','Part 2.1: single layer backrpop') ;
checkDerivativeNumerically(@(x) proj(p, vl_nnconv(x, w, [])), x, dx) ;
Questions:
- Recall that the derivative of a function
$y=f(x)$ is given by$$ \frac{\partial f}{\partial x}(x) = \lim_{\delta\rightarrow 0} \frac{f(x+\delta) - f(x)}{\delta} $$ Open the filecheckDerivativeNumerically.m
. Can you identify the lines in the code above that use this expression?- Note that
checkDerivativeNumerically()
is applied to the function@(x) proj(p, vl_nnconv(x, w, []))
. This syntax defines a function on the fly (an anonymous closure to be more precise). In this case, the purpose of the closure is to evaluate the expression for a variablex
and a fixed value ofw
. Furthermore, the closure projects the output ofvl_nnconv()
ontop
by calling theproj()
function. Why?Tasks:
- Run the code, visualizing the results. Convince yourself that the numerical and analytical derivatives are nearly identical.
- Modify the code to compute the derivative of the first element of the output tensor
$\by$ with respect to all the elements of the input tensor$\bx$ . Hint: it suffices to change the value of$\bp$ .- Modify the code to compute the derivative with respect to the convolution parameters
$\bw$ instead of the convolution input$\bx$ .
Next, we use the backward mode of convolution and ReLU to implement backpropagation in a network that consists of two layers:
% Forward mode: evaluate conv followed by ReLU
y = vl_nnconv(x, w, []) ;
z = vl_nnrelu(y) ;
% Pick a random projection tensor
p = randn(size(z), 'single') ;
% Backward mode: projected derivatives
dy = vl_nnrelu(z, p) ;
[dx,dw] = vl_nnconv(x, w, [], dy) ;
Question (important) In the code above, in backward mode the projection
p
is fed to thevl_nnrelu
operator. However, thevl_nnconv
operator now receivesdy
as projection. Why?Tasks:
- Run the code and use
checkDerivativeNumerically()
to compare the analytical and numerical derivatives. Do they differ?- (Optional) Modify the code above to a chain of three layers: conv + ReLU + conv.
Creating new layers is a common task when experimenting with novel CNN architectures. MatConvNet makes this particularly easy, since you can use all standard MATLAB operators and functions. The same code also works on the GPU.
In this part we will show how to implement a layer computing the Euclidean distance between a tensor x
and a reference tensor r
and your goal will be then to implement absolute difference (L1) loss. This layer will be used later to learn a CNN from data.
The first step is to write the forward mode. This is contained in the l2LossForward.m
function. Open the file and check its content:
function y = l2LossForward(x,r)
delta = x - r ;
y = sum(delta(:).^2) ;
The function computes the difference x - r
, squares the individual elements (.^2
), and then sums the results. The vectorization delta(:)
just turns the tensor into a vector by stacking, so that the sum is carried across all elements (by default sum
operates only along the first dimension). The overall result is a scalar y
, which is the sum of the squared Euclidean distances between x
and r
, for all data instances.
Next, we need to implement the backward mode:
function dx = l2LossBackward(x,r,p)
dx = 2 * p * (x - r) ;
Note that the backward mode takes the projection tensor p
as an additional argument. Let us show that this code is correct. Recall that the goal of the backward mode is to compute the derivative of the projected function:
Here the subscript
In order to see how to implement the backward mode, compute the derivative with respect to each input element
Tasks:
- Verify that the forward and backward functions are correct by computing the derivatives numerically using
checkDerivativeNumerically()
.- Implement the
l1LossForward.m
andl1LossBackward.m
to compute the L1 distance (sum of absolute differences):$$ f(\bx) = \sum_{lmnt} \lvert x_{lmnt} - r_{lmnt} \rvert. $$ In order to implement the backward pass, you need to find$$ \frac{\partial}{\partial x_{ijkt}} \langle \bp, f(\bx) \rangle = \frac{\partial}{\partial x_{ijkt} } \left[ p \sum_{lmnt} \lvert x_{lmnt} - r_{lmnt} \rvert \right]. $$ Recall that for${v} \neq 0$ :$$ \frac{\partial |v|}{\partial v} = \begin{cases} -1 & v<0 \\ 1 & v>0 \end{cases}. $$ - Make sure that both the forward and backward modes are correctly modified by verifying the result numerically once more. What happens for the components of
$\bx$ that are zero or very close to zero?
By now you should be familiar with two basic CNN layers, convolution and ReLU, as well as with the idea of backpropagation. In this part, we will build on such concepts to learn a CNN model.
CNN are often used for classification; however, they are much more general than that. In order to demonstrate their flexibility, here we will design a CNN that takes an image as input and produces an image as output (instead of a class label).
We will consider in particular the problem of deblurring images of text, as in the following example:
The first task is to load the training and validation data and to understand its format. Start by opening in your MATLAB editor exercise3.m
. The code responsible for loading the data is
imdb = load('data/text_imdb.mat') ;
The variable imdb
is a structure containing
imdb.images.data
: a imdb.images.label
: a imdb.images.set
: a Run the following code, which displays the first image in the dataset and its label:
figure(31) ; set(gcf, 'name', 'Part 3.1: Data') ; clf ;
subplot(1,2,1) ; imagesc(imdb.images.data(:,:,:,1)) ;
axis off image ; title('Input (blurred)') ;
subplot(1,2,2) ; imagesc(imdb.images.label(:,:,:,1)) ;
axis off image ; title('Desired output (sharp)') ;
colormap gray ;
Task: make sure you understand the format of
imdb
. Use MATLAB to find out the number of training and validation images as well as the resolution (size) of each image.
It is often important to center the data to better condition the learning problem. This is usually obtained by subtracting the mean pixel intensity (computed from the training set) from each pixel. Here, however, pixels are rescaled and shifted to have values in the interval
Question: why was the interval
$[-1, 0]$ chosen? Hint: what intensity corresponds to 'white'? What does the convolution operator do near the image boundaries?
Next we define a CNN net
and initialize its weights randomly. A CNN is simply a collection of interlinked layers. While these can be assembled 'manually' as you did in Part 2, it is usually more convenient to use a wrapper.
MatConvNet contains two wrappers, SimpleNN and DagNN. SimpleNN is suitable for simple networks that are a chain of layers (as opposed to a more general graph). We will use SimpleNN here.
This wrapper defines the CNN as a structure net
containing a cell-array layers
listed in order of execution. Open initializeSmallCNN.m
and find this code:
net.layers = { } ;
The first layer of the network is a convolution block:
net.layers{end+1} = struct(...
'name', 'conv1', ...
'type', 'conv', ...
'weights', {xavier(3,3,1,32)}, ...
'pad', 1, ...
'learningRate', [1 1], ...
'weightDecay', [1 0]) ;
The fields are as follows:
name
specifies a name for the layer, useful for debugging but otherwise arbitrary.
type
specifies the layer type, in this case convolution.
weights
is a cell array containing the layer parameters, in this case two tensors for the filters and the biases. The filters are initialized using the xavier()
function to have dimensions xavier()
also initializes the biases to be zero.
pad
specifies the amount of zero padding to apply to the layer input. By using a padding of one pixel and a
learningRate
contains two layer-specific multipliers to adjust the learning rate for the filters and the biases.
weightDecay
contains two layer-specific multipliers to adjust the weight decay (regularization strength) for the layer filters and biases. Note that weight decay is not applied to the biases.
Question: what would happen if
pad
was set to zero?
The convolution layer is followed by ReLU, which is given simply by:
net.layers{end+1} = struct(...
'name', 'relu1', ...
'type', 'relu') ;
This pattern is repeated (possibly varying the number and dimensions of filters) for a total of three convolutional layers separated by ReLUs.
Question: The last layer, generating the output image, is convolutional and is not followed by ReLU. Why?
The command vl_simplenn_display()
can be used to print information about the network. Here is a subset of this information:
| layer | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|---|
| type | input | conv | relu | conv | relu | conv | custom |
| name | n/a | conv1 | relu1 | conv2 | relu2 | prediction | loss |
| support | n/a | 3 | 1 | 3 | 1 | 3 | 1 |
| filt dim | n/a | 1 | n/a | 32 | n/a | 32 | n/a |
| num filts | n/a | 32 | n/a | 32 | n/a | 1 | n/a |
| stride | n/a | 1 | 1 | 1 | 1 | 1 | 1 |
| pad | n/a | 1 | 0 | 1 | 0 | 1 | 0 |
| rf size | n/a | 3 | 3 | 5 | 5 | 7 | 7 |
Questions: Look carefully at the generated table and answer the following questions:
- How many layers are in this network?
- What is the support (height and width) and depth (number of feature channels) of each intermediate tensor?
- How is the number of feature channels related to the dimensions of the filters?
The last row reports the receptive field size for the layer. This is the size (in pixels) of the local image region that affects a particular element in a feature map.
Question: what is the receptive field size of the pixel in the output image (generated by the prediction layer)? Discuss whether a larger receptive field size might be preferable for this problem and how this might be obtained.
In this part we will use SGD to learn the CNN from the available training data. As noted above, the CNN must however terminate in a loss layer. We add one such layer as follows:
% Add a loss (using our custom layer)
net = addCustomLossLayer(net, @l2LossForward, @l2LossBackward) ;
The function addCustomLossLayer()
creates a layer
structure compatible with SimpleNN and adds it as the last of the network. This structure contains handles to the functions defined in Part 2, namely l2LossForward()
and l2LossBackward()
.
Next, setup the learning parameters:
trainOpts.expDir = 'data/text-small' ;
trainOpts.gpus = [] ;
trainOpts.batchSize = 16 ;
trainOpts.learningRate = 0.02 ;
trainOpts.plotDiagnostics = false ;
trainOpts.numEpochs = 20 ;
trainOpts.errorFunction = 'none' ;
The fields are as follows:
expDir
specifies a directory to store intermediate data (snapshot and figures) as well as the final model. Note that the code resumes execution from the last snapshot; therefore change this directory or clear it if you want to start learning from scratch.
gpus
contains a list of GPU IDs to use. For now, do not use any.
batchSize
specifies how many images to include in a batch. Here we use 16.
learningRate
is the learning rate in SGD.
plotDiagnostic
can be used to plot statistics during training. This is slow, but can help setting a reasonable learning rate. Leave it off for now.
numEpochs
is the number of epochs (passes through the training data) to perform before SGD stops.
errorFunction
disables plotting the default error functions that are suitable for classification, but not for our problem.
Finally, we can invoke the learning code:
net = cnn_train(net, imdb, @getBatch, trainOpts) ;
The getBatch()
function, passed as a handle, is particularly important. The training script cnn_train
uses getBatch()
to extract the images and corresponding labels for a certain batch, as follows:
function [im, label] = getBatch(imdb, batch)
im = imdb.images.data(:,:,:,batch) ;
label = imdb.images.label(:,:,:,batch) ;
The function takes as input the imdb
structure defined above and a list batch
of image indexes that should be returned for training. In this case, this amounts to simply extract and copy some data; however, in general getBatch
can be used to e.g. read images from disk or apply transformations to them on the fly.
Task: run the training code and wait for learning to be complete. Note that the model is saved in
data/text-small/net-epoch-16.mat
, where 16 is the number of the last epoch.
The network is evaluated on the validation set during training. The validation error (which in our case is the average squared differences between the predicted output pixels and the desired ones), is a good indicator of how well the network is doing (in practice, one should ultimately evaluate the network on a held-out test set).
In our example it is also informative to evaluate the qualitative result of the model. This can be done as follows:
train = find(imdb.images.set == 1) ;
val = find(imdb.images.set == 2) ;
figure(33) ; set(gcf, 'name', 'Part 3.4: Results on the training set') ;
showDeblurringResult(net, imdb, train(1:30:151)) ;
figure(34) ; set(gcf, 'name', 'Part 3.4: Results on the validation set') ;
showDeblurringResult(net, imdb, val(1:30:151)) ;
Since the CNN is convolutional, it can be applied to arbitrarily-sized images. imdb.examples
contains a few larger examples too. The following code shows one:
figure(35) ;
set(gcf, 'name', 'Part 3.4: Larger example on the validation set') ;
colormap gray ;
subplot(1,2,1) ; imagesc(imdb.examples.blurred{1}, [-1 0]) ;
axis image off ;
title('CNN input') ;
res = vl_simplenn(net, imdb.examples.blurred{1}) ;
subplot(1,2,2) ; imagesc(res(end).x, [-1 0]) ;
axis image off ;
title('CNN output') ;
Questions:
- Do you think the network is doing a good job?
- Is there any obvious difference between training and validation performance?
So far, we have trained a single small network to solve this problem. Here, we will experiment with several variants to try to improve the performance as much as possible.
Before we experiment further, however, it is beneficial to switch to using a GPU. If you have a GPU and MATLAB Parallel Toolbox installed, you can try running the code above on the GPU by changing a single switch. To prepare MatConvNet to use the GPU, change the first line of the script from setup
to:
setup('useGpu', true) ;
Assuming that the GPU has index 1 (which is always the case if there is a single CUDA-compatible GPU in your machine), modify the training options to tell MatConvNet to use that GPU:
trainOpts.expDir = 'data/text-small-gpu'
trainOpts.gpus = [1] ;
The code above also changes expDir
in order to start a new experiment from scratch.
Task: Test GPU-based training (if possible). How much faster does it run compared to CPU-based training?
Now we are ready to experiment with different CNNs.
Task: Run a new experiment, this time using the
initializeLargeCNN()
function to construct a larger network.Questions:
- How much slower is this network compared to the small model?
- What about the quantitative performance on the validation set?
- What about the qualitative performance?
You are now in control. Play around with the model definition and try to improve the performance as much as possible. For example:
And, of course, make sure to beat the other students.
Remark: You can see the relative change of the network weights by setting
trainOpts.plotDiagnostics = true ;
The code for this practical is written using the software package MatConvNet. This is a software library written in MATLAB, C++, and CUDA and its source code is freely available.
MatConvNet can train complex computer vision models, such as VGG VD and Inception. Several of these models, including a few cool demos, are available for download.
Many more computer vision practicals are available here.
Connect here to Qwick labs as you have been instructed. Press the Select
button for the MatConvNet Lab:
Press the Start Lab
button:
Wait for the progress bar to finish (this may take one or two minutes):
Click the lab instructions
link and follow the rest of the instructions:
Once MATLAB is started, continue from the top.
By default, MATLAB on Linux systems has EMACS-style shortcuts. To change it to more familiar Windows style shortcuts:
preferences
in MATLAB Command Window.Keyboard -> Shortcuts
Active settings
to Windows Default Set
OK
to apply and close the settings windowIf you are running the practical through a VNC-based remote desktop connection, you can try adjusting the resolution by changing the setting in the OS (click on the big Ubuntu button on the top left and search for Displays
).
If you are familiar with convolution as defined in mathematics and signal processing, you might expect to find the index
The derivative is computed with respect to a certain assignment
The stacking operator
Like for example. ↩


from enum import Enum
# TODO LOGIC: Combine modes and action states into one class
[docs]class ActionState:
'''
ActionState defines the different states the possible actions (filter, optimize etc.) can be in
'''
# Using the Pymol convention for numbers
# If I use 4 for CURRENTLY_DISABLED and 1 for ALWAZS DISABLED, PYMOL WILL ONLY USE THE GREEN FONT FOR BOTH
CURRENTLY_ENABLED = 3
CURRENTLY_DISABLED = 1
ALWAYS_ENABLED = 2
ALWAYS_DISABLED = 4
# Only usefull during debugging
[docs]class EventType(Enum):
'''
EventType defines the different events that a selection can deal with
'''
SELECT = 'select'
MOVE = 'move'
SIZE = 'size'
CONFIRM = 'confirm'


We are a devoted group of consultants who can make your software ideas into a reality! Contact us if you need any type of tech/IT support. From building website and apps to designing database and automating repeatitive tasks, we will devise ways to cater your IT requirements!
Our highly skilled group of civil engineers are present to help you in your construction activities. This includes designing blueprints of houses, roads and bridges, interior designing. We provide you the best consulting services so that you will know how your infrastructure will look like after it has been completed.
Our team of environment engineers and scientists are here to evaluate and assess the impacts on the environment before and after an infrastructure or a factory is being constructed. We do IEE (Initial Environment Examination) and EIA (Environment Impact Assessment) for all your construction works.


{% if prediction==1 %}
Prediction:
You have DIABETES.
{% elif prediction==0 %}
Prediction:
You DON'T have diabetes.
{% endif %}


Assumptions: you are starting with beer from your primary or secondary at 0.8 to 1.2 volumes, in a 5 gallon corney keg, and no shaking.
End volumes CO2:
Assumptions: you are starting with beer from your primary or secondary at 0.8 to 1.2 volumes, in a 5 gallon corney keg, and no shaking.
End volumes CO2:


|
UMI3D Unity SDK
2.5.b.221125
A UMI3D sdk implementation using Unity
|
A user in a UMI3D context More...
Public Member Functions | |||
| ulong | Id () | ||
| The public Getter for objectId. More... | |||
| virtual void | SetStatus (StatusType status) | ||
| Setter for the status More... | |||
| IEntity | ToEntityDto (UMI3DUser user) | ||
| bool | LoadOnConnection (UMI3DUser user) | ||
Condition to be loaded on connection.
| |||
| bool | AddConnectionFilter (UMI3DUserFilter filter) | ||
Add a filtering condition from the user filtering.
| |||
| bool | RemoveConnectionFilter (UMI3DUserFilter filter) | ||
Remove a filtering condition from the user filtering.
| |||
| bool | LoadOnConnection (UMI3DUser user) | ||
| Condition to be loaded on connection. More... | |||
| bool | AddConnectionFilter (UMI3DUserFilter filter) | ||
| Add a filtering condition from the user filtering. More... | |||
| bool | RemoveConnectionFilter (UMI3DUserFilter filter) | ||
| Remove a filtering condition from the user filtering. More... | |||
| ulong | Id () | ||
| UMI3D Id of an entity. More... | |||
Public Attributes | |
| bool | IsReadyToGetResources = true |
| bool | hasJoined = false |
| Has the user joined the environment? More... | |
Properties | |
| virtual ulong | userId = 0 [get, set] |
| The unique user identifier. More... | |
| bool | hasImmersiveDevice = true [get, protected set] |
| Does the user have an immersive device? More... | |
| StatusType | status = StatusType.CREATED [get, protected set] |
| UMI3D status of the object. More... | |
A user in a UMI3D context
| bool umi3d.edk.UMI3DUser.AddConnectionFilter | ( | UMI3DUserFilter | filter | ) |
Add a filtering condition from the user filtering.
| filter |
Implements umi3d.edk.UMI3DMediaEntity.
| ulong umi3d.edk.UMI3DUser.Id | ( | ) |
The public Getter for objectId.
Implements umi3d.edk.UMI3DEntity.
| bool umi3d.edk.UMI3DUser.LoadOnConnection | ( | UMI3DUser | user | ) |
Condition to be loaded on connection.
| user |
Implements umi3d.edk.UMI3DMediaEntity.
| bool umi3d.edk.UMI3DUser.RemoveConnectionFilter | ( | UMI3DUserFilter | filter | ) |
Remove a filtering condition from the user filtering.
| filter |
Implements umi3d.edk.UMI3DMediaEntity.
|
virtual |
Setter for the status
| status |
Reimplemented in umi3d.edk.collaboration.UMI3DCollaborationUser.
| bool umi3d.edk.UMI3DUser.hasJoined = false |
Has the user joined the environment?
| bool umi3d.edk.UMI3DUser.IsReadyToGetResources = true |
|
getprotected set |
Does the user have an immersive device?
|
getprotected set |
UMI3D status of the object.
See StatusType.
|
getsetprotected |
The unique user identifier.


Articles & Tutorials |
|
|
Android Biometrics UX Guide – User Messaging
(handstandsam.com)
Sam Edwards considers the best messaging and user experience when using biometric authentication in your apps. |
||
|
Modeling States vs. Facts
(publicobject.com)
Lots of object models primarily track application state. Jesse Wilson has recently started to prefer models that primarily track facts instead. Here's why. |
|
|
Safely accessing lateinit variables
(okkotlin.com)
Kotlin, by design, doesn't allow a non-null variable to be left uninitialized during its declaration. Rahul Chowdhury demonstrates how Kotlin's lateinit allows us to declare a variable first and then initialize it some point in the future to get past this issue, |
|
Sponsored |
|
Place a sponsored post & reach over 66k Android devs
(androidweekly.net)
|
||
|
Android Unidirectional Data Flow and Local Unit Testing
(proandroiddev.com)
When Adam Hurwitz started building an app using a unidirectional data flow with the LiveData pattern he did not allocate the time to develop tests. Now he shares extensive experience with implementing these tests over time. |
|
|
Android Developer Skills for 2020
(www.techyourchance.com)
Many Android developers ask “what do I need to know to become a good Android developer?”. Vasiliy Zukanov helps answer this question for various levels of developer experience. |
|
|
Exploring Jetpack Compose: Row & Column
(joebirch.co)
Joe Birch shows how to layout child components in a vertical or horizontal format using the Row or Column component. |
|
|
Cross-platform with Kotlin/Native at PlanGrid
(medium.com)
Ben Asher and Agnes Vasarhelyi have been using Kotlin/Native and Kotlin multiplatform as a cross-platform initiative since the start of 2019. They’ve learned a lot, and share the experiences and findings using Kotlin multiplatform! |
|
|
Kotlinx Json vs Gson
(medium.com)
Juraj Kušnier demonstrates the JSON parser provided as a Kotlin extension library and compares it to Gson. |
|
|
AnimatedIcons: Search / X
(blog.stylingandroid.com)
Mark Allison shows how to programmatically create a cool animated transition from a search / magnifying glass icon to a cross. |
|
|
Dagger in a multi-module project without dagger.android
(medium.com)
Setting up Dagger in a multi-module project is non-trivial. Vlastimil Brečka shows how to do this without using the problematic dagger.android library. |
|
|
Implementing your first Android lint rule
(proandroiddev.com)
Fábio Carballo assures you that by the end of the article you should be able to write your first Android lint rule! |
|
|
How to make a Scrollable list in Jetpack Compose?
(proandroiddev.com)
Nikit Bhandari shows how easy it is to create a list in Jetpack Compose using VerticalScroller and HorizontalScroller. |
|
|
Build complex screens faster on Android with Epoxy
(medium.com)
Akshay Chordiya shares the basics of Epoxy and an overview of the problems it helps solve when using a RecyclerView as your main layout for UI. |
|
Design |
|
|
Reimagining Design Systems at Spotify
(spotify.design)
Spotify introduced Encore, a family of design systems, managed by distributed teams. In this post, they share what motivated them to create Encore, how it’s structured, and how it’s different from what they’ve tried before. |
||
Jobs |
|
|
Senior Android Engineer @ Peloton
(New York, New York)
Peloton uses technology and design to bring studio-style workouts into millions of homes globally. We continuously innovate and bring Members socially-connected fitness experiences. Adding a Sr. Android Engineer, experienced with writing code in Kotlin, to our fast-growing team of smart creatives. |
|
|
Contract for Senior Engineers and Teams
(Salt Lake City, UT, and Remote)
LumaTouch is looking for talented senior engineers and teams to contract to develop a feasibility demo for bringing LumaFusion, our industry-leading iOS professional mobile video editor, to Android and ChromeOS. If the demo is successful, this will lead to larger development project |
|
|
Android Developer @ Big Nerd Ranch
(Atlanta or Remote)
Big Nerd Ranch specializes in developing business-building mobile apps for our clients, teaching fellow developers, and writing our best selling Big Nerd Ranch Guides. We are looking for Android Engineers to join our team. Learn more about us: https://www.bignerdranch.com/about-us/careers/ |
|
Libraries & Code |
|
|
PowerSpinner
(github.com)
A lightweight dropdown popup spinner with an arrow and animations |
||
|
Timeline-View
(github.com)
Android Timeline View is used to display views like Tracking of shipment/order, steppers etc. |
|


org.davidmoten.rx2.io.internal
Classes
AfterOnNext
AfterOnNextFactory
ByteBufferInputStream
DefaultSerializer
FlowableFromInputStream
FlowableFromInputStream.FromStreamSubscription
FlowableFromInputStream.IdRequested
FlowableSingleFlatMapPublisher
FlowableSingleFlatMapPublisher.SingleFlatMapPublisherObserver
HttpMethod
NoCopyByteArrayOutputStream
Server
Server.HandlerSubscriber
ServletHandler
Util


In the days of relational databases, there were few choices except to use the database system as a simple data repository. Most, if not all, of the analysis and query logic associated with time-varying data needed to be implemented in application programs. The deficiency of the relational systems was their inability to create new data types that could hold time-varying collections of data. If the operation couldn't be done using select, project, join, and cartesian product, it couldn't be done in the relational system.
With the advent of object-oriented technology in general, and object-oriented database systems in particular, the obvious problem of the relational systems appears to be solved. Because object-oriented database systems can implement new data types that are directly usable by the database system, it is now possible to define new types of collections -- such as time-series -- that model time-varying collections of data. Presumably, these new data types can include the operations needed to maintain, select, and aggregate their contents based on the needs of the application builder.
Based on this new-found capability, there is now a perception that the only thing to do is provide a starter set of classes. Our ten years of experience in designing and using VisionTM -- our commercial, temporal, object-oriented database system -- tells us that the problem is larger than that.
Providing a TimeSeries class -- a type of indexed collection that understands time as its index -- is a reasonable starting point for modeling time-varying data in an object-oriented system. Of its many and extensible set of properties and operations, the salient features of this new class are as follows:
Although many time-series hold observations recorded at a fixed frequency such as annual, quarterly, or monthly, it is overly restrictive to require a regular pattern of observations -- stock split adjustment factors and intra-day trades on a stock exchange, for example, will never occur at regular intervals.
Armed with a TimeSeries class, properties of new and existing classes can be declared in terms of its instances. Applications of TimeSeries in a number of real financial systems developed with Vision include:
Intuitively, there are no surprises here. Just as other collection types are used to model structural one-to-many relationships, time-series are used to model temporal one-to-many relationships. There is, however, one significant difference between structural and temporal one-to-many relationships. In most databases, there are usually more temporal one-to-many relationships than there are structural one-to-many relationships.
With the exception of a few truly immutable properties, such as a person's blood type or birth date, any property has the potential to be time-varying. In practice, which properties actually need to be made time-varying is a function of the information the database needs to capture and how that information will be used. That is a fact of life and a source of complexity that must be managed.
An application can use time-varying data in a database in one of two general ways. It can directly examine a time-series to display its content, query its elements, compute a statistic, or perform some other operation that can be answered locally by the time-series. Adding an observation or generating a price chart are examples.
The other way an application can use a time-series is as part of a navigation from one object to another. In that role, the time-series is simply expected to supply whichever one of its elements is appropriate as of a particular point in time:
ibm industrySeries asOf: aPointInTime
The navigational use of time-series, although apparently simpler, has far greater impact than any other use. Other uses are localized to a specific part of an application. Navigation, on the other hand, is fundamental to the operation of an object-oriented database.
Every time-varying property participates in a time-dependent navigation every time it is accessed on the way from one part of the database to another. If the data model specifies that the industry classification of a Company varies over time, it is incumbent on the application to supply a point in time when it wants a company's industry.
Although it can be done, it is unreasonable to require that every application supply an explicit extra parameter every time it traverses a time-varying property. Access to time-varying properties needs to be encapsulated in a way that simplifies the use of those properties from an application. In the case of this example, it is reasonable to define an industry method at Company that gets a value for aPointInTime from somewhere else:
ibm industry
This encapsulation is useful for all the obvious programming reasons. It happens to be useful from a data modeling point of view as well. The designer of the database probably intended to assert that every Company has an Industry -- it just happens that the industry property of Company varies over time.
The set of time-varying properties is also subject to change as the database evolves. If industry changes from a time-invariant property to a time-varying property, the ability to write a method to encapsulate the navigation is not just nice to have -- it is an absolute necessity. If existing programs are to continue to work, the new type signature for the class Company has to be substitutable for the old signature. For example, industry has to continue to return an Industry object; it can't simply disappear or suddenly return a different kind of object like a time-series.
All of this may seem to belabor the obvious. Of course these methods can and should be written -- any competent programmer can see that all that is needed is some global location to which a method can refer to answer the when? question. The ability to create new properties and methods, is, after all, part of every object-oriented programming environment. The problem is not quite that simple.
There is a major problem here, and it comes from the use of global variables to pass the values of parameters. The objects used to record and supply the temporal context used to navigate the database are not properly part of the database -- they exist only to support its use. They also should not be globals. The use of globals to cache state and pass parameters has rightfully fallen into disfavor -- especially in environments like a database system that need to be multi-user and multi-threaded.
To illustrate some of the difficulties, consider answering the question:
"In which of the last five years did the earnings per share of more than half the companies in the database exceed the previous year's industry average earnings per share?"
This is a query based on the overall state of the database, not the content of some specific time-series. To answer this question using just the capabilities of the programming language without architectural support from the database, an application programmer must manually iterate through the years of interest, running the query for each year in turn. More subtly, the need to answer the previous year sub-query embedded in this query requires that the temporal context change during the query.
The solution to this problem is not simply a matter of application programmer cleverness. This approach has pushed a substantial amount of responsibility back onto the application programmer. Even if all of this complexity can be encapsulated to look benign, it is, in fact, a cumbersome, non-reentrant, highly procedural way of doing things. In effect, this work-around has removed the problem from the database system -- where it can be optimized by designers who know how to do such things -- and hidden it in the bowels of an application's logic.
That time is special should not come as a surprise. The world is multi-dimensional and time is one of those dimensions. Different points in time select different states of the world. A database dealing with time-varying data needs to do the same.
Technically, time is a parameter. Unlike the properties of a class, which parameterize instances of that class, time parameterizes the entire database. The programming tools suitable for parameterizing a class are not sufficient to parameterize the entire database. When an application supplies a value -- or set of values -- for time, it is selecting a collection of states from the database, not a set of instances from a class in the database.
Although the precise interaction of time with the data model is managed in the small at the level of the data model's structure, time itself exists in the large -- globally and outside the context of any particular part of the database. Supporting time in a database -- or any other system that models the world -- requires architectural support to parameterize the model as a whole, not just the component parts of the model.
Time is not the only property that parameterizes whole models. Any property that depends on the perspective of the user places exactly the same demands on the system. For example, in a financial system that deals with multi-currency data, Currency works the same way. In the small, the data model specifies the rules for accessing and using monetary values consistently; in the large, the perspective of the user determines how those rules get used. Other properties such as Scenario and Version play similar roles in other applications.
| Copyright © 1999 Innovative Systems Techniques, Inc. | Updated January 28, 1999 |


?7
8
9
lv
the
New
York
copyright
reserved
botanical
Garden
fivfr
road
from
Roseau
to
Canefieid
EOTANICAL
N5A
a
d
August
5,
19S8
Walteb.
H.
Hodge
BOTANICAL
GARDEN
01529795
01529795
Legend -
Level of confidence that token is an accurately-transcribed word
extremely low
very low
low
undetermined
medium
high
very high


TCS partners Qualcomm to launch Hyderabad innovation hub
Hyderabad: IT major Tata Consultancy Services (TCS) on Wednesday launched an innovation hub in Hyderabad with support from Qualcomm Technologies.
The new hub will be used to build domain-specific solutions that utilize the combinatorial power of Artificial Intelligence (AI), Internet of Things (IoT) and 5G technologies to help global enterprises across industries accelerate their digital transformation journeys, TCS said.
Designed to facilitate massive data flows with very low latency and ultra-high reliability, 5G and edge computing are expected to transform every industry in the coming years. “The convergence of 5G, AI and edge computing will open unprecedented opportunities for value creation in industrial automation, autonomous vehicles and other industries,” V Rajanna, Global Head, Technology Business Unit, TCS, said in a statement. “The new Innovation Hub brings together TCS’ and Qualcomm Technologies’ world-class technology expertise to unlock the potential of transformational solutions in this emerging space to help global enterprises explore the art of the possible and accelerate their Business 4.0 journeys,” Rajanna said.
The technology industry ecosystem anticipates a new wave of technology investments from progressive enterprises looking to harness the power of 5G, AI and other emerging technologies. The new hub will utilize TCS’s expertise in digital technologies, along with Qualcomm Technologies’ depth in 5G, edge AI and edge devices to build solutions to entirely new use-cases. The hub will explore the possibilities opened up by 5G in different industries — such as healthcare, automotive, manufacturing, retail, utilities. (IANS)
Also Read: Markets End Flat, TCS 2% Down Ahead Of Earnings Outcome
Also Watch: Govt all set to push for the contentious Citizenship Bill in the winter session of Parliament


Dashboard
About
Contact
Signout
Sort by
TimeStamp
Upvotes
FilterBy
Status
POST A QUESTION
Post Question


iobj
: indirect object
| WARNING | |
|---|---|
| ⚠ | The traditional term “indirect object”, associated with morphosyntactic encoding of certain types of arguments (especially datives/recipients) in a clause, has a wide range of interpretations across languages and linguistic frameworks. In UD, universal-level relations do not distinguish arguments and adjuncts; rather, the distinction is between core arguments and oblique modifiers. iobj must only be used for core arguments, never for obliques, as described below. The naming of this relation may be changed in the next major revision of the UD guidelines. |
In UD, the indirect object of a verb is any nominal phrase that is a core argument of the verb but is not its subject or (direct) object. The prototypical example is the recipient of ditransitive verbs of exchange:
She gave me a raise
iobj(gave, me)
nsubj(gave, She)
However, many languages allow other semantic roles as additional objects. The most common case is allowing benefactives, but some languages allow other roles. Examples include instruments, such as in the Kinyarwanda example below, or comitatives. At the other extreme, some languages lack all indirect objects.
Umukoóbwa a-ra-andik-iish-a íbárúwa íkárámu \n girl 1-PRS-write-APPL-ASP letter pen
obj(a-ra-andik-iish-a, íbárúwa)
iobj(a-ra-andik-iish-a, íkárámu)
In languages distinguishing morphological cases, the recipient will often be marked by the dative case.
However, the iobj
relation can be used only for a core argument. The morphological dative may signal a core argument
in some languages (such as Basque) but in many others it is just oblique (like the English preposition to). For
instance, in many Indo-European languages, the recipient should be attached as obl and not iobj
, regardless
of the traditional grammar which may label it as “indirect object”.
In the following Czech example, the verb takes two objects. Both are nouns in the accusative case, which is rather unusual—for most other verbs, one of the arguments would be in the dative and would thus be treated as oblique in UD. However, a bare accusative signals a core object and a verb with one nominative and two accusatives is ditransitive in UD. One of the accusatives is direct object (patient), the other is indirect (recipient). It is parallel to how the English translation would be annotated (where there is no morphological case marking) and also to verbs of giving in English (consider a similar sentence, he gave my daughter a class of maths).
On učí mou dceru matematiku . \n He teaches my daughter.Acc maths.Acc .
obj(učí, matematiku)
iobj(učí, dceru)
obj(teaches, maths.Acc)
iobj(teaches, daughter.Acc)
Predicates in Basque can cross-reference (by morphological agreement on the auxiliary verb) up to three arguments
in different morphological cases: ergative, absolutive, and dative. The morphological cross-reference is a strong
indicator that all three are core arguments. Therefore, if all three are present, we have a double-object situation
and the dative argument will be iobj
(while the ergative argument will be nsubj and the absolutive obj).
Even if the absolutive argument is omitted for a verb which licenses three arguments, the dative argument is still
iobj
.
(Nik)/Case=Erg (zuri)/Case=Dat liburua/Case=Abs eman dizut . \n (I) (you) book given I-have-you-it .
nsubj(eman, (Nik))
iobj(eman, (zuri))
obj(eman, liburua)
aux(eman, dizut)
punct(eman, .-6)
nsubj(given, (I))
iobj(given, (you))
obj(given, book)
aux(given, I-have-you-it)
punct(given, .-13)
Mariari/Case=Dat eman nion liburua/Case=Abs . \n To-Maria given I-have-her-it book .
iobj(eman, Mariari)
obj(eman, liburua)
aux(eman, nion)
punct(eman, .-5)
iobj(given, To-Maria)
obj(given, book)
aux(given, I-have-her-it)
punct(given, .-11)
Mariari/Case=Dat eman nion . \n To-Maria given I-have-her-it .
iobj(eman, Mariari)
aux(eman, nion)
punct(eman, .-4)
iobj(given, To-Maria)
aux(given, I-have-her-it)
punct(given, .-9)
Liburua/Case=Abs eman nion . \n Book given I-have-her-it .
obj(eman, Liburua)
aux(eman, nion)
punct(eman, .-4)
obj(given, Book)
aux(given, I-have-her-it)
punct(given, .-9)
Nevertheless, Basque has also a class of verbs that license only two core arguments, one ergative and
one dative. Here the ergative has the A function and the dative the P function (Zúñiga and Fernández 2014),
meaning that the dative is obj rather than iobj
, as in “The teacher has looked angrily at the students.”
Irakasleak/Case=Erg haserre begiratu die ikasleei/Case=Dat . \n Teacher angrily looked he-has-them to-students .
nsubj(begiratu, Irakasleak)
advmod(begiratu, haserre)
aux(begiratu, die)
obj(begiratu, ikasleei)
punct(begiratu, .-6)
nsubj(looked, Teacher)
advmod(looked, angrily)
aux(looked, he-has-them)
obj(looked, to-students)
punct(looked, .-13)
Another class of transitive verbs in Basque license one dative and one absolutive argument. Here the dative has the A function and the absolutive the P function, meaning that the dative is nsubj and the absolutive is obj, as in “The boy likes the soup very much.”
Zopa/Case=Abs izugarri gustatzen zaio mutilari/Case=Dat . \n Soup greatly pleasing it-is-him to-boy .
obj(gustatzen, Zopa)
advmod(gustatzen, izugarri)
aux(gustatzen, zaio)
nsubj(gustatzen, mutilari)
punct(gustatzen, .-6)
obj(pleasing, Soup)
advmod(pleasing, greatly)
aux(pleasing, it-is-him)
nsubj(pleasing, to-boy)
punct(pleasing, .-13)
In Tagalog, core arguments are marked by the prepositions ang and ng (or by corresponding inflection of personal pronouns), while oblique dependents are typically marked by the preposition sa (sometimes glossed as the dative). Giving somebody something is a (mono)transitive predicate.
- Nagbigay ang lalaki ng libro sa babae.
However, locative dependents can be topicalized if the verb morphology signals the “locative voice”. Then the locative noun phrase switches to nominative, it becomes a core argument, while the original two core arguments keep core coding, too. Therefore we have a ditransitive clause with three core arguments, even for verbs that are not associated with ditransitives in other languages:
- Aalisan ng babae ng bigas ang sako para sa bata. “A/the woman will take some rice out of the sack for a/the child.” (locative voice)
# sent_id = 3.111c/tl
# text = Aalisan ng babae ng bigas ang sako para sa bata.
# gloss = FUT-take.out-DP ACT woman OBJ rice PIV sack BEN child
# text_en = A/the woman will take some rice out of the sack for a/the child.

In Plains Cree (Wolvengrey 2011), transitive verbs cross-reference subjects and animate objects but not
inanimate objects. With a verb of giving, the theme is typically inanimate while the recipient is
typically animate. Assuming that nsubj and obj are reserved for the two core arguments
cross-referenced by the verb, the theme has to be iobj
(if it is a core argument at all; otherwise
it would have to be obl; but real oblique nominals in Plains Cree take a locative case affix,
which is not present here).
- Nikī-miyāw anima masinahikan.
In the above example, the verb stem used is for animate objects, while masinahikan “book” is inanimate. That is a proof that the 3rd person singular cross-reference on the verb does not refer to the book but to an animate recipient that is not overtly represented in the sentence.
If the language has a prototypical iobj
(occurring in a double object construction with obj),
then morphosyntactic criteria need to be established for when a sole object is obj and when it is iobj
.1
Depending on the language, potential reasons to consider a sole object in a clause as an iobj
include:
- It has case marking distinct from that of a prototypical obj, e.g. dative rather than accusative
- Another, more patient-like object may be inserted into the clause without affecting the morphosyntax of the object in question
- The verb licenses the object in combination with a ccomp (the ccomp may be analyzed as taking the place of an obj)
For example, in English, the verb teach may occur with obj, iobj, or both:
She teaches the students introductory logic .
iobj(teaches, students)
obj(teaches, logic)
She teaches introductory logic .
obj(teaches, logic)
She teaches the first-year students .
iobj(teaches, students)
She teaches her students that good writing is important .
iobj(teaches, students)
ccomp(teaches, important)
She teaches her students to write well .
iobj(teaches, students)
xcomp(teaches, write)
However, not all verbs license two objects (or an object plus ccomp), in which case the sole object should be plain obj even if it has recipient-like semantics:
She questions her students about their interests .
obj(questions, students)
obl(questions, interests)
She helps her students to succeed .
obj(helps, students)
xcomp(helps, succeed)
References
- Fernando Zúñiga, Beatriz Fernández (draft 26.6.2014): Grammatical relations in Basque
- Arok Elessar Wolvengrey (2011): Semantic and pragmatic functions in Plains Cree syntax (PhD thesis). Utrecht: LOT. ISBN 978-94-6093-051-5.
-
This is an amended policy as described on the changes page. ↩
iobj in other languages: [bej] [bg] [cop] [cs] [de] [el] [en] [es] [eu] [fr] [fro] [gsw] [gub] [hy] [it] [ja] [kk] [la] [no] [pcm] [pt] [qpm] [ro] [ru] [sl] [sv] [swl] [tr] [u] [vi] [yue] [zh]


Welcome to viBlocks
Your One Stop Digital Audio Workstation
Existing user
Username:
password:
login
New User
Username:
password:
Confirm password:
Create


We exchange interfaces!
- engineer visionary markets
- brand cutting-edge architectures
- matrix cross-platform technologies
- evolve leading-edge technologies
- drive clicks-and-mortar supply-chains
- incentivize revolutionary convergence
- leverage best-of-breed technologies
- scale user-centric e-services
- drive impactful systems


For submissions to all sections of FERMAT, such as contributions to: articles; comments to articles; forum; communication; news & views; and education, send email to<EMAIL_ADDRESS>and mention “FERMAT SUBMISSION” in the subject line.
Submission Preparation Checklist
As part of the submission process, authors are required to check off their submission's compliance with all of the following items, and submissions may be returned to authors that do not adhere to these guidelines.
Copyright Notice
All papers published in FERMAT should be cited by mentioning, Author(s), Title, the Date of publication and the URL from where it can be accessed. "All published Papers are approved for public release and their distribution is unlimited".
Potential contributors to this Open and On-line Journal and Forum can adapt their material and submit it to other journals, if they wish. However, they are encouraged to check and adhere to the editorial policies of other journals.
As an example, IEEE policy includes the following statement: "If authors have used their own previously published work(s) as a basis for a new submission, they are required to cite the previous work(s) and very briefly indicate how the new submission offers substantive novel contributions beyond those of the previously published work(s)."
Privacy Statement
If you are providing your e-mail address in this journal site, it will be used exclusively for the stated purposes of this journal and will not be made available for any other purpose or to any other party.


Adapter is a special object to assess and manipulate the Scroller. The API it provides is discussed on this page. In order to get an access to the Adapter API, the Datasource has to be instantiated via operator new:
{{datasourceSample}}
For better typings it is recommended to provide also data item type argument:
{{datasourceTypedSample}}
The constructor argument is an object of IDatasource type which must include get method property and may include settings object property. The Scroller's augments the result Datasource object with the Adapter object property during instantiating. So, after the Datasource object had been instantiated, we may access this.datasource.adapter property object with its API methods and properties.


Iterating over ls output is fragile. Use globs.
for f in $(ls *.wav)
do
echo "$f"
done
for f in *.wav
do
[[ -e "$f" ]] || break # handle the case of no *.wav files
echo "$f"
done
Also note that in Bash, shopt -s nullglob
will allow the loop to run 0 times instead of 1 if there are no matches. There are also several other conditions to be aware of.
When looping over a set of files, it's always better to use globs when possible. Using command expansion causes word splitting and glob expansion, which will cause problems for certain filenames (typically first seen when trying to process a file with spaces in the name).
The following files can or will break the first loop:
touch 'filename with spaces.wav'
touch 'filename with * globs.wav'
touch 'More_Globs[2003].wav'
touch 'files_with_fønny_chæracters_in_certain_locales.wav'


Let us know how we can improve freeCodeCamp
Nome:
E-mail:
Which option best describes your current role?