I spent most of the weekend working on the new wiki for Webware (http://wiki.w4py.org), which is going along with the new website (http://webwareforpython.org , or w4py.org for short). The front page design itself is still in the works, and the wiki content is still a rough translation from its former home.
You can read about the wiki itself on the This Wiki page. Key features:
I'm excited about the possibility of making the wiki the canonical location for all the Webware documentation. Much of the stuff that's already in reST form can be easily imported, and we can export the content easily as well.
Ian, I like this a *lot*. However ReST on its own is YAWML, so you might want to make a couple of modifications to it. Certainly more casual visitors to the wiki will probably appreciate being able to input both WikiNames and [[Bracketed Wiki Names]]. You could alwyas pre-process them into ReST before passing it on to the parser, and store the ReST form.
I've added a sandbox, linked to from the "This Wiki" page.
One thing I've found quite useful on some of the newer wikis that I've come across is a checkbox that allows the authors to state "this is a minor change". This allows people to come in and correct typos and whatnot without it triggering a new entry on RecentChanges which will be undetectable to the naked eye, and rather a downer when viewing the subsequent diff. It would still appear on the page history.
Other possible changes:
Viewing a diff might be nice.
Having a link to "view current version" on the bottom when viewing a history entry
Writing some docs on how to include an image would be nice.
I'll see if I can have a look at doing these in my Copious Free Time this evening...
Cool stuff. Could you provide a hourly checkout or something like this? Not everybody is already using Subversion (and Subversion under Jaguar is no fun), so it would be nice to just pull down some .tar.gz ...
Moof: I'm not a huge fan of the reST linking (i.e., `words here`_), but I'd rather keep it consistent. And I dislike implicit links like WikiName, especially since the code refers to a lot of class names, all of which look like wiki names, and it gets distracting.
For minor changes, I'm not sure -- MoinMoin has this, but all changes show up in the RSS regardless. Part of this is to allow monitoring for abuse. It would be possible to have two RSS feeds, perhaps, one that was thorough and another that wasn't.
A diff is planned. Maybe when a log message is missing it could even go in the RSS (or at least some abbreviated form).
There is a link to current version implicit, in that "View" always shows the current version. Maybe it should be named differently when you're on a historical page, though.
I'm not sure how to document reST -- repeating the reST documentation seems like a bad idea, but a really-quick introduction might be good. But maybe that should be part of reST too.
Georg: while it's not hourly, I made a checkout to my home directory: http://www.webwareforpython.org/~ianb/w4py.org/Wiki/
At some point we should put up a better code browser on the site, since the code is the whole point of the site. But that should give you something to look at for now.# Ian Bicking
Very cool. A couple of suggestions, though...
If you save the unconverted HTML in the .html files, (but with relative links to other Wiki pages as e.g. "./SomePage.html") they could actually be served statically as pure documentation. So, if the "cache" were visible directly via a webserver, you'd actually see static doc pages. But, when displayed in the Wiki, you'd have the Wiki wrapper content around the page, including edit links, etc., as long as you stripped off the '.html' in the URLs.
In other words, if you move the '_cleanHTML()' call so it occurs on data retrieved from the cache, rather than on data being put in the cache, this should work. (If you want it to go faster, you might also try using html.rfind(".)
# Phillip J. Eby
Phillip: that would still leave dangling links, which are good form for a wiki, but obviously very bad form for a static site. Plus the .html files aren't fully formed -- we strip them down to a fragment, and some information (at this point just the title) is kept separately. (Though it could conceivably be merged back in)
What's required is really an alternate template-driven publishing system that is triggered whenever a page is changed *or* when a page it links to is created or deleted. Which actually wouldn't be that much harder to do, and the result would be much more useful.
(I noticed that Zope 3 is putting .html extensions back on URLs, which I actually kind of like even if it's "bad" in theory -- it might also be nice if the wiki did the same thing, thus making the static and Webware URLs equivalent)# Ian Bicking


Isar735.github.io
What do MA, MBA, BS, MS, MSW and PhD stand for? We define each degree acronym and explain the meanings behind all the different terminology. Terminology. The degree is abbreviated PhD (sometimes Ph.D. in North America), from the Latin Philosophiae Doctor, pronounced as three separate letters PhD with Creative Dissertation. The . expected for such a project and the Department s limited resources in the area of creative writing, . Alberta, Canada Fine Performing Arts Programs Broadcast Arts, Ceramics, Costume Studies Design, Creative Art Therapies, Creative Writing, Dance Arts…to Vocal. The Malahat Review, Canada’s premier literary magazine, invites entries for its Constance Rooke Creative Nonfiction Prize.
PHD IN CREATIVE WRITING work must be of such a standard as to justify the admission of a candidate to a PhD programme in which a creative writing project.
What is Creative Writing? - Definition, Types Examples. Oxford University's Master of Studies in Creative Writing is a two-year, part-time master's degree course offering a unique combination of high contact.
The online PhD in psychology with an emphasis in cognition and instruction at GCU explores how the mind works while analyzing teaching and training methods. 22 PhDs in Creative Writing - PhDportal.com. Phd in creative writing canada.
Life requires daily acts of ingenuity and novel workarounds, so it is in everyone's interest to nurture creative impulses, regardless of one's day job. How to shake. Picturing the Project Approach Gryphon House. Campus Starter – Universities and Colleges in Canada.
Grand Canyon University's PhD in performance psychology prepares you to advance your career in sports, coaching, business and more by examining behavior modification. Amazon.com: The Creative Journal for Teens: Making Friends. Study Creative Writing at universities or colleges in United Kingdom - find 20 PhD Creative Writing degrees to study abroad.
Canadian Writing Programs – Canadian Creative Writers. To find the Divine within and help others do the same through creative expression. Every individual carries the Divine Spark within. My mission Department of English City, University of London. Specialization Program Name Faculty ; Accounting : Doctor of Philosophy in Business Administration in Accounting (PhD).
BibMe: Free Bibliography Citation Maker
The University of Calgary does not offer a degree in Creative Writing. Graduate Studies in Creative Writing. MA with Creative Thesis; PhD Calgary, Alberta, Canada. As an English teacher, I use The Creative Journal for Teens: Making Friends With Yourself for journal topic ideas even though it seems to be meant as a teen's. 20 Creative Writing PhD programmes in United Kingdom. The Whisperer is a big fan of PhD student blogging. We want to promote it as a way of doing scholarship. All of the blogs in the list below have been started Buy essay online at professional essay writing service. Order custom research academic papers from the best trusted company. Just find a great help for students Gain an Oxford qualification. From undergraduate certificates to Master's and DPhil (PhD) Flexible study. Most of our undergraduate programmes 9 Creative Writing Master s degrees in Canada.
Film Studies in Canada FSAC-ACÉC. Creative writing camps Find camps that specialize in creative writing listed below . If your child has a storytelling or writing gift you wish to encourage
What Do MA, MBA, MS, MSW and PhD Stand. Structure. A thesis (or dissertation) may be arranged as a thesis by publication or a monograph, with or without appended papers, respectively, though many graduate. Creative Writing phd/doctorate graduate and postgraduate degree programs offered by universities in Canada. Graduate Studies in Creative Writing Department of English. MSt in Creative Writing Oxford University Department. This list is incomplete - as we begin to take memberships, we will be adding institutional members to it, as well as listing other creative writing programs in Canada.
PhD with Creative Dissertation Department of English. Search for the best PhD programs in 2019 here. Save time and contact the universities directly here for your PhD Degree. Links to Film Studies and Related Programs at Colleges and Universities in Canada. BibMe Free Bibliography Citation Maker - MLA, APA, Chicago, Harvard.
Study Creative Writing at universities or colleges in Canada - find 9 Master Creative Writing degrees to study abroad. Graduate Degree Programs Graduate School PhD in Performance Psychology Graduate Degree Program.
Why Jews Support Black Causes - Interview With Kevin. Also known as 'the art of making things up,' creative writing is a vital part of modern society. This lesson will explore what makes writing. Undergraduate Diploma in Creative Writing Oxford.
UBC Creative Writing: Canada s most prestigious creative.
Creative Writing Camps Summer Camps that Encourage. The Department of English, encompasses our undergraduate English programme as well as more specialist disciplines such as Creative Writing and Publishing which. Canadian Creative Writing PhD and Doctorate Programs. Read some PhD Student blogs - Community The Thesis Whisperer.
Canada s most prestigious creative writing program. UBC offers world-class creative writing programs at the undergraduate, BFA and MFA level. Doctor of Philosophy - Wikipedia. Online PhD in General Psychology - Cognition. Ph.D. Creative Writing (On-Campus or By Distance Learning) The PhD in Creative Writing (On-Campus or By Distance Learning) from the University. Lucia Capacchione – Lucia Capacchione Ph.D., A.T.R., R.E.A.T. Why Jews Support Black Causes - Interview With Kevin MacDonald PhD. Interviews, Kevin MacDonald PhD Interviews, Zionist Agenda Articles-WHY JEWS SUPPORT. Creative Nonfiction Prize Malahat Review Writing Contest. “Picturing: The Project Approach is a much-needed practical and informative guide for teachers who are curious and excited about changing their young children’s.
PHD in Creative Writing - Wits University.


Home
Register
Gallery
Videos
Team
Speakers
Sponsors
Contact
Team
Dr. Rajendra N. Paramanik
Professor In-Charge
Piyush Chauhan
Organiser
Parth Kulkarni
Co-organiser
Finance and sponsorship
Deepa Gupta
Design and web
Vatsal Singhal
Bharadwaj Nayanar
Yash Choudhary
Hospitality
Bhavani Shushmita
Shivansh Shukla
Aparsh Gupta
Management
Atharva Ekatpure
Arohan Panda
Abhijeet Kharat
Advertising and promotion
Aswin Krishna
Yaswanth Choudhary
Planning
Vibhor Upadhayaya
R J Srivatsa


Sefu Boisrond
1804 Liberation Ave, West Palm Beach, FL 33407
ph:<PHONE_NUMBER>
email<EMAIL_ADDRESS>Obective
To become the best race car driver this team has ever had.

List of my experiences
- Astro Racer, Venus, Milky Way Galaxy...2013-2018
- Tie Fighter Pilot...2010-2013
- Mars Explorer...1986-2010
Education
Star Fleet Academy


Personal information
User Name
User Age
User Gender
Male
Female
Major
computer scince
software engineer
computer information system
other
skills


{% extends 'base.html' %} {% load humanize %} {% block breadcrumb %}
Civil engineering association, CEA, one of the oldest associations of the college proudly announces its official website.
Yes, you heard that right!
CEA, has now, its very own website. This initiative is for the benefit of our students.

This website helps you with all kinds of issues, related to academics and career guidance.
It covers all the information regarding the association as well. You can now easily look at the already implemented ideas and the future ideas to. The website also carries information about the students behind the actual work in the association.
The key things available:
1. All the magazines of CEA
2. Information about past events conducted
3. Information about the upcoming events
4. The syllabus of all the years
The Website has come up with an interesting Questionnaire section. Here you can put up all your questions, whether it is the academics or non-academics part. All professors, alumni and the present students can take part in questions and answers after logging in.
Our website also carriers messages from Head of the Department, Dr.M.Chandrasekhar, our Faculty Advisor, Dr.M.Sashi and the General Secretary of CEA, Hamsika Kali.


You can aggregate multiple web based storages and access to the content from one place. Currently supported storage providers: B2DROP, DROPBox, any service providing WEBDAV endpoint. Settings
You can browse files from all registered providers from one place. Clicking on a file will open it's content in second panel: These tools are integrated: Litemol viewer visualizes file with "pdb" or "ent" extension. Dataset and PDB components viewer - if you click on "Dataset" tab. File Manager
You can access the files directly using WEBDAV protocol.
1. step, pick a folder:VF dir
2. click or copy this folder URL:
URL generated by this widget allows access to the resources, datasets and files without any other authentication mechanism. Use it to fulfil only your tasks. All generated URLs expire next calendar month after creation.
Use File picker to generate individual WEBDAV capable links to individual files or directories.
Follow documentation to integrate file picking or directory picking into your web application.


ally-financial
Businessmodel of Ally Financial
Customer Segments
Ally Financial provides a range of financial products and services to a broad customer base, which principally comprises customers across the following segments:
- Consumers, providing personal auto finance and leases, business auto finance and lease, and specialty vehicles to general consumers, primarily the customers of its auto dealerships clients;
- Automotive Dealers, providing dealer loans and wholesale inventory financing to various automotive dealerships and sales outlets; and
- Other Commercial Entities, comprising other commercial enterprises to which the Company provides insurance services. Ally Financial’s three operating segments serve a domestic customer base, with operations across Texas, California, Florida, Pennsylvania, Illinois, Georgia, North Carolina, Ohio, New York, and Michigan accounting for more than 50% of the Company’s automotive and mortgage businesses.
Value Propositions
Ally Financial provides value to its customers in the following ways:
- Its technical expertise and experience, with the Company employing highly-trained specialist personnel across its three operating segments, with a team of experienced industry executives;
- Its broad portfolio of products and services, with the Company offering a broad range of financing and insurance options to automotive dealers and their customers across the US;
- Its incentive and rewards programs, with the Company implementing its Ally Dealer Rewards program, which provides various incentives to eligible dealers for selling or using qualifying Ally Financial products and services; and
- Its close relationships with dealer customers, with the Company working closely with its dealer customers, many of which use four or more Ally Financial products, and providing a targeted messaging program that helps dealers communicate readily with their customers. ### Channels
Ally Financial operates a website at www.ally.com, through which it provides information on its various products, services, and activities. The Company also operates an online dealer portal through its website that allows customers to access certain services, tools, and communications functions. The Company’s auto financing and banking arms also offer online services that enable customers to make payments and manage accounts online, as well as through mobile applications on iOS and Android platforms, over the phone and by post.
Ally Financial also serves its customers through its own network of offices, through which the Company’s specialist sales and service personnel operate. This includes principal corporate offices in Detroit, Charlotte, and New York; primary offices for its dealer financial services operations in Detroit and Southfield; and primary offices for its mortgage operations are located in Fort Washington and Charlotte.
Ally Financial’s dealer customers also serve as an affiliate network, through which the Company is able to provide additional products and services to consumers. This includes more than 17,500 dealers in the US, including close to 11,000 dealers outside of the Company’s General Motors Company and Fiat Chrysler Automobiles dealer channels.
Customer Relationships
Ally Financial provides its customers a range of self-service offerings across its banking and auto financing units. The Company’s dealer portal enables dealer customers to access certain services and tools without interacting with members of the Company’s sales and support staff. Ally Financial also provides digital channels to consumers, who are able to manage accounts and make payments autonomously online and via mobile.
Ally Financial’s sales and service teams work closely with its dealer customers, working together to serve general consumers, and with the Company providing tools to support dealer operations. The Company seeks to establish longstanding relationships in this way, with a view to recurring long-term recurring business.
Ally Financial provides a range of ongoing support services to its customers. It offers a suite of online resources, such as FAQs and guides, and provides contact details for its various operating units. Customers are able to contact support staff directly and receive personalised responses to queries and enquiries. Customers are also able to interact directly with the Company through its social media accounts, including with Facebook, Twitter, Google+, and YouTube.
Key Activities
Ally Financial operates as a financial holding company and a banking holding company.
The Company’s operations are organised into three business segments: Automotive Finance operations, including the provision of automotive financing services to consumers and automotive dealers; Insurance operations, which offers both consumer financial and insurance products through its automotive dealer network, as well as commercial insurance products directly to dealers; and Mortgage operations, which includes the management of its held-for-investment mortgage loan portfolio and the execution of bulk purchases of income mortgage loans originated by third parties.
The Company also operates a banking subsidiary, Ally Bank, which provides various internet, telephone, mobile, and mail banking market services.
Key Partners
Ally Financial works in conjunction with numerous businesses and organisations across its multiple business segments. These partners include:
- Supplier and Vendor Partners, comprising suppliers of tools, services and resources, as well as companies to which certain non-technical functions can be outsourced;
- Channel and Distribution Partners, principally comprising the Company’s network of dealer customers, through which the Company serves a large consumer base; and
- Strategic and Alliance Partners, comprising various companies and organisations with which the Company shares resources and collaborates on joint projects. Ally Financial is a preferred lender of General Motors and Chrysler, the dealerships of which serve effectively as affiliates of the Company. The Company has also established an auto financing partnership with Aston Martin and has agreed a deal with Beepi to provide financing for used cars bought online.
Key Resources
Ally Financial’s key resources are its financial resources, its IT and communications infrastructure, its online and mobile platforms, its intellectual properties, its sales and distribution networks, its partnerships, and it personnel.
Ally Financial owns and leases a number of properties across the US, principally corporate and sales offices for its operating segments and divisions. This includes almost 800,000 square metres of office space across Detroit, Charlotte, New York, Southfield, and Fort Washington.
Cost Structure
Ally Financial incurs costs in relation to the maintenance of its IT and communications infrastructure, the development and maintenance of its online and mobile platforms, the implementation of advertising and marketing campaigns, the operation of its sales and distribution networks, the payment of professional and vendor fees, the management of its partnerships, and the retention of its personnel.
In 2015 Ally Financial’s largest expense related to the payment of salaries and benefits to its workforce of employees, which amounted to $963 million. Other operating costs – including occupancy fees, professional services, advertising and marketing, technology and communications, and regulatory and licensing fees – totalled $1.51 billion.
Revenue Streams
Ally Financial generates revenue primarily through the provision of auto financing services, principally in the form finance charges or lease payments and fees paid by customers on the retail contracts and leases. The Company also derives revenue through fees and premiums associated with its insurance, mortgage, and banking services and products.
In 2015 Ally Financial generated total annual net revenue of $4.85 billion, up on the $4.65 billion recorded by the Company in 2014. The majority of the Company’s revenue was attributed to its automotive financing operations, which accounted for $3.66 billion in revenue for the year. Its insurance operations generated $1.09 billion in revenue, with mortgage and other revenue amounting to $212 million.


Role: Preproduction, Programmer
Framework: XNA
Team Tyro is a Stealth Puzzle game with tile based movement.
Players guide their characters from level to level by placing, turning, and removing directional tiles.
Team Tyro uses a special optimized method to detect which tile the mouse is over for tile placement.
Rather than compare the mouse's position to every tile, a simple algorithm is used once to convert the mouse's position to a tile index.


{% load staticfiles %}
Enter your username and password to log on:
Fill in the form below to get instant access:


This file is rendered when you are logged in, but don't have permission to view this page.
See your session information to see your identity.


| Constructor and Description |
|---|
ArrayBid.Builder(MarketBasis marketBasis)
Constructor to create an instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
ArrayBid |
build()
Makes sure the whole array is filled, then creates the ArrayBid with the Builder's internal values.
|
ArrayBid.Builder |
demand(double demand)
Adds a demand
double to builderDemand. |
ArrayBid.Builder |
demandArray(double... demand)
Sets the demandArray with the supplied demand array.
|
ArrayBid.Builder |
fillTo(int priceStep)
fills the demand array from the nextIndex until the designated priceStep with the last set demand Will do
nothing on an already filled array.
|
public ArrayBid.Builder(MarketBasis marketBasis)
marketBasis
- the MarketBasis
of the cluster.public ArrayBid.Builder demand(double demand)
double
to builderDemand.demand
- The demand to be added to the demand array. Must not be higher than the previous added demand.java.lang.IllegalArgumentException
- when the demand to be added is higher than the demand already in the arrayjava.lang.ArrayIndexOutOfBoundsException
- when the demand array is already fullpublic ArrayBid.Builder demandArray(double... demand)
demand
- The new demand arrayjava.lang.IllegalArgumentException
- if the size of the array differs from the number of priceSteps in the MarketBasis or if the
demand array is ascendingpublic ArrayBid build()
java.lang.IllegalArgumentException
- When the length of the demandArray is not equal to the number of price stepspublic ArrayBid.Builder fillTo(int priceStep)
priceStep
- The priceStep to fill to.java.lang.IllegalStateException
- when nextIndex is zero (no demand has been set, yet)java.lang.IllegalArgumentException
- when the supplied priceStep is higher than the number of price steps in the marketBasis


----------------------------------------------------------------------- Release Notes for ArchStudio 3 Builds ----------------------------------------------------------------------- TABLE OF CONTENTS I. KNOWN ISSUES II. CLASS LOADING ISSUES III. MISCELLANEOUS FAQs ----------------------------------------------------------------------- I. KNOWN ISSUES ----------------------------------------------------------------------- ---------- ISSUE ID: 0001 OVERVIEW: Problems with incorrect types on elements when running with an old ArchStudio build. ISSUE: If you are running an ArchStudio 3.0 build older than 1012, some elements in documents created or edited with a build > 1012 may appear to be the wrong XML Schema (XSI) type in ArchEdit, along with other problems. No exceptions or other indication of the problem is generally given. WORKAROUND: Upgrade to latest build. REPRTD BY: Rob Egelink<EMAIL_ADDRESS>STATUS: Closed, not a bug. ----------- ISSUE ID: 0002 OVERVIEW: Possible Event Dispatch Thread (AWT thread) deadlock when two GUIs communicate via EPC (Event-based Procedure Call). ISSUE: There is a very subtle threading issue that can cause a deadlock in the Event Dispatch Thread, also known as the AWT thread, that processes AWT and Swing events, when two communicating GUIs in separate components interact via the Event-based Procedure Call (EPC) mechanism. This situation occurs in the following case: Consider two components with GUIs, C1 and C2. The user performs an action on the GUI in C1, causing the AWT thread to call a listener function. For example, the user selects a menu item, causing the AWT thread to call the menu item's ActionListener's actionPerformed() function. In the programming for this function, an event-based procedure call is made to component C2. C2 receives this EPC and, in response to it, makes a call that results in C2's thread blocking, waiting for the AWT thread to perform some action (e.g. popping up a modal dialog like a JOptionPane). In this case, the system will deadlock. The AWT thread is blocked waiting for C2 to complete the EPC and return. C2's thread, processing the EPC, is blocked waiting for the AWT thread to process some data. After investigation, we have determined that this behavior cannot be entirely solved by a workaround hidden entirely in the EPC mechanism, and that this is a fundamental problem in building event-based, independent components using AWT or Swing. Basically, each component assumes (because of event-based architecture style rules) that it has its own independent thread of control and that it cannot be affected by things going on in other components. ArchStudio and the underlying C2 framework both try to create this illusion as much as possible. However, in this case there is communication between two components "under the covers"--that is, the existence of only a single AWT thread shared by all components causes this problem. This cannot be remedied by the framework, since the control of AWT thread creation and maintenance is handled almost entirely by the JVM implementation. JVM implementers are free to use a multi- threaded AWT threading policy, but many (including Sun) choose not to. WORKAROUND: In this case, the best way to handle the deadlock is to release control of the AWT thread before actionPerformed() in C1 returns. This is possible if the call is proxied off to a separate thread. So: AWT Thread->(calls)->actionPerformed(); actionPerformed() passes its work to delegate thread T actionPerformed() returns immediately, freeing AWT thread. T processes actionPerformed()'s work separately. Unfortunately, this requires changes to the code of the calling component C1. Instead of adding a standard ActionListener, it must add a special ActionListener that is able to delegate its work to another thread. For this workaround, a new class in the c2.fw framework was created to make this much easier. So, in the very limited case where the AWT thread calls a listener that makes an EPC to another component that will block until the AWT thread processes its event queue, replace the call of this form: someObject.addXXXListener(l); with a call of this form: someObject.addXXXListener((XXXListener) c2.pcwrap.ThreadInterfaceProxyFactory. createThreadInterfaceProxy(l, XXXListener.class) ); All calls to the Listener's methods will now be delegated to a separate thread, unless they return a value (in which case the calling AWT thread must wait for the results and this workaround will fail; however, all known AWT listeners to date have methods that return void). REPRTD BY: Rob Egelink<EMAIL_ADDRESS>STATUS: Closed, issue description and fix/workaround available. ----------- ISSUE ID: 0003 OVERVIEW: Possible NullPointerException in serialize() call to XArchFlatInterface, or a getPrettyXmlRepresentation() call to the data binding library ISSUE: If your application inserts "null" data into an attribute or element in the XML tree, a call to serialize() can possibly throw a NullPointerException originating from the internal Xalan implementation in Java 1.4. The console output will be listed as something like this: This shouldn't happen. java.lang.NullPointerException at org.apache.xml.utils.TreeWalker.dispatachChars(TreeWalker.java:259) at org.apache.xml.utils.TreeWalker.startNode(TreeWalker.java:403) at org.apache.xml.utils.TreeWalker.traverse(TreeWalker.java:167) at org.apache.xalan.transformer.TransformerIdentityImpl.transform(Tra nsformerIdentityImpl.java:325) at edu.uci.isr.xarch.XArchUtils.getPrettyXmlRepresentation(Unknown Source) at c2demo.klax.Description.getXml(Description.java:245) at c2demo.klax.Description.main(Description.java:35) WORKAROUND: Don't put null data in the XML tree; it's not allowed anyway. REPRTD BY: Santiago Ca Hung Li<EMAIL_ADDRESS>STATUS: Closed, not a bug. ----------- ISSUE ID: 0004 OVERVIEW: Exiting ArchStudio 3 causes STOP error (Blue Screen of Death) on some Windows machines with ATI video cards. ISSUE: Exiting ArchStudio 3 can sometimes cause a STOP error or a complete system hang requiring a hard-reset. This occurs only on Windows machines with ATI video cards, most notably Radeon video cards. This also occurs only with JDK 1.4.1. This is a bug in the ATI video drivers that is exercised in JDK 1.4.1 and 1.4.1_01, not a bug in ArchStudio 3. Sun engineers have built a workaround that will be released in JDK 1.4.1_02, due out sometime in late Feb. 2003. The latest ATI drivers for DESKTOP MACHINES ONLY also seem to fix this issue. Note that this problem affects most other Java Swing applications and other non-Java applications as well. WORKAROUND: Upgrade to JDK 1.4.1_02, upgrade ATI video drivers, or run ArchStudio 3 with the following command line switch: java -Dsun.java2d.noddraw=true archstudio.Bootstrap ... REPRTD BY: Eric Dashofy<EMAIL_ADDRESS>STATUS: Closed, bug in infrastructure. ----------- ----------------------------------------------------------------------- II. CLASS LOADING POLICY ----------------------------------------------------------------------- The intent of c2.fw and ArchStudio 3 was always to compartmentalize class loading as much as possible. That is, each instance of an application would basically be loaded in its own ClassLoader. Automatic dynamic class reloading within a running application is a future goal, but is not supported now. There are many thorny issues involved there, such as reloading classes where instances already exist. We may eventually allow automatic or forcible class reloading at the level of individual bricks someday. Previous (<1039) ArchStudio 3 releases included custom ClassLoaders like SimpleClassLoader and NetClassLoader (not used) that had reloading code in them, but this code was never exercised for a variety of reasons. The Post-Java-1.2 Classloading model is not well-understood by, well, anybody. Available examples of classloading are incorrect and buggy. Even correct implementations elide critical details: namely, classes loaded in one classloader don't play nicely with classes loaded in other classloaders (including the default classloader). The best article I have found explaining this difficulty is at: http://forum.java.sun.com/thread.jsp?forum=4&thread=169232 Basically, this means that a foo.bar.Foobar loaded by classloader A is not an instanceof a foo.bar.Foobar loaded by classloader B in general. There are useful exceptions, however, based on the classloader delegation model. A classloader's loadClass method can choose to either load the class itself or call a parent (or the system) classloader to load the class for it. Classes loaded by the classloader itself are *different* than those loaded by a delegate classloader, in that classes loaded by the delegate live in the delegate's world and classes loaded by the main classloader live in the main classloader's world. So, for example: Class B extends Class A Class main is the main program and is loaded by the system classloader. Class main creates a new CustomClassLoader, which loads class B. Since B depends on A, CustomClassLoader tries to load class A too, but CustomClassLoader decides not to, and instead delegates this to the system classloader. So now we have Class main and Class A loaded by the system classloader, and class B loaded by the CustomClassLoader. It turns out that, as far as class main is concerned, class A isAssignableFrom class B. This is not normally the case, but it means that Class main can call methods on class B indirectly through its life as an extension of Class A. We use this to our advantage in new builds of ArchStudio. The new ClassLoaders will, when instantiating an application, delegate the loading of any class starting with "java.", "javax." or "c2.fw." to the system class loader. This includes interfaces like Brick and MessageProvider and such. It loads all other classes, like component classes, using a SimpleClassLoader. Because c2.fw makes all calls to Bricks through the Brick interface, the classes are compatible. This gives special privilege to classes in the "c2.fw." "namespace," however. So, if you are a component developer who wants your component to implement a new interface that is called from the framework (i.e., from outside the architecture), you need to put the interface definition in package c2.fw (or a subpackage) when changing the framework, otherwise you'll get ClassCastExceptions and such. Note that this should affect almost no users or developers, but is documented here just in case some brave soul attempts to extend the framework itself. ----------------------------------------------------------------------- III. MISCELLANEOUS FAQs ----------------------------------------------------------------------- Q001: Why is that editor called "Archipelago?" A001: According to dictionary.com, an archipelago is "Any sea or broad sheet of water interspersed with many islands or with a group of islands." ("Archipelago" may also refer to the island group itself). We felt that the name archipelago reflected several salient qualities of the editor. First, it's a word that starts with "arch," carrying the "architecture" connotation. Second, it describes the internal structure of the editor itself--Archipelago is composed of a group of loosely connected plugins rather than one monolithic mass of code. Third, it describes the typical diagrams edited by Archipelago--namely, diagrams of loosely connected blocks that resemble a sea populated by islands. Q002: How do you pronounce "Archipelago?" A002: Archipelago is an ordinary English word, its proper pronunciation is roughly "ark-ih-PEL-uh-go." Q003: Does ArchStudio really reticulate splines? A003: Yes. -----------------------------------------------------------------------


--- layout: archive title: Zulip Chat Archive permalink: /stream/113488-general/topic/Tactic.20to.20no.20tactic.html ---
Is there an easy way to re-write the last function without using tactic?
section parameters (p : Prop) [decidable p] def cnd₁ : Prop := sorry def cnd₂ : Prop := sorry def check : Prop := if p then cnd₁ else cnd₂ def f₁ (c:cnd₁) : nat := sorry def f₂ (c:cnd₂) : nat := sorry def f (c:check): nat := -- if p then f₁ cnd₁ else f₂ cnd₂ begin by_cases p ; simp [check,h] at c, exact f₁ c, exact f₂ c, end end
theorem check_of_p (h : p) : check ↔ cnd₁ := iff_of_eq (if_pos h) theorem check_of_not_p (h : ¬ p) : check ↔ cnd₂ := iff_of_eq (if_neg h) def f (c:check) : nat := if h : p then f₁ ((check_of_p h).1 c) else f₂ ((check_of_not_p h).1 c)
Thank you, if_pos
and if_neg
are what I was looking for.
def f' (c:check): nat := if h:p then f₁ (eq.mp (if_pos h) c) else f₁ (eq.mp (if_neg h) c)
Nima beats Mario
I wrote it that way for a reason. You should not rely on definitional expansion in this way as it is brittle. The point of the lemma is to isolate the unfolding of check
so that this isn't happening in an ambiguous context
The usage of iff
is by convention since these are propositions
Last updated: Apr 24 2020 at 19:02 UTC


class: center, middle # Deploying Applications w/ Docker ## A _(very brief)_ Introduction BLN (aka Brian Lloyd-Newberry) @brianln ** Hit P for the presentation notes ** --- name: who # Who? ## Brian Lloyd-Newberry * Enterprise Architect @ Dealer.com (A Dealertrack Technologies Solution) * 16+ years of getting paid for building software (Woot!) * Wide range of experience including SysAdmin, Programming, Management and now Full Time Architecture ??? Enjoy being a Dad, 3D Printing, Cycling and geeking out with my Son. Love being in VT, grew up in "Midstate" and am happy to be able to raise a family here! Worked locally at VSAC for 5.5 years and at DDC for almost 5. --- name: why class: middle, center # Why are we here? ![Docker Whale](https://d3oypxn00j2a10.cloudfront.net/0.9.0/img/homepage/docker-whale-home-logo.png "The new application deployment hotness.") ??? Why? * Docker is the "new hotness" in application management. * Learn about what Docker is, and some ways that apps can be deployed in it today (and tomorrow). * Not a deep dive into all of Docker, just give you a taste. * Talk about where Docker is going * What will be the role is in the IaaS & PaaS workspace * How many people have * Heard about Docker? * Played with Docker? * Use Docker today in their work/play? --- name: roadmap # Roadmap: * What is Docker? * A Mental Model (Show Me!) * Escaping one host * Using Docker today --- name: whatisdocker # What is Docker? ## Engine for deployment of applications * Client & Server * [APIs](http://docs.docker.com/reference/api/docker_remote_api/ "Docker REST API") * [Command Line Interface](http://docs.docker.com/reference/commandline/cli/ "Docker CLI") * [Registry](https://registry.hub.docker.com/ "Common Registry for Docker Images") for management and sharing of "images" -- ## "virtualized" execution environment * Image format & Filesystem Abstraction * Linux Containers ??? * Achieve many of the same goals as Virtualization * without the overhead/cost * with more risk? * Lots of tooling written in Go --- # Docker Container Pieces .left-column[ * Execution Driver * libcontainer * LXC * ... * Linux CGroups * Kernel Namespaces * Image ] .right-column[ ![Shipping Containers](http://photos.adron.me/Software/Software-Development/Docker-Virtual-Machines/i-jT3FfMR/0/S/photodune-1719153-container-l-S.jpg "Consistent API for Shipping Code") ] ??? * Not Virtualization * VMWare is very interested/involved in the community * Many times containers are run in VMs to achieve higher isolation (w/ some cost) * CGroups * Kernel Level * Groups processes * Controls resource allocations: CPU, Memory, Network, Disk * Can be layered/nested * Kernel Namespaces * Control what you can do * Restrict the "view" of the system * Docker has defaults * Can be layered/nested * Docker Image * A package of "tarballs" * Can be hierarchical * Ends up being built as a layered - copy on write filesystem * Linux containers and CGroups have [been in the linux kernel since 2007] (http://www.quora.com/What-is-the-history-of-control-groups-and-Linux-Containers-in-the-Linux-kernel). * FreeBSD Jails have been [since 4.x](https://www.freebsd.org/doc/handbook/jails.html#jails-synopsis) ([2000-2005](http://en.wikipedia.org/wiki/History_of_FreeBSD#FreeBSD_4)) --- # Docker Filesystem ![Multiple Containers running in Docker](http://docs.docker.com/terms/images/docker-filesystems-busyboxrw.png) ??? * BootFS * Layer on Images * Writable container on top (copy on write) --- # A Mental Model (Show Me) * One container * Docker CLI - Crash Course * Multiple Containers - Volumes * Multiple Containers - Linking * Multiple Containers example w/ Fig --- name: docker_hello_world # One Container - Running a shell in Docker ```sh # Run bash on ubuntu (-i interactive -t tty) * $ docker run -i -t --rm ubuntu /bin/bash ``` #### Wait for it to build... (the first time) ``` Unable to find image 'ubuntu' locally Pulling repository ubuntu 96864a7d2df3: Download complete 511136ea3c5a: Download complete bfb8b5a2ad34: Download complete c1f3bdbd8355: Download complete 897578f527ae: Download complete 9387bcc9826e: Download complete 809ed259f845: Download complete ``` #### There we go! ```sh root@c6f2dad31651:/# echo Hello World from $(hostname) Hello World from c6f2dad31651 root@c6f2dad31651:/# exit exit $ ``` ??? docker run -i -t --rm ubuntu /bin/bash echo hostname ps uname -a uptime exit * --rm means throw the container away when we exit. --- name: crash_using_images # Crash Course - Using Images Pre-built images that you can use to run Images are conceptually "tarballs" that contain the "layers" that will make up the container. ## Commands: * docker images * docker pull [imagename] * docker search [imagename] ??? * Docker images shows you images you have on your Docker host to work with. * Docker pull allows you to pull specific images to your docker host (work offline or avoid bottleneck down the road) * Search looks at the registry and finds stuff. --- name: crash_registries # Crash Course - Registries Registries manage images. They can be widely shared, or closely held. * Public registry * [Docker Hub](https://registry.hub.docker.com/) * private registry * [Run your own in Docker](https://github.com/docker/docker-registry) * [Quay](https://quay.io/) * docker login ??? * docker run -p 5000:5000 registry * No Demo of registries (for now) --- name: crash_building_images # Crash Course - Building Images * Manually * Start an image w/ bash * Run commands * Maybe use salt, ansible, chef, puppet, ... * docker commit * Dockerfile * The way (we are going) to do it... ??? * Building images is similar to the concept in Vagrant. * You can use configuration management, but that leads down the way to multi-purpose pain if you are not careful * Don't think of containers as VMs... * You should try for single purpose containers * Dockerfiles make building "re-usable", in the same way that configuration management systems do. --- name: crash_dockerfiles # Crash Course - [Dockerfile](https://docs.docker.com/reference/builder/) ```sh FROM centos MAINTAINER Brian Lloyd-Newberry
ENV REFRESHED_AT 2014-09-18 WORKDIR /tmp # Add a Pre-download the jdk8 JVM so we can do an offline demo ADD jdk-8u11-linux-x64.tar.gz /opt/java ENTRYPOINT ["/opt/java/jdk1.8.0_11/bin/java"] CMD ["-version"] ``` ??? * FROM derive from a base image * MAINTAINER * ENV set an environment variable in the container * Can pass ENVs in at runtime as well * ADD import files (and explode tar/zip/etc) * ENTRYPOINT what program to run * CMD what parameters to pass to entrypoint --- name: crash_creating_bln_centos_jvm # Crash Course - Images from Dockerfiles docker build [-t tagname] pathspec ```sh $ docker build -t bln_centos_jvm . Sending build context to Docker daemon 159 MB Sending build context to Docker daemon Step 0 : FROM centos ---> 70214e5d0a90 Step 1 : MAINTAINER Brian Lloyd-Newberry
---> Using cache ---><PHONE_NUMBER>4a Step 2 : WORKDIR /tmp ---> Using cache ---> 0eb1d0ffc672 Step 3 : RUN yum install -y tar ---> Using cache ---> dfe513cc9dd0 Step 4 : ADD jdk-8u11-linux-x64.tar.gz /opt/java ---> Using cache ---> 6ef0e7bfb1a8 Step 5 : ENTRYPOINT ["/opt/java/jdk1.8.0_11/bin/java"] ---> Using cache ---> 958c2dbda7aa Step 6 : CMD ["-version"] ---> Using cache ---> 475aafbc4fda Successfully built 475aafbc4fd ``` ??? ## Running the example * cd centos-jvm * ./pulljava.sh * docker build -t bln_centos_jvm . ## What it does * It will read the Dockerfile from the local directory (. is the pathspec here) * Pushes local context (i.e. directory context) to the Docker server * "Packages" up each step to construct an image w/ the tag of bln_centos_jvm (so we can find it) --- name: crash_running_bln_centos_jvm # Crash Course - Running our new Image docker run [imagespec] [args] ```sh * $ docker run bln_centos_jvm java version "1.8.0_11" Java(TM) SE Runtime Environment (build 1.8.0_11-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.11-b03, mixed mode) ``` ** How is this useful?** ??? * docker run bln_centos_jvm -help * Doesn't really do anything, but it is a great **BASE IMAGE** for JVMs * Docker containers can inherit from other containers * Let's do that. --- name: springboot class: middle, center # Requisite [Spring Boot](http://projects.spring.io/spring-boot/) Application... ## (plus Docker) java -jar something.jar Build and run an endpoint that records url hits (i.e. a pixel server) --- name: simplepixel_demo # Run a simple pixel server that just logs Checkout the __redispixel__ branch ```sh # Build and run the pixel on my local machine cd pixel git checkout simplepixel gradle build # Run it locally java -jar build/libs/docker-pixel-0.0.1-SNAPSHOT.jar ``` -- ### What are the problems with doing this? * Environment setup! ??? Buidling a simple pixel server that just logs what you hit it with. --- name: pixeldockerrun # Dockerfile for executable jar ```sh FROM bln_centos_jvm MAINTAINER Brian Lloyd-Newberry
ADD build/libs/docker-pixel-0.0.1-SNAPSHOT.jar /opt/jars/ CMD ["-jar", "/opt/jars/docker-pixel-0.0.1-SNAPSHOT.jar"] ``` ??? * Throw in our newly minted jarfile * Override the CMD to say run the jar -- ### Build and run the image ```sh docker build -t bln_java_pixel . docker run -p 8888:8080 bln_java_pixel ``` -- ### Build and run the image in the background ```sh docker run -p 8888:8080 -d bln_java_pixel docker logs -ft bln_java_pixel ``` ??? * 8888 will be the port that our application will be exposed externally on * Mapped internally to 8080 Test url: * Get the IP address of our Docker host, and construct a URL to our service * echo "http://$(boot2docker ip 2>/dev/null):8888/" * Run some fake pixel traffic against our server * ./streampixels.py "http://$(boot2docker ip 2>/dev/null):8888/" Inspect images * docker inspect imagespec --- name: pixeldockerredis_start class: middle,center # Example w/ a dependency ### Spring Boot pixel server ### Publishing messages to Redis Go to https://registry.hub.docker.com/ and [search for redis](https://registry.hub.docker.com/_/redis/) --- name: pixeldockerredis_buildredis # Running a Redis container ```sh > docker run --name pixel-redis -d redis 18aca2c9904d856b2745973d2f47cc3cf14d1a0c87d0083e1d19bca0ac9dcfb6 > docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 18aca2c9904d redis:latest "redis-server" 25 hours ago Up About a minute 6379/tcp pixel-redis > docker run -it --link pixel-redis:redis --rm redis sh -c 'exec redis-cli -h "$REDIS_PORT_6379_TCP_ADDR" -p "$REDIS_PORT_6379_TCP_PORT"' <IP_ADDRESS>:6379> ``` ??? ### Run the redis server docker run --name pixel-redis -d redis ### Run the redis CLI connecting to the redis server (as a disposable VM) docker run -it --link pixel-redis:redis --rm redis sh -c 'exec redis-cli -h "$REDIS_PORT_6379_TCP_ADDR" -p "$REDIS_PORT_6379_TCP_PORT"' NOTE: This is not persistent. Need to use a [volume](https://docs.docker.com/userguide/dockervolumes/). --- name: pixeldockerredis_buildpixel # Rebuilding the pixel application image for redis Checkout the __redispixel__ branch ```sh # Build the image docker build -t bln_java_pixel_redis . # Run the application hitting the new pixel server docker run --link pixel-redis:redis -p 8889:8080 -d bln_java_pixel_redis docker logs -ft bln_java_pixel_redis ``` [Linking containers](https://docs.docker.com/userguide/dockerlinks/) is an important concept. ??? ```sh # Build and run the pixel on my local machine cd pixel git checkout redispixel gradle build # Run it docker build -t bln_java_pixel_redis . docker run --link pixel-redis:redis -p 8889:8080 -d bln_java_pixel_redis docker logs -ft bln_java_pixel_redis ``` --- name: pixel_redis_wrapup # Watching pixel redis in action ```sh docker run -it --link pixel-redis:redis --rm redis \ sh -c 'exec redis-cli -h "$REDIS_PORT_6379_TCP_ADDR" \ -p "$REDIS_PORT_6379_TCP_PORT"' SUBSCRIBE pixel ``` ??? * Show Java code * Spin up temp redis image * docker run -it --link pixel-redis:redis --rm redis sh -c 'exec redis-cli -h "$REDIS_PORT_6379_TCP_ADDR" -p "$REDIS_PORT_6379_TCP_PORT"' * SUBSCRIBE pixel --- name: fig # Linking is complicated... ## http://www.fig.sh/ ```yaml web: build: . command: python app.py links: - db ports: - "8000:8000" db: image: postgres ``` ??? * Fig is one of several tools that provides a meta-manifest * YAML based * Again, there are lots of projects out there. --- name: escaping_one_host class: center, middle # Escaping one host Kubernetes Mesos/Marathon CoreOS IaaS and PaaS providers and solutions Panamax --- name: kubernetes class: center, middle # Kubernetes ## https://github.com/GoogleCloudPlatform/kubernetes ??? * Master & Minions * Pods & Services * On top of etcd * http://www.slideshare.net/rajdeep/introduction-to-kubernetes --- name: mesos_marathon class: center, middle # Mesos & Marathon ## https://github.com/mesosphere/marathon Also: https://mesosphere.io/learn/ ??? * Mesos is cluster manager - twitter, etc * Marathon is "cluster wide init and control system" * Marathon provides a load balancer config for HAProxy across the containers it deploys * Strong API for management * https://github.com/mesosphere/playa-mesos --- name: coreos class: center, middle # CoreOS ## https://coreos.com/ ??? * Everything is a container * A cluster from the start using fleet (distributed init system) * Commercial support available * Built out of ChromeOS --- name: iaas_paas class: middle, center # IaaS and PaaS providers OpenStack CloudFoundry Microsoft Azure Google Cloud Engine AWS Elastic Beanstalk ??? * OpenStack has a [hypervisor driver](https://wiki.openstack.org/wiki/Docker) for Docker in Nova Compute * Cloud Foundry has [Decker](http://www.cloudcredo.com/decker-docker-cloud-foundry/) * [Azure running Kubernetes](http://azure.microsoft.com/blog/2014/08/28/hackathon-with-kubernetes-on-azure/) * [GCE and Mesosphere](https://mesosphere.io/), plus Kubernetes is Google... --- name: dockertoday # Using Docker Today * Moving extremely quickly * Lots of innovation and churn * https://devopsu.com/blog/docker-misconceptions/ * Local and Dev environments * Do lots of the same things that vagrant does w/ chef,puppet,salt * You can't deploy vagrant images (sortof) ??? * Know what you are getting into * Safe for local envs and exploration in dev and other low risk environments * Again, know what you are getting into and how fast things are changing... --- # Credits * [Docker](https://www.docker.com/) - The Docker Team and committers * [The Docker Book](http://www.dockerbook.com/) - Great Overview from [James Turnbull](http://www.jamesturnbull.net/) * [Vagrant](https://www.vagrantup.com/) * [Boot2Docker](https://github.com/boot2docker/boot2docker) * [Fig](http://www.fig.sh/) * [Kubernetes](https://github.com/GoogleCloudPlatform/kubernetes) * [Mesos](http://mesos.apache.org/) & [Marathon](http://mesosphere.io/learn/launch-docker-container-on-mesosphere/) * [SpringBoot](http://projects.spring.io/spring-boot/) and [Spring Data Redis](https://spring.io/guides/gs/messaging-redis/) * [Remark.js](http://remarkjs.com/) ([git](https://github.com/gnab/remark)) - for the presentation markdown engine --- name: qanda class: middle, center # Questions?


-- Please select an image collection --
{{collection.name}}
{{key}}
{{action.label}}
Go!
Image's albums:
{{album}}
Next images


Web¶
Introduction¶
While small plots can easily be created and stored in a single HTML and JavaScript file, which are then loaded completely in the browsers memory, this is not possible for larger data sets due to browser limitations. In order to solve this problem, Faerun includes a small HTTP server (based on cherrypy) to serve the data to the browser.
Creating Faerun Data Files¶
As shown in Getting Started, Faerun can save data as .faerun
data files using pickle
.
with open('helix.faerun', 'wb+') as handle:
pickle.dump(f.create_python_data(), handle, protocol=pickle.HIGHEST_PROTOCOL)
Starting a Faerun Web Server¶
from faerun import host
host('helix.faerun', label_type='default',
theme='dark')
Formatting Labels¶
Labels can be formatted by defining a custom label_formatter
. If no label_formatter
is provided to the host
function, the default is used:
label_formatter = lambda label, index, name: label.split('__')[0]
This default splits the label value on '__'
to store different labels and enable search on different values the the displayed labels. See “Searching” for details. Defining a custom label formatter is straight forward. As an example, let’s prefix each label with a string and add their index and layer name:
def custom_label_formatter(label, index, name):
return f'Example: {label} ({index}, {name})'
host('helix.faerun', label_type='default',
theme='dark', label_formatter=custom_label_formatter)
This function is then called whenever a label is requested from the server. In addition to the argument label
, the arguments index
and name
can be used to further customize the displayed label and represent the integer index of the data point and the data layer they belong to (e.g. the name defined with add_scatter
).
Adding Hyperlinks¶
Faerun allows to link the data to an arbitrary URL which can be visited upon double-clicking a data point. In order to do this, a link_formatter
has to be provided. This works similar to customizing the label.
def custom_link_formatter(label, index, name):
return f'https://www.google.com/search?q={label}'
host('helix.faerun', label_type='default',
theme='dark', link_formatter=custom_link_formatter)
Searching¶
The hosted version of a Faerun visualization also allows for searching. As a default, the search searches for exact matches in labels (substring or regex searches are not possible at this time).
However, the search can be customized. As described in “Formatting Labels”, additional label values can be added by separating them using '__'
.
c = np.random.randint(0, 2, len(x))
labels = [''] * len(c)
for i, e in enumerate(c):
labels[i] = str(e) + '__' + str(i % 20)
data = {'x': x, 'y': y, 'z': z, 'c': c, 'labels': labels}
The above examples adds an additional label value and as default, the second label value is then used by the search.
If there are additional label values, the search index can be set using the search_index
argument.
Add Info / Documentation¶
As the visualization is ready to be deployed to a publicly accessible web server, it might be of interest to add a documentation. The host
method supports the argument info
that accepts a (markdown formatted) string. This information is the desplayed on the generated web page.
info = ('#Welcome to Fearun',
'This is a small Faerun example.'
'',
'Yay markdown! This means that you can easily:',
'- Add lists',
'- Build tables',
'- Insert images and links',
'- Add code examples',
'- ...'
)
host('helix.faerun', label_type='default', theme='dark',
label_formatter=custom_label_formatter, link_formatter=custom_link_formatter,
info='\n'.join(info))
An info button is then shown next to the screenshot button, which upon click opens a window containing the info.
Complete Example¶
import pickle
import numpy as np
from faerun import Faerun, host
def main():
f = Faerun(title='faerun-example', clear_color='#222222', coords=False, view='free')
x = np.linspace(0, 12.0, 326)
y = np.sin(np.pi * x)
z = np.cos(np.pi * x)
c = np.random.randint(0, 2, len(x))
labels = [''] * len(c)
for i, e in enumerate(c):
labels[i] = str(e) + '__' + str(i % 20)
data = {'x': x, 'y': y, 'z': z, 'c': c, 'labels': labels}
f.add_scatter('helix', data, shader='sphere', colormap='Dark2', point_scale=5.0,
categorical=True, has_legend=True, legend_labels=[(0, 'Zero'), (1, 'One')])
f.plot('helix')
with open('helix.faerun', 'wb+') as handle:
pickle.dump(f.create_python_data(), handle, protocol=pickle.HIGHEST_PROTOCOL)
def custom_label_formatter(label, index, name):
return f'Example: {label} ({index}, {name})'
def custom_link_formatter(label, index, name):
return f'https://www.google.com/search?q={label}'
info = ('#Welcome to Fearun',
'This is a small Faerun example.'
'',
'Yay markdown! This means that you can easily:',
'- Add lists',
'- Build tables',
'- Insert images and links',
'- Add code examples',
'- ...'
)
host('helix.faerun', label_type='default', theme='dark',
label_formatter=custom_label_formatter, link_formatter=custom_link_formatter,
info='\n'.join(info))
if __name__ == '__main__':
main()


AVA Chatbot
I designed for AVA, a machine learning chatbot that files claims and answers questions for more than 53k customers/month.
Principal Product Designer
Asurion
About the Product
AVA is machine-learning chatbot that began development in 2017. The web app was a candidate to become the primary way Asurion handled its customer relationship management; but first, it needed to prove it could attract customers (user acquisition) and perform on par with other options (optimization).
I joined the team in 2018 as a principal product designer and led the design for the user acquisition, design system, and optimization efforts.
Major Outcomes
Increased user acquisition to 20% from 3% of Asurion customers in 2 months
Increased claims filed to ~1000/day from ~500/day in 3 months
Decreased design/development time for A/B tests to 1.5 weeks from 1.5 months
Optimized conversational design to increase FPY to ~35% from ~30% to handle the influx of new users
Led the effort to create and maintain a design system and pattern library
Product Problems
Users can interact with AVA in a conversational format. AVA primarily handled resolving claim-related issues (such as filing claims and checking claim status), but it was starting to be seen as a potential long-term CRM tool. During this crucial stage in its growth, it faced major problems.
I conducted both quantitative and qualitative research with business stakeholders, real users, and representative users to identify these problems.
From a business perspective, AVA's inconsistent design was not seen as up to industry standard. AVA did not attract enough users - Only 3% of users who were presented with the option to use AVA actually chose it. The chatbot's inconsistent design and voice made the app seem untrustworthy to customers, and the user experience suffered from non-optimal, cumbersome conversational flows.
Increasing User Acquisition
After reviewing AVA's acquisition and bounce rates, I interviewed and tested 15+ real users and representative users to better understand why AVA had little success in attracting/keeping users.
Low visual hierarchy: Users rarely noticed the AVA option because of its visual treatment
Unclear content: If users notice the option, the content did not give them enough information to understand what it offered
Low trust: Users who entered AVA found it unpolished and therefore untrustworthy
Based on my findings, I designed three experiments: a minimal content/visual change; a more aggressive full-page modal with more explanatory content; and lastly, a full-page modal with stronger CTAs, listing the various tasks that AVA could perform for the user. Each design was user tested by 10+ users each.
We started with many unknowns about the complexity of developing and tracking each experiment. The landing page on which users accessed AVA was owned by another team, who had not invested time in changing or tracking it beyond bug fixes.
I decided to begin with the most minimal design, which we called Phase 1. Although Phase 1 was low reward (we didn’t expect a substantial increase in users from Phase 1), it was also low risk. I could pair with our landing page team to understand the development effort, and see how much control I could have over the process. If there were unknowns, the change would not be substantial enough to cause a problem in production.
Outcomes
I deployed Phase 1 to 25% of users, which acquired an average of ~8% users (compare to 3% original)
I developed Phase 2 and Phase 3, cutting down our A/B test deployment to 1.5 weeks (compare to 1.5 months original)
I deployed Phase 2 to 25% of users, which acquired an average of 20% users (compare to 3% original)
I am also working on optimizing the beginning of AVA's flow before we deploy Phase 3, in anticipation of higher bounce rates and drop-offs as we continue acquiring users.
Optimizing Conversational Flows and Process
AVA suffered from two problems regarding its conversational flows.
First, the actual flows were non-optimized. They had not been revisited since MVP release, and sometimes trapped a user into a path that they could not escape. Other times, the user had multiple questions, but would have to refresh the web app in order to ask them one at a time.
Second, the design files were becoming unmaintainable, contributing to poor conversational design, longer development time, and poor documentation. Design files rarely matched production, while some flow designs were missing entirely. Files had extremely poor version control.
I am leading the effort to optimize not only our conversational flows, but our design documentation.
Outcomes
My goal was maintain FPY to deal with increased users, but I increased FPY to 35% from 30% by optimizing the beginning of the flow
I began optimizing the scheduling flow by A/B testing a UI-based or conversational-based approach, finding that users preferred guidance
I designed a lean "start over" design, allowing users to ask more questions after the end of a flow path
I increased the percentage of design files that matched production and were properly versioned to 30% (from 0)
Next Steps
My next steps for AVA are to improve its user experience and user metrics by:
(1) Designing, documenting, and implementing a design system for AVA
(2) Optimizing conversational flows that end abruptly or have high user drop-off
(3) Further increasing user acquisition for AVA while maintaining FPY and bounce rate
(4) Revising the way design versions files and hands off designs to development


EOG Resources (EOG) Bank of America Merrill Lynch Global Energy Conference - Slideshow
by SA Transcripts, https://seekingalpha.com/author/sa-transcriptsThe following slide deck was published by EOG Resources, Inc. in conjunction with this event.
The following slide deck was published by EOG Resources, Inc. in conjunction with this event.


We collect a few web based demonstrator applications in this website.
These are proof of concept projects to showcase how our pipeline of software tools work.
They all use Conjure to solve the respective problems, but the user interface is developed by project students at the School of Computer Science at the University of St Andrews.
People involved in developing and maintaining each demo are referenced in the relevant pages.
The source code for each demo is hosted in a Github repository. Please feel free to let us know if there are any issues with the demos using the issue tracker in the relevant repository.


"An online DNA test proves I'm the lovechild of Bee Gees singer Maurice Gibb"
EXCLUSIVE: Nick Endacott begged Bee Gees singer Maurice Gibb's family for a DNA test but was stunned to find the results proved they were a '100 percent match'
by Patrick HillA musician who begged the family of Bee Gee Maurice Gibb for a DNA test has finally got evidence the singer was his dad.
Nick Endacott sent a saliva swab to an online genealogy firm and was stunned when he received the result.
Unknown to Nick, Maurice’s son Adam had given his own DNA to the same website, Ancestry.co.uk , and they were a “100 per cent match”.
Nick told the Sunday Mirror: “I paid about £90 for the saliva test and the results came back about 10 days after I had sent the swab back to them.
“When I saw the results I was thinking, ‘Is this real?’. I felt an overwhelming sense of relief and completion in my life.
“I don’t know how it came about or for what reason Adam put his DNA on the website but I just want to thank him from the bottom of my heart. The website said he did it a few years ago.
“It has been such a long hard journey, but this has finally given me closure and I have a new found belief in myself from knowing my identity. It’s amazing.”
Nick, 51, was given up soon after his birth in 1968 and placed in a children’s home in Woolwich, South London.
His birth name was Aaron Conway, but he was renamed after his adoption and had a middle-class upbringing with three siblings in the Ashdown Forest, East Sussex.
In 2003 he was reunited with his biological mother Patti Nolder, who had mixed with the stars as a music studio manager and was a guest at Elton John’s 1984 wedding to her best pal Renate Blauel.
Patti, who now lives in Spain, initially told Nick his father was Chris Andrews, of 1960s rock band Fleur de Lys, but a DNA test ruled this out.
In 2010, Nick approached Patti’s sister who told him that Maurice was his biological father.
Maurice died in 2003 aged 53, and Robin died in 2012, aged 62, leaving Barry as the only surviving member of the Bee Gees.
Two years ago Nick told the Sunday People how he sent three letters to Barry, now 73, begging him to have tests to confirm his ancestry.
By that time, Nick had taken a facial recognition test that showed it was highly likely he was related to Maurice.
Maurice’s widow Yvonne – mum to his son Adam and daughter Samantha – indicated she would be happy for a DNA test but later withdrew permission.
Nick, a professional musician who has been singing since he was six, said: “I just wanted to know the truth and to know my medical history.
“I was diagnosed with rheumatoid arthritis last month, which Barry Gibb also suffers from and if I had known my family history sooner maybe I could have done something about it.”
The ancestry test also linked Nick to two other members of Maurice’s wider family, who it says are his cousins.
Maurice left his widow Yvonne and their children a huge estate with six homes around the world and all ownership to copyrights.
The Bee Gees have sold more than 120 million records like Stayin’ Alive, Night Fever and More Than A Woman.
But Nick, who lives in Hove, East Sussex, with partner Jacqui, added: “I’ve never been interested in money and as I was legally adopted I would have no claim anyway.
“I just wanted to know who my dad is. To finally have it in black and white feels unbelievable.
“I want my story to be a beacon of hope to other adoptees. Never give up, you never know what is going to happen.”
An agent for the Gibb family was unavailable for comment.
Patti Nolder has previously refused to talk about the story.


Project Goals
Introduction
The goal of this project is to develope an app for outpatient care management. The app is a mobile version of an already existng desktop application which have some drawbacks due to its functionalities. The mobile version of the app will be limited to some functionality which are suitable to used on mobile phone. In the sense the mobile version of the app complements the desktop version
Funtionalities
- The supervisor can check and see the current activity of a nurse.
- The supervisor will get a notfication on when a nurse finished caring for a patient.
- The nurse get a reminder of when his/her patients prescription is going to finished.
- A nurse can transfer his/her patient to another nurse in case he/she has to spend extra time with current patients due to emergency.
- And the supervisor can removes a patient from a nurse schedule.
- The nurse can scan the PZN barcode on the medication of his/patient for odering from the pharmancy
- The nurses can check their weekly shedule.


💹 Deep RL Bitcoin Trading Bot
[status: ongoing]
After going through OpenAI’s Spinning Up in Deep RL tutorial, I decided to try my hand at using Deep Reinforcement Learning to build a bitcoin trading bot, but since then I’ve found this great repository on Github and will probably base any further work I do on it.
[stub]


As the name already implicates: version control is used to manage different versions of a product (e.g. programs and files in the context of web development). It allows people to either lock files in order to make them accessable and editable for only one person. Or it may track changes that are made to files and programs. When tracking, version control saves different states of the coding process. This enables multiple persons to work on a project at the same time and merge their work afterwards. Furthermore, bugs can be found more easily since programer just have to review the previous code for debugging. There are many different version control systems. However the two most popular ones for developers are Subversion (a.k.a. SVN) and Git.
How git tracks changes
Git is an open-source version control system that tracks changes you make to coding files in projects. It considers coding files as a sort of tree. Each time you change or add something to your code the latest version is added to the original as a new branch. Finally, you can merge those branches with the original version and make them one code.
Benefits of using GitHub to store code
GitHub is an open source version control system. One of its biggest advantage is, that it is distributed. This means that you can clone a project an work on the entire project history on your computer - without interacting with a server. Further, it stores a copy of your project's repository as a backup. It uses markdown (a simple way to write that is used by text-editors) and therefor makes it easy for us by not having to learn another formatting system. Last but not least, GitHub offers its users great service by offering help, guides and great documentation.


PERSONAL LEARNING LIBRARY
Create
History
Rating:
5
4
3
2
1
I learned:
I want to remember:
Selected text:
Add selected
Tags:
Your tags:
Would you recommend this to others?
Yes
No
Add Bookmark
Cancel
Bookmark successful!
×
Bookmark failed to save. Try again?
×
Filter by tag:


JexiaClient
Bootstraping jexia-sdk-js with a new session
Constructor Summary
| Public Constructor | ||
| public |
constructor(options: Object): Promise<JexiaClient, Error> Create a new JexiaClient object with some initial values. |
Member Summary
| Public Members | ||
| public |
|
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
|
Public Constructors
public constructor(options: Object): Promise<JexiaClient, Error> source
Create a new JexiaClient object with some initial values.


bad-jsonp (content/type:application/json):
Send
good-jsonp (content/type:application/javascript):
Send


Reports a non-standalone Angular component, directive, or pipe that is not declared in any module or is declared in multiple modules.


{% extends 'base.html' %} {% block container %}
Check player profiles to see their completion and win rate.
Want to see more stats or have any feedback please get in contact at<EMAIL_ADDRESS>| Total Divisions | |
| Total Players | |
| Total Matches in Ladder | |
| Total Matches Played | |
| Percentage Matches Played | |
System Stats |
|
| Total Years | {{ at_years }} {{ at_years_str }} |
| Total Ladders | {{ at_ladders }} |
| Total Divisions | {{ at_divisions }} |
| Complete Matches | {{ at_results }} |
| Unique Players | {{ at_players }} |
| Div | Player | Total |
|---|


Harkilgamed:
We will meet again.
But I have said all I care to now. Return to Kekropus and speak with him.


Step 1: In a stockpot, over medium heat, combine the tomatoes, onion, cloves and chicken broth. Bring to a boil, and gently boil for about 20 minutes to blend all of the flavors.
Step 2: Remove from heat and run the mixture through a food mill into a large bowl, or pan. Discard any stuff left over in the food mill.
Step 3: In the now empty stockpot, melt the butter over medium heat.
Step 4: Stir in the flour to make a roux, cooking until the roux is a medium brown.
Step 5: Gradually whisk in a bit of the tomato mixture, so that no lumps form, then stir in the rest.
Step 6: Season with sugar and salt, and adjust to taste.
Step 7: Serve and Enjoy!


{% extends "layout.html" %} {% block content %}
Fundamental analysis uses the information of a company such as its balance sheet, income statements, etc. to compute its value.


Advanced M:N Associations
Make sure you have read the associations guide before reading this guide.
Let's start with an example of a Many-to-Many relationship between User
and Profile
.
const User = sequelize.define('user', {
username: DataTypes.STRING,
points: DataTypes.INTEGER
}, { timestamps: false });
const Profile = sequelize.define('profile', {
name: DataTypes.STRING
}, { timestamps: false });
The simplest way to define the Many-to-Many relationship is:
User.belongsToMany(Profile, { through: 'User_Profiles' });
Profile.belongsToMany(User, { through: 'User_Profiles' });
By passing a string to through
above, we are asking Sequelize to automatically generate a model named User_Profiles
as the through table (also known as junction table), with only two columns: userId
and profileId
. A composite unique key will be established on these two columns.
We can also define ourselves a model to be used as the through table.
const User_Profile = sequelize.define('User_Profile', {}, { timestamps: false });
User.belongsToMany(Profile, { through: User_Profile });
Profile.belongsToMany(User, { through: User_Profile });
The above has the exact same effect. Note that we didn't define any attributes on the User_Profile
model. The fact that we passed it into a belongsToMany
call tells sequelize to create the two attributes userId
and profileId
automatically, just like other associations also cause Sequelize to automatically add a column to one of the involved models.
However, defining the model by ourselves has several advantages. We can, for example, define more columns on our through table:
const User_Profile = sequelize.define('User_Profile', {
selfGranted: DataTypes.BOOLEAN
}, { timestamps: false });
User.belongsToMany(Profile, { through: User_Profile });
Profile.belongsToMany(User, { through: User_Profile });
With this, we can now track an extra information at the through table, namely the selfGranted
boolean. For example, when calling the user.addProfile()
we can pass values for the extra columns using the through
option.
Example:
const amidala = await User.create({ username: 'p4dm3', points: 1000 });
const queen = await Profile.create({ name: 'Queen' });
await amidala.addProfile(queen, { through: { selfGranted: false } });
const result = await User.findOne({
where: { username: 'p4dm3' },
include: Profile
});
console.log(result);
Output:
{
"id": 4,
"username": "p4dm3",
"points": 1000,
"profiles": [
{
"id": 6,
"name": "queen",
"User_Profile": {
"userId": 4,
"profileId": 6,
"selfGranted": false
}
}
]
}
You can create all relationship in single create
call too.
Example:
const amidala = await User.create({
username: 'p4dm3',
points: 1000,
profiles: [{
name: 'Queen',
User_Profile: {
selfGranted: true
}
}]
}, {
include: Profile
});
const result = await User.findOne({
where: { username: 'p4dm3' },
include: Profile
});
console.log(result);
Output:
{
"id": 1,
"username": "p4dm3",
"points": 1000,
"profiles": [
{
"id": 1,
"name": "Queen",
"User_Profile": {
"selfGranted": true,
"userId": 1,
"profileId": 1
}
}
]
}
You probably noticed that the User_Profiles
table does not have an id
field. As mentioned above, it has a composite unique key instead. The name of this composite unique key is chosen automatically by Sequelize but can be customized with the uniqueKey
option:
User.belongsToMany(Profile, { through: User_Profiles, uniqueKey: 'my_custom_unique' });
Another possibility, if desired, is to force the through table to have a primary key just like other standard tables. To do this, simply define the primary key in the model:
const User_Profile = sequelize.define('User_Profile', {
id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true,
allowNull: false
},
selfGranted: DataTypes.BOOLEAN
}, { timestamps: false });
User.belongsToMany(Profile, { through: User_Profile });
Profile.belongsToMany(User, { through: User_Profile });
The above will still create two columns userId
and profileId
, of course, but instead of setting up a composite unique key on them, the model will use its id
column as primary key. Everything else will still work just fine.

Models recap (with minor rename)
To make things easier to follow, let's rename our User_Profile
model to grant
. Note that everything works in the same way as before. Our models are:
const User = sequelize.define('user', {
username: DataTypes.STRING,
points: DataTypes.INTEGER
}, { timestamps: false });
const Profile = sequelize.define('profile', {
name: DataTypes.STRING
}, { timestamps: false });
const Grant = sequelize.define('grant', {
id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true,
allowNull: false
},
selfGranted: DataTypes.BOOLEAN
}, { timestamps: false });
We established a Many-to-Many relationship between User
and Profile
using the Grant
model as the through table:
User.belongsToMany(Profile, { through: Grant });
Profile.belongsToMany(User, { through: Grant });
This automatically added the columns userId
and profileId
to the Grant
model.
Note: As shown above, we have chosen to force the grant
model to have a single primary key (called id
, as usual). This is necessary for the Super Many-to-Many relationship that will be defined soon.
Using One-to-Many relationships instead
Instead of setting up the Many-to-Many relationship defined above, what if we did the following instead?
// Setup a One-to-Many relationship between User and Grant
User.hasMany(Grant);
Grant.belongsTo(User);
// Also setup a One-to-Many relationship between Profile and Grant
Profile.hasMany(Grant);
Grant.belongsTo(Profile);
The result is essentially the same! This is because User.hasMany(Grant)
and Profile.hasMany(Grant)
will automatically add the userId
and profileId
columns to Grant
, respectively.
This shows that one Many-to-Many relationship isn't very different from two One-to-Many relationships. The tables in the database look the same.
The only difference is when you try to perform an eager load with Sequelize.
// With the Many-to-Many approach, you can do:
User.findAll({ include: Profile });
Profile.findAll({ include: User });
// However, you can't do:
User.findAll({ include: Grant });
Profile.findAll({ include: Grant });
Grant.findAll({ include: User });
Grant.findAll({ include: Profile });
// On the other hand, with the double One-to-Many approach, you can do:
User.findAll({ include: Grant });
Profile.findAll({ include: Grant });
Grant.findAll({ include: User });
Grant.findAll({ include: Profile });
// However, you can't do:
User.findAll({ include: Profile });
Profile.findAll({ include: User });
// Although you can emulate those with nested includes, as follows:
User.findAll({
include: {
model: Grant,
include: Profile
}
}); // This emulates the `User.findAll({ include: Profile })`, however
// the resulting object structure is a bit different. The original
// structure has the form `user.profiles[].grant`, while the emulated
// structure has the form `user.grants[].profiles[]`.
The best of both worlds: the Super Many-to-Many relationship
We can simply combine both approaches shown above!
// The Super Many-to-Many relationship
User.belongsToMany(Profile, { through: Grant });
Profile.belongsToMany(User, { through: Grant });
User.hasMany(Grant);
Grant.belongsTo(User);
Profile.hasMany(Grant);
Grant.belongsTo(Profile);
This way, we can do all kinds of eager loading:
// All these work:
User.findAll({ include: Profile });
Profile.findAll({ include: User });
User.findAll({ include: Grant });
Profile.findAll({ include: Grant });
Grant.findAll({ include: User });
Grant.findAll({ include: Profile });
We can even perform all kinds of deeply nested includes:
User.findAll({
include: [
{
model: Grant,
include: [User, Profile]
},
{
model: Profile,
include: {
model: User,
include: {
model: Grant,
include: [User, Profile]
}
}
}
]
});
Aliases and custom key names
Similarly to the other relationships, aliases can be defined for Many-to-Many relationships.
Before proceeding, please recall the aliasing example for belongsTo
on the associations guide. Note that, in that case, defining an association impacts both the way includes are done (i.e. passing the association name) and the name Sequelize chooses for the foreign key (in that example, leaderId
was created on the Ship
model).
Defining an alias for a belongsToMany
association also impacts the way includes are performed:
Product.belongsToMany(Category, { as: 'groups', through: 'product_categories' });
Category.belongsToMany(Product, { as: 'items', through: 'product_categories' });
// [...]
await Product.findAll({ include: Category }); // This doesn't work
await Product.findAll({ // This works, passing the alias
include: {
model: Category,
as: 'groups'
}
});
await Product.findAll({ include: 'groups' }); // This also works
However, defining an alias here has nothing to do with the foreign key names. The names of both foreign keys created in the through table are still constructed by Sequelize based on the name of the models being associated. This can readily be seen by inspecting the generated SQL for the through table in the example above:
CREATE TABLE IF NOT EXISTS `product_categories` (
`createdAt` DATETIME NOT NULL,
`updatedAt` DATETIME NOT NULL,
`productId` INTEGER NOT NULL REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
`categoryId` INTEGER NOT NULL REFERENCES `categories` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
PRIMARY KEY (`productId`, `categoryId`)
);
We can see that the foreign keys are productId
and categoryId
. To change these names, Sequelize accepts the options foreignKey
and otherKey
respectively (i.e., the foreignKey
defines the key for the source model in the through relation, and otherKey
defines it for the target model):
Product.belongsToMany(Category, {
through: 'product_categories',
foreignKey: 'objectId', // replaces `productId`
otherKey: 'typeId' // replaces `categoryId`
});
Category.belongsToMany(Product, {
through: 'product_categories',
foreignKey: 'typeId', // replaces `categoryId`
otherKey: 'objectId' // replaces `productId`
});
Generated SQL:
CREATE TABLE IF NOT EXISTS `product_categories` (
`createdAt` DATETIME NOT NULL,
`updatedAt` DATETIME NOT NULL,
`objectId` INTEGER NOT NULL REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
`typeId` INTEGER NOT NULL REFERENCES `categories` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
PRIMARY KEY (`objectId`, `typeId`)
);
As shown above, when you define a Many-to-Many relationship with two belongsToMany
calls (which is the standard way), you should provide the foreignKey
and otherKey
options appropriately in both calls. If you pass these options in only one of the calls, the Sequelize behavior will be unreliable.
Self-references
Sequelize supports self-referential Many-to-Many relationships, intuitively:
Person.belongsToMany(Person, { as: 'Children', through: 'PersonChildren' })
// This will create the table PersonChildren which stores the ids of the objects.
Specifying attributes from the through table
By default, when eager loading a many-to-many relationship, Sequelize will return data in the following structure (based on the first example in this guide):
// User.findOne({ include: Profile })
{
"id": 4,
"username": "p4dm3",
"points": 1000,
"profiles": [
{
"id": 6,
"name": "queen",
"grant": {
"userId": 4,
"profileId": 6,
"selfGranted": false
}
}
]
}
Notice that the outer object is an User
, which has a field called profiles
, which is a Profile
array, such that each Profile
comes with an extra field called grant
which is a Grant
instance. This is the default structure created by Sequelize when eager loading from a Many-to-Many relationship.
However, if you want only some of the attributes of the through table, you can provide an array with the attributes you want in the attributes
option. For example, if you only want the selfGranted
attribute from the through table:
User.findOne({
include: {
model: Profile,
through: {
attributes: ['selfGranted']
}
}
});
Output:
{
"id": 4,
"username": "p4dm3",
"points": 1000,
"profiles": [
{
"id": 6,
"name": "queen",
"grant": {
"selfGranted": false
}
}
]
}
If you don't want the nested grant
field at all, use attributes: []
:
User.findOne({
include: {
model: Profile,
through: {
attributes: []
}
}
});
Output:
{
"id": 4,
"username": "p4dm3",
"points": 1000,
"profiles": [
{
"id": 6,
"name": "queen"
}
]
}
If you are using mixins (such as user.getProfiles()
) instead of finder methods (such as User.findAll()
), you have to use the joinTableAttributes
option instead:
someUser.getProfiles({ joinTableAttributes: ['selfGranted'] });
Output:
[
{
"id": 6,
"name": "queen",
"grant": {
"selfGranted": false
}
}
]
Many-to-many-to-many relationships and beyond
Consider you are trying to model a game championship. There are players and teams. Teams play games. However, players can change teams in the middle of the championship (but not in the middle of a game). So, given one specific game, there are certain teams participating in that game, and each of these teams has a set of players (for that game).
So we start by defining the three relevant models:
const Player = sequelize.define('Player', { username: DataTypes.STRING });
const Team = sequelize.define('Team', { name: DataTypes.STRING });
const Game = sequelize.define('Game', { name: DataTypes.INTEGER });
Now, the question is: how to associate them?
First, we note that:
- One game has many teams associated to it (the ones that are playing that game);
- One team may have participated in many games.
The above observations show that we need a Many-to-Many relationship between Game and Team. Let's use the Super Many-to-Many relationship as explained earlier in this guide:
// Super Many-to-Many relationship between Game and Team
const GameTeam = sequelize.define('GameTeam', {
id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true,
allowNull: false
}
});
Team.belongsToMany(Game, { through: GameTeam });
Game.belongsToMany(Team, { through: GameTeam });
GameTeam.belongsTo(Game);
GameTeam.belongsTo(Team);
Game.hasMany(GameTeam);
Team.hasMany(GameTeam);
The part about players is trickier. We note that the set of players that form a team depends not only on the team (obviously), but also on which game is being considered. Therefore, we don't want a Many-to-Many relationship between Player and Team. We also don't want a Many-to-Many relationship between Player and Game. Instead of associating a Player to any of those models, what we need is an association between a Player and something like a "team-game pair constraint", since it is the pair (team plus game) that defines which players belong there. So what we are looking for turns out to be precisely the junction model, GameTeam, itself! And, we note that, since a given game-team pair specifies many players, and on the other hand that the same player can participate of many game-team pairs, we need a Many-to-Many relationship between Player and GameTeam!
To provide the greatest flexibility, let's use the Super Many-to-Many relationship construction here again:
// Super Many-to-Many relationship between Player and GameTeam
const PlayerGameTeam = sequelize.define('PlayerGameTeam', {
id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true,
allowNull: false
}
});
Player.belongsToMany(GameTeam, { through: PlayerGameTeam });
GameTeam.belongsToMany(Player, { through: PlayerGameTeam });
PlayerGameTeam.belongsTo(Player);
PlayerGameTeam.belongsTo(GameTeam);
Player.hasMany(PlayerGameTeam);
GameTeam.hasMany(PlayerGameTeam);
The above associations achieve precisely what we want. Here is a full runnable example of this:
const { Sequelize, Op, Model, DataTypes } = require('sequelize');
const sequelize = new Sequelize('sqlite::memory:', {
define: { timestamps: false } // Just for less clutter in this example
});
const Player = sequelize.define('Player', { username: DataTypes.STRING });
const Team = sequelize.define('Team', { name: DataTypes.STRING });
const Game = sequelize.define('Game', { name: DataTypes.INTEGER });
// We apply a Super Many-to-Many relationship between Game and Team
const GameTeam = sequelize.define('GameTeam', {
id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true,
allowNull: false
}
});
Team.belongsToMany(Game, { through: GameTeam });
Game.belongsToMany(Team, { through: GameTeam });
GameTeam.belongsTo(Game);
GameTeam.belongsTo(Team);
Game.hasMany(GameTeam);
Team.hasMany(GameTeam);
// We apply a Super Many-to-Many relationship between Player and GameTeam
const PlayerGameTeam = sequelize.define('PlayerGameTeam', {
id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true,
allowNull: false
}
});
Player.belongsToMany(GameTeam, { through: PlayerGameTeam });
GameTeam.belongsToMany(Player, { through: PlayerGameTeam });
PlayerGameTeam.belongsTo(Player);
PlayerGameTeam.belongsTo(GameTeam);
Player.hasMany(PlayerGameTeam);
GameTeam.hasMany(PlayerGameTeam);
(async () => {
await sequelize.sync();
await Player.bulkCreate([
{ username: 's0me0ne' },
{ username: 'empty' },
{ username: 'greenhead' },
{ username: 'not_spock' },
{ username: 'bowl_of_petunias' }
]);
await Game.bulkCreate([
{ name: 'The Big Clash' },
{ name: 'Winter Showdown' },
{ name: 'Summer Beatdown' }
]);
await Team.bulkCreate([
{ name: 'The Martians' },
{ name: 'The Earthlings' },
{ name: 'The Plutonians' }
]);
// Let's start defining which teams were in which games. This can be done
// in several ways, such as calling `.setTeams` on each game. However, for
// brevity, we will use direct `create` calls instead, referring directly
// to the IDs we want. We know that IDs are given in order starting from 1.
await GameTeam.bulkCreate([
{ GameId: 1, TeamId: 1 }, // this GameTeam will get id 1
{ GameId: 1, TeamId: 2 }, // this GameTeam will get id 2
{ GameId: 2, TeamId: 1 }, // this GameTeam will get id 3
{ GameId: 2, TeamId: 3 }, // this GameTeam will get id 4
{ GameId: 3, TeamId: 2 }, // this GameTeam will get id 5
{ GameId: 3, TeamId: 3 } // this GameTeam will get id 6
]);
// Now let's specify players.
// For brevity, let's do it only for the second game (Winter Showdown).
// Let's say that that s0me0ne and greenhead played for The Martians, while
// not_spock and bowl_of_petunias played for The Plutonians:
await PlayerGameTeam.bulkCreate([
// In 'Winter Showdown' (i.e. GameTeamIds 3 and 4):
{ PlayerId: 1, GameTeamId: 3 }, // s0me0ne played for The Martians
{ PlayerId: 3, GameTeamId: 3 }, // greenhead played for The Martians
{ PlayerId: 4, GameTeamId: 4 }, // not_spock played for The Plutonians
{ PlayerId: 5, GameTeamId: 4 } // bowl_of_petunias played for The Plutonians
]);
// Now we can make queries!
const game = await Game.findOne({
where: {
name: "Winter Showdown"
},
include: {
model: GameTeam,
include: [
{
model: Player,
through: { attributes: [] } // Hide unwanted `PlayerGameTeam` nested object from results
},
Team
]
}
});
console.log(`Found game: "${game.name}"`);
for (let i = 0; i < game.GameTeams.length; i++) {
const team = game.GameTeams[i].Team;
const players = game.GameTeams[i].Players;
console.log(`- Team "${team.name}" played game "${game.name}" with the following players:`);
console.log(players.map(p => `--- ${p.username}`).join('\n'));
}
})();
Output:
Found game: "Winter Showdown"
- Team "The Martians" played game "Winter Showdown" with the following players:
--- s0me0ne
--- greenhead
- Team "The Plutonians" played game "Winter Showdown" with the following players:
--- not_spock
--- bowl_of_petunias
So this is how we can achieve a many-to-many-to-many relationship between three models in Sequelize, by taking advantage of the Super Many-to-Many relationship technique!
This idea can be applied recursively for even more complex, many-to-many-to-...-to-many relationships (although at some point queries might become slow).


