Bittersweet day for Aleksandar Mitrovic, high-flying Bees and Leyton Orient's early FA Cup exit
The EFL talking points from another busy weekend in the Championship and the FA Cup
by Jake SandersIt was another action-packed weekend in the Football League, with the London derby between Millwall and Charlton one of the big games in the Championship.
A late goal from Matt Smith earned Millwall the bragging rights as the Lions won 2-1 at the Den, with Gary Rowett enjoying another home win, after a victory against his old side Stoke City in his first game in charge.
Elsewhere, there were wins for Fulham and Brentford, while Queens Park Rangers drew 2-2 with Middlesbrough at Loftus Road.
Below, we take a look at the talking points from the weekend action.
Millwall remain Championship kings of south east London
A 91st minute winner from Matt Smith might have come as a surprise - especially considering the striker hasn't found the net since the end of September - but Millwall beating Charlton will be seen as anything but.
The Addicks were hot on the heels of the top-two earlier in the season and were seven points clear of their south London rivals less than two months ago, but after leaving The Den with that familiar losing feeling, Charlton have seen that gap closed to just a single point after Smith's last-gasp header, with the Addicks continuing to miss Lyle Taylor.
Bittersweet afternoon for Mitrovic
Only in one of Fulham's seven Championship victories this season has Aleksandar Mitrovic not been on the scoresheet, so it was no surprise the Serbian striker came up trumps when the Whites needed him most against Birmingham City on Saturday.
After five points from a possible 15 available, Scott Parker's job looked in doubt, but Mitrovic's second-half winner at St Andrew's could prove to be a turning point - a result that saw Fulham temporarily climb back into the top-six before Bristol City won at Cardiff a day later.
However it wasn't all rosy for the league's top goalscorer, who earlier received his fifth card of the campaign and will miss next Friday's west London derby against QPR after the international break through suspension.
Bees flying high
Brentford proved that their shock home defeat by Huddersfield Town last weekend was a minor blip as they blew Wigan away and became the first visiting side to score three goals at the DW Stadium since Sheffield United did on New Year's Day.
The only surprise was that Ollie Watkins didn't add to his impressive league tally, but the Bees are closing in on the play-off places after remarkably finding themselves on the cusp of the relegation zone only a matter of weeks ago.
Leyton Orient suffer humiliation
If October was a month to remember, November has most certainly been a month to forget for Leyton Orient.
The O's began Carl Fletcher's reign with an impressive victory at Grimsby Town, which was their third league win in succession, but three games without a win has seen Orient slide towards the wrong end of the table.
However, a kind FA Cup draw against a team more than 70 places below them in the football pyramid looked to be the ideal distraction on their return to the first round. But it turned out to be a disastrous afternoon for Fletcher's men, who were beaten 2-1 by Essex-based Maldon & Tiptree in front of a shell-shocked Brisbane Road crowd - a result that came just eight days after the O's lost to Morecambe, who sit bottom of the Football League.
Results
Championship
Birmingham City 0-1 Fulham
Millwall 2-1 Charlton Athletic
Queens Park Rangers 2-2 Middlesbrough
Wigan Athletic 0-3 Brentford
FA Cup 1st Round
AFC Wimbledon 1-1 Doncaster Rovers
Leyton Orient 1-2 Maldon & Tiptree


Hi, I'm Ryan Petrecca, I was born in Newport Beach, California and have lived there most of my life. I was born on December 9th, 1997 and I share this birthday with my twin brother, Alex; you can view photos of him and I on the portfolio page. I recently graduated from UCLA with a bachelor's degree in psychobiology. I'm currently learning full stack web development through the boot camp at UCLA Extension.
My hobbies and interests include video-gaming, primarily League of Legends and Valorant, and watching/reading anime and manga.
You can reach me at my email here<EMAIL_ADDRESS>or at my phone number:<PHONE_NUMBER>.
Please feel free to reach out to me and connect at my LinkedIn or my GitHub


{% extends "layout.html" %} {% block title %}401 Unauthorized{% endblock %} {% block content %}
You need to be logged in to view this page. Login?


Famous birthdays for Nov. 18: Margaret Atwood,
by UPI StaffNov. 18 (UPI) -- Those born on this date are under the sign of Scorpio.
They include:
-- French physicist Louis Daguerre, inventor of daguerreotype photography, in 1787
-- Journalist Dorothy Dix in 1861
-- Pollster George Gallup in 1901
-- Astronaut Alan Shepard, the first American in space, in 1923
-- Author Margaret Atwood in 1939 (age 80)
-- Actor Brenda Vaccaro in 1939 (age 80)
-- Actor David Hemmings in 1941
-- Actor Linda Evans in 1942 (age 77)
-- Writer Alan Dean Foster in 1946 (age 73)
-- Actor Jameson Parker in 1947 (age 72)
-- Football Hall of Fame member Jack Tatum in 1948
-- Actor Kevin Nealon in 1953 (age 66)
-- Comic book writer Alan Moore in 1953 (age 66)
-- Actor Oscar Nunez in 1958 (age 61)
-- Actor Elizabeth Perkins in 1960 (age 59)
-- TV writer/producer Steven Moffat in 1961 (age 58)
-- Guitarist Kirk Hammett in 1962 (age 57)
-- Actor Owen Wilson in 1968 (age 51)
-- Television news commentator Megyn Kelly in 1970 (age 49)
-- Actor-comedian Mike Epps in 1970 (age 49)
-- Actor Chloe Sevigny in 1974 (age 45)
-- Boston Red Sox legend David Ortiz in 1975 (age 44)
-- Rapper Fabolous, born John David Jackson, in 1977 (age 42)
-- NASCAR driver Denny Hamlin in 1980 (age 39)
-- Actor Damon Wayans, Jr. in 1982 (age 37)
-- Actor Jake Abel in 1987 (age 32)
-- Actor Nathan Kress in 1992 (age 27)
(0) Leave a comment
upi.com/6960017
Latest Headlines
Entertainment News // 14 minutes ago
Bristol Palin, boyfriend Janson Moore go Instagram official
Nov. 18 (UPI) -- "Teen Mom OG" alum Bristol Palin is dating Janson Moore following her split from Dakota Meyer.
Entertainment News // 44 minutes ago
'Brooklyn Nine-Nine's' Melissa Fumero expecting second child
Nov. 18 (UPI) -- "Brooklyn Nine-Nine" star Melissa Fumero has announced on Instagram she is expecting her second child with husband David Fumero of "Power" fame.
Music // 1 hour ago
Kanye West announces opera show, 'Nebuchadnezzar'
Nov. 18 (UPI) -- Kanye West is set to hold his first opera show titled "Nebuchadnezzar" at the Hollywood Bowl in Los Angeles on Sunday.
Music // 1 hour ago
Chris Brown, Lizzo win big at 2019 BET Soul Train Awards
Nov. 18 (UPI) -- Chris Brown and Lizzo won big at 2019 BET Soul Train Awards, dominating the event's major categories.
Entertainment News // 2 hours ago
Street Fighter V: Champion Edition' announced with new character Gill
Nov. 18 (UPI) -- Developer and publisher Capcom is set to release a new version of "Street Fighter V" titled Champion Edition and a new character for the fighting game, Gill.
Entertainment News // 6 hours ago
Hulu: What's coming and going in December 2019
Nov. 18 (UPI) -- "How to Train Your Dragon: Homecoming" and new seasons of "Younger," "Marvel's Runaways" and "Killing Eve" are headed to Hulu.
Music // 18 hours ago
Donny and Marie Osmond perform final show of 11-year Las Vegas residency
Nov. 17 (UPI) -- Brother-sister entertainers Donny and Marie Osmond ended their 11-year residency in Las Vegas this weekend.
TV // 19 hours ago
'General Hospital' stars to attend Graceland fan convention in January
Nov. 17 (UPI) -- Stars of the ABC soap opera "General Hospital" are confirmed to take part in a 2nd annual fan celebration at the late Elvis Presley's estate in Memphis this winter.
TV // 20 hours ago
'Fuller House' stars celebrate series wrap with karaoke
Nov. 17 (UPI) -- Production on the fifth and final season of the sitcom "Fuller House" is now complete.
Movies // 20 hours ago
'Ford v Ferrari' tops the North American box office with $31M
Nov. 17 (UPI) -- The Christian Bale-Matt Damon racing drama "Ford v Ferrari" is the No. 1 movie in North America, earning $31 million in receipts this weekend, BoxOfficeMojo.com announced Sunday.


