For my capstone class project, I designed an online learning platform that aims to improve student engagement and reduce isolation in online courses. The platform features a pedagogical approach that includes peer collaboration and interactions. As part of the this project, I conducted research that included a survey and a design exercise. I also designed an interactive prototype of the system, which I tested with users.
Nowadays, with the advancement of technologies, much of our time is spent online. Naturally, much of our learning happens online too. Massive Open Online Courses (MOOCs) have been on a steady rise. Though MOOCs promise to make great education more affordable and universally accessible, they also have serious flaws. Students in MOOCs are isolated and suffer from lack of social interactions with their peers and with the course instructors. I researched these problems and designed Learndevú - a platform that enables student collaboration in online courses. Founded in learning theory, Learndevú aims to reduce the student isolation online.
In order to better understand the problem, I created a stakeholder map. The map made me consider all sides of education in general and helped me think of the various possible issues I could explore within online education.
I wrote love and breakup letters to my product. The technique is intended to be used as if a user wrote those letters to the product. The love letter helped me explore what features might make my project special and make my users love it. On the other hand, the breakup letter aims at describing why a user might choose to leave the product for a competitor. These design techniques were useful as initial tools to explore my idea and start thinking about its features and possible challenges.
In order to explore the problem space, I conducted background research, which included literature review in the following domains:
To explore related products and solutions, I conducted a competitive analysis on MOOCs, online learning tools and Q&A boards.
The analysis indicated that though there are many online learning platforms, none of them are focused on rich collaboration between students and instructors. This furthered my interest in the area and convinced me to explore it further.
As part of my research, I conducted a survey with people who have taken online courses. I wanted to learn about the general moods around such courses and also learn preferences about topics, such as deadlines, collaborative work, and working pace.
The survey indicated the following insights:
To try to better understand the user needs and explore the solution space, I conducted a design exercise called speed dating, which I ran over 10 one-on-one sessions. Users were presented with the 8 storyboards in rapid succession, which I explained. Next, participants were asked to rank the storyboards from most likely to least likely to enhance MOOCs through social engagement and collaboration. Finally, a debriefing sessions was conducted to look into the motivations behind their rankings.
The gathered data indicated that collaborating on assignments via a shared work tool was the top ranked approach among participants. That became a central concept in my design.
As I began imagining the various parts of my solution, I drew an interaction flow diagram. This technique helped raise questions and reveal potential design challenges.
Next, I sketched out s high-level view of the main interaction flows of the app. This helped me visualize and iterate on the complete user journey with the potential solution.
Moving to higher fidelity I wireframed the core screens of the solution, in order to get feedback and to start working out deeper details. I was able to show the wireframes to potential users and get valuable feedback.
With the insights that I have gathered through my research and iterations, I was able to build a digital prototype of my solution. I picked Framer as the prototyping tool of choice, due to its ability to create highly interactive prototypes. I wanted to be able to test the microinteractions of my solutions, and thought that the time invested in using this tool is worth it for this design.
To test the usability and value proposition of my solution, I conducted usability assessment sessions with 5 participants. The participants were graduate students at the University of Michigan, School of Information.
Overall, participants found the system easy to navigate and easy to go through. There were no major confusions related to the interaction flow of the application for core tasks, such as picking a course, watching a lecture, or setting up a group for an assignment.
The interface for calling group members was easy to understand by the participants. However, additional features, such having the ability for a user to see their own camera during a call were requested. In general, the call interface seemed too basic to some participants, indicating that Google Hangouts offers a more advanced interface with more features.
Though most participants (P2-P5) liked the drag and drop function of the flexible collaboration screen, none of the participants were able to discover the feature during the sessions. In addition, one participant indicated that when dragging a panel to an area on the screen, they want it to clip and automatically be placed in that placeholder area when even a small part of the panel is over the area.
Two participants (P2 and P4) said that the “group assignment” label on an assignment was confusing, since the system actually gave them a choice to work individually or with a group in that assignment.s
My refined prototype was presented as a capstone project for my graduate studies. The presetntation and final prototype were well received. I was happy to deepen my knowledge in this the exciting online learning domain. In addition, I believe that gained valuable experience from completing a full project lifecylce, which included getting feedback on multiple occasions and iterating on various prototype details.


Click below to see the HTML version of this email.
http://link.cvs.com/r/QFCRVTQ/5N31U/0NTGQ4/EWJA1UO/KADAO/JQ/t?a=QFCRVTQ&b=G04LP&c=PN7JWPE&d=XJUTY7&e=1&f=36bb2c4f3888bed7dc04
****************************************************
CVS/pharmacy®
****************************************************
LAST DAY! 25% OFF your order.*
Check out this offer and more >
http://link.cvs.com/r/QFCRVTQ/5N31U/0NTGQ4/EWJA1UO/2FBF9/JQ/t?a=QFCRVTQ&b=G04LP&c=PN7JWPE&d=XJUTY7&e=1&f=36bb2c4f3888bed7dc04
****************************************************
Add<EMAIL_ADDRESS>to your address book to continue receiving our emails.
****************************************************
*Offer available online only. Expires on 2/5/13 at 11:59 PM ET. To receive the 25% off discount, enter coupon code 25DEAL at Checkout. The 25% savings will be calculated after any other discounts have been applied. The 25% sale excludes prescriptions and gift cards. Savings are not transferable. No cash back. Tax charged before discount applied where required. Tax and shipping charges are not
applicable towards your order total. Offer not valid for orders placed on CVSphoto.com or CVS/pharmacy Optical.
You are receiving this email because you indicated you wanted to be informed of the latest news and specials from CVS/pharmacy online. If you prefer not to receive future emails, please unsubscribe below. Please note that if you are opted in for other CVS/pharmacy email communications, you will continue to receive them unless you opt-out specifically for those.
http://link.cvs.com/u/QFCRVTQ/5N31U/0NTGQ4/EWJA1UO/GK/aHVibGVlcGg2MDZAdHVtYmxyLmNvbQ==/
© Copyright 2013 CVS.com
http://link.cvs.com/r/QFCRVTQ/5N31U/0NTGQ4/EWJA1UO/LZYZV/JQ/t?a=EM_Win_020513
One CVS Drive, Woonsocket, RI 02895
[[QFCRVTQ-G04LP-5N31U-0NTGQ4-EWJA1UO-M-M2-20130205-9ea197435a69c86]]


New York Based software developer, I moved here to pursue my degree in Economics at New York University. I spend a good chunk of my spare time traveling, and meeting new people, and exploring restaurants. Born in Hong Kong, and grew up in Japan, I am half Japanese/Brazilian and half Chinese. I lived in Toyko for 4 years before moving to New York City, and 2 years in Switzerland for College before that for my Hotel Management Degree. Thus I am fluent in several languages: Mandarin, Japanese, Cantonese, portuguese, and English. I enjoy coding and creating amazing things. Thank you for reading and check back often for new posts!


{% extends "base.html" %} {% block app_content %}
{{ file }}
You should have a file to which we write here.


jQuery is a JavaScript library that we can use to do some cool manipulation of HTML pages.
In programming, a library is just code that is written for other programmers—in other words, code that helps you write code. Libraries are mostly composed of functions (remember those?) that you can call in order to do some useful task.
jQuery specializes in manipulating HTML pages. This means we can create or edit content on the fly, perhaps in response to a user interacting with our page in some way.
jQuery is very popular and very widely used, so learning jQuery will be very useful if you want to continue writing web applications after you have finished this class.
If you wanted to know why the library is written "jQuery", we don't know. Maybe they thought was the cool way to name libraries back in the day.
Remember how we had to pull in external stylesheets using a special HTML tag? We need to go through a similar process here.
To pull in a JavaScript library or script, we need to use the
script
tag. It takes a src
element, which should
be a URL pointing to the script in question.
Sometimes, a popular library is made available on a content delivery network. (A content delivery network is basically a web service that stores code libraries on servers in a bunch of regions and countries and makes sure that users in those regions get the code library from the nearest server.) jQuery has its own content delivery network, so we can just use it to get a copy of jQuery onto our pages.
Here is an example of how to get jQuery onto your HTML page:
So how does jQuery actually work? We've said it allows you to manipulate parts of your HTML document, but how does it do that?
jQuery's basic approach is actually similar to how CSS works. Web browsers process CSS rules by using their selectors to find matching elements, and then applying style properties to those elements. jQuery allows you to use selectors in order to select elements, which can then be traversed or modified as needed.
Here's an example:
As you can see, the example above does two things: selects some elements, and then makes a change. In this case, it changes a CSS style property on each paragraph element.
We will now explore some different use cases for manipulating HTML elements with jQuery. Specifically, we will focus on:
If you want to manipulate the page as soon as it has finished loading, you can do so by wrapping your code in a jQuery document loaded check. Here is an example of what that looks like:
The most important thing in this example is the use of $
right
at the beginning of the script block, where we pass in a
function
declaration which contains our CSS manipulation.
The $
function, when given a callback function as an
argument, will wait until the page is fully loaded and ready to go before
executing the code inside the function. This is super important and must
always be done before doing any jQuery selectors or manipulation. A good
rule of thumb is, every line of jQuery must be wrapped inside a call to the
$
function.
Okay, it's pretty boring to just change all paragraphs at the same time, and we could have just used CSS. Let's make things more interesting. What if we want to leave our paragraphs their normal color, but turn them red if the user clicks on them?
Here's how we can do that:
Everything we have seen in jQuery so far has involved manipulating (or creating event handlers for) all elements matched by a jQuery selector. We haven't needed to work with individual matched elements, because we just wanted to turn all of the paragraphs red (or set up a click event handler on all of them). But what if we did need to work with the matched elements?
jQuery supports iterating over elements. This means we can use a selector to get some elements, then work on them one at a time.
Here's an example, where we will count the number of characters in each paragraph and append that count to the end of each paragraph:
$(something)
) for each of the
following cases:
$("p").css("color", "red");
on
jquery.com. What type of style does this
create: inline, embedded, or external? How do you know? (Hint: Look at
the HTML source of the page using Chrome developer tools.)


PiFrame Remote
Settings
Screen Settings
Logs
Frame Stats
Demo Media Player
QR:
Back
Screen Settings
Screen status:
Sleep Settings
Wake Time
Sleep Time
Back
Logs
Back
Frame Stats
CPU Usage
Memory Usage