| Package | Description |
|---|---|
| org.apache.jena.query |
ARQ - A query engine for Jena, implementing SPARQL.
|
| org.apache.jena.sparql.expr | |
| org.apache.jena.sparql.expr.aggregate |
| Modifier and Type | Method and Description |
|---|---|
Expr |
Query.allocAggregate(Aggregator agg) |
| Modifier and Type | Method and Description |
|---|---|
Aggregator |
ExprAggregator.getAggregator() |
| Constructor and Description |
|---|
ExprAggregator(Var v,
Aggregator agg) |
| Modifier and Type | Class and Description |
|---|---|
class |
AggAvg |
class |
AggAvgDistinct |
class |
AggCount |
class |
AggCountDistinct |
class |
AggCountVar |
class |
AggCountVarDistinct |
class |
AggCustom
Syntax element and framework execution for custom aggregates.
|
class |
AggGroupConcat |
class |
AggGroupConcatDistinct |
class |
AggMax |
class |
AggMaxDistinct |
class |
AggMin |
class |
AggMinDistinct |
class |
AggNull
The null aggregate (which can't be written in SPARQL)
calculates nothing but does help remember the group key.
|
class |
AggregatorBase
Aggregate that does everything except the per-group aggregation that is needed for each operation
|
class |
AggSample |
class |
AggSampleDistinct |
class |
AggSum |
class |
AggSumDistinct |
| Modifier and Type | Method and Description |
|---|---|
Aggregator |
AggSampleDistinct.copy(ExprList exprs) |
Aggregator |
Aggregator.copy(ExprList exprs) |
Aggregator |
AggSum.copy(ExprList exprs) |
Aggregator |
AggAvgDistinct.copy(ExprList expr) |
Aggregator |
AggCount.copy(ExprList expr) |
Aggregator |
AggMin.copy(ExprList exprs) |
Aggregator |
AggAvg.copy(ExprList expr) |
Aggregator |
AggMinDistinct.copy(ExprList exprs) |
Aggregator |
AggCustom.copy(ExprList exprs) |
Aggregator |
AggGroupConcatDistinct.copy(ExprList exprs) |
Aggregator |
AggCountDistinct.copy(ExprList expr) |
Aggregator |
AggSample.copy(ExprList exprs) |
Aggregator |
AggSumDistinct.copy(ExprList exprs) |
Aggregator |
AggMax.copy(ExprList expr) |
Aggregator |
AggGroupConcat.copy(ExprList expr) |
Aggregator |
AggNull.copy(ExprList exprs) |
Aggregator |
AggMaxDistinct.copy(ExprList expr) |
Aggregator |
AggCountVar.copy(ExprList expr) |
Aggregator |
AggCountVarDistinct.copy(ExprList exprs) |
Aggregator |
Aggregator.copyTransform(NodeTransform transform) |
Aggregator |
AggregatorBase.copyTransform(NodeTransform transform) |
static Aggregator |
AggregatorFactory.createAggNull() |
static Aggregator |
AggregatorFactory.createAvg(boolean distinct,
Expr expr) |
static Aggregator |
AggregatorFactory.createCount(boolean distinct) |
static Aggregator |
AggregatorFactory.createCountExpr(boolean distinct,
Expr expr) |
static Aggregator |
AggregatorFactory.createCustom(String iri,
Args a) |
static Aggregator |
AggregatorFactory.createCustom(String iri,
boolean distinct,
Expr expr) |
static Aggregator |
AggregatorFactory.createCustom(String iri,
boolean distinct,
ExprList exprs) |
static Aggregator |
AggregatorFactory.createGroupConcat(boolean distinct,
Expr expr,
String separator,
ExprList orderedBy) |
static Aggregator |
AggregatorFactory.createMax(boolean distinct,
Expr expr) |
static Aggregator |
AggregatorFactory.createMin(boolean distinct,
Expr expr) |
static Aggregator |
AggregatorFactory.createSample(boolean distinct,
Expr expr) |
static Aggregator |
AggregatorFactory.createSum(boolean distinct,
Expr expr) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
AggSampleDistinct.equals(Aggregator other,
boolean bySyntax) |
boolean |
Aggregator.equals(Aggregator other,
boolean bySyntax)
Consider this 'protected'
|
boolean |
AggSum.equals(Aggregator other,
boolean bySyntax) |
boolean |
AggAvgDistinct.equals(Aggregator other,
boolean bySyntax) |
boolean |
AggCount.equals(Aggregator other,
boolean bySyntax) |
boolean |
AggMin.equals(Aggregator other,
boolean bySyntax) |
boolean |
AggAvg.equals(Aggregator other,
boolean bySyntax) |
boolean |
AggMinDistinct.equals(Aggregator other,
boolean bySyntax) |
boolean |
AggCustom.equals(Aggregator other,
boolean bySyntax) |
boolean |
AggGroupConcatDistinct.equals(Aggregator other,
boolean bySyntax) |
boolean |
AggCountDistinct.equals(Aggregator other,
boolean bySyntax) |
boolean |
AggSample.equals(Aggregator other,
boolean bySyntax) |
boolean |
AggSumDistinct.equals(Aggregator other,
boolean bySyntax) |
boolean |
AggMax.equals(Aggregator other,
boolean bySyntax) |
boolean |
AggGroupConcat.equals(Aggregator other,
boolean bySyntax) |
boolean |
AggNull.equals(Aggregator other,
boolean bySyntax) |
boolean |
AggMaxDistinct.equals(Aggregator other,
boolean bySyntax) |
boolean |
AggCountVar.equals(Aggregator other,
boolean bySyntax) |
boolean |
AggCountVarDistinct.equals(Aggregator other,
boolean bySyntax) |
Licenced under the Apache License, Version 2.0


{% extends "base.html" %} {% block content %}
Life is complicated. Life is simple. Life needs music to make it beautiful. Melody is the light and lyric is the key.
{{ userTotal }} users have contributed {{ lyricTotal }} lyrics in total. {% if user.is_authenticated %}
{% else %} Do you wanna join us? {% endif %}


{% for e_question in e_questions %}
{{ assignment.description }}
Due: {{ assignment.due_date }}
Submit


Surfer Co.
ABOUT US
WE
ARE
SURFERS CO.
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Corporis impedit
nesciunt omnis? Atque deleniti iusto magni quia, reprehenderit vel voluptatem!
Esse itaque libero quo. Architecto et harum nihil non rerum.Corporis impedit
nesciunt omnis? Atque deleniti iusto magni quia, reprehe nderit vel voluptatem!
Esse .
OUR TEAM
LATEST UPDATES
Ellie Turner and Joble Harris
have taken out the 2016
British National Surf
Championships
have taken out the 2016
British National Surf
Championships
A large group of surfers
invaded the coast of La Jolla Shores, in California, with a
single goal in mind
invaded the coast of La Jolla Shores, in California, with a
single goal in mind
Surfboard are constanty
evolving, and there are
multiple board designs for a board range of environments
evolving, and there are
multiple board designs for a board range of environments