title=Lucas's Compendium of Odd Java Things | Volume 3: Lambdas Throwing Checked Exceptions date=2016-10-01 type=post tags=blog status=published ~~~~~~
Probably any developer developing in Java 8 will eventually run into the issue of wanting to call a method that takes a functional parameter, but wanting to give it one that throws a checked exception. For example, IntelliJ will be all like,
And then you'll be all like,
Relax, Titus. First of all, there's really no nice way to pass a lambda that throws a checked exception to any of the commonly used methods that take them, such as those provided by Stream. You may as well go "back to basics" and use Java 7 syntax. It isn't any less readable.
for (final String s : classNames) { Class.forName(s); }
However, there are ways to make it work, even if it would have to be monstrously cruel to other developers reading your code. There is a well-traveled StackOverflow thread addressing this topic. The answer accepted there describes how to use lambdas with exceptions re-thrown as RuntimeExceptions (which need not be caught or declared). The point of checked exceptions is that you are forced to catch or declare them, thereby mitigating bugs, which makes the RuntimeException solution seem kind of self-defeating. An interesting idea (the second answer on the thread) is to override the functional method with a default one, and add an abstract, non-default method (which becomes the one that is implemented by lambdas) that throws something.
@FunctionalInterface public interface CheckedConsumer<T> extends Consumer<T> { @Override default void accept(final T t) { try { acceptThrows(t); } catch (Exception e) { doThrow(e); } } void acceptThrows(T t) throws Exception; @SuppressWarnings("unchecked") static <E extends Exception> void doThrow(Exception e) throws E { throw (E) e; } }
How does that static doThrow method work, by the way? StackOverflow nails it again.
It may be noted that the lombok.SneakyThrows annotation may be used to achieve a similar result. I find lombok really exciting in general because of its contribution to conciseness in Java code, but I wouldn't recommend using this annotation for a reason I will explain shortly.
Oh and also, why not make acceptThrows generic with an exception type parameter, which would make it more flexible
(i.e., <E extends Exception> void acceptThrows(T t) throws E
)?
Simply because there is no syntax that would accommodate its use as a lambda, owing to the language spec
(15.27.3):
A lambda expression is congruent with a function type if all of the following are true:
- The function type has no type parameters.
- ...
Since the CheckedConsumer interface extends Consumer, it can be used to fix the broken code:
Collections.singleton("abc").forEach((CheckedConsumer<String>) Class::forName);
Class::forName
should implement Consumer#accept.Still, this isn't much better than the technique of rethrowing with RuntimeExceptions because, since Iterable#forEach doesn't throw anything, the compiler won't expect the method calling this code to throw anything, either. We need it to compile, but for robustness, we still want to require the exception to be handled. To this end, you'd have to wrap it with another method that does throw the exceptions that other methods should be expected to handle, or that at least throws Exception.
static <T> void forEach(Collection<T> collection, CheckedConsumer<T> consumer) throws Exception { collection.forEach(consumer); } { forEach(Collections.singleton("abc"), Class::forName); // Unhandled exception: java.lang.Exception // (which is roughly what we want) }
But, this is definitely nicer than the alternative of using a try-catch inside the lambda, having it throw RuntimeException, catching it, and conditionally throwing the cause, in order to achieve the same functionality:
try { classNames.forEach(s -> { try { Class.forName(s); } catch (ClassNotFoundException e) { throw new RuntimeException(e); } }); } catch (Exception e) { if (e.getCause() instanceof ClassNotFoundException) { throw (ClassNotFoundException) e.getCause(); } else { throw e; // some other Throwable happened } }
I personally would only ever use the "CheckedConsumer" trick if I had to use a particular Exception-throwing lambda in about 1000 different places and it saved me a lot of typing. In any case, this illustrates an unfortunate limitation of the Java language.


Adds a nuclear spin to a spin system.
NewSys = nucspinadd(Sys,Nuc,A) NewSys = nucspinadd(Sys,Nuc,A,AFrame) NewSys = nucspinadd(Sys,Nuc,A,AFrame,Q) NewSys = nucspinadd(Sys,Nuc,A,AFrame,Q,QFrame)
This function adds the nucleus specified in Nuc
to the spin system structure given in Sys
and returns the spin system structure with this additional nucleus. A
is an array containing the isotropic hyperfine coupling, the hyperfine principal values, or the full hyperfine tensor. Similarly, Q
contains the quadrupole principal values or the full quadrupole tensor. AFrame
and QFrame
contain the Euler tilt angles for the respective tensors. See the page on spin system structures for details on how to specify A
, Q
, AFrame
, and QFrame
.
If any of AFrame
, Q
or QFrame
is missing or set to []
, it is set to [0 0 0]
.
The following two lines defines a system of an electron spin coupled to a 63Cu and a 14N nucleus.
Sys = struct('S',1/2,'g',[2 2 2.2]); Sys = nucspinadd(Sys,'63Cu',[50 50 520]); Sys = nucspinadd(Sys,'14N',[3 3 9],[],[-1 -1 2]);
Note that the above is more convenient than the manual construction
Sys = struct('S',1/2,'g',[2 2 2.2],'Nucs','63Cu,14N'); Sys.A = [50 50 520; 3 3 9]); Sys.Q = [0 0 0; -1 -1 2]);
since a nucleus can be included and excluded just by adding or removing a line.
To add a full hyperfine matrix, use
A = [10 0 0; 0 15 0; 0 0 30]; Sys = nucspinadd('14N',A);
To add a full hyperfine matrix and a full quadrupole matrix, use
A = [10 0 0; 0 15 0; 0 0 30]; Q = [-1 0 0; 0 -1 0; 0 0 2]; Sys = nucspinadd('14N',A,Q);
spin system structures, nucspinrmv


MSIMS
Course
Logout
Course material
Add File
Submit
Add a new component
Submit
Bulletin Board
Assignment
detail
Add an assignment
Submit
Discussion


MotoSpare's business
MotoSpare is in the business of providing genuine auto parts for all car makes and models. Our complete focus is to provide our customers with genuine parts at the most competitive prices one can find, and once you see our prices you would be pleased. Providing the best customer service is in the team’s DNA and we take pride in doing this.
Parts and Accessories
Our extensive range of parts and accessories combined with our user-friendly website ensures that our customers find any part they are looking for in no time, and if for any reason you are not able to then our experienced customer service team is there to help you at all times.
Features to make you love us more
At MotoSpare, we serve both the end consumer and bulk orders for our B2B customers. We ship globally and you can expect fast and efficient delivery with us. Our team looks forward to helping you with your queries and serving your all genuine auto parts needs.
Available for your smartphone
Simple and Affordable Online
Auto Parts Shopping.


2 Install everything
If you are trying R for the first time, it is vital that you attempt to set up your computer with the necessary software in advance or it will be difficult to keep up.
This chapter describes all of the pre-workshop homework:
- Already installed?
- Install R and RStudio
- Create a project
- Add some folders
- Install CRAN packages
- Install midfieldr
- Install midfielddata
2.1 Already installed?
If you do not have R and RStudio installed, please skip this section and start with the next section. If you are already an R and RStudio user, this is a great time to check for updates.
Updating RStudio
- RStudio menu Help > Check for Updates will tell you if you are current or not.
- To update, close RStudio on your machine, download the new version from the RStudio website, and run the
RStudio-some-version-number.exe
. (Windows users might have to run the executable as an administrator.)
Update your packages
How to upgrade all out-of-date packages in What They Forgot to Teach You About R by Jennifer Bryan and Jim Hester.
Updating R
The easiest way to update R is to simply download the newest version. RStudio will automatically use the latest you’ve installed.
Alternatively, Windows users can use the installr package:
- Install the installr package
- If open, close R and RStudio
- Navigate to your most recent
Rgui.exe
file located in your Programs directory, e.g.,C:\Program Files\R\R-4.0.0\bin\x64\Rgui.exe
- Right-click on
Rgui.exe
and run as administrator - In the R GUI window that appears, run the commands
# Windows users only
library("installr")
updateR()
Updating your R library
How to transfer your library when updating R also by Bryan and Hester. Requires the fs package.
Once your updates are complete
Skip the next section and continue the homework with
2.2 Install R and RStudio
The first steps are to install R and RStudio. Windows users may have to login as an Administrator before installing the software.
- Install R for your operating system
- Install RStudio, a user interface for R
Once the installation is complete, you can take a 2-minute tour of the RStudio interface.
- Let’s start (00:57–02:32) by R Ladies Sydney [1]
The same video includes a longer (7 minute) tour of the four quadrants (panes) in RStudio if you are interested.
- The RStudio quadrants (07:21–14:40) by R Ladies Sydney [1]
2.3 Create a project
To begin any project, we create an RStudio Project file and directory. You can recognize an R project file by its .Rproj suffix.
If you prefer your instructions with commentary,
- Start with a Project (02:34–04:50) by R Ladies Sydney [1]
If you prefer basic written instructions,
- RStudio, File > New Project… > New Directory > New Project
- Or, click the New Project button in the Console ribbon,
In the dialog box that appears,
- Type the workshop name as the directory name, for example,
workshop
, or if you like more detail,midfield-workshop-asee-2021
- Use the browse button to select a location on your computer to create the project folder
- Click the Create Project button
Whenever you work with the workshop materials, launch the workshop.Rproj
file (using the name you actually used) to start the session.
2.4 Add some folders
While file organization is a matter of personal preference, we ask that you use the directory structure shown here for your work in the workshop. Assuming we called our project workshop
, the minimal directory structure has three folders in it plus the .Rproj
file at the top level.
\workshop
\data
\results
\scripts workshop.Rproj
We use the folders as follows:
data
data filesresults
finished graphs and tabulated data formatted for display
scripts
R scripts that operate on data to produce results
To create folders:
- use your usual method of creating new folders on your machine
- or you can use the New Folder button in the Files pane
For a video guide,
- Make some folders (04:50–06:08) by R Ladies Sydney [1]
2.5 Install CRAN packages
The fundamental unit of shareable code in R is the package. For the R novice, an R package is like an “app” for R—a collection of functions, data, and documentation for doing work in R that is easily shared with others [2].
Most packages are obtained from the CRAN website [3]. To install a CRAN package using RStudio:
- Launch RStudio
The RStudio interface has several panes. We want the Files/Plots/Packages pane.
- Select the Packages tab
Next,
- Click Install on the ribbon
- In the dialog box, type the name of the package. For our first package, type
data.table
to install the data.table package [4] - Check the Install dependencies box
- Click the Install button
During the installation, Windows users might get a warning message about Rtools, something like:
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version...
.
Rtools is needed for packages with C/C++/FORTRAN code from source—which does not apply to us. You may ignore the warning and carry on.
In the RStudio Console, you should see a message like this one,
'data.table' successfully unpacked and MD5 sums checked package
If successful, the package will appear in the Packages pane, e.g.,
Repeat the process for the following packages
wrapr
Rdpack
checkmate
ggplot2
Alternatively, you can install them all at once by typing in the Console:
<- c("data.table", "wrapr", "Rdpack", "checkmate", "ggplot2")
packages_we_use install.packages(packages_we_use)
2.6 Install midfieldr
midfieldr is not yet available from CRAN. To install the development version of midfieldr from its drat
repository, type in the Console:
# type in the RStudio Console
install.packages("midfieldr",
repos = "https://MIDFIELDR.github.io/drat/",
type = "source")
You can confirm a successful installation by running the following lines to bring up the package help page in the Help window.
# type in the RStudio Console
library("midfieldr")
`midfieldr-package`
?
# or, equivalently
help("midfieldr-package")
If the installation is successful, the code chunk above should produce a view of the help page as shown here.
2.7 Install midfielddata
Because of its size, the data package is stored in a drat
repository instead of CRAN. Installation takes time; please be patient and wait for the Console prompt “>” to reappear.
Type (or copy and paste) the following lines in the RStudio Console.
# type in the RStudio Console
install.packages("midfielddata",
repos = "https://MIDFIELDR.github.io/drat/",
type = "source")
# be patient
Once the Console prompt “>” reappears, you can confirm a successful installation by viewing the package help page. In the Console, run:
# type in the RStudio Console
library("midfielddata")
help("midfielddata-package")
If the installation is successful, the code chunk above should produce a view of the help page as shown here.
2.8 Exiting R and RStudio
When you exit R/RStudio, you probably get a prompt about saving your workspace image.
The answer is No.
You can turn this prompt off by using the pulldown menu,
- Tools > Global Options…
- In the dialog box, Save workspace to .RData on exit: Select “Never”
You finished your homework!


2. Getting Started¶
2.1. Overview and Developer’s First Steps¶
OpenDSA consists of content delivered by servers. Content is delivered in the form of “book instances”, which are created by the configuration process. A book instance is accessed through a Learning Management System (at the moment, we are only supporting Canvas), with the files delivered by an LTI Content Provider. Various support operations are conducted by the OpenDSA Server. If you want to develop content, then create a book instance and view it, then you will need to set up the necessary infrastructure. For testing purposes, this has all been packaged together to simplify setting up a development environment. See https://github.com/OpenDSA/OpenDSA-DevStack for how to set this up.
Once you have the development environment in place, the next step is to get an account on a Canvas server. You can either use one provided by your institution, set up your own Canvas server, or use the public test server provided by Instructure at https://canvas.instructure.com. With your account in place, you can tell Canvas to create a course. The place to start is to create a course named “Test”. You will then go back to your development environment, and create a course configuration file. You should start with one named “Test_LMSconf.json”, made by copying the template in the config directory. You can then go to the top of the OpenDSA repository, and do make Test. If everything worked right, then you will have populated your course on Canvas with some content. At this point, you are ready to learn about the parts of the system that you need to know in detail so that you can do useful work.
2.2. Project Communications¶
The primary discussion forum for topics related to OpenDSA and JSAV is our Piazza forum at https://piazza.com/class/i1v25wdagpr6sn.
Issues (bug reports and suggestions) related to any of the repositories should be posted to their respective GitHub issue trackers.
2.3. Repositories and Official Mirrors¶
Main development is done out of repositories hosted at GitHub. We use a GitHub “organization” at https://github.com/OpenDSA. Here is a list of the individual repositories that we use:
- The main OpenDSA development repository: https://github.com/OpenDSA/OpenDSA. The stable releases are kept in a separate repository at https://github.com/OpenDSA/OpenDSA-stable.
- Most developers should use the version of JSAV distributed with OpenDSA. However, if your task requires the most recent changes then the development version of JSAV can be found at: https://github.com/vkaravir/JSAV.
- We use the Khan Academy infrastructure for exercises and distribute the necessary portions with OpenDSA.
- Support for setting up OpenDSA servers can be found at https://github.com/OpenDSA/OpenDSA-DevStack.
- The OpenPOP project is in a separate repository at https://github.com/OpenDSA/OpenPOP.
- The QBank project is in a separate repository at https://github.com/OpenDSA/QBank.
The stable releases of OpenDSA and JSAV are mirrored at: http://algoviz.org/OpenDSA/ and http://algoviz.org/OpenDSA/JSAV, respectively. The built version of the stable modules are mirrored at: http://algoviz.org/OpenDSA/Books. The development versions of OpenDSA and JSAV are mirrored at: http://algoviz.org/OpenDSA/dev/OpenDSA and http://algoviz.org/OpenDSA/dev/OpenDSA/JSAV, respectively.
2.4. JSAV¶
Visualizations are developed using the JSAV (JavaScript Algorithm Visualization) library. Documentation for the JSAV API can be found at: http://jsav.io/
2.5. File Structure and File Naming Conventions¶
The following refers to the OpenDSA content or “client side” repositories (“OpenDSA” and “OpenDSA-stable”).
Content materials come in the form of modules (in RST), exercises, AVs, etc. There are various top-level directories, as explained below and in more detail in the project README file (https://github.com/OpenDSA/OpenDSA/blob/master/README.md). Within the RST, AV, SourceCode and Exercises directories, the materials are subdivided into subdirectories based on topical content (such as Sorting). These content subdirectories are mirrored across all of the materials subtypes. That is, if there is a Sorting subdirectory in the AVs directory, there should also be one in the RST directory, Exercises directory and the SourceCode directory to match. In addition, each of the major top-level directories contains a subdirectory named Development. All content starts life in the Development subdirectory. Once it is completed, polished, validated, and had a thorough code review, Dr. Shaffer will move code out of the Development subdirectory to an appropriate content subdirectory.
Algorithm visualizations, proficiency exercises, and related code live in the AV directory.
Exercises built using the Khan Academy exercise infrastructure lives in the Exercises directory.
Tutorial modules live in the RST directory, with the actual source in RST/source.
Code examples that will be presented within the modules (such as Processing or Python code) lives in the SourceCode directory.
Individual files are further labeled by functional type. Files related to AVs have their filename end in AV (such as insertionsortAV.js). Files related to proficiency exercises end in PRO. Files related to mini-slideshows or similar content that is included within a module end in CON. Khan Academy exercises that are multiple choice questions end in MC, and T/F questions end in TF. KA-based questions that are interactive (for example, where a user clicks on JSAV array elements to give an answer) end in PRO. The practice is to put individual KA questions in separate files, and often these are then aggregated to present to students as a battery of “summary” questions. Such aggregations end in Summ.
2.6. OpenDSA Coding Standards¶
Coding standards for OpenDSA are largely driven by validation tools. The requirements for CSS and JavaScript files are embedded in the validation tools and settings built into the OpenDSA Makefile. No code gets out of the “Development” stage and into public use until it follows our rules for splitting into separate HTML/CSS/JavaScript files and passes the validation tools with zero warnings and errors.
HTML Pages Ideally, HTML pages that are part of OpenDSA should pass the W3 validation suite. An easy way to run this on your page is to install the Web Developer plugin (from http://chrispederick.com) for your browser. This is available for both Chrome and Firefox, and gives you icons on your toolbar that lets you run the validator on the current page. Unfortunately, we so far have not adopted a command-line tool for validation of HTML pages similar to what we are using for CSS and JavaScript.
We try to avoid JavaScript and CSS in the HTML pages (though we often tolerate a couple of lines of CSS for an AV that needs only minimal customization away from the standard lib/odsaStyle.css template). Our standard practice is to use <script> and <link> tags to call separate .js and .css files, respectively.
CSS Files We use csslint to validate css files. OpenDSA/Makefile contains our required csslint flags.
JavaScript We use eslint for validating JavaScript. OpenDSA/.eslintrc contains our official configuration file that defines the expected style. It is relatively strict. Developers should strive to eliminate all warnings (and of course, all errors).
JSON Files We use jsonlint to validate css files.
2.7. Tools¶
This section describes the various tools that are either required or might be particularly helpful for various aspects of OpenDSA development.
2.7.1. git¶
There are several versions of git for Windows We recommend the version found at http://msysgit.github.com/. This guide assumes that windows users are working through the Git Bash command window. When installing msysgit, you should install it at the level of C:\, rather than in C:\Program Files. Otherwise, you are likely to have troubles interacting with GnuWin32 tools (for make). Aside from this, just accept the default configuration options.
2.7.2. make¶
GNU make for Windows can be found at http://gnuwin32.sourceforge.net/packages/make.htm.
2.7.3. Python¶
We are using Python 2.7 (NOT 3.x).
2.7.4. Python setuptools¶
Python setuptools is used for installing Sphinx. On Linux this might come preinstalled. If not, run the following using the appropriate package manager for your distribution (on Ubuntu, it is “apt-get”):
sudo <package_manager> install python-setuptools
On windows, see http://pypi.python.org/pypi/setuptools#files. You will need to include [PythonHome]/Scripts on your PATH system variable for both setuptools and sphinx. I had some trouble installing setuptools for the 64-bit version of Python 2.7.3 on Windows. When I tried to install setuptools, it wouldn’t recognize that a Python installation was available. This is a known problem. You can either re-install the 32-bit version, or look on the internet for the proper registry work-around.
2.7.5. sphinx¶
For documentation, see http://sphinx.pocoo.org/contents.html.
With Python and setuptools installed, just type easy_install -U Sphinx at the command line.
2.7.6. Hieroglyph¶
Hieroglyph is only needed to compile course slides. You need to use version 0.5.5 (newer versions don’t work). To install, just type easy_install pip; pip install hieroglyph==0.5.5 at the command line.
2.7.7. nodejs¶
We don’t use nodejs directly in our toolchain, but this is useful for installing several of the other tools. For installation instructions, see http://nodejs.org (and don’t forget to check for the 64-bit version if that is the OS you are running).
2.7.9. csslint¶
Once you have nodejs installed, just do:
npm install -g csslint
Note: To be able to lint check either JavaScript or CSS, you need to put it in separate files from your HTML code.
2.7.11. uglifyjs¶
We use this for minimizing JavaScript code. To install on Windows:
npm install -g uglify-js
On Linux, you more likely will need to use the package manager. For example, on Ubuntu:
apt-get install uglifyjs
2.7.12. Some other things: requirements.txt¶
(This needs more documentation.) From the top level of the OpenDSA directory, do the following:
pip install -r requirements.txt
2.7.13. Notes for Windows¶
- You will need to be sure that Git, Python, and make are on your path. On Windows 7, you edit your path variable by right-clicking your Computer icon, clicking on “Advanced system settings” and then “Environment Variables”.
- If you have a 64-bit operating system, be aware that the various GNU tools will not work properly if they see “Program Files (x86)” on the system path variable. You might need to install these tools elsewhere, and/or reorder things on the path so that the GNU tool appears before anything referencing “Program Files (x86)”.
- We have had a lot of trouble getting the Git Bash shell to work properly when running GnuWin32 tools like “make”. One solution is to make sure that Git is not installed to a directory whose name has spaces in it (in particular, the standard “Program Files” directory that is the default). Instead, we find it most reliable to install Git directly into C:/.
- Beware if you have Cygwin installed on your Windows machine: There
might be path conflicts between Cygwin on the one hand, and the Git
Bash shell and the GNU tools on the other.
If you insist on trying to use both on your system, you are on your
own.
Otherwise you have two reasonable options:
- If you don’t use Cygwin much, then delete it entirely from your system.
- Or stick completely with using Cygwin, by running Git and your other tools from within it instead of the Git command shell.
2.8. Web Programming Resources¶
Since we do so much webpage development and programming in JavaScript, newcomers will need good resources. One well-respected site is https://developer.mozilla.org/en/JavaScript. Beware of doing a search engine query and ending up at w3schools, which is not so well respected these days. If you are at Virginia Tech (or if your school supports this), a wonderful source of documentation is the Safari database (http://proquest.safaribooksonline.com/?uicode=viva), which contains a huge collection of technical books including the entire O’Reilly catalog.
2.9. Simple Web Server¶
Once you are able to compile a book or create an exercise on your computer, you will probably want to look at it in your web browser. Unfortunately, much of the infrastructure only works when run through a web server. Since most people do not normally run a web server (like Apache) on their own computer, will need something simple that you can use instead. At the top level of the OpenDSA repository there is a script named WebServer that you can use. Just open a console window for the web server, go to the top level of your copy of the OpenDSA repository, and run the script (on Linux or Mac) or paste the Python command into the console (on Windows) to start up the simple Python web server. Then, open your browser to the URL listed in the comments of the WebServer script file. This should show you the top level directory structure for the OpenDSA repository.
2.10. Debugging¶
When you right-click a web page in Chrome (or Firefox when Firebug is installed), you get a popup menu whose bottom item is “Inspect Element”. This brings up the Chrome Developer Tools panel (in Chrome) or Firebug (in Firefox). This is especially helpful for inspecting the various DOM elements on your web page. A big help here is seeing the CSS styles in effect for any specified DOM element. For details on how to view and even edit on-the-fly your CSS settings in force (for example, to see what you should change), see https://developers.google.com/chrome-developer-tools/docs/elements-styles.
While Chrome has built-in developer tools (and a lite version of Firebug), we highly recommend using the full version of Firebug, available for Firefox, for JavaScript debugging. More information about Firebug’s features can be found here: https://getfirebug.com/.
The following are highlights for some debugger features and how they can be used.
- Console - an interactive JavaScript console which allows:
- Print statments for debugging and error logging.
- Testing JavaScript statements (including access to variables and functions defined on the current page).
- Viewing network requests - GET and POST messages appear in the console allowing the user to see what data was sent and the server’s response.
- Inspect - allows the user to select an element on a page, view the HTML for it and modify the element’s CSS in real time (helpful for rapid GUI prototyping).
- Debugger - a full featured JavaScript debugger (useful for debugging or simply following code execution).
2.11. Setting up a Testing Environment¶
To compile your own books for testing purposes requires rather a lot of infrastruture. It also involves running multiple servers: at least one for the LTI provider and one for the OpenDSA scoring server. To make this relatively easy for most developers, we have created a package to deliver a complete “OpenDSA in a box” on a virtual machine. Complete instructions can be found at: https://github.com/OpenDSA/OpenDSA-DevStack.


'br}
'br}
'if n "c 'if t \$1c 'if n \$1c 'if n " \$2 \$3 \$4 \$5 \$6 \$7 '.ft R
{\
getconf - Query system configuration variables
getconf -a
getconf [-v specification] system_var
getconf [-v specification] path_var pathname
-a
Displays all configuration variables for the current system and their values.
-v
Indicate the specification and version for which to obtain configuration variables.
system_var
A system configuration variable, as defined by sysconf(3) or confstr(3).
path_var
A system configuration variable as defined by pathconf(3). This must be used with a pathname.
getconf was written by Roland McGrath for the GNU C Library
This man page was written by Ben Collins<EMAIL_ADDRESS>for the Debian GNU/Linux system.
sysconf(3), pathconf(3), confstr(3)


By understanding code's scope, we know when that code affects only one part of our code, or the entire codebase. If we create things that are global in scope, we are giving any code the supreme power to control our code. So we want to protect our code by being very careful when creating things that are global in scope. This is especially important if you plan on using JavaScript libraries like jQuery.
JavaScript uses function scope, meaning every time we create a new function the scope changes. Any code inside that function is local to that function. Code that is local in scope is not accessible to outside code.


WebSocket client
{"text": "Hi! I'm a client."}
Send message
Connect
#messages-sent
#messages-received
#errors


Did you forget your password? No problem, use that password: {{ newPass }}
Don't forget to change it in your information panel!
A rota entre você e sua fome
Ceccof, 2020


new Timer(initValue)
Utility class to simplify use of timers created by setTimeout.
Parameters:
| Name |
Type |
Argument |
Description |
initValue |
Object
|
<optional>
|
Specifies initial property values. Keys are property names, their values are values of corresponding properties.
The following keys (properties) can be specified:
| Name |
Type |
Description |
| action |
Function |
Related action that should be executed after time period is elapsed. |
| active |
Boolean |
Whether timer usage should be immediately started. |
| period |
Integer |
Time period in milliseconds that is used to schedule related action execution. |
| recurrent |
Boolean |
Whether related action should be executed repeatedly. |
|
- Source:


The Gold party package is great way to celebrate with a bunch of friends and leave all of your inhibitions at the door. Grab your girls and get ready for a party experience which includes everything you need for a fabulous celebration. Learn how to move seductively around the pole, perfect and perform your dance routine and prepare to take home gourmet cupcakes and bubbly after your pole experience with us.
* Max 9 people
For liability and legal purposes, we do not allow alcohol to be consumed during or prior to our parties. Please refrain from alcohol consumption, before your party and please do not attempt to consume any alcohol in or outside the premises. If we suspect a guest is under the influence of alcohol, we will ask that the guest be removed from the premises.
Age LimitationsIf you are under the age of 18, we require parental consent. Your parent will need to come to the studio with you so that they can sign the release form with a copy of their ID. Admittance is at the discretion of the instructor.
Late Arrival or No-showsWe cannot extend party time due to late arrivals. Parties will start at the scheduled party time and no later. Please do your best to be on time for your party. You will not receive a refund for any guest who does not attend.
ReservationsWe offer parties between 4pm-8pm Saturdays. You can book up several weeks or even months in advance. Reservations are required and are taken on a first-come, first-serve basis. We highly recommend booking your preferred date and time as soon as possible. To request a party package please email<EMAIL_ADDRESS>with your party requirements and we'll get right back to you.
Rescheduling/Reservation ChangesParties can be rescheduled once if given a 10 day notice (subject to availability). If you would like to change your party package or start time, please give us a call or send an email to<EMAIL_ADDRESS>at least 10 days before your party and we will try our best to accommodate the change. Changes cannot be made less than 10 days before the party because our resources have already been allocated.


| Author | Title | Year | Journal/Proceedings | Reftype | DOI/URL |
|---|---|---|---|---|---|
| Park, I.M., Ságodi, Á. and Sokół, P.A. | Persistent learning signals and working memory without continuous attractors | 2023 | unpublished | arXiv | |
| Stone, I.R., Sagiv, Y., Park, I.M. and Pillow, J.W. | Spectral learning of Bernoulli linear dynamical systems models for decision-making | 2023 | Transactions on Machine Learning Research | article | URL arXiv code |
| Stone, I., Sagiv, Y., Park, I.M. and Pillow, J.W. | Spectral learning of Bernoulli latent dynamical system models for decision-making | 2023 | Computational and Systems Neuroscience (COSYNE) | inproceedings | |
| Sokół, P. | Geometry of learning and representation in neural networks | 2023 | School: Stony Brook University | phdthesis | |
| Sokół, P. and Park, I.M. | Only two types of attractors support representation of continuous variables, and learning over long time-spans | 2023 | Computational and Systems Neuroscience (COSYNE) | inproceedings | |
| Levi, A.J., Zhao, Y., Park, I.M. and Huk, A.C. | Sensory and choice responses in MT distinct from motion encoding | 2023 | Journal of Neuroscience Vol. 43(12), pp. 2090-2103 |
article
(Levi and Zhao are co-first authors) |
DOI URL |
| Dowling, M., Zhao, Y. and Park, I.M. | Linear time GPs for inferring latent trajectories from neural spike trains | 2023 | International Conference on Machine Learning (ICML) | inproceedings | URL arXiv |
| Dowling, M., Zhao, Y. and Park, I.M. | The Exponential Family Variational Kalman Filter for Real-time Neural Dynamics | 2023 | Computational and Systems Neuroscience (COSYNE) | inproceedings | |
| Dowling, M., Zhao, Y. and Park, I.M. | Real-time variational method for learning neural trajectory and its dynamics | 2023 | International Conference on Learning Representations (ICLR) | inproceedings | URL arXiv |
| Arora, T. | Exploring the expressive power of latent variable models | 2023 | School: Stony Brook University | mastersthesis | |
| Zhao, Y., Nassar, J., Jordan, I., Bugallo, M. and Park, I.M. | Streaming Variational Monte Carlo | 2022 | IEEE Transactions on Pattern Analysis and Machine Intelligence Vol. 45(1), pp. 1150-1161 |
article | DOI URL arXiv code |
| Vermani, A., Chen, K., Kogan, J., Fontanini, A. and Park, I.M. | Can time dependent and invariant decoders co-exist? | 2022 | Computational and Systems Neuroscience (COSYNE) | inproceedings | |
| Neophytou, D., Arribas, D., Levy, R., Arora, T., Park, I.M. and Oviedo, H.V. | Differences in temporal processing speeds between the right and left auditory cortex reflect the strength of recurrent synaptic connectivity | 2022 | PLoS Biology Vol. 20(10), pp. e3001803 |
article | DOI URL |
| Nassar, J. | Bayesian Machine Learning for Analyzing and Controlling Neural Populations | 2022 | School: Stony Brook University | phdthesis | |
| Jordan, I.D. | Metastable Dynamics Underlying Neural Computation | 2022 | School: Stony Brook Univeersity | phdthesis | |
| Dowling, M., Sokół, P. and Park, I.M. | Hida-Matérn Gaussian Processes | 2022 | Computational and Systems Neuroscience (COSYNE) | inproceedings | |
| Brinkman, B.A.W., Yan, H., Maffei, A., Park, I.M., Fontanini, A., Wang, J. and La Camera, G. | Metastable dynamics of neural circuits and networks | 2022 | Applied Physics Reviews Vol. 9(1), pp. 011313 |
article | DOI arXiv |
| Pei, F., Ye, J., Zoltowski, D., Wu, A., Chowdhury, R.H., Sohn, H., O'Doherty, J.E., Shenoy, K.V., Kaufman, M.T., Churchland, M., Jazayeri, M., Miller, L.E., Pillow, J., Park, I.M., Dyer, E.L. and Pandarinath, C. | Neural Latents Benchmark '21: Evaluating latent variable models of neural population activity | 2021 | Advances in Neural Information Processing Systems (NeurIPS) | inproceedings
(PF and YU are co-first authors) |
URL arXiv |
| Pei, F., Ye, J., Sedler, A.R., Zoltowski, D., Wu, A., Chowdhury, R.H., Sohn, H., O'Doherty, J.E., Shenoy, K.V., Kaufman, M.T., Churchland, M., Jazayeri, M., Miller, L.E., Park, I.M., Dyer, E., Pillow, J. and Pandarinath, C. | Advancing the investigation of neural population structure with the Neural Latents Benchmark | 2021 | Society for Neuroscience | inproceedings | |
| Neophytou, D., Arribas, D., Oviedo, H. and Park, I.M. | Quasi-Bayesian estimation of time constants supports lateralized auditory computation | 2021 | Computational and Systems Neuroscience (COSYNE) | inproceedings | |
| Jordan, I., Sokol, P. and Park, I.M. | Mechanisms Underlying Sequence-to-Sequence Working Memory | 2021 | DeepMath | conference | URL |
| Jordan, I.D., Sokol, P.A. and Park, I.M. | Gated recurrent units viewed through the lens of continuous time dynamical systems | 2021 | Frontiers in Computational Neuroscience | article | DOI arXiv |
| Dowling, M., Sokół, P. and Park, I.M. | Hida-Matérn Kernel | 2021 | unpublished | URL arXiv | |
| Dowling, M., Zhao, Y. and Park, M. | NP-GLM: Nonparametric GLM | 2021 | Computational and Systems Neuroscience (COSYNE) | inproceedings | |
| Arribas, D., Zhao, Y. and Park, M. | Framework to generate more realistic GLM spike trains | 2021 | Computational and Systems Neuroscience (COSYNE) | inproceedings | |
| Zhao, Y., Nassar, J. and Park, I.M. | Real-time discovery of effective dynamics from streaming noisy neural observations | 2020 | Computational and Systems Neuroscience (COSYNE) | inproceedings | |
| Zhao, Y., Yates, J.L., Levi, A., Huk, A. and Park, I.M. | Stimulus-choice (mis)alignment in primate area MT | 2020 | PLOS Computational Biology | article | DOI URL data youtube |
| Zhao, Y. and Park, I.M. | Variational online learning of neural dynamics | 2020 | Frontiers in Computational Neuroscience | article | DOI arXiv code |
| Sokol, P. and Park, I.M. | Information geometry of orthogonal initializations and training | 2020 | International Conference on Learning Representations (ICLR) | inproceedings | URL arXiv |
| Park, I.M. and Pillow, J.W. | Bayesian Efficient Coding | 2020 | bioRxiv, pp. 178418+ | unpublished
(under review) |
DOI URL data |
| Nassar, J., Sokol, P., Chung, S.Y., Harris, K. and Park, I.M. | On 1/n neural representation and robustness | 2020 | DeepMath | conference | URL |
| Nassar, J., Sokol, P., Chang, S., Harris, K. and Park, I.M. | On 1/n neural representation and robustness | 2020 | Advances in Neural Information Processing Systems (NeurIPS) | inproceedings
(JN and PS are co-first authors) |
URL arXiv |
| Nassar, J., Sokol, P., Chung, S., Harris, K. and Park, I.M. | Spectral regularization in biological and artificial neural networks | 2020 | Computational and Systems Neuroscience (COSYNE) | inproceedings | |
| Michaelis, B., Leathers, K., Ache, B., Bobkov, Y., Principe, J., Baharloo, R., Park, I.M. and Reidenbach, M. | Odor tracking in marine organisms: the importance of temporal and spatial intermittency of the odor signal | 2020 | Scientific Reports Vol. 10, pp. 7961 |
article | DOI |
| Kepple, D.R., Lee, D., Prepscius, C., Isler, V., Park, I.M. and Lee, D.L. | Jointly learning visual motion and confidence from local patches in event cameras | 2020 | 16th European conference on computer vision (ECCV2020) | inproceedings
spotlight |
DOI |
| Jordan, I.D. and Park, I.M. | Birhythmic analog circuit maze: A nonlinear neurostimulation testbed | 2020 | Entropy Vol. 22(5), pp. 537 |
article | DOI URL arXiv |
| Dowling, M., Zhao, Y. and Park, I.M. | Non-parametric generalized linear model | 2020 | unpublished | arXiv | |
| Dikecligil, G.N., Graham, D., Park, I.M. and Fontanini, A. | Layer and cell type specific response properties of gustatory cortex neurons in awake mice | 2020 | Journal of Neuroscience | article | DOI |
| Arribas, D.M., Zhao, Y. and Park, I.M. | Rescuing neural spike train models from bad MLE | 2020 | Advances in Neural Information Processing Systems (NeurIPS) | inproceedings | URL arXiv code |
| Sokol, P., Jordan, I. and Park, I.M. | Information geometry at initialization and beyond | 2019 | DeepMath | conference | URL |
| Sokol, P. and Park, I.M. | Limit Cycle Neural Networks Have Infinite Memory | 2019 | DeepMath | conference | URL |
| Sokol, P., Jordan, I., Kadile, E. and Park, I.M. | Adjoint dynamics of stable limit cycle neural networks | 2019 | 53rd Asilomar Conference on Signals, Systems and Computers | inproceedings | DOI PDF |
| Nassar, J., Linderman, S., Park, I.M. and Bugallo, M. | Tree-structured locally linear dynamics model to uproot Bayesian neural data analysis | 2019 | Computational and Systems Neuroscience (COSYNE) | inproceedings | |
| Nassar, J., Linderman, S.W., Bugallo, M. and Park, I.M. | Tree-Structured Recurrent Switching Linear Dynamical Systems for Multi-Scale Modeling | 2019 | International Conference on Learning Representations (ICLR) | inproceedings | URL arXiv code |
| Mofakham, S., Fry, A., Adachi, J., Winans, N., Liang, J., Ashcroft, B., Sharma, H., Fiore, S., Park, I.M. and Mikell, C. | Electrophysiological prognostication of functional cortical integrity after traumatic brain injury | 2019 | American Association of Neurological Surgeons (AANS) | inproceedings | |
| Mofakham, S., Fry, A., Adachi, J., Ashcroft, B., Winans, N., Liang, J., Sharma, H., Fiore, S., Park, I.M. and Mikell, C. | Recovery of consciousness after traumatic brain injury: Biomarkers and a mechanistic model | 2019 | Computational and Systems Neuroscience (COSYNE) | inproceedings | |
| Hocker, D. and Park, I.M. | Myopic control of neural dynamics | 2019 | PLOS Computational Biology | article | DOI URL |
| Bobkov, Y., Park, I., Michaelis, B.T., Matthews, T., Reidenbach, M.A., Príncipe, J.C. and Ache, B. | Coding spatiotemporal characteristics of odor signals | 2019 | Association for Chemoreception (AChemS) Annual Meeting | inproceedings | |
| Zhao, Y. and Park, I.M. | Accessing neural states in real time: recursive variational Bayesian dual estimation | 2018 | Computational and Systems Neuroscience (COSYNE) | inproceedings | |
| Nassar, J., Linderman, S., Zhao, Y., Bugallo, M. and Park, I.M. | Learning structured neural dynamics from single trial population recording | 2018 | 52nd Asilomar Conference on Signals, Systems and Computers | inproceedings | URL PDF |
| Kirschen, G.W., Ge, S. and Park, I.M. | Probability of viral labeling of neural stem cells in vivo | 2018 | Neuroscience Letters | article | DOI |
| Hocker, D. and Park, I.M. | Myopic Control: A New Control Objective for Neural Population Dynamics | 2018 | Computational and Systems Neuroscience (COSYNE) | inproceedings | |
| Esfahany, K., Siergiej, I., Zhao, Y. and Park, I.M. | Organization of neural population code in mouse visual system | 2018 | eNeuro, pp. 0414-17 | article | DOI URL |
| Esfahany, K., Siergiej, I., Zhao, Y. and Park, I.M. | Organization of neural population code in mouse visual system | 2018 | Computational and Systems Neuroscience (COSYNE) | inproceedings | |
| Bobkov, Y., Park, I.M., Michaelis, B.T., Matthews, T., Reidenbach, M.A., Príncipe, J.C. and Ache, B. | Rhythmically discharging olfactory receptor neurons can encode the spatiotemporal characteristics of odor signals within complexfluid environments | 2018 | European Chemoreception Research Organization (ECRO) | inproceedings | URL |
| Zhao, Y., Yates, J. and Park, I.M. | Low-dimensional state-space trajectory of choice at the population level in area MT | 2017 | Computational and Systems Neuroscience (COSYNE) | inproceedings | |
| Zhao, Y. and Park, I.M. | Gotta infer'em all: dynamical features from neural trajectories | 2017 | Computational and Systems Neuroscience (COSYNE) | inproceedings | |
| Zhao, Y. and Park, I.M. | Variational Latent Gaussian Process for Recovering Single-Trial Dynamics from Population Spike Trains | 2017 | Neural Computation Vol. 29(5) |
article | DOI youtube arXiv code |
| Yates, J.L., Park, I.M., Katz, L.N., Pillow, J.W. and Huk, A.C. | Functional dissection of signal and noise in MT and LIP during decision-making | 2017 | Nature Neuroscience Vol. 20, pp. 1285-1292 |
article | DOI |
| Hocker, D. and Park, I.M. | Instability of the generalized linear model for spike trains | 2017 | Computational and Systems Neuroscience (COSYNE) | inproceedings | |
| Hocker, D. and Park, I.M. | Multistep inference for generalized linear spiking models curbs runaway excitation | 2017 | 8th International IEEE EMBS Conference On Neural Engineering, pp. 613-616 | inproceedings | DOI PDF |
| Zhao, Y. | Log-linear Model Based Tree and Latent Variable Model for Count Data | 2016 | School: Stony Brook University | phdthesis | |
| Zhao, Y. and Park, I.M. | Interpretable Nonlinear Dynamic Modeling of Neural Trajectories | 2016 | Advances in Neural Information Processing Systems (NIPS) | inproceedings | URL youtube arXiv |
| Zhao, Y. and Park, I.M. | Variational inference of latent Gaussian neural dynamics | 2016 | International Conference on Machine Learning (ICML) Workshop on Computational Biology | inproceedings | |
| Zhao, Y. and Park, I.M. | Inferring low-dimensional network dynamics with variational latent Gaussian process | 2016 | Organization for Computational Neuroscience (CNS) | inproceedings | |
| Dikecligil, G.N., Graham, D., Park, I.M. and Fontanini, A. | Layer Specific Sensorimotor Activity in the Gustatory Cortex of Licking Mice | 2016 | Society for Neuroscience | inproceedings | |
| Yates, J., Archer, E., Huk, A.C. and Park, I.M. | Canonical correlations reveal co-variability between spike trains and local field potentials in area MT | 2015 | Organization for Computational Neuroscience (CNS) | inproceedings | |
| Wu, A., Park, I.M. and Pillow, J. | Convolutional spike-triggered covariance analysis for neural subunit models | 2015 | Advances in Neural Information Processing Systems (NIPS) | inproceedings | URL |
| Wu, A., Park, I.M. and Pillow, J. | Convolutional spike-triggered covariance analysis for estimating subunit models | 2015 | Frontiers in Systems Neuroscience. Conference Abstract: Computational and Systems Neuroscience (COSYNE) | inproceedings | |
| Park, I.M., Yates, J., Huk, A. and Pillow, J. | Dynamic correlations between visual and decision areas during perceptual decision-making | 2015 | Frontiers in Systems Neuroscience. Conference Abstract: Computational and Systems Neuroscience (COSYNE) | inproceedings | |
| Archer, E., Park, I.M., Buesing, L., Cunningham, J. and Paninski, L. | Black box variational inference for state space models | 2015 | ArXiv e-prints | unpublished | arXiv |
| Yates, J.L., Katz, L.N., Park, I.M., Pillow, J.W. and Huk, A.C. | Correlations and choice probabilities in simultaneously recorded MT and LIP neurons | 2014 | Society for Neuroscience | inproceedings | |
| Park, I.M., Meister, M.L.R., Huk, A.C. and Pillow, J.W. | Encoding and decoding in parietal cortex during sensorimotor decision-making | 2014 | Nature Neuroscience Vol. 17(10), pp. 1395-1403 |
article | DOI PDF |
| Park, I.M., Seth, S. and Van Vaerenbergh, S. | Probabilistic Kernel Least Mean Squares Algorithms | 2014 | IEEE International Conference on Acoustics, Speech, and Signal Processing (ICASSP) | inproceedings | DOI URL |
| Park, I.M., Archer, E., Latimer, K. and Pillow, J. | Scalable nonparametric models for binary spike patterns | 2014 | Frontiers in Systems Neuroscience. Conference Abstract: Computational and Systems Neuroscience (COSYNE) | inproceedings | |
| Park, I.M., Bobkov, Y.V., Ache, B.W. and Príncipe, J.C. | Intermittency coding in the primary olfactory system: A neural substrate for olfactory scene analysis | 2014 | The Journal of Neuroscience Vol. 34(3), pp. 941-952 |
article | DOI |
| Huk, A., Yates, J., Katz, L., Park, I.M. and Pillow, J. | Dissociated functional significance of choice-related activity across the primate dorsal stream | 2014 | Frontiers in Systems Neuroscience. Conference Abstract: Computational and Systems Neuroscience (COSYNE) | inproceedings | |
| Archer, E., Park, I.M. and Pillow, J. | Bayesian Entropy Estimation for Countable Discrete Distributions | 2014 | Journal of Machine Learning Research Vol. 15, pp. 2833-2868 |
article | URL arXiv |
| Yates, J., Park, I.M., Cormack, L., Pillow, J. and Huk, A. | Precise characterization of dorsal stream neural activity during decision making | 2013 | Society for Neuroscience | inproceedings | |
| Yates, J., Park, I.M., Cormack, L., Pillow, J. and Huk, A. | Precise characterization of multiple LIP neurons in relation to stimulus and behavior | 2013 | Frontiers in Systems Neuroscience. Conference Abstract: Computational and Systems Neuroscience (COSYNE) | inproceedings | |
| Pillow, J. and Park, I.M. | Beyond Barlow: A Bayesian theory of efficient neural coding | 2013 | Frontiers in Systems Neuroscience. Conference Abstract: Computational and Systems Neuroscience (COSYNE) | inproceedings | |
| Park, I.M., Seth, S. and Van Vaerenbergh, S. | Bayesian Extensions of Kernel Least Mean Squares | 2013 | ArXiv e-prints | unpublished | arXiv |
| Park, I.M., Archer, E., Priebe, N. and Pillow, J.W. | Spectral methods for neural characterization using generalized quadratic models | 2013 | Advances in Neural Information Processing Systems (NIPS) | inproceedings | URL |
| Park, I.M., Archer, E., Latimer, K. and Pillow, J.W. | Universal models for binary spike patterns using centered Dirichlet processes | 2013 | Advances in Neural Information Processing Systems (NIPS) | inproceedings | URL |
| Park, I.M., Archer, E. and Pillow, J. | Bayesian entropy estimators for spike trains | 2013 | Computational Neuroscience (CNS) | inproceedings | |
| Park, I.M., Archer, E., Priebe, N. and Pillow, J. | Got a moment or two? Neural models and linear dimensionality reduction | 2013 | Frontiers in Systems Neuroscience. Conference Abstract: Computational and Systems Neuroscience (COSYNE) | inproceedings | |
| Park, I.M., Seth, S., Paiva, A.R.C., Li, L. and Principe, J.C. | Kernel methods on spike train space for neuroscience: a tutorial | 2013 | IEEE Signal Processing Magazine Vol. 30(4), pp. 149-160 |
article | DOI arXiv |
| Paiva, A.R.C., Park, I., Príncipe, J.C. and Sanchez, J. | Instantaneous cross-correlation analysis of neural ensembles with high temporal resolution | 2013 | Neural engineering applied to neurorehabilitation | inbook | |
| Archer, E., Park, I.M. and Pillow, J.W. | Bayesian entropy estimation for binary spike train data using parametric prior knowledge | 2013 | Advances in Neural Information Processing Systems (NIPS) | inproceedings | URL |
| Archer, E., Park, I.M. and Pillow, J. | Bayesian and Quasi-Bayesian Estimators for Mutual Information from Discrete Data | 2013 | Entropy Vol. 15(5), pp. 1738-1755 |
article | DOI |
| Archer, E., Park, I.M. and Pillow, J. | Semi-parametric Bayesian entropy estimation for binary spike trains | 2013 | Frontiers in Systems Neuroscience. Conference Abstract: Computational and Systems Neuroscience (COSYNE) | inproceedings | |
| Park, I.M., Meister, M.L.R., Huk, A.C. and Pillow, J.W. | Deciphering the code for sensorimotor decision-making at the level of single neurons in parietal cortex | 2012 | Society for Neuroscience | inproceedings
(oral presentation) |
|
| Park, I.M., Nassar, M. and Park, M. | Active Bayesian Optimization: Minimizing Minimizer Entropy | 2012 | ArXiv e-prints | unpublished | arXiv code |
| Park, I.M. and Pillow, J. | Bayesian spike-triggered covariance and the elliptical LNP model | 2012 | Frontiers in Systems Neuroscience. Conference Abstract: Computational and Systems Neuroscience (COSYNE) | inproceedings | |
| Park, I.M., Seth, S., Rao, M. and Príncipe, J.C. | Strictly positive definite spike train kernels for point process divergences | 2012 | Neural Computation Vol. 24(8), pp. 2223-2250 |
article | DOI PDF |
| Li, L., Park, I.M., Brockmeier, A., Chen, B., Seth, S., Francis, J.T., Sanchez, J.C. and Príncipe, J.C. | Adaptive Inverse Control of Neural Spatiotemporal Spike Patterns with a Reproducing Kernel Hilbert Space (RKHS) Framework | 2012 | IEEE Transactions on Neural Systems and Rehabilitation Engineering Vol. 21(4), pp. 532-543 |
article | DOI |
| Li, L., Park, I., Seth, S., Sanchez, J.C. and Príncipe, J.C. | Functional Connectivity Dynamics Among Cortical Neurons: A Dependence Analysis | 2012 | IEEE Transactions on Neural Systems and Rehabilitation Engineering Vol. 20(1), pp. 18-30 |
article | DOI |
| Bobkov, Y., Park, I., Ukhanov, K., Príncipe, J.C. and Ache, B.W. | Cellular basis for response diversity in the olfactory periphery | 2012 | PLoS One Vol. 7(4), pp. e34843+ |
article | DOI |
| Archer, E., Park, I.M. and Pillow, J.W. | Bayesian estimation of discrete entropy with mixtures of stick breaking priors | 2012 | Advances in Neural Information Processing Systems (NIPS) | inproceedings | URL |
| Archer, E., Park, I.M. and Pillow, J. | Bayesian entropy estimation for infinite neural alphabets | 2012 | Frontiers in Systems Neuroscience. Conference Abstract: Computational and Systems Neuroscience (COSYNE) | inproceedings | URL |
| Seth, S., Rao, M., Park, I. and Príncipe, J.C. | A Unified Framework for Quadratic Measures of Independence | 2011 | IEEE Transactions on Signal Processing Vol. 59, pp. 3624-3635 |
article | DOI |
| Park, I., Seth, S., Rao, M. and Principe, J.C. | Estimation of symmetric chi-square divergence for point processes | 2011 | IEEE International Conference on Acoustics, Speech, and Signal Processing (ICASSP), pp. 2016-2019 | inproceedings | DOI |
| Park, I.M. and Pillow, J.W. | Bayesian Spike Triggered Covariance Analysis | 2011 | Advances in Neural Information Processing Systems (NIPS) | inproceedings | URL |
| Park, I.M., Seth, S. and Príncipe, J.C. | Spike Train Kernel Methods for Neuroscience | 2011 | Joint Statistical Meeting | conference | |
| Park, I.M., Meister, M., Huk, A. and Pillow, J.W. | Detailed encoding and decoding of choice-related information from LIP spike trains | 2011 | Frontiers in Systems Neuroscience. Conference Abstract: Computational and Systems Neuroscience (COSYNE) | inproceedings | |
| Li, L., Park, I.M., Seth, S., Choi, J., Francis, J.T., Sanchez, J.C. and Príncipe, J.C. | An adaptive decoder from spike trains to micro-stimulation using kernel least-mean-square (KLMS) algorithm | 2011 | IEEE International Workshop on Machine Learning for Signal Processing (MLSP) | conference | DOI |
| Seth, S., Park, I., Brockmeier, A.J., Semework, M., Choi, J., Francis, J. and Príncipe, J.C. | A novel family of non-parametric cumulative based divergences for point processes | 2010 | Advances in Neural Information Processing Systems (NIPS), pp. 2119-2127 | inproceedings | URL |
| Príncipe, J.C. | Information Theoretic Learning | 2010 | book | URL | |
| Park, I. and Príncipe, J.C. | Quantification of Inter-trial Non-stationarity in Spike Trains from Periodically Stimulated Neural Cultures | 2010 | IEEE International Conference on Acoustics, Speech, and Signal Processing (ICASSP), pp. 5442-5445 | inproceedings
Special session on Multivariate Analysis of Brain Signals: Methods and Applications |
DOI |
| Park, I.M. | Capturing spike train similarity structure: A point process divergence approach | 2010 | School: The University of Florida | phdthesis | |
| Paiva, A.R.C. and Park, I. | Which measure should we use for unsupervised spike train learning? | 2010 | Statistical Analysis of Neuronal Data (SAND5) | conference | |
| Paiva, A.R.C., Park, I. and Príncipe, J.C. | Inner Products for Representation and Learning in the Spike Train Domain | 2010 | Statistical Signal Processing for Neuroscience | inbook | |
| Paiva, A.R.C., Park, I. and Príncipe, J.C. | A Comparison of Binless Spike Train Measures | 2010 | Neural Computing & Applications Vol. 19, pp. 405-419 |
article | DOI |
| Li, L., Park, I., Seth, S., Sanchez, J.C. and Príncipe, J.C. | Neuronal Functional Connectivity Dynamics in Cortex: An MSC-based Analysis | 2010 | Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBS) | inproceedings | |
| Brockmeier, A.J., Park, I., Mahmoudi, B., Sanchez, J.C. and Príncipe, J.C. | Spatio-Temporal Clustering of Firing Rates for Neural State Estimation | 2010 | Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBS) | inproceedings | |
| Príncipe, J.C., Xu, J.W., Jenssen, R., Paiva, A. and Park, I. | A Reproducing Kernel Hilbert Space Framework for Information-Theoretic Learning | 2010 | inbook | ||
| Bobkov, Y., Ukhanov, K., Park, I., Príncipe, J.C. and Ache, B. | Measuring Ensemble Activity in Lobster ORNs through Calcium Imaging | 2010 | Association for Chemoreception (AChemS) Annual Meeting | inproceedings | |
| Seth, S., Park, I. and Príncipe, J.C. | A new nonparametric measure of conditional independence | 2009 | IEEE International Conference on Acoustics, Speech, and Signal Processing (ICASSP) | inproceedings | DOI |
| Park, I. and Príncipe, J.C. | Significance test for spike trains based on finite point process estimation | 2009 | Society for Neuroscience | inproceedings | |
| Park, I., Bobkov, Y., Ukhanov, K., Ache, B.W. and Príncipe, J.C. | Input Driven Synchrony of Oscillating Olfactory Receptor Neurons: A Computational Modeling Study | 2009 | Association for Chemoreception (AChemS) Annual Meeting | inproceedings | |
| Park, I., Rao, M., DeMarse, T.B. and Príncipe, J.C. | Point Process Model for Precisely Timed Spike Trains. | 2009 | Frontiers in Systems Neuroscience. Conference Abstract: Computational and Systems Neuroscience (COSYNE) | inproceedings | DOI |
| Paiva, A.R.C., Park, I. and Príncipe, J.C. | A Reproducing Kernel Hilbert Space framework for Spike Trains | 2009 | Neural Computation Vol. 21(2), pp. 424-449 |
article | DOI |
| Liu, W., Park, I. and Príncipe, J.C. | An Information Theoretic Approach of Designing Sparse Kernel Adaptive Filters | 2009 | IEEE Transactions on Neural Network Vol. 20(12), pp. 1950-1961 |
article | DOI |
| Liu, W., Park, I., Wang, Y. and Príncipe, J.C. | Extended Kernel Recursive Least Squares Algorithm | 2009 | IEEE Transactions on Signal Processing Vol. 57(10), pp. 3801-3814 |
article | DOI |
| Li, L., Seth, S., Park, I., Sanchez, J.C. and Príncipe, J.C. | Estimation and Visualization of Neuronal Functional Connectivity in Motor Tasks | 2009 | Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBS) | inproceedings | DOI |
| Dockendorf, K., Park, I., He, P., Príncipe, J.C. and DeMarse, T.B. | Liquid State Machines and Cultured Cortical Networks: The Separation Property | 2009 | Biosystems Vol. 95(2), pp. 90-97 |
article | DOI |
| Bobkov, Y., Park, I., Ukhanov, K., Príncipe, J.C. and Ache, B.W. | Population coding within an ensemble of rhythmically active primary olfactory receptor | 2009 | Society for Neuroscience | inproceedings | |
| Xu, J.W., Paiva, A.R.C., Park, I. and Príncipe, J.C. | A Reproducing Kernel Hilbert Space Framework for Information-Theoretic Learning | 2008 | IEEE Transactions on Signal Processing Vol. 56(12), pp. 5891-5902 |
article | DOI |
| Park, I. and Príncipe, J.C. | Correntropy based Granger causality | 2008 | IEEE International Conference on Acoustics, Speech, and Signal Processing (ICASSP) | inproceedings | DOI |
| Park, I., Paiva, A.R.C., DeMarse, T.B. and Príncipe, J.C. | An efficient algorithm for continuous-time cross correlogram of spike trains | 2008 | Journal of Neuroscience Methods Vol. 168(2), pp. 514-523 |
article | DOI |
| Paiva, A.R.C., Park, I., Sanchez, J. and Príncipe, J.C. | Peri-event Cross-Correlation over Time for Analysis of Interactions in Neuronal Firing | 2008 | International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC) | inproceedings | |
| Paiva, A.R.C., Park, I. and Príncipe, J.C. | Reproducing Kernel Hilbert Spaces for Spike Train Analysis | 2008 | IEEE International Conference on Acoustics, Speech, and Signal Processing (ICASSP) | inproceedings | DOI |
| Park, I. | Continuous time correlation analysis techniques for spike trains | 2007 | School: The University of Florida | mastersthesis | |
| Park, I., Paiva, A.R.C., Príncipe, J.C. and DeMarse, T.B. | An Efficient Computation of Continuous-time Correlogram of Spike Trains | 2007 | Frontiers in Systems Neuroscience. Conference Abstract: Computational and Systems Neuroscience (COSYNE) | inproceedings | |
| Park, I., Paiva, A.R.C., DeMarse, T.B., Príncipe, J.C. and Harris, J. | A Closed Form Solution for Multiple-Input Spike Based Adaptive Filters | 2007 | IEEE International Joint Conference on Neural Networks (IJCNN) | inproceedings | |
| Paiva, A.R.C., Park, I. and Príncipe, J.C. | Innovating Signal Processing for Spike Train Data | 2007 | International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC) | inproceedings | |
| Paiva, A.R.C., Rao, S., Park, I. and Príncipe, J.C. | Spectral Clustering of Synchronous Spike Trains | 2007 | IEEE International Joint Conference on Neural Networks (IJCNN), pp. 1831-1835 | inproceedings | DOI URL |
| Park, I., Xu, D., DeMarse, T.B. and Príncipe, J.C. | Modeling of Synchronized Burst in Dissociated Cortical Tissue: An Exploration of Parameter Space | 2006 | IEEE International Joint Conference on Neural Networks (IJCNN) | inproceedings | DOI |
| Park, I. and Park, J.C. | Modeling Causality in Biological Pathways for Logical Identification of Drug Targets | 2005 | Bioinfo | inproceedings | |
| Paiva, A.R.C., Park, I. and Príncipe, J.C. | Optimization in Reproducing Kernel Hilbert Spaces of Spike Trains | ? | Computational Neuroscience | inbook
(in press) |