Torque 2D – Fish Demo Tutorial - Part 2
2. Creating the Level
2.1 Add our background image
We have three background images that we can place. Let's place the first one on the Static Sprites list (as shown in Figure 2.1.1). So click and drag it into your level (as shown in Figure 2.1.2).
Figure 2.1.1
Figure 2.1.2
As you can see, after dropping the image into your level it is far too big. This is because the image's source size was created very big to scale properly with higher resolutions. So let's scale it down. The easiest way to do this is to zoom out (with your mouse wheel or the zoom out button) and then grab a corner. Hold shift and drag (holding shift helps to keep its ratio). Our goal is to make it just bigger than our camera (which is represented by the outer blue border line behind our image). To do this, you must first size it just inside the camera (as shown in Figure 2.1.3), then scale it out just beyond the camera's borders. For more resizing tips, click here. (expands in window)For more resizing tips, click here. (expands in window)
Figure 2.1.3
2.2 Setting our background's layer
Now, there is one more thing we need to do before we can add the next two background images; we need to set this background's layer. Change the background image's layer to 30 (it's nice to have a layer for hiding objects). For details on changing the layer, click here.For details on changing the layer, click here.
2.3 Adding and layering our rock images
Figure 2.3.1
Figure 2.3.2
Now drag the first rock image, (the second image in our Static Sprites library (as shown in Figure 2.3.2)), into the center of your level. Just like our background image, click one of the corners and hold the shift key to drag it proportionally. Do this on each corner until it fits our background image nicely. It is better to make it just a slight bit larger than our background image, rather than smaller (as shown in Figure 2.3.3). Click the Edit tab and then change its layer to 20.
Figure 2.3.3
Now we have brought in our first rock image; lets add our second one. As you can see, on the rock image we just added there are some areas that seem to be detailed very roughly in comparison to the rest. These are the spots that our next layer will fit over, so when sizing and positioning our next rock layer we must make sure we fit it nicely over those areas. Click on the Create tab again and this time we are getting the third image in our Static Sprites library (as shown in Figure 2.3.4). Drag that image into the center of our level and resize it to fit our other rock image. (Just like we did before, you can hold shift to keep the resizing proportional when using the corner handles on the object).
Figure 2.3.4
Figure 2.3.5
Figure 2.3.6
We have now placed our background image (layered to be shown behind everything), our back rock image (to be shown behind everything but our background), and our front rock image (to be shown a few layers in front of our back rock image). Our base level is complete!


The D2RQ Platform is a system for accessing relational databases as virtual, read-only RDF graphs. It offers RDF-based access to the content of relational databases without having to replicate it into an RDF store. Using D2RQ you can:
- query a non-RDF database using SPARQL
- access the content of the database as Linked Data over the Web
- create custom dumps of the database in RDF formats for loading into an RDF store
- access information in a non-RDF database using the Apache Jena API
D2RQ is Open Source software and published under the Apache license. The source code is available on GitHub. You can contact the dev team on the D2RQ mailing list at<EMAIL_ADDRESS>News
- Version 0.8.1 released. This release adds support for W3C's Direct Mapping, a new
d2r-query
script for command-line SPARQL querying, a comprehensive set of options for including or excluding specific tables and columns, metadata for each resource and the entire dataset in D2R Server (including VoID support), an option for specifying SPARQL query timeouts, and D2R Server default settings that work better for large databases. For full details, see the release notes. 2012-06-22 - Free webinar on D2RQ. As part of the LOD2 project's series of webinars on Linked Open Data topics, Robert Isele will present a session about D2RQ on Tuesday, April 24th. Sign up here, or see here for more information. 2012-04-21
- Poster on D2RQ/Update at WWW2012. Vadim Eisenberg's D2RQ/Update extension will be presented next week in the poster session at the WWW2012 conference in Lyon, France. See the poster here. 2012-04-13
- Version 0.8 released. New features include preliminary SPARQL 1.1 support, Firebird support, generation of RDFS/OWL schemas for databases, and download maps for making the content of CLOB/BLOB columns accessible via HTTP. Datatype compatibility with Oracle, MySQL, SQL Server and HSQLDB has been greatly improved, and a truckload of bugs have been fixed. For full details, see the release notes. 2012-03-12
Overview and Features
The D2RQ Platform consists of:
- the D2RQ Mapping Language, a declarative mapping language for describing the relation between an ontology and an relational data model. More…
- the D2RQ Engine, a plug-in for the Jena Semantic Web toolkit, which uses the mappings to rewrite Jena API calls to SQL queries against the database and passes query results up to the higher layers of the frameworks.
- D2R Server, an HTTP server that provides a Linked Data view, a HTML view for debugging and a SPARQL Protocol endpoint over the database. More…
Database Compatibility
- Supported databases
- Oracle
MySQL
PostgreSQL
SQL Server
HSQLDB
Interbase/Firebird - ODBC data sources
- D2RQ can connect to ODBC data sources like MS Access using an ODBC-JDBC bridge. This works with some limitations. We recommend using a dedicated JDBC driver for the database in question.
- Other databases
- May or may not work. By default, D2RQ interacts with the database using the SQL-92 standard. Any compatible database should work out of the box. We are interested in reports about D2RQ on other databases.
See Database compatibiliy on the D2RQ wiki for more details.
Acknowledgements
- Maintainers
-
Richard Cyganiak
- Project founder
- Chris Bizer
- Contributors
-
Luís Eufrasio Teixeira Neto
Hannes Mühleisen
Aftab Iqbal
Jacobus Geluk
Giovanni Mels
David Venable
Christian Becker
Olaf Hartig
Andreas Langegger
Herwig Leimer
Inigo Surguy
Oliver Maresch
Jörg Garbers
- Contributing organisations
- FU Berlin, DERI, UCB, JP Morgan Chase, AGFA Healthcare, HP Labs, Johannes Kepler Universität Linz


:: com :: sun :: star :: xml :: sax ::
|
| unpublished |
interface XFastTokenHandler |
|
|
|
- Usage Restrictions
- not published
- Description
- interface to translate xml strings to integer tokens.
An instance of this interface can be registered at a XFastParser.
It should be able to translate all xml names (element local names,
attribute local names and constant attribute values) to integer tokens.
A token value must be greater or equal to zero and less than
FastToken::NAMESPACE. If a string identifier is not known
to this instance, FastToken::DONTKNOW is returned.
|
| Methods' Summary |
| getToken |
returns a integer token for the given string identifier.
|
| getIdentifier |
returns a string identifier for the given integer token.
|
| getTokenFromUTF8 |
returns a integer token for the given string
|
| getUTF8Identifier |
returns a identifier for the given integer token as a byte
sequence encoded in UTF8.
|
| Methods' Details |
getToken
| long |
| getToken( |
[in] string |
Identifier ); |
- Description
- returns a integer token for the given string identifier.
- Returns
- a unique integer token for the given String or FastToken::DONTKNOW
if the identifier is not known to this instance.
|
|
getIdentifier
| string |
| getIdentifier( |
[in] long |
Token ); |
- Description
- returns a string identifier for the given integer token.
|
|
getTokenFromUTF8
| long |
| getTokenFromUTF8( |
[in] sequence< byte > |
Identifier ); |
- Description
- returns a integer token for the given string
- Parameter Identifier
- the string given as a byte sequence encoded in UTF8
- Returns
- a unique integer token for the given String or FastToken::DONTKNOW
if the identifier is not known to this instance.
|
|
getUTF8Identifier
| sequence< byte > |
| getUTF8Identifier( |
[in] long |
Token ); |
- Description
- returns a identifier for the given integer token as a byte
sequence encoded in UTF8.
|
|
Top of Page
Copyright © 2013, The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache, the Apache feather logo, Apache OpenOffice and OpenOffice.org are trademarks of The Apache Software Foundation. Other names may be trademarks of their respective owners.


Impulse aims to provide students with a world-class technical experience, to inspire and inculcate critical thinking among them by enhancing their problem-solving skills and promote indigenous self-made
technology.
Impulse’20 is an event
you wouldn’t wanna miss! This two-day technical fest will witness young minds in action as they take on these exciting opportunities that are sure to prove once in a lifetime!
Interactive and comprehensive seminar on how to shape your B.Tech. into a very productive and result-oriented graduation program, discussion on Placement Scenario, preparation for Placements (especially Off-Campus Placements) and vital information and guidance about the Tech and IT world.
Impulse'19
With IMPULSE'19, we successfully organized the second version of our tech-fest series, "IMPULSE". From Algorythm, the event, especially for the coding geeks to gaming where PubG and CS: Go players were slashing the enemies to get to the finals. DevDash, the first-ever blind web development event in the history of MAIT was itself a unique experience for the participants and volunteers as well, Explora-the workshop where students learned a lot about competitive coding and interview preparation. But the most special event was HackMAIT 2.0, a 36-hours hackathon, where the winners were awarded prizes worth 1 lac.
Impulse'18
Impulse’ 18 was the first tech fest of IOSD-MAIT and it was a great success. With crowd engaging events such as PIXEL: UI/UX designing event and CodeSaga: a competitive coding event to an enthusiastic game development workshop. With Impulse’ 18 we also organized the first version of HackMAIT, a 36-hour hackathon, and the winners were awarded prizes worth 1 lac.


{% endblock breadcrumbs_self %}
{% block content %}
{{ block.super }}
{% include "hawc/_delete_block.html" with name="search/import" notes="This will remove all the references for this assessment, from this search-query/import string.
If a reference found in this search/import was also found in other searches/imports, it will not be removed.
This may also remove all data which was extracted from these references as well, including study evaluation, endpoints, and BMD modeling." %}
{% endblock content %}


---
date: "2009-09-01T00:00:00Z"
meta:
_edit_last: "2"
published: true
status: publish
categories:
- Programming
tags:
- rant
title: Good Bug Reports and Tracking
type: post
---
Every developer, no matter how experienced, has to dig in and fix bugs. This is, in my experience, the typical cycle:
- bug is reported
- bug is assigned to developer
- developer thinks the bug is fixed
- developer marks bug as resolved
- tester checks to see bug is fixed, but it isn’t.
- tester reopens bug, assigns it back to developer
- back to step number two. Repeat until developer (or tester) climbs to the top of a 307 foot administrative building with high-powered rifles to demonstrate USMC-worthy marksmanship.
Now, even if you aren’t into the whole Lean Software development philosophy (i.e. eliminating waste), you can probably appreciate that it can be pretty wasteful of time and patience every time that #6 happens, so please indulge me as I elaborate on some of the finer points of bug reporting. Now, where I say “bug reporter”, I typically mean somebody who is in a QA role – their job is to find bugs and report them. This doesn’t always have to be the case though.
If you check out most open source projects, you will often find rules/guidelines for reporting bugs. In the case that doesn’t exist then perhaps the following might be of use: When you log a bug, be explicit, and give lots of details. Don’t be lazy. If it’s hard to duplicate your bug, then odds are it either won’t get looked at, or won’t be fixed properly. And when it doesn’t get fixed properly, there will be a lot of churn.
At the very least, when reporting a bug you should provide:
- A detailed description of the problem. Note the emphasis on problem.  Let the programmer figure out the solution. For example: Using version 3.1415 of the application on 28-July-2009, I was expected a date to be calculated a certain way based on some values. The application didn’t crash, but the correct date was not calculated.
- What you expect to happen. If you have some sort of formal spec, repeat it here, and cite how to find the spec. i.e. According to Page 1054, in section 1<IP_ADDRESS> the new date is to be calculated as follows : add the value of ((a - b)- 10) /2 (rounding down) to the date Y for a new date of Z.
- What actually happened. i.e. Using these values a=300, b= 150 and Y of 1-Sep-2009 I expected that the new date Z should be 2-Oct-2009
- A step-by-step description of HOW to duplicate the bug. This means explaining in excruciating detail HOW the programmer can duplicate what your reporting, i.e.
- Go to the URL http://myproblem.com/is/here
- Click on the text box next to the label “Value A:” and enter a value of 300
- From the drop down list by “Value B:” and click the value 150 from the drop down list
- Use the tab key to navigate to the “Calculate new date” button.
- Hit Enter
- The text box by the “New Date:” label now has the date of 4-July-1943. I expected 2-Oct-2009.
- How the developer can get a hold of you. This comes in handy when for some reason the developer can’t duplicate your bug or doesn’t understand what you were doing.
When the developer flags the bug as resolved and it turns out not to be fixed, don’t just re-open the bug with curt “This is still broken”.
Ah, but now aren’t I the smug developer – shifting my inability to quickly resolve a bug to the poor reporting capabilities of my tester. I’m pretty ungrateful too. I mean, somebody took the time to test out my application, and then enter a bug like “I tried to calculate the new date and it didn’t work. Please fix”. Well, fear not – there is a lot developers should be doing as well, but that is the subject of a later post.
Of course, the key part in all of this is COMMUNICATION. Don’t be afraid, as someone reporting a bug, to actually talk to the developer. Nothing really beats face-to-face communication (or a phone call) if things seem unclear. Odds are you won’t have an empty whisky bottle thrown at you. Most likely the personal grooming standards of the developer will be higher than that of a middle age serf during the Black Plague. In theory, as a tester, you’re on the same side as the developer trying to fix the bug.


SCAIA (Sentinel based Complex Agri-Industrial Application) is an operational, automated processing chain, generating customized agricultural products from Sentinel-1 (A&B) and Sentinel-2 (A&B) time series data, according to the client’s predefined requests. The Web application was tailored to the needs of Dalmand Corporation (Bonafarm Group), and provides near real time monitoring of their cropland management. The standalone system can be run on any hardware running a Unix-like operating system; even on HPCs and cloud computing server infrastructures. The system is currently configured to develop 42 dedicated products under 4 main categories. Most of the final products are related to four major crop types (winter wheat, winter barley, rapeseed, and corn). All services were requested by our pilot partner, and each product was verified by experts in respect to their own operations purposes. SCAIA is a joint effort of Sarmap SA, Dalmand Corporation, and the University of Pécs. The development was supported by the European Space Agency and the National Information Infrastructure Development Institute supercomputing infrastructure (NIIF HPC).


---
layout: post
title: 'Agile 2009: Herding Cats - Managing Large Test Suites'
date: 2009-08-28 00:00:00
category: software-development
---
Herding Cats - Managing Large Tests Suites piqued my interest, as we've struggled with some aspects of automated testing recently.
- The presenter, David Kessler, has been running tens of thousands of tests on hundreds of builds of their product;
- There's a pull between fixing up tests and doing new work; keeping the build green is like herding cats;
- Many of the test failures are at their root caused by basic Java or design issues;
- They have a classic build monitor on a large screen; one refrain heard from the dev team is "it's not my build that broke!";
- Lessons they've learned include decoupling tests from one another; mocking out external services (they particularly referenced a third-party payment gateway); tracking percentages of tests which have been temporarily "turned off"; and simplifying test data;
- Complex hierarchies of tests cause problems; there's a maintenance cost here which can in part be addressed by simplifying their setup;
- Third party services need to be mocked out. A payment gateway they were working with said they were fine for automated testing, but when it got to them being hit per-build by a CI machine, they were less keen;
- Working with 3P services opens up issues of availability, network and firewall problems;
- They replaced this with a mocked out service, which also let them test edge cases easily, and backed this up with a single test of the remote service to check they could connect to it;
- Turning tests off breaks trust - "yeah we were testing for this thing, then we stopped doing it";


About Me
Hello every one , my name is Omar Al-Zoubi I am 30 years old .
graduated from Yarmouk university from Computer Information Systems department ,
and I work alot in different field,some of themwith high salary ,
but then I felt that I am not comfort with any job of them because I am not
looking for
money I want to be WEB DEVELOPER.then I heared about the scholarship
that LTUC provide. and I decided to go on and follow my dream.hen I heared about
the scholarship that LTUC provide. and I decided to go on and follow my dream.
Here is some of my education and experiances :
- Bachelor Degree in Computer Information system.
- Data Science intensive course at Al Hussein Technical University (100 hours).
- Web development intensive course (Full-Stack) at LTUC (in progress).
- Customer care at “Extencya'' company.
- Technical support at “Extencya'' company.
- Salesman (cash van) at Modern Arab Distribution.


---
layout:post
categories:toeza
tags:toeza
title:How to Play Whist
date:2016-12-07 14:32:45 +0800
---
User Reviewed
How to Play Whist
Two Methods:Basic WhistBid Whist or Contract WhistCommunity Q&A
Whist is the 18th century ancestor to many trick-taking card games such as Bridge or Hearts. In its original form it is a fun game of strategy and communication between four players. A more recent and complex variant called bid whist or contract whist has the players bet on how many tricks they can take before the game begins.
Steps
Method 1Basic Whist
1
Divide into two partnerships. Whist is always played between two teams. Have players sit in a circle, each player between their two opponents and across from their partner.
For example, the two members of Team A and the two members of Team B sit down in ABAB order.
2
Shuffle the cards and deal them out to each player. Begin with the player to your left and deal clockwise. Each player should end up with exactly 13 cards, yourself included.
You can all agree on who gets to be first dealer, or decide randomly.
Remove any jokers from the deck before dealing.
When playing with strangers or in a tournament, one player shuffles, a second player cuts the cards, and a third player deals them out. This reduces opportunity for cheating and is a common standard for card games.
3
Reveal the last card dealt to the entire player. The suit of this card (hearts, spades, clubs, or diamonds) is the Trump Suit for this round and will always "beat" cards from the other suits. (Read on for more details.)
This card is part of the dealer's hand.
If the last card dealt doesn't end up in front of the dealer, everyone should count their hand and make sure they have 13 cards exactly. Remember, always deal hands beginning with the player on the dealer's left and moving clockwise.
This is the only card revealed. All others are hidden in their owner's hand until played.
4
Inform everyone of the order of cards. Each card is ranked according to the standard system, with Aces high.
From lowest to highest: Two, Three, Four, (...), Nine, Ten, Jack, Queen, King, Ace.
5
The player to the dealer's left plays a card face up. This card remains on the table visible to everyone.
This is called leading, since it is the only card on the table. Once a trick is taken, the cards will be moved to the side and whoever took the trick will lead.
A player may lead with any card.
6
The next three players take turns playing a card of the same suit. Moving clockwise (left), each player in turn places a card from their hand face up next to the previous cards.[1]
If a player has any card in hand with the same suit as the original card, he must put a card down of that suit.
If he has no cards of the original suit, he may play any card from his hand.
If more than one suit is face up on the table, only the original suit led restricts what cards someone can play.
For example, player A leads with a 10 of Clubs. Player B chooses from the Clubs in her hand and puts down a King of Clubs. Player C doesn't have a single Club, so he chooses from any card in his hand and puts down a 3 of Diamonds. Player D has the Jack of Clubs in hand as their only Club and must play it.
7
Determine who takes the trick. The stack of four face up cards is called a trick. One player will take this trick and put it face down to one side to be used later for scoring. Follow these simple rules to determine who wins the trick and gets to take it:
If one or more cards from the trump suit was played, whoever played the highest trump card wins.
If there are no trump cards in the trick, whoever played the highest card of the suit led wins.
Remember, the trump suit was determined by the revealed card earlier. Write it down next time if people have trouble remembering.
Do not put the cards from the trick back into your hand. They will not be played again for this round.
8
The winner of the last trick leads for the next one. After moving the last trick to his personal pile, the winner places another card down. Every trick follows the same rules:
The leader may play any card from their hand.
The other 3 players take turns in clockwise order from the leader. Each player must play a card of the same suit led if she has it. Otherwise, she may play any card from her hand.
Whoever has the highest trump card wins the trick. If there are no trump cards in the trick, the highest card of the suit led this trick wins.
9
Continue to play tricks until everyone is out of cards. Everyone should run out of cards on the same trick since the cards were dealt evenly.
In order to make scoring easier, try to keep each trick you win distinct. You can do this easily by stacking them on top of each other but reversing their orientation. (The first trick is oriented North-South, the second is East-West, the third is North-South, etc.)
10
Determine each team's score. You score points as a team, not as an individual.
Count each team's tricks. If Frodo took 3 tricks this round and his partner Sam took 4, they combine this into one number: 7.
The winning team subtracts 6 from the number of tricks they won. This is their score for the round. (Frodo and Sam would earn 1 point.)
The losing team scores no points this round.
Remember to count tricks (groups of 4 cards) and not the number of individual cards won.
11
Play additional rounds until a team scores a total of 5 points. To set up for the next round:
Shuffle all cards together.
The player to the last dealer's left is the new dealer. (Continue rotating clockwise each round.)
The last card dealt is revealed as before to determine the trump suit. There is only ever one trump suit per round.
Method 2Bid Whist or Contract Whist
1
Make sure all players are familiar with whist rules. Bid Whist begins with a bidding process that will make little sense to someone who has not seen whist played before.
(Fortunately, the rules for basic whist are written right on this page!)
2
Shuffle two different Jokers into the deck. Players should agree which Joker is the "Big Joker" and which is the "Little Joker". The deck should now contain 54 cards.
3
Deal 12 cards to each player and 6 in its own pile. This pile of six is called the kitty. Players may look at their hands but the kitty remains face down.
4
The player to the dealer's left makes a bid or passes. There are several varieties of bid a player can make. This is essentially a bet (or "contract") that the player's team will be able to take a certain number of tricks.[2]
5
Each bid must include a number from 1 to 7. This is the number of points the bidding player claims they can make.
Since the first six tricks a team wins aren't worth any points, add 6 to the bid to determine how many tricks the player's team has to take to succeed. A bid of 3 is a promise to win at least 9 tricks.
6
A winning "Downtown" bid changes the value of the cards. A bid of "Four" or "Four Uptown" is a promise to win at least 4 points (10 tricks) and to follow the usual ranking of the cards. A bid of "Four Downtown" promises to win at least 4 points and follow a partially reversed card ranking:[3]
The uptown (or normal) card ranking from lowest to highest is: 2, 3, (...), 10, J, Q, K, A, Little Joker, Big Joker. Both Jokers are considered trumps.
The downtown card ranking from lowest to highest is: K, Q, J, 10, (...), 2, A, Little Joker, Big Joker. Both Jokers are considered trumps.
Note that Aces and Jokers remain high in the Downtown ranking!
7
"Notrump" bids promise to play a round without a trump suit. A bid of "Seven Notrump" promises that the bidder's team will win seven points (all 13 tricks) and that there will be no trump suit this round.
If a Notrump bid wins, jokers are worthless this round and can never win a trick.
You cannot make a "Notrump Uptown" or "Notrump Downtown" bid.
8
Each player in clockwise order bids or passes. Each bid must be higher than the last bid spoken, following these rules:
A bid is always higher than a bid with a lower number. Any bid of "Four" beats any bid of "Three".
A "Downtown" bid is higher than an "Uptown" bid of the same amount. Remember that an unspecified bid (e.g. "Five") is assumed to be an Uptown bid.
A "Notrump" bid is higher than any other bid of the same number.
9
When the other 3 players pass, the last bid spoken wins. The rules declared in that bid are now in effect this round, once the winner makes some decisions:
If the winning bid was a Trump, Uptown, Downtown, or unspecified bid, the winner decides which suit is the trump suit this round.
If the winning bid was a Notrump bid, the winner decides whether to play with Uptown or Downtown ranking.
If the first three players to speak all pass, the dealer must make a bid and automatically wins the bidding.
10
The winning bidder looks at the pile of cards set aside. The six cards in this "kitty" count as the first trick for the winner. There are additional special rules associated with these:
Unless the winning bid was Notrump, the winner reveals the cards in the kitty to all players.
The winner may now secretly exchange any number of cards in his hand for an equal number in the kitty. The other players can see how many cards are being exchanged, but not which ones.
11
Play a round of whist. Apart from the special rules determined by the winning bid, including the value of Jokers, the trick-taking portion of the game is unchanged.
The rules for this portion are detailed in the Basic Whist section.
Since the winner of the bidding portion took the first trick (the kitty), that player leads for the next trick.
12
Determine scoring. Only the team that won the bidding this round can score points, but they have the potential to lose points as well:
The bid-winning team counts the number of tricks they took this round. This includes the "kitty" set aside while dealing. (It counts as one trick.)
If the bid-winning team succeeded in its points goal, they score points normally. (Remember that a team's first six tricks provide no points. Each additional trick is worth one point.)
If the bid-winning team failed to meet its goal, it loses points equal to the amount they fell short. For instance, if the winning bid was Seven and that team only scores three points (9 tricks), that team loses four points.
13
Play additional rounds until a predetermined score is reached. A common system is to play until one team earns 5 points total (and wins the game) or -5 points total (and loses).


Connected Peers
Currently Connected to Peer:
Messages:
You [
]
Sent:
Remote Connection Data:
Local Connection Data:


YBN Cordae Sheds Tears While Reacting to Being Nominated for 2 Grammys
by VladTVYBN Cordae took to Instagram to react to being nominated for Best Rap Album and Best Rap Song at the 2020 Grammys. Cordae is nominated alongside Dreamville, 21 Savage, Tyler, The Creator, and Meek Mill for Best Rap Album. Cordae's The Lost Boy debut album was released earlier this year to critical acclaim, which is why it was no surprise that the project was nominated for a Grammy.
 He followed up on Instagram by posting a video in his Stories, where he shed tears and stood in disbelief.
Cordae is nominated alongside Dreamville, 21 Savage, Tyler, The Creator, and Meek Mill for Best Rap Album.


The index number of the property in it's property group
A 1D, positive speed value equal to the speed at which the property is changing at the default time. This element can be used only for spatial properties.
The temporal velocity value at the current time. For spatial properties, such as Position, it returns the tangent vector value. The result is the same dimension as the property.
Used to create a new style object, rather than referencing and modifying an existing one.
An empty style object
Get the style object of a text property at a character index
Which character to get the style at
The time to get the style at, defaulting to the current time
The index of the keyframe to return (e.g. the 1
st keyframe)
The keyframe at the specified index on the property
Loops a segment of time that is measured from the first keyframe on the layer forward toward the Out point of the layer. The loop plays from the In point of the layer.
"cycle"
: (default) Repeats the specified segment.
"pingpong"
: Repeats the specified segment, alternating between forward and backward.
"offset"
: Repeats the specified segment, but offsets each cycle by the difference in the value of the property at the start and end of the segment, multiplied by the number of times the segment has looped.
"continue"
: Does not repeat the specified segment, but continues to animate a property based on the velocity at the first or last keyframe.
determines what segment is looped: The segment looped is the portion of the layer from the first keyframe to the numKeyframes+1 keyframe. The default value of 0 means that all keyframes loop
Loops a segment of time that is measured from the first keyframe on the layer forward toward the Out point of the layer. The loop plays from the In point of the layer.
"cycle"
: (default) Repeats the specified segment.
"pingpong"
: Repeats the specified segment, alternating between forward and backward.
"offset"
: Repeats the specified segment, but offsets each cycle by the difference in the value of the property at the start and end of the segment, multiplied by the number of times the segment has looped.
"continue"
: Does not repeat the specified segment, but continues to animate a property based on the velocity at the first or last keyframe.
The number of composition seconds in a segment to loop; the specified range is measured from the first keyframe
Loops a segment of time that is measured from the last keyframe on the layer back toward the In point of the layer. The loop plays until the Out point of the layer.
"cycle"
: (default) Repeats the specified segment.
"pingpong"
: Repeats the specified segment, alternating between forward and backward.
"offset"
: Repeats the specified segment, but offsets each cycle by the difference in the value of the property at the start and end of the segment, multiplied by the number of times the segment has looped.
"continue"
: Does not repeat the specified segment, but continues to animate a property based on the velocity at the first or last keyframe.
determines what segment is looped: The segment looped is the portion of the layer from the last keyframe to the thisProperty.numKeys - numKeyframes
keyframe. The default value of 0 means that all keyframes loop
Loops a segment of time that is measured from the last keyframe on the layer back toward the In point of the layer. The loop plays until the Out point of the layer.
"cycle"
: (default) Repeats the specified segment.
"pingpong"
: Repeats the specified segment, alternating between forward and backward.
"offset"
: Repeats the specified segment, but offsets each cycle by the difference in the value of the property at the start and end of the segment, multiplied by the number of times the segment has looped.
"continue"
: Does not repeat the specified segment, but continues to animate a property based on the velocity at the first or last keyframe.
The number of composition seconds in a segment to loop; the specified range is measured from the last keyframe backwards.
The marker that is nearest in time to t
The number of levels in the property hierarchy to ascend, e.g. countUp = 1
will return the parent PropertyGroup
.
The group of properties (PropertyGroup
object) relative to the property of which the expression is written
Smooths the property values over time, converting large, brief deviations in the value to smaller, more evenly distributed deviations. This smoothing is accomplished by applying a box filter to the value of the property at the specified time.
The range of time (in seconds) over which the filter is averaged.
The number of discrete samples evenly spaced over time; use a larger value for greater smoothness (but decreased performance). Generally, you’ll want samples to be an odd number so that the value at the current time is included in the average.
The composition time in seconds to get the speed at
A 1D, positive speed value equal to the speed at which the property is changing at the specified time. This element can be used only for spatial properties.
Samples the property value at a time which is wiggled
The rate at which the value changes in wiggles per second
How much the value should change, in units of the original property value (e.g. 1
by 100% of the original value)
How much detail the wiggle has, which is driven by the number of "octaves" of noise to multiply together. Higher values will have more detail
The amount the given amplitude is multiplied by for each octave, which controls the falloff of the upper harmonics ("octaves").
The time at which the value is sampled for use within the wiggle
Returns the value for the property at the specified time
THe composition time in seconds to get the value at
The composition time in seconds to get the velocity at
The temporal velocity value at the specified time. For spatial properties, such as Position, it returns the tangent vector value. The result is the same dimension as the property.
Modifies the property value randomly over time.
The rate at which the value changes in wiggles per second
How much the value should change, in units of the original property value (e.g. 1
by 100% of the original value)
How much detail the wiggle has, which is driven by the number of "octaves" of noise to multiply together. Higher values will have more detail
The amount the given amplitude is multiplied by for each octave, which controls the falloff of the upper harmonics ("octaves").
The time at which the value is sampled for use within the wiggle
Generated using TypeDoc
The number of keyframes on the property


Welcome
Please sign up either as a Doctor or as a Patient
Already have an account?
Login
Patient
Doctor
Sign Up as a Patient
Username
Password
First Name
Middle Name
Last Name
Address
Email
Phone Number
Emergency Contact Number
Your Doctor's Name
Your Doctor's Number
Your Doctor's Email
Hospital
Please select your Hospital
Kaiser Permanente
Cedars-Sinai Medical Center
UCLA Medical Center
St. Jude Medical Center
Keck Medical Center of USC
Gender
Please select your Gender
Male
Female
Other
Birthday
Height
Weight
Ethnicity
Please select your Ethnicity
American Indian or Alaska Native
Asian
Black or African American
Hispanic or Latino
White
Sign Up as a Doctor
Username
Password
First Name
Middle Name
Last Name
Address
Email
Phone Number
Emergency Contact Number
Your Doctor's Name
Your Doctor's Number
Your Doctor's Email
Hospital
Please select your Hospital
Kaiser Permanente
Cedars-Sinai Medical Center
UCLA Medical Center
St. Jude Medical Center
Keck Medical Center of USC
Gender
Please select your Gender
Male
Female
Other
Birthday
Height
Weight
Ethnicity
Please select your Ethnicity
American Indian or Alaska Native
Asian
Black or African American
Hispanic or Latino
White


|
Gephi Toolkit Javadoc | ||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
| Class Summary | |
|---|---|
| AbstractList<T> | Complex type that defines list of any type of items. |
| BigDecimalList | Complex type that define a list of BigDecimal items. |
| BigIntegerList | Complex type that define a list of BigInteger items. |
| BooleanList | Complex type that define a list of Boolean items. |
| ByteList | Complex type that define a list of Byte items. |
| CharacterList | Complex type that define a list of Character items. |
| DoubleList | Complex type that define a list of Double items. |
| DynamicBigDecimal | Represents BigDecimal type which can have got different values in
different time intervals. |
| DynamicBigInteger | Represents BigInteger type which can have got different values in
different time intervals. |
| DynamicBoolean | Represents Boolean type which can have got different values in
different time intervals. |
| DynamicByte | Represents Byte type which can have got different values in
different time intervals. |
| DynamicCharacter | Represents Character type which can have got different values in
different time intervals. |
| DynamicDouble | Represents Double type which can have got different values in
different time intervals. |
| DynamicFloat | Represents Float type which can have got different values in
different time intervals. |
| DynamicInteger | Represents Integer type which can have got different values in
different time intervals. |
| DynamicLong | Represents Long type which can have got different values in
different time intervals. |
| DynamicShort | Represents Short type which can have got different values in
different time intervals. |
| DynamicString | Represents String type which can have got different values in
different time intervals. |
| DynamicType<T> | A special type which provides methods of getting/setting values of any time interval. |
| FloatList | Complex type that define a list of Float items. |
| IntegerList | Complex type that define a list of Integer items. |
| Interval<T> | This class represents an interval with some value. |
| IntervalTree<T> | It is essentially a map from intervals to object which can be queried for
Interval instances associated with a particular interval of time. |
| LongList | Complex type that define a list of Long items. |
| NumberList<T extends Number> | Complex type that defines list of items that are numbers. |
| ShortList | Complex type that define a list of Short items. |
| StringList | Complex type that define a list of String items. |
| TimeInterval | Complex type for specifying time interval. |
| TypeConvertor | Class responsible for type manipulation and creation needed in Attributes API. |
Defines new immutable types that can represent attributes.
Defines more complex type of data than Java doesn't provide. Types defined
here may be supported by AttributeType
and exploited by others
API.
|
Gephi Toolkit Javadoc | ||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |


RobotWare
RobotWare is a simple, 'code free' environment for automating tasks. It allows non-programmers to easily develop
macros to do repetitive tasks.
At the lowest level is a step which is a small piece of functionality eg:
- deleting a file on disk
- copying a file
- creating a zip archive
A variety of steps are then chained together to form a specification eg:
- delete an image file
- copy a new image file
- resize image file
- create a zip archive of image file
- delete zip archive on FTP server
- upload new zip archive to FTP server
- play a sound
RobotWare will then execute each of these steps in the specification in sequence to automate a task.


The marvelous-aurelia-grid
is an open source, modern and powerful component based on aurelia framework.
It provides rich set of features such as grouping, state persistance, filtering and many more. It leverages binding syntax
to make configuration as easy as possible. Default implementation of remote data source uses .NET's IQueryable
interface
making integration with ASP.NET
sites extremally simple. Under the hood it is built on component driven architecture
which makes it easy to extend. It provides local and remote data sources.
Please bear in mind that this library is still in the beta and some features might be missing.
Install the grid into your project using jspm::
jspm install marvelous-aurelia-grid
Then load the css file and let know aurelia about the grid plugin::
import 'marvelous-aurelia-grid/styles/default.css!';
// ...
export function configure(aurelia) {
let config = aurelia.use;
config
// ...
.plugin('marvelous-aurelia-grid');
aurelia.start().then(a => {
a.setRoot();
});
}
Each grid needs a configuration. Bare minimum is configured data source and columns.
There are 3 approaches to the configuration:
Here is an HTML based example:
Exactly the same configuration with code based approach:
It is also allowed to mix both of them:
Currently only modern browsers are supported, but IE >= 9 support is on the TODO list.
GNU General Public License is the only option for now, but commercial license will be available in the future. It will not be free, but price will be affordable even for small projects.


{% extends "layout.html" %} {% block title %} Documentation- {% endblock %} {% block head %} {{ super() }}{% endblock %} {% block content %}
DBaaS allows FHCRC faculty and staff to create stand alone database instances. The database instances are created in docker containers on a shared server managed by scicomp. You will not have direct access to the file system but you will have superuser permissions to the database instance. Current support for these database servers is minimal. We will back up your databases, allowing for recovery with data loss of up to 24 hours. We can assist with tuning your database if performance is an issue.
A dropdown will apear when you hover over "Create DB Container" from the main DBaas page. The dropdown shows the different databae engines that are available. Select one by clicking on its name. Within each create screen you will have the option to select a particluar version of the database. New database engines and updated versions will be made available. In the web form we have provided default/recommended values where possible. These defaults can be altered in the form but at this time:
If you have questions about database configuration options and defaults, contact scicomp.
When you submit this form, a database container will be created with the name in "DB/Container Name" field. The default database name will match the container name. The "DB Username" and "DB password" are used to create a database account which will have root privliages for the DB. As the root user you will be able to create other user accounts and grand premissions. The "Contact Name" and "Contact Email" are the name and email, respectively, of the person or group that Scientific Computing can contact in case of outages or changes to the system.
A secondary root account is created by Scicomp for the purpose of performing backups.
There is a link to "Delete DB Container." This will remove the docker container where the database runs, but will not delete the data directory. Scicomp manually deletes those files 10 days after the deletion of the container. If you contact scicomp before that time, we can recreate the container very easily. If you contact scicomp to restore a deleted container after 10 days, it will take time to restore the databases and may result in data loss. NOTE: in order to delete a container, you will need a superuser login and password on the database server.
Please report any bugs or submit requests for additional functionality to github issues at https://github.com/FredHutch/DB4SCI.git


Poll by @Luis Perez
I would rate my understanding of the material in the 02_model-fitting
as:
| 😱 | | 0 |
| 🙁 | | 0 |
| 😐 | ████████████ | 12 |
| 🙂 | ██████████ | 10 |
| 😄 | █ | 1 |


{% set page = { title: 'index', dev: true, secondary: true, service: 'DS1500', html_classes: ['page-class'] } %} {% extends page.layout | d(prototype.current.layout) %} {% block primary %}
We have received the document and will now look at the information you have provided in support of your patient's claim.
Complete the missing information and post in to DWP to claim your payment.
We will pay your fee directly into your bank or building society account.
{% endblock %} {% block secondary %} {% endblock %} {% block body_end %} {{ super() }} {% endblock %}


Team Profile Generator
John
1
<EMAIL_ADDRESS>1
Jimbo
2
<EMAIL_ADDRESS>jimbo123
Cate
3
<EMAIL_ADDRESS>UCF


You've launched the Jasmine webOS test harness app for running all of its specs. There is either a low-level problem,
jasmine.js was not included, or you have launched this app from the launcher instead of the command line.
Check the logs for this app and/or ensure that you are launching the app from your command line via rake.


{% extends "base.html" %} {% block content %}
To sign up to this list as a participant, and to get others to participate, please use:
{{ signup_url }}
To review and close your list, triggering Santa to send out emails to all poeple that signed up, please use:
{{ review_url }}


sdPreprocessSprite performs one of the pre-processing operations on an sSprite
void sdPreprocessSprite(sSprite* pSprite,long dwOperationID,long dwColor);
None. [ASM: All registers are preserved.]
sdPreprocessSprite(pSprite1,SDPREPR_ALPHA_FROM_COLOR,0xFF00FF);
sdPreprocessSprite(pSpriteWithAlpha2,SDPREPR_PREMULTIPLY_ALPHA,0);
SDPREPR_ALPHA_FROM_COLOR sets the SDRAWSPRITE_HASALPHA flag of the sSprite.
SDPREPR_PREMULTIPLY_ALPHA sets the SDRAWSPRITE_PREMULALPHA flag of the sSprite.
These two flags are used in sBlt() to determine which of its 3 internal transfers/blends to perform.
The first flag is used in sBltAlpha() to determine which of its 2 internal blends to perform.


COMING SOON
A collaboration between director Clyde Petersen and the band Earth
Even Hell Has its Heroes is a documentary film by Clyde Petersen, in collaboration with the legendary Seattle drone band Earth. Pioneers of the drone metal genre, the members of Earth have a legacy of 25 years of musical innovation and personal reinvention.
DRONE DOOM DRUGS
TBD
Northwest Film Forum is a fiscal sponsor for Even Hell Has Its Heroes. All donations are tax deductable.


Refugio Matanzas / Cerda Pe Arquitectos
- Curated by Clara Ott
- about 21 hours
- version="1.0" encoding="UTF-8"? Architects: Cerda Pe Arquitectos
- AreaArea of this architecture projectArea: 105.0 m2
- version="1.0" encoding="UTF-8"?YearCompletion year of this architecture project Year: 2017
- version="1.0" encoding="UTF-8"?PhotographsPhotographs: Sebastián Cerda Pé
- version="1.0" encoding="UTF-8"?ManufacturersBrands with products used in this architecture project Manufacturers: Arauco, BASTRO, Ceresita, Graphisoft, Polyglass, Quimica Universal
- Lead Architect Sebastián Cerda Pé
- Clients Cristobal Hasbún , Camila Pardo
- Engineering Osvaldo Peñaloza
- Collaborators Stefano Modena
More Specs Less Specs
Text description provided by the architects. Matanzas is a recognized place among kitesurfers and windsurfers for its waves and privileged winds that allow you to enjoy these sports. Our client chose precisely this area for these attributes, the owner is a Kitesurf lover and wanted a house that would allow him to enjoy the view and the outside, but protected from the wind. With this as a priority, we worked on a simple scheme that referred to his hobby. A roof that changes in width with respect to the base, a simple geometric game that gives movement to the house and that makes the house perceived differently depending on the point of view, generating a dynamic architecture.
The site is at the top of a hill, we chose to place the house a few meters below the top, taking advantage of the hill as a natural protector of the south wind. In addition, a closed terrace was developed that protected from the sun and setting wind, a location that also directs the view towards the main landscape, the Rapel River. The material chosen was impregnated pinewood, both for the structure and for the cladding. The pine wood is an abundant material in the area and often used among local workers. It was thought from the beginning to have large windows with north orientation (privileging view of the landscape and abundance of sun) plus a facade with small openings to the south, thus reducing thermal losses.
Programmatically, it is composed of a large common space divided into exterior and interior, a limit that disappears when the windows are opened. At the opposite end of the terrace are the bedrooms and a bathroom. In addition, it is thought that this programming is compatible with possible future extensions of this house. The family that owns this house has been able to enjoy a privileged landscape close to perfect beaches to enjoy marine sports and a space that allows them to enjoy sheltered from the wind and open to the sun.


weldon.gull5
04-Aug-19 11:32 AM
BTC will not change much in the short term, but the price of KMDBTC I think will not improve in the short term.
All the altcoins are falling, and the news for KMD is an opportunity, but it has been following the decline
A market-recognized opportunity missed, and prices will not change much.


{% load staticfiles %} {% include "base/links.html" %} {% include "base/less_headers/login_less.html" %}


{{ partial "app_head.html" . }}
{{ partial "app_header.html" . }} {{ partial "app_content.html" . }}


Material Design Lite blog
Material Design Blog
search
Menu
Main menu
home
Home
person
About
import_contacts
Archives
mail_outline
Contact
Archives
import_contacts
January
62 Episodes
reply_all
import_contacts
February
62 Episodes
reply_all
import_contacts
March
62 Episodes
reply_all


pyMeteo documentation¶
Contents:
Skew-T/Log-P plotting, meteorology and interfacing with CM1
This package provides routines for plotting Skew-T/Log-P diagrams and working with CM1 output. For contributions, please submit pull requests to https://github.com/cwebster2/pymeteo. Please report bugs using the github issue tracker at https://github.com/cwebster2/pymeteo/issues.
Skew-t/Log-p Plotting¶
This module allows plotting Skew-T/Log-P diagrams and hodographs from arrays of data with helper functions to plot directly from CM1 output files in either Grads or HDF5 format and also from sounding data text files in the format used for WRF and CM1 initialization.
This module also has code to produce rudimentary analysis of the soundings data. Currently this is limited to CAPE (surface and most unstable), CIN, wind shear, storm relative helicity, lifted index and a rough estimate of storm motion based on the Bunkers (2000) method.
Plotting¶
High level plotting functions¶
plot_cm1h5()
– plots skewt from CM1 generated hdf5 files processed by ingest_cm1plot_cm1()
– plots skewt from CM1 generated GRaDS style outputplot_wrf()
– plots skewt from WRF generated NetCDF outputplot_sounding_data()
– plots skewt from CM1/WRF input sounding filesplot_sounding_data_uwyo()
– plots skewt from uwyo sounding data (file or online)
These functions are called by command line scripts provided to make plotting from data files easy. You can invoke these through command line scripts as:
# From tabular sounding data (e.g. WRF or CM1 intial sounding data)
$ skewt tabular -f sounding.dat skewt.pdf
# From GrADS stlye CM1 output
$ skewt cm1 -p . -d cm1out -x 0 -y 0 skewt-cm1.pdf
# From HDF5 CM1 output
$ skewt cm1hdf -f model-data.h5 -x 0 -y 0 skewt.pdf
# From WRF output
$ skewt wrf -f wrfout.nc --lat 30 --lon -80 -t 0 skewt.pdf
# From University of Wyoming data file
$ skewt uwyo -f uwyo-data.dat skewt.pdf
# From University of Wyming website data (live)
$ skewt uwyoweb --station 72251 skewt.pdf
plot()
– generic high level plot function
import numpy as np
import pymeteo.skewt as skewt
# prepare 1D arrays height (z), pressure (p), potential temperature (th),
# water vapor mixing ratio (qv), winds (u and v) all of the same length.
skewt.plot(None, z, th, p, qv, u, v, 'skewt.pdf')
Variables affecting the plot output¶
These variables affect the skewness of the plot and the bounds of the plot
skew_angle
– skewnessTmin
,Tmax
– T dimension bounds (temperature, C)pbot
,ptop
– p dimension bounds (pressure, Pa)
These variables affect the lines plotted on the skew-t
These variables affect the plotting of the lines above
These variables affect the plotting style of skewt data
Functions to draw isolines¶
If you are manually plotting skew-t data, these functions can be used to draw various lines on your plot. These are used by the high level plotting functions.
Module reference¶
-
pymeteo.skewt.
Tmax
= 40.0¶ Sets the right boundary of the plot. Temperature at 1000 mb (C)
-
pymeteo.skewt.
Tmin
= -40.0¶ Sets the left boundary of the plot. Temperature at 1000 mb (C)
-
pymeteo.skewt.
dp
= 5000.0¶ The delta pressure used in calculating adiabats
-
pymeteo.skewt.
draw_dry_adiabat
(axes)¶ Plot dry adiabats on axes
Parameters: axes ( matplotlib.axes
) – The axes to draw onThis function calculates dry adiabats and plots these lines. Adiabats are calculated every 10 K
-
pymeteo.skewt.
draw_isobars
(axes)¶ Plot isobars on axes
Parameters: axes ( matplotlib.axes
) – The axes to draw onThis function draws isobars at intervals of 2*dp.
-
pymeteo.skewt.
draw_isotherms
(axes)¶ Plot isotherms on axes
Parameters: axes ( matplotlib.axes
) – The axes to draw onThis function draws isotherms every 10 C.
-
pymeteo.skewt.
draw_moist_adiabat
(axes)¶ Plot moist adiabats on axes
Parameters: axes ( matplotlib.axes
) – The axes to draw onThis function calculates moist adiabats and plots these lines. Adiabats are calculated for values of T at 1000mb from -15 to 45 C every 5 C between -15 and 10 C and every 2.5 C between 12.5 and 45 C.
-
pymeteo.skewt.
draw_water_mix_ratio
(axes)¶ Plot lines of constant water vapor mixing ratio on axes
Parameters: axes ( matplotlib.axes
) – The axes to draw onThis function calculates isolines of constant water vapor mixing ratio and plots these lines. Values of w calculated are given by the list variable w.
-
pymeteo.skewt.
dry_adiabats
= array([-40, -30, -20, -10, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200])¶ List of dry adiabats to plot on the skew-t. In degrees C
-
pymeteo.skewt.
isobars
= array([100000., 95000., 90000., 85000., 80000., 75000., 70000., 65000., 60000., 55000., 50000., 45000., 40000., 35000., 30000., 25000., 20000., 15000., 10000.])¶ List of isobars to plot on the skew-t. In Pascals
-
pymeteo.skewt.
isotherms
= array([-150, -140, -130, -120, -110, -100, -90, -80, -70, -60, -50, -40, -30, -20, -10, 0, 10, 20, 30, 40, 50])¶ List of isotherms to plot on the skew-t. In degrees C
-
pymeteo.skewt.
label_std_heights
(axes)¶ Plot heights of standard pressure levels
Paramter axes: The axes to draw on
-
pymeteo.skewt.
lc_major
= 'grey'¶ Line color of ‘major’ lines. E.g. Lines plotted at 10 C intervals or 50 mb intervals
-
pymeteo.skewt.
lc_minor
= 'lightgrey'¶ Line color of ‘minor’ lines. E.g. Lines not plotted at the major intervals
-
pymeteo.skewt.
linecolor_Parcel_T
= 'red'¶ Line color of lifted surface parcel temperature profile
-
pymeteo.skewt.
linecolor_T
= 'black'¶ Line color of environmental temperature profile
-
pymeteo.skewt.
linecolor_Td
= 'green'¶ Line color of environmental dew-point temperature profile
-
pymeteo.skewt.
linecolor_Tve
= 'black'¶ Line color of environmental virtual temperature profile
-
pymeteo.skewt.
linecolor_Tvp
= 'red'¶ Line color of lifted surface parcel virtual temperature profile
-
pymeteo.skewt.
linecolor_Twb
= 'blue'¶ Line color of environmental wet-bulb temperature profile
-
pymeteo.skewt.
linestyle_Tve
= '--'¶ Line style of environmental virtual temperature profile
-
pymeteo.skewt.
linestyle_Tvp
= '--'¶ Line style of lifted surface parcel virtual temperature profile
-
pymeteo.skewt.
linewidth_Parcel_T
= 1.0¶ Line width of lifted surface parcel temperature profile
-
pymeteo.skewt.
linewidth_T
= 1.5¶ Line width of environmental temperature profile
-
pymeteo.skewt.
linewidth_Td
= 1.5¶ Line width of environmental dew-point temperature profile
-
pymeteo.skewt.
linewidth_Tve
= 0.7¶ Line width of environmental virtual temperature profile
-
pymeteo.skewt.
linewidth_Tvp
= 0.7¶ Line width of lifted surface parcel virtual temperature profile
-
pymeteo.skewt.
linewidth_Twb
= 0.5¶ Line width of environmental wet-bulb temperature profile
-
pymeteo.skewt.
lw_major
= 0.6¶ Line width of ‘major’ lines. E.g. Lines plotted at 10 C intervals or 50 mb intervals
-
pymeteo.skewt.
lw_minor
= 0.25¶ Line width of ‘minor’ lines. E.g. Lines not plotted at the major intervals
-
pymeteo.skewt.
mixing_ratios
= [0.2, 0.4, 0.8, 1, 2, 3, 4, 6, 8, 10, 14, 18, 24, 32, 40]¶ List of water vapor mixing ratio lines to plot. In g/kg
-
pymeteo.skewt.
moist_adiabats
= array([-15., -10., -5., 0., 5., 10., 12., 14., 16., 18., 20., 22., 24., 26., 28., 30., 32., 34., 36., 38., 40., 42., 44.])¶ List of moist adiabats to plot on the skew-t. In degrees C
-
pymeteo.skewt.
pbot
= 105000.0¶ Sets the bottom boundary of the plot. Pressure (Pa)
-
pymeteo.skewt.
plevs
= array([105000., 100000., 95000., 90000., 85000., 80000., 75000., 70000., 65000., 60000., 55000., 50000., 45000., 40000., 35000., 30000., 25000., 20000., 15000., 10000.])¶ List of pressure levels to do calculations on
-
pymeteo.skewt.
plot
(loc, z, th, p, qv, u, v, output, time=None, title=None)¶ Plots Skew-T/Log-P diagrapms with hodograph
The helper functions above facilitate loading data from various formats and then call this function. If you have data in another format or arrays of data in python already, then this is the function you want to use.
Parameters: - loc – Location string
- z – z grid mesh (1D)
- time – Time string
- th – Potential temperature at z points
- p – Pressure at z points
- qv – Water vapor mixing ratio at z points
- u – u winds at z points
- v – v winds at z points
- title – Title for plot
- output – Filename to save plot to
-
pymeteo.skewt.
plot_cm1
(path, filename, xi, yi, output)¶ Plot skewt from a Grads format CM1 output file
Parameters: - _path – Path to CM1 dataset
- _filename – Filename of dataset
- x1 – X gridpoint to plot SkewT
- y1 – Y gridpoint to plot SkewT
- output – Filename to save skewt plot
This function plots a skewt from a CM1 output file. This routine uses winds interpolated to the scalar gridpoints.
-
pymeteo.skewt.
plot_cm1h5
(filename, xi, yi, output)¶ Plots a skewt from an HDF5 file.
Parameters: To use this function the HDF5 file must have the following variables:
- xh – x scalar grid locations
- yh – y scalar grid locations
- z – z grid locations
- time – timestep of file data (scalar)
- th – potential temperature (K)
- thpert – potential temperature perturbation (K)
- prs – pressure (Pa)
- u – u wind speed (m/s)
- v – v wind speed (m/s)
- qv – water vapor mixing ratio (kg/kg)
The names of these variables correspond to default naming by CM1 using HDF5 output.
-
pymeteo.skewt.
plot_hodo_axes
(axes)¶ Plot hodograph axes
This will plot range arcs and labels for a hodograph plot
-
pymeteo.skewt.
plot_hodograph
(axes, z, u, v)¶ Plot Hodograph data
This plots u and v winds vs height on a hodograph.
Parameters: - z – height values (1D array)
- u – U component of wind at z heights (1D array)
- v – V component of wind at z heights (1D array)
Paramter axes: The axes instance to draw on
-
pymeteo.skewt.
plot_legend
(axes)¶ Plot skew-t legend
-
pymeteo.skewt.
plot_sounding
(axes, z, th, p, qv, u=None, v=None)¶ Plot sounding data
This plots temperature, dewpoint and wind data on a Skew-T/Log-P plot. This will also plot derived values such as wetbulb temperature and label the surface based LCL, LFC and EL.
Parameters: - z – height values (1D array)
- th – potential temperature at z heights (1D array)
- p – pressure at z heights (1D array)
- qv – water vapor mixing ratio at z heights (1D array)
- u – U component of wind at z heights (1D array)
- v – V component of wind at z heights (1D array)
Paramter axes: The axes instance to draw on
-
pymeteo.skewt.
plot_sounding_axes
(axes)¶ Plots Skew-T/Log-P axes
This will plot isotherms, isobars, dry and moist adiabats, lines of constant water vapor mixing ratio, labels and setup the y axes to be reversed.
Paramter axes: The axes to draw on
-
pymeteo.skewt.
plot_sounding_data
(filename, output)¶ Plot SkewT from a WRF / CM1 compatible sounding data file
Parameters: The datafile is the same format as used in sounding initalization files for WRF and CM1.
The format is: 1 line header with surface pressure (mb), theta (K) and qv (g/kg) n number of lines with z (m), theta (K), qv (g/kg), u (m/s), v(m/s)
-
pymeteo.skewt.
plot_sounding_data_csv
(filename, output)¶ Plot SkewT from a CSV sounding data file
Parameters: The datafile format is CSV with the following columns:
- pressure (mb)
- height (m)
- temperature (C)
- dew point (C)
- wind direction (degrees)
- wind speed (m/s)
Missing values should be filled with the value -9999.00
-
pymeteo.skewt.
plot_sounding_data_uwyo
(filename, output, stationID=0, date=None)¶ Plot SkewT from University of Wyoming sounding data
Parameters: If filename is not None then this function will plot data from that file. If filename is None and stationID is non-zero, then this will request a sounding datafile from http://weather.uwyo.edu for the specified date. If date is None then the requested sounding will be the most recent sounding taken at either 12Z or 00Z.
-
pymeteo.skewt.
plot_wrf
(filename, lat, lon, time, output)¶ Plots a skewt from an WRF NetCDF output file.
Parameters: This function assumes the NetCDF file was produce by the WRF model. If another program produces the file but names variables in the same manner as the WRF model, this function should work for that dat as well.
The variables using in the wrfout.nc data are: - Times ? - U(Time, bottom_top, south_north, west_east_stag) - V(Time, bottom_top, south_north_stag, west_east) - T(Time, bottom_top, south_north, west_east) Theta perturbation - P(Time, bottom_top, south_north, west_east) Pres perturbation - PB(Time, bottom_top, south_north, west_east) pres base state - QVAPOR(Time, bottom_top, south_north, west_east)
- PH(Time, bottom_top_stag, south_north, west_east)
- PHB(Time, bottom_top_stag, south_north, west_east) Z = (((PH(k)+PH(k+1)) / 2) + ((PHB(k)+(PHB(k+1)) / 2) / 9.81
- TH2(Time, south_north, west_east) – 2m pot temp
- PSFC(Time, south_north, west_east) – surface pres
- U10(Time, south_north, west_east) – 10m U
- V10(Time, south_north, west_east) – 10m V
- XTIME(Time) – minutes since start of sim
- XLAT, XLONG, XLAT_U/V, XLONG_U/V
- Start_date
Need time, theta, pressure
-
pymeteo.skewt.
ptickbot
= 100000.0¶ Lowest elevated pressure level to be labelled in the plot (Pa)
-
pymeteo.skewt.
pticktop
= 10000.0¶ Highest elevated pressure level to be labelled in the plot (Pa)
-
pymeteo.skewt.
ptop
= 10000.0¶ Sets the top boundary of the plot. Pressure (Pa)
-
pymeteo.skewt.
skew
(p)¶ Puts the skew in skew-T
Parameters: p – pressure level of the point. This calculates the skew of the T axis for a point to plot. This assumes a logarithmic y axes and uses the variable :py:data:skew_angle to determine the skew. This is the magic that turns a cartesian plot into a Skew-T/Log-p plot.
-
pymeteo.skewt.
skew_angle
= 37.5¶ This defines the skewness of the T axis
-
pymeteo.skewt.
tickdp
= 10000¶ The spacing between pressure labels in the plot (Pa)
Interfacining with CM1¶
Class to read GRaDS style CM1 model output data
-
class
pymeteo.cm1.read_grads.
CM1
(_CM1__path, _CM1__datasetname)¶ Class that implements reading CM1 model data
Parameters: - path – path to CM1 data files
- datasetname – the CM1 data files basename
-
dimT
= 0¶ T grid dimension (1D)
-
dimX
= 0¶ X grid dimension (1D)
-
dimY
= 0¶ Y grid dimension (1D)
-
dimZ
= 0¶ Z grid dimension (1D)
-
dt
= 0¶ timestep between time levels
-
nt
= 0¶ number of time levels in the dataset
-
nv
= 0¶ number of variables in the dataset
-
nx
= 0¶ gridpoints in the x direction
-
ny
= 0¶ gridpoints in the y direction
-
nz
= 0¶ gridpoints in the z direction
-
read3d
(time, varname)¶ Reads a 3D variable from the dataset
Parameters: - time – the timelevel to read
- varname – the variable name to read
Reaturns: 3D array containing the variable at the time
Dynamics¶
This module provides routine thermodynamic functions
-
pymeteo.dynamics.
mean_wind
(_u, _v, _z, zbot, ztop)¶ Calculates the mean wind in the layer between zbot and ztop
Parameters: - _u – U winds (1D vector in z)
- _u – V winds (1D vector in z)
- _z – z heights (1D vector in z)
- zbot – Bottom of the layer
- ztop – Top of the layer
-
pymeteo.dynamics.
shear
(_u, _v, _z, zbot, ztop)¶ Calculates the shear in the layer between zbot and ztop
Parameters: - _u – U winds (1D vector in z)
- _u – V winds (1D vector in z)
- _z – z heights (1D vector in z)
- zbot – Bottom of the layer
- ztop – Top of the layer
-
pymeteo.dynamics.
srh
(_u, _v, _z, zbot, ztop, cx, cy)¶ Calculates the storm relative helicity in the layer between zbot and ztop
Parameters: - _u – U winds (1D vector in z)
- _u – V winds (1D vector in z)
- _z – z heights (1D vector in z)
- zbot – Bottom of the layer
- ztop – Top of the layer
- cx – u component of storm motion
- cy – v component of storm motion
-
pymeteo.dynamics.
uv_to_deg
(u, v)¶ transforms u, v, to direction, maginutide
Parameters: - u – u wind component
- v – v wind component
Returns: wind direction and magnitude
-
pymeteo.dynamics.
wind_deg_to_uv
(direction, speed)¶ Converts direction and speed into u,v wind
Parameters: - direction – wind direction (mathmatical angle)
- speed – wind magnitude
Returns: u and v wind components
Thermodynamic routines¶
-
pymeteo.thermo.
T
(theta, p)¶ Convert Potential Temperature \(\theta\) to Temperature
Parameters: - theta – Potential temperature (K)
- p – Pressure (Pa)
Returns: Temperature (K)
Meteorological constants¶
This module provides constants used in the rest of the package


I kid, I kid. Welcome! This is a portfolio site I threw together as a playground for WebGL, WebVR, and Leap Motion JS API projects. It doesn't have much yet but it does have a pretty clean structure. It is officially open source under the MIT license... but I haven't really bothered to do everything I need to have it licensed correctly, so whatever.
In any case, here's the repo: https://github.com/JamesHagerman/threejs_starter
And here's a list of links to the projects that the repo has right now:
And one more note: You may need to reload the page after you click one of those links because I haven't


.hdr 1. DRAWING WITH RED
.hoc 1.1. Introduction
The Draw dialect is a domain-specific language intended to simplify
drawing. The language was created in Red itself. However, when you draw
lines, shapes, animations, you will also make use of Red, and of VID (to
place and set up GUI widgets - 'faces'). Here, we will work through some
typical graphics tasks, and introduce - or remind you - about relevant Red
and VID facilities.
This page is only a sampling of Draw. It does not cover ways of speeding-up
animations, or the full range of facilities. Draw has many commands, and
some of these have many options - so you will need to explore its official
documentation:
Draw:
https://doc.red-lang.org/en/draw.html
There are some impressive demos on:
http://www.red-lang.org/2016/03/060-red-gui-system.html
You might also need VID:
Official:
https://doc.red-lang.org/en/vid.html
Red-by-example:
http://www.red-by-example.org/vid.html
When building a GUI with tightly-linked widgets, it can be very useful to
use Red's reactive programming facilities, as shown here:
http://www.red-lang.org/2016/06/061-reactive-programming.html
Thanks to Gregg Irwin for suggestions:
https://gist.github.com/greggirwin
.top
.hoc 2.1. Drawing A Line and Box On A Canvas
Here is the code for our first program:
Red [ needs 'view ]
view [
canvas: base 150x150 draw [line 10x0 160x50]
]
Screenshot:
||draw-line1.png||
The program needs to incorporate View facilities, at the top.
We use a VID view to set up and place faces (GUI widgets, controls) on the
window. Here, we only use a $$0base$$ (though we could also draw on an
$$0image$$). We chose to name it 'canvas'.
Following the draw, we have a block of drawing commands, with values if
necessary. Here we draw a $$2line$$ from 10x0 to 160x50. Note that the
line is too long, and the extra part is clipped.
The top left of the base is (0, 0), and in Red we use $$pair!$$ notation -
such as 0x0.
Next we extend the program to draw a $$2box$$, providing its top-left and
bottom-right coordinates. We have also used a VID option to make the
canvas white.
Red [ needs 'view ]
view [
canvas: base 150x150 white draw [
line 10x0 160x50
box 10x10 100x80
]
]
Screenshot:
||draw-line-and-box.png||
In fact, a box can be created by specifying any 2 opposite corners (such as
bottom-left and top-right).
There are lots of shapes, such as circle, ellipse, polygon, etc. Details
are in the Draw official documentation.
Note that we provide values - not variables, expressions - for the shape
coordinates. We cannot put, for example:
xy-coords: 22x33
draw [line xy-coords 100x100] ;-- no!
Later, we will see how to work with this.
Drawing commands can be placed in nested blocks, as in:
[[line 10x0 160x50] [box 10x10 100x80]]
The end result is the same, but the structure can be useful if we need to
process shapes (e.g. deleting a particular shape).
.top
.hoc 2.2. Pens, Fill-pens, color
Drawing lines and unfilled shapes is done with a $$2pen$$, whereas filled
shapes are drawn with a $$2fill-pen$$.
They have default settings (a 1-pixel black line etc.) but we can provide
new settings, such as colour, width, and thickness.
Here is an example:
Red [ needs 'view ]
view [
canvas: base 200x200 white draw [
pen blue line-width 8 line 10x0 160x50
pen red box 10x10 100x60
fill-pen pink box 10x80 120x140
pen off box 10x150 120x190
]
]
Screenshot:
||draw-pens.png||
We created a blue pen with an 8-pixel width, and drew a line. The pen
command must be followed immediately by a colour.
We altered the pen to red, and drew a box, unfilled.
We set the fill-pen to pink, then drew a box - note the red edges.
We turned the pen off, then drew a pink box. There are no edges on the box.
There are more pen options, such as specifying the shape of the line-end,
and how joins appear.
Note also that we can draw on an $$0image$$ widget, as in :
Red [needs 'View]
view [
photo: image 250x250 %country.png
draw [fill-pen gold pen off circle 100x50 25] ;-- add sun
]
Screenshot, showing the added 'sun':
||draw-sun.png||
.top
.hoc 2.3. Drawing Text
We can incorporate text in a drawing, as follows:
Red [needs 'View ]
view [
canvas: base 150x150 white
draw [text 50x50 "Hello!!!!" circle 70x60 40]
]
Screenshot:
||draw-text.png||
If your text in not part of the drawing (such as instructions, captions on
faces - widgets) - you can use the VID $$0text$$ face.
It is also possible to specify fonts and sizes.
.top
.hoc 3.1. The Draw Block - Introduction
In the earlier examples, we followed 'draw' with a block of commands. This
is the 'draw-block'. We can add or remove items to it, as required.
Here, we introduce a button, and show how to use a draw-block. We have the
code:
Red [needs 'view]
do-but1: function [] [
print ["canvas/draw-before: " canvas/draw]
print ["size .. " canvas/size]
canvas/size: 160x200
canvas/draw: [fill-pen blue box 10x10 60x60]
print ["canvas/draw-after: " canvas/draw]
]
view [
b1: button "draw" [ do-but1]
return
canvas: base 200x200 white draw [ box 44x44 88x88]
]
Running it shows:
||draw-block1.png||
When we click the button, the canvas goes smaller, and we see a blue box:
||draw-block2.png||
We also see this printed on the console:
canvas/draw-before: box 44x44 88x88
size .. 200x200
canvas/draw-after: fill-pen blue box 10x10 60x60
Note the printing: we can access options using the /refinement notation, as
in canvas/size. The /draw contains a block of drawing instructions. It
only holds one block, so when we assign the instructions to draw a blue box,
the previous state is erased. However it is easy to add drawing
instructions to the block, like this:
canvas/draw: [fill-pen blue box 10x10 60x60]
append canvas/draw [box 33x33 170x55] ;-- added this - another blue
box
print ["canvas/draw-after: " canvas/draw].
It draws 2 blue boxes, and prints:
canvas/draw-before: box 44x44 88x88
size .. 200x200
canvas/draw-after: fill-pen blue box 10x10 60x60 box 33x33 170x55
We could use append/only if we wanted to keep each shape in its own block,
to allow access to individual shapes.
Here is another example, which initially draws an unfilled box. It detects
the $$0on-down$$ (mouse-click) event of the base, then draws a red filled
box. The initial box vanishes of course, because the draw block is
completely replaced by a new one.
Red [ needs 'view ]
in-canvas: function [] [
canvas/draw: [ fill-pen red box 2x2 30x30]
]
view [
canvas: base 200x200 white draw [ box 44x44 88x88]
on-down[in-canvas]
]
In summary, when the draw-block is drawn, the previous drawing is erased,
and the new drawing is created. If you want something drawn, put it in the
block.
The draw-block thus contains the whole drawing, as text. You can manipulate
it, for example to add an 'undo' facility, or to select part of the drawing.
.top
.hoc 3.2. The Draw Block - Variables, Compose, Reduce
What if we want to use a variable, as in:
top-left: 22x33
draw [ line top-left 100x100]
We can't do this - the draw block must use values. We need to do some kind
of evaluation first, and in Red, we can use $$compose$$ and $$reduce$$. They
are similar, and here is a summary:
The word $$reduce$$ returns a copy of a block, evaluating all expressions
in the block.
The word $$compose$$ returns a copy of a block, evaluating only $$paren!$$
items. A paren! type is surrounded in (parentheses).
We can also use Red symbols. For example the symbol:
'elephant
evaluates to:
elephant
Here are some examples:
>> a: 11 b: 22 ;-- create some variables and a block
>> blk: [line (a + b) a + b "message" 123]
>> compose blk
== [line 33 a + b "message" 123] ;-- note (...) effect
>>
>> ;-- now try reduce, on same block
== [line (a + b) a + b "message" 123]
>> reduce blk
*** Script Error: line has no value
>> ;-- try another block, with a 'symbol
>> blk: ['line a b]
>> reduce blk
== [line 11 22] ;-- what we want
Here is a practical example - we want to use a variable for the start of a
line. We can use compose or reduce:
top-left: 4x0
compose [pen red line (top-left) 3x66] ;compose only ( )
reduce ['pen red 'line top-left 3x66]
Either of these results in:
pen 255.0.0 line 4x0 3x66
Here is a program which draws a line at a different place, with every
button-click. Note that we cannot append to an uninitialised block, so we
have used the VID 'do' feature for some once-only initialisation.
Red [needs 'view]
line-end: 100x100
do-but1: func [] [ ;--func allows easier global use
append canvas/draw compose [line 0x100 (line-end)]
line-end: line-end + 0x10
]
view [
b1: button "draw" [do-but1]
return
canvas: base 200x200 white
do [ ;-- initialisation
canvas/draw: copy []
]
]
Screenshot:
||draw-block-fan.png||
Here is the same basic program, but one click causes 10 lines to be drawn
rapidly, without any user-interaction. The button-click code is:
do-but1: func [] [
line-end: 100x100
loop 10 [
append canvas/draw compose [line 0x100 (line-end)]
line-end: line-end + 0x10
]
]
.top
.hoc 3.3. A 'do' Block For Initialisation
Sometimes it is useful to initialise variables and faces. We can add
a 'do' block at the bottom of view. It contains Red code, as in:
Red [needs 'View]
b: false
... etc
view [
canvas: base white 350x350
; ...etc
do [
canvas/draw: [box 10x10 30x30] ;-- initial shape
b: true
]
]
.top
.hoc 4.1. Animation: Rate, On-time
Each face can have a $$0rate$$ timer, which can be made to tick regularly,
or wait for a duration.
An integer value (above 0) sets a frequency (per second), a $$time!$$ type
sets a duration, and $$none$$ stops it. Here, we set the canvas rate to 1
(per second), and detect the tick via the $$on-time$$ event. The blue square
moves diagonally across the screen, to the bottom-right.
Red [ needs 'view ]
top-left: 10x10
canvas-tick: func [] [
top-left: top-left + 8x8
canvas/draw: reduce ['fill-pen blue 'box top-left top-left + 55x55]
]
view [
canvas: base 200x200 white rate 1
on-time [canvas-tick]
]
The animation is jerky, but try changing the increment to e.g. 1x1, and the
rate to 20, for a gliding blue box.
.top
.hoc 4.2. The Bouncing Ball Program
This is a standard animation example. A blue ball bounces around the
screen. You can stop and start it with buttons - it manipulates the rate
to do this. The items you might wish to play around with have been
initialised at the top of the code.
It could be improved - the testing for wall contact involves the centre of
the ball, whereas it should be the edge. Some work for you to do!
Red [needs 'view]
draw-freq: 25 ;-- init
centre: 10x10
x-step: 1
y-step: 3
in-canvas: func [] [ ;-- for every tick
canvas/rate: draw-freq
;-- hit an edge? And add a bit of randomness, for fun.
if centre/x > 300 [x-step: -1 * x-step - random 0.2]
if centre/y > 300 [y-step: -1 * y-step - random 0.2]
if centre/x < 0 [x-step: -1 * x-step]
if centre/y < 0 [y-step: -1 * y-step]
incr: to-pair reduce [(3 * x-step) (3 * y-step)]
centre: centre + incr
canvas/draw: reduce ['fill-pen blue 'circle centre 8]
;-- use append in above line, if you want a ball trail
]
do-stop: func [] [
canvas/rate: none ;-- stop timer
]
do-start: func [] [
canvas/rate: draw-freq ;starts
]
view [
stop-btn: button "stop" [do-stop]
start-btn: button "start" [do-start]
return
;-- rate set in do-block, below
canvas: base 300x300 white
on-time [in-canvas]
do [ ;-- init
canvas/rate: draw-freq
canvas/draw: copy [] ;-- for the first append
]
]
.top
.hoc 5.1. Mouse Coordinates, Events, All-over
When drawing with user-interaction, we can use buttons, etc, and it can also
be useful to use the mouse position. Here is a fragment of code. When we
click on the base, 'do-down' is called, passing the event object into 'ev'.
The /offset refinement provides the position where the left mouse button was
depressed.
do-down: func [ev] [
xy-pos: ev/offset ;-- mouse position - a pair
;-- etc...
]
view [
canvas: base 300x300 white on-down [do-down event]
]
Here is a program which draws straight lines between successive mouse-clicks:
Red [needs 'View
title: "Sketch with mouse"
]
sketching: false
do-down: func [ev] [
xy-New: ev/offset ;-- mouse position - pair
either not sketching [ ;-- first time?
sketching: true
xy-Start: xy-New ;-- no visible line
] [
append canvas/draw compose [line (xy-Start) (xy-New)]
xy-Start: xy-New ;-- remember where we were
]
]
clear-canvas: func [ev] [
sketching: false
xy-Start: ev/offset
canvas/draw: copy [pen red line-width 7]
]
view [
break-btn: button "Break line" [sketching: false]
clear-btn: button "Clear" [clear-canvas event]
return
canvas: base 300x200 white draw [pen red line-width 7]
on-down [do-down event] ;-- click in canvas?
]
And a screenshot:
||draw-red-mouse.png||
Here is another example which uses the VID $$0all-over$$ command. This
allows us to pick up mouse-move events.
This program lets you click anywhere on the canvas, and drag open a box to
the required size.
Red [needs 'View]
mouse-state: 'up
draw-block: copy []
coord1: 0x0
do-down: func [event] [
mouse-state: 'down
coord1: event/offset
]
do-up: func [] [
mouse-state: 'up
]
do-move: func [event] [
if mouse-state = 'down [ ;-- and over the canvas
draw-block: copy []
draw-block: compose [box (coord1) (event/offset)] ;based on mouse
canvas/draw: draw-block
]
]
view [
canvas: base 200x200 white all-over ;-- nb all-over
on-up [do-up]
on-down [do-down event]
on-over [do-move event]
]
.top
.hoc 5.2. Shape Sub-dialect
The Shape sub-dialect has similar commands to Draw, but they can be more
convenient, such as:
- automatically closing shapes
- relative drawing, from the previous point. This is done by using the
lit-word version - for example 'line rather than line.
We enclose the commands in a block, after 'shape'. Here is some code
Red [needs 'View]
;-- shape dialect
do-down: func [] [
canvas/draw: [
line-width 5 shape [
line 0x0 90x30 30x90
'hline 90 'vline 22
]
]
]
view [
start-btn: button "Draw" [do-down]
return
canvas: base 300x200 white draw [line-width 7]
]
- It draws 2 lines - note the series of points - (3 here, not 4) - for
the line command.
- It uses the relative versions 'hline, 'vline to draw horizontal and
vertical lines, with one parameter specified.
- It closes the shape (the long 45 degree diagonal line).
Screenshot:
||draw-sub-dialect.png||
The official doc is at:
https://doc.red-lang.org/en/draw.html#_shape_commands
.top
.hoc 6.1 Transformations On Drawings
Red provides facilities to transform drawings, such as scaling, rotating.
There are also facilities to work with transformation matrices directly.
In general, the transformations work on all draw commands which follow them.
Alternatively, you can restrict the transformations to a block.
Here is the basis of a clock program. It initially draws a vertical line,
and then rotates it by 6 degrees, about one of its ends. The rate of the
canvas tick is once per second, so effectively, we have a clock second-hand.
Red [needs 'View ]
do-rot: func [] [
canvas/draw: compose[rotate 6 150x150 (canvas/draw) ]
]
view[
canvas: base 330x330 white rate 1
draw [line 150x150 150x10]
on-time [do-rot]
]
Note that we chose to rotate the current state of canvas/draw, rather than
incrementing an 'angle' variable.
This concludes our brief sampling of Red's Draw dialect. Look at the
introduction above for more links etc.