--- layout: post title: "Invariant functors" description: "Containers that support mapping isomorphic values." date: 2022-08-01 5:49 UTC tags: [Software Design] image: "/content/binary/invariant-functor-set-diagram.png" image_alt: "Set diagram. The biggest set labelled invariant functos contains two other sets labelled functors and invariant functors." --- {% include JB/setup %}
{{ page.description }}
This article series is part of a larger series of articles about functors, applicatives, and other mappable containers. So far, you've seen examples of both co- and contravariant functors, including profunctors. You've also seen a few examples of monomorphic functors - mappable containers where there's no variance at all.
What happens, on the other hand, if you have a container of (generic) values, but it's neither co- nor contravariant? An endomorphism is an example - it's neither co- nor contravariant. You'll see a treatment of that in a later article.
Even if neither co- nor contravariant mappings exists for a container, all may not be lost. It may still be an invariant functor.
Consider a container f
(for functor). Depending on its variance, we call it covariant, contravariant, or invariant:
a -> b
can be lifted into a function f a -> f b
.a -> b
can be lifted into a function f b -> f a
.a -> b
can be lifted into a function over f a
.In general, that is. A limited escape hatch exists:
"an invariant type [...] allows you to map from
a
tob
if and only ifa
andb
are isomorphic. In a very real sense, this isn't an interesting property - an isomorphism betweena
andb
means they're already the same thing to begin with."
In Haskell we may define an invariant functor (AKA exponential functor) as in the invariant package:
class Invariant f where invmap :: (a -> b) -> (b -> a) -> f a -> f b
This means that an invariant functor f
is a container of values where a translation from f a
to f b
exists if it's possible to translate contained values both ways: From a
to b
, and from b
to a
. Callers of the invmap
function must supply translations that go both ways.
It's possible to translate the concept to a language like C#. Since C# doesn't have higher-kinded types, we have to examine the abstraction as a set of patterns or templates. For functors and monads, the C# compiler can perform 'compile-time duck typing' to recognise these motifs to enable query syntax. For more advanced or exotic universal abstractions, such as bifunctors, profunctors, or invariant functors, we have to use a concrete container type as a stand-in for 'any' functor. In this article, I'll call it Invariant
.
Such a generic class must have a mapping function that corresponds to the above invmap
. In C# it has this signature:
public Invariant InvMap(Func aToB, Func bToA)
In this example, InvMap
is an instance method on Invariant
. You may use it like this:
Invariant<long> il = createInvariant(); Invariant<TimeSpan> its = il.InvMap(l => new TimeSpan(l), ts => ts.Ticks);
It's not that easy to find good examples of truly isomorphic primitives, but TimeSpan is just a useful wrapper of long
, so it's possible to translate back and forth without loss of information. To create a TimeSpan
from a long
, you can use the suitable constructor overload. To get a long
from a TimeSpan
, you can read the Ticks property.
Perhaps you find a method name like InvMap
non-idiomatic in C#. Perhaps a more idiomatic name might be Select
? That's not a problem:
public Invariant Select(Func aToB, Func bToA) { return InvMap(aToB, bToA); }
In that case, usage would look like this:
Invariant<long> il = createInvariant(); Invariant<TimeSpan> its = il.Select(l => new TimeSpan(l), ts => ts.Ticks);
In this article, I'll use Select
in order to be consistent with C# naming conventions. Using that name, however, will not make query syntax light up. While the name is fine, the signature is not one that the C# compiler will recognise as enabling special syntax. The name does, however, suggest a kinship with a normal functor, where the mapping in C# is called Select
.
As is usual with these kinds of universal abstractions, an invariant functor must satisfy a few laws.
The first one we might call the identity law:
invmap id id = id
This law corresponds to the first functor law. When performing the mapping operation, if the values in the invariant functor are mapped to themselves, the result will be an unmodified functor.
In C# such a mapping might look like this:
var actual = i.Select(x => x, x => x);
The law then says that actual
should be equal to i
.
The second law we might call the composition law:
invmap f2 f2' . invmap f1 f1' = invmap (f2 . f1) (f1' . f2')
Granted, this looks more complicated, but also directly corresponds to the second functor law. If two sequential mapping operations are performed one after the other, the result should be the same as a single mapping operation where the functions are composed.
In C# the left-hand side might look like this:
Invariant<IntPtr> left = i.Select(f1, f1p).Select(f2, f2p);
In C# you can't name functions or variables with a quotation mark (like the Haskell code's f1'
and f2'
), so instead I named them f1p
and f2p
(with a p for prime).
Likewise, the right-hand side might look like this:
Invariant<IntPtr> right = i.Select(ts => f2(f1(ts)), ip => f1p(f2p(ip)));
The composition law says that the left
and right
values must be equal.
You'll see some more detailed examples in later articles.
This is all too abstract to seem useful in itself, so example are warranted. You'll be able to peruse examples of specific invariant functors in separate articles:
As two of the titles suggest, all functors are also invariant functors, and the same goes for contravariant functors:
To be honest, invariant functors are exotic, and you are unlikely to need them in all but the rarest cases. Still, I did run into a scenario where I needed an invariant functor instance to be able to perform a particular sleight of hand. The rabbit holes we sometimes fall into...
Invariant functors form a set that contains both co- and contravariant functors, as well as some data structures that are neither. This is an exotic abstraction that you may never need. It did, however, get me out of a bind at one time.
Next: Endomorphism as an invariant functor.
Comments
Instead of 'compile-time duck typing', I think a better phrase to describe this is structural typing.
Tyson, thank you for writing. I wasn't aware of the term structural typing, so thank you for the link. I've now read that Wikipedia article, but all I know is what's there. Based on it, though, it looks as though F#'s Statically Resolved Type Parameters are another example of structural typing, in addition to the OCaml example given in the article.
IIRC, PureScript's row polymorphism may be another example, but it's been many years since I played with it. In other words, I could be mistaken.
Based on the Wikipedia article, it looks as though structural typing is more concerned with polymorphism, but granted, so is duck typing. Given how wrong 'compile-time duck typing' actually is in the above context, 'structural typing' seems more correct.
I may still stick with 'compile-time duck typing' as a loose metaphor, though, because most people know what duck typing is, whereas I'm not sure as many people know of structural typing. The purpose of the metaphor is, after all, to be helpful.


SUFFIX
问题描述 :
A string is a list of characters containing only letter ‘a’ to ‘z’. For example: “abcdefg”, “isun” are valid strings. “rocket323” is not a valid string.
A suffix of a string suf[i] is the list of characters at positions from i to n-1 (positions are labeled from 0 to n �C 1, n is length of the string). For the string “hustacm”, suf[0] = “hustacm”, suf[1] = “ustacm”, suf[3] = “tacm”, suf[6] = “m”.
The suffix list L of a string is a permutation of numbers from 0 to n-1(n is length of the string), which satisfy the following condition:
suf[L[0]] < suf[L[1]] < suf[L[2]] < … < suf[L[n-1]].
For the string “aabac”, its suffix list is [0, 1, 3, 2, 4].
Here comes the question: Given a string S and a suffix list L, you are to change minimum number of characters of S so that the suffix list of the new string is equal to L.
输入:
There are multiple cases, for each case:
The first line is integer n representing the length of the string. (1 <= n <= 500)
The second line is the string.
The third line is a permutation of numbers from 0 to n-1.
The first line is integer n representing the length of the string. (1 <= n <= 500)
The second line is the string.
The third line is a permutation of numbers from 0 to n-1.
输出:
There are multiple cases, for each case:
The first line is integer n representing the length of the string. (1 <= n <= 500)
The second line is the string.
The third line is a permutation of numbers from 0 to n-1.
The first line is integer n representing the length of the string. (1 <= n <= 500)
The second line is the string.
The third line is a permutation of numbers from 0 to n-1.
样例输入:
3 abc 0 1 2 3 aab 2 0 1
样例输出:
0 2
#include <cstdio> #include <cstring> const int inf = 0x3f3f3f3f; int len, timeStamp; char str[555]; int rank[555], sa[555]; int f[555][26]; void upd(int &x, int y) { if ( y < x ) x = y; } int main() { while ( scanf("%d", &len) != EOF ) { scanf("%s", str); for ( int i = 0; i < len; i ++ ) scanf("%d", &sa[i]); for ( int i = 0; i < len; i ++ ) rank[sa[i]] = i; rank[len] = -1; memset(f, 0x3f, sizeof(f)); for ( int a = 0; a < 26; a ++ ) f[0][a] = a != (str[sa[0]] - 'a'); for ( int i = 0; i < len - 1; i ++ ) { int p = sa[i], q = sa[i + 1]; for ( int j = 0; j < 26; j ++ ) { for ( int k = j + 1; k < 26; k ++ ) upd(f[i + 1][k], f[i][j] + (k != str[q] - 'a')); if ( rank[p + 1] < rank[q + 1] ) upd(f[i + 1][j], f[i][j] + (j != str[q] - 'a')); } } int res = inf; for ( int a = 0; a < 26; a ++ ) upd(res, f[len - 1][a]); if ( res == inf ) printf("-1\n"); else printf("%d\n", res); } }
(adsbygoogle = window.adsbygoogle || []).push({});
Cookie____
Cookie____
Cookie____
Cookie____
Cookie____
Cookie____
Cookie____
Cookie____
不错，赞一个！
代码过于复杂了吧
这怎么用Catalan数啊？求解答！
楼主放题时候没注意下？xxx定律见：
hdoj3782：http://acm.hdu.edu.cn/showproblem.php?pid=3782
想问下computeLSPArray那里，if(len!=0) len=lps[len-1]是什么意思
原来如此 了解了
已更正。
比较基础，找些自信
纠正一个错误，二分查找树的中序遍历获得元素的升序排列。
博主的C++功底真是好
失误失误，转载错了。已经改正，抱歉。
赞一个
很有意思，可惜我很菜啊
程序员会算法，等于一个古惑仔带了zhi抢啊


Here you can read our handy guide about what to do when.
This page was written by<EMAIL_ADDRESS>for Example.
Top of page


select a play file on server Play a RDP file on server Play a VNC file on server Play a SSH file on server Play a TELNET file on server or drag and drop a play file(.rdpv、.vnc、.sshv、.telnetv)


Get insights that help your business grow.
Discover the benefits of data analytics and make better decisions regarding revenue, customer experience, and overall efficiency.
10k+
companies
314
templates
12m+
queries
Challenge by
Frontend Mentor. Coded by
Muhammad Hassaan Farooq Butt.


--- country: India date: 2016-01-01 projectUrl: http://uxassist.com title: UX Assist ---
Adit created UX Assist for iOS. It’s the first product of its kind that has grouped UX activities into 12 unique workflows based on the kind of product you’re working on, namely, an optimum viable product, minimum viable product, client-based product and a data-driven product. Each product has a different UX design lifecycle. The app gives user, task based recommendations for each product types. It will assists users in making your their own workflow based on the business requirements.


Former addict wants action against dealers
by Adam BurnsAn Alexandra man and former drug addict says he is angered by the influence of methamphetamine (P) dealers who he believes are preying on small communities.
Toni Jarvis (58) wants to consolidate support from residents in the Central Otago town and proposes a community meeting be held to tackle the issue.
"I'm not interested in stomping on people who have an addiction - they need support.

Mr Jarvis was appointed to the survivor advisory group for the Royal Commission of Inquiry into Historical Abuse in Care earlier this year, following years of abuse and drug addiction.
Central Otago sub-area supervisor Senior Sergeant Clint Wright said police were working hard to combat the issue, which was widespread.
"Like in most communities, we have noticed an increase in drug-related harm but as always we are committed to preventing and investigating drug use and drug dealing in our communities."
He said there had been a small rise in petty crime in and around Alexandra.
Hundreds of residents on a Facebook community group have praised Mr Jarvis' efforts to take the initiative on the issue.
A group administrator said the issue extended to other towns in the region, including Cromwell, Wanaka and Queenstown.
Alexandra resident Billy Te Wake (38) is a member of the Anti-P Ministry group and struggled with an addiction to the drug for many years.
"I've seen what it does, I have lived that life."
"I'm tired of seeing people burying their kids, burying their best friends, burying their family."
Central Otago Mayor Tim Cadogan expressed doubt as to whether a community meeting was the best approach.
"Having read Facebook posts on the topic lately ... such a meeting might produce a lot more heat than illumination.
"However, if the services at the forefront of this battle feel there is benefit to such a meeting I would, of course, support one."
Mr Cadogan said services for users and family members alongside community education were the key needs.


City Chooser
Theme Chooser
Masts
Rents
Transit mode
Traffic model
Distance and duration:
Geodesic distance:


|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.json.zip.BitInputStream
public class BitInputStream
This is a big endian bit reader. It reads its bits from an InputStream.
| Constructor Summary | |
|---|---|
BitInputStream(java.io.InputStream in)
Make a BitReader from an InputStream. |
| Method Summary | |
|---|---|
boolean |
bit()
Read one bit. |
long |
nrBits()
Get the number of bits that have been read from this BitInputStream. |
boolean |
pad(int width)
Check that the rest of the block has been padded with zeroes. |
int |
read(int width)
Read some bits. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BitInputStream(java.io.InputStream in)
in
- An InputStream.| Method Detail |
|---|
public boolean bit() throws java.io.IOException
bit
in interface BitReader
java.io.IOException
public long nrBits()
nrBits
in interface BitReader
public boolean pad(int width) throws java.io.IOException
pad
in interface BitReader
width
- The size of the block to pad in bits.
This will typically be 8, 16, 32, 64, 128, 256, etc.
java.io.IOException
public int read(int width) throws java.io.IOException
read
in interface BitReader
width
- The number of bits to read. (0..32)
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


'Low-lifes' steal safe and 40 bottles of spirits from Hucknall Town FC
'Any money is a loss to a club at our level,' said the club chairman
by Jamie BarlowThieves raided and smashed through the clubhouse of non-league Hucknall Town - causing thousands of pounds worth of damage.
Chairman Bob Scotney said the culprits removed a panel below a window at ground level to get in and broke several locks in a raid believed to have happened between 9pm on Monday, November 18, and 8.20am on Tuesday, November 20.
A safe from the cellar was taken, along with about 40 full bottles of spirits. Boxes of sweets, including bags of Haribo, were also stolen.
Mr Scotney, 60, said the 'old-fashioned' safe was taken using a trolley used by staff to move around barrels of beer.
"There was cash in the safe," he said. "Any money is a loss to a club at our level. It's got to be replaced."
Storage containers full of alcohol were also taken from the cellar and behind the bar at the ground in Watnall Road.
"We probably estimate in the region of 40 [bottles]," said Mr Scotney, who has been the club chairman for about four years.
"It's all branded, we don't sell any non-branded types of spirit."
The thieves only took full bottles.
The club is run by volunteers and Mr Scotney said it came as a disappointment to find "some low-lifes have caused that much damage".
Several doors were smashed and have had to be repaired.
"It will run into thousands of pounds for the damage and everything we have got to put right, even small things like padlocks."
Tills were also damaged but Mr Scotney said there was no money in them.
The club posted pictures of the damage on Facebook, with images showing smashed glass on the floor.
A club statement, published on Tuesday (November 19), read: "This is what we have walked into after a break in at the club last night.
"A safe was stolen and taken in a sack trolley along with equipment and spirits.
"Did anyone see anything suspicious between 9pm last night and 8am?
"If so please contact the club or the police."
All the damage has been repaired.
Police have launched an appeal for witnesses.
Sergeant Mark Westlake, of Nottinghamshire Police, said: “Our investigation into this burglary is ongoing, including checking for any CCTV opportunities and carrying out house-to-house enquiries."
Anyone with information which may help the investigation is asked to contact the force on 101, quoting incident 132 of November 19.
Alternatively, Crimestoppers can be contacted anonymously on 0800 555 111.
With the General Election approaching we want to give you all the results and reactions as they happen. Join our new WhatsApp service to receive breaking news alerts throughout the night by texting ELECTION to<PHONE_NUMBER>2. The first messages will go out December 12 after polls close.


Bonn
Bonn is a city on the banks of the Rhine River in the State of North Rhine-Westphalia, Germany. It was the capital of West Germany from 1949 to 1990 and the official seat of government of united Germany from 1990 to 1999. Bonn is located in the very south of the largest metropolitan area in Germany. It is the seat of two major DAX-listed German corporate players.
Even though Berlin became the capital of united Germany in 1990, Bonn stays a centre of politics and administration. Roughly half of all government jobs and many government departments and numerous sub-ministerial level government agencies remain in Bonn. In recognition of this, the former capital holds the one-of-a-kind title of Federal City ("Bundesstadt").
Bonn has developed into a hub of international cooperation in particular in the area of environment and sustainable development. In addition to a number of other international organizations and institutions, such as the IUCN Environmental Law Center (IUCN ELC), the city currently hosts 18 United Nations institutions.[2] Simultaneously, Bonn is establishing itself as a national and international centre of meetings, conventions and conferences, many of which are directly related to the work of the United Nations. A new conference centre capable of hosting thousands of participants is currently under construction in the immediate vicinity of the UN Campus.The city is home to the University of Bonn, one of Germany's most reputable institutions of higher learning. From 1597 to 1794, Bonn was the residence of the Archbishops and Prince-electors of Cologne, and is the birthplace of Ludwig van Beethoven (born 1770).


Roof
Path: CARNOT/Load/Houses/wall_floor/
Purpose
Model of a ceiling and roof.
Description
The inner heat transfer
is the same as for a ceiling.
The outer heat transfer to ambient is modeled in two parts:
- Convective heat transfer outer surface according to EN 6946
- Radiative heat transfer to the ground is limited by a view of 0.25, i.e. view
factor to the sky is 0.75 (Frohner, 2005) :
Dynamic, convective heat transfer coefficients according to: Glück B.:
Wärmeübergangskoeffizienten an thermisch aktiven Bauteiloberflächen und der
Übergang zu Basiskennlinien für die Wärmestromdichte; gi Gesundheits-Ingenieur;
128. Jahrgang 2007, Heft 1, Seiten 1-10
The roof itself is modeled by the Beuken model.
For the further description
see wall_out.
NOTE: --
Parameters and Dialog Box
Characteristics
Direct Feedthrough No
Sample
time
Inherited
from driving block
States
corresponding
to the number of nodes
Vectorized
No


What is CITE ?
What is CITE ?
CITE’s PDGM in Technology Entrepreneurship is an advanced 11 month program divided across 3 phases. It is for tech entrepreneurs and tech minded individuals seeking to launch / scale their ventures or work in the entrepreneurial eco-system such as seed funds, incubators etc.


Performs classification and variable selection on high-dimensional tensors (multi-dimensional arrays) after adjusting for additional covariates (scalar or vectors) as CATCH model in Pan, Mai and Zhang (2018) <arXiv:1805.04421>. The low-dimensional covariates and the high-dimensional tensors are jointly modeled to predict a categorical outcome in a multi-class discriminant analysis setting. The Covariate-Adjusted Tensor Classification in High-dimensions (CATCH) model is fitted in two steps: (1) adjust for the covariates within each class; and (2) penalized estimation with the adjusted tensor using a cyclic block coordinate descent algorithm. The package can provide a solution path for tuning parameter in the penalized estimation step. Special case of the CATCH model includes linear discriminant analysis model and matrix (or tensor) discriminant analysis without covariates.
| Version: | 1.0 |
| Depends: | R (≥ 3.1.1) |
| Imports: | tensr, Matrix, MASS, methods |
| Published: | 2018-05-14 |
| Author: | Yuqing Pan, Qing Mai, Xin Zhang |
| Maintainer: | Yuqing Pan <yuqing.pan at stat.fsu.edu> |
| License: | GPL-2 |
| NeedsCompilation: | yes |
| CRAN checks: | catch results |
| Reference manual: | catch.pdf |
| Package source: | catch_1.0.tar.gz |
| Windows binaries: | r-devel: catch_1.0.zip, r-release: catch_1.0.zip, r-oldrel: catch_1.0.zip |
| OS X binaries: | r-release: catch_1.0.tgz, r-oldrel: catch_1.0.tgz |
Please use the canonical form https://CRAN.R-project.org/package=catch to link to this page.


CTIE(1) CTIE(1) NAME ctie - merge or apply CWEB change files SYNOPSIS ctie -c|-m outputfile masterfile changefile... DESCRIPTION The ctie program is used to process multiple change files used with the CWEB system for literate programming. The CWEB programs allow one to apply patches to a source file (the masterfile) by means of a single change file. ctie can be used to either merge up to 32 change files into a single one or to apply the changes to the masterfile in order to create a new master file. Output of either the new change file or the patched master file goes into outputfile. Any include files (indicated using the CWEB @i command) are fully expanded during ctie processing, which means that the change files are able to modify the contents of any included files. OPTIONS -c Create a single change file from the given changefiles. -m Create a new master file by applying the given changefiles. ENVIRONMENT The environment variable CWEBINPUTS is used to search for the input files, or the system default if CWEBINPUTS is not set. See tex(1) for the details of the searching. SEE ALSO cweb(1), ctiedoc.tex, tie(1), web(1). AUTHOR Julian Gilbey<EMAIL_ADDRESS>The original TIE program was by Klaus Guntermann, TH Darmstadt, Institut f. Theoretische Informatik. The TIE man page was by Joachim Schnitter, TH Darmstadt, Phys. Chemie I, and was modified for CTIE by Julian Gilbey. Web2C 2012 7 April 2010 CTIE(1)