Contents
Section 0: Quick Start Guide
Section 1: Introduction
Section 2: Web Demo guide
Section 3: Technical Guide
Section 0: Quick Start Guide
0a. Find the HEG WiFi!
First thing's first:
1. Power up your HEG by plugging it into your computer or plugging a battery in.
2. Open up your WiFi signal list and look for "My_HEG". Connect with the password "12345678".
3. Depending on your OS, open up Chrome or Firefox (recommended) and enter "http://<IP_ADDRESS>" or "http://esp32.local" (this works on Apple and Bonjour-enabled devices)
4. Check out the HTML5 demo and see if the HEG LEDs come on when you hit start!
WiFi Settings:
From the main page, go to "Connection Settings" or add /connect to the page address. Here you may also connect your HEG through your local WiFi and access it from your main network, enabling online features.
The easiest way to get online is to enter your local WiFi name and password, which can be seen
via scan results at the bottom of the page. Just type in these to pieces of information and hit connect.
You can now connect to the ESP32 from your main router either via http://esp32.local or an automatically assigned IP address you can find in your router's interface.
You can also assign a "Static IP" if you know the gateway IP and subnet mask, and know an unused local IP address you can assign to the ESP32.
We also have a "Suggest IP" mode which, when you type in the SSID and password, will connect then disconnect to that router and then suggest you an IP. This is done from the
default ESP32 access point from the /connect page. when you reconnect to the access point.
There is some jank depending on the type of router you connect to,
so try a few times if it does not work at first. You cannot connect to a 5GHz router on the ESP32.
0b. Your first session
Make sure the HEG sensor is firmly flush against your forehead so you can feel the LEDs and photosensor
pressing against you but without hurting.
The easiest way to test your HEG is through our web API. Just go to the HTML5 Web demo from the main page or /listen and hit the "Start HEG" button!
- Chrome or Firefox work the most consistently.
- We are working on full cross-browser compatibility.
However, you may soon find that after a few seconds, no data comes through, or you get weird
negative values or giant oscillations on the graph. This is where you remember you're using a
developer product that isn't always consistent if you don't know what you're supposed to do.
0c. Debugging the signal
Check these conditions when you are not receiving a stable, positive ratio and cannot control the games:
- Can you see the Red LED flashing when you hit start?
- Open up the debug console on your web browser and verify if you get "HEGduino Events Connected" on the HTML5 Web Demo page
- Check your ambient lighting conditions. It is best but not required to be in a dim or indirectly lit environment.
- If the light sensor is not firmly against your forehead and exposed directly to the LEDs or sunlight, it will be saturated and output 0's in the Red and IR output.
- Even a cloudy day can create too much ambient light for the LEDs to be picked up, and you will get a negative or zero ratio, or wild oscillations.
- If you use the command 'D' via USB Serial while the sensor is off it will toggle Debug mode and allow you to see the raw values per LED flash.
- If you are receiving 32767 your ADC is being saturated. There are several reasons this may be the case.
- If there is too much ambient light or the LEDs are directly exposed to the photodiode.
- Is your forehead sweaty? This can cause moisture to build up and short the sensor temporarily until it dries again.
- We recommend taping a screen protector down over the sensor to buffer moisture.
- If there is a short or the photodiode is fried
- If you are receiving -1, this means the ADC is not set up or connected correctly.
- If you are receiving repeating low values like 64, 84, etc, that don't produce a stable ratio that means the photodiode output is not being read and may be damaged or not soldered correctly.
- Check that no solder points or leads are contacting your skin as this will ground out those voltages. Electrical tape is an easy way to cover this up.
If you cannot get any data through, use a serial monitor (like Arduino or this chrome app: https://chrome.google.com/webstore/detail/arduino-chrome-serial-mon/opgcocnebgmkhcafcclmgfldjhlnacjd?hl=en)
Follow the instructions in the readme in our github repository (https://github.com/moothyknight/HEG_ESP32)
0d. Safety Precautions and Disclaimers
Safety Guide - Know Your Limits!
We've been recommended by clinicians and long-time biofeedback practitioners several
key conditions to follow when you begin your training to ensure safe and effective results.
Like any form of exercise, you can strain yourself too much, leading to unpleasant effects
or fatigue. The HEG can be a powerful learning and interfacing tool when used correctly.
- Your first sessions should be no more than 5 to 10 minutes between breaks.
- First just try to get a feel for breathing slow, relaxing, focusing, and noticing how your score increases or decreases based on your moment to moment thoughts and movements.
- Limit your first few days of using the HEG to 30 minutes of practice.
- You may feel strain or fatigue after doing the exercises for 10 minutes or more, if you do stop and rest.
- If you "over train" you may get a small headache in the area you trained. This should subside after a few hours or after a night's rest.
- In the unlikely event the headache does not subside the next day, you can "train down" by trying to lower your score while sensing that area, or call your doctor as it may be something else.
Disclaimers
FDA Disclaimer:
These statements have not been evaluated by the Food and Drug Administration. These statements are for informational purposes only and are not
intended as a substitute for medical counseling. This information is not intended to diagnose, treat, cure, or prevent any disease. The author
and publisher shall have neither liability nor responsibility to any person or entity with respect to any loss, damage, or injury caused
directly or indirectly by the information contained herein.
Our Disclaimers:
This is an experimental product by enthusiasts for enthusiasts, we are not health professionals and assume no risks in how you use this,
We assert that we have worked to the best of our ability to ensure the safety and enjoyment of our users, whether they are tech savvy or not.
If you have heart or blood pressure problems or are at risk of stroke or other vascular issues, aerobic exercise can help immensely in any form,
but be cautious when training your brain blood flow as it is a very sensitive and intricate organ. We do not know all of the potential risks
associated when using a device like the HEG if you have serious health conditions.
If you are experiencing an episode of a mental or brain disorder, HEG or aerobic exercise in general may help as a form of intervention.
However, there are complex risk factors associated and we again cannot make any calls as to the best procedure. Please follow your doctor's
recommendations and don't put yourself at unnecessary risk.
Support:
Please inform us of any positive or adverse reactions you have when using the HEG so we can document it.
For technical support please create an issue at https://github.com/moothyknight/HEG_ESP32 so we can publicly resolve it to guide future users.
You may also contact us for questions or technical support at<EMAIL_ADDRESS>Section 1: Introduction
Welcome to HEG Biofeedback with the Internet of Things!
This hardware and software package is designed to have a minimum barrier
for entry for users wanting to use or develop this unique form of brain training.
Hemoencephalography (HEG) simply means using blood flow signals for feedback
data from the body while doing certain actions or experiencing different mental
states.
Hemo - Meaning blood.
Encephalography - Imaging brain structure through a particular medium.
This device you are using now belongs to particular classification called fNIRS
or "functional Near-Infrared Spectroscopy" as we are using Red and InfraRed LEDs
reflected into a light sensor to measure an important component of brain activity.
It is a reflectance-based pulse oximeter in closest comparison, and we can gather
the same data, we just use it in a "functional" way to measure overall O2 saturation
of a particular region of your brain.
The HEG sensor is able to capture signals from about an inch deep in your skull
wherever it has been placed. This is done mainly on our forehead and the pre-frontal
cortex as this is the most accessible area, but smaller sensors will allow for
measuring other parts of the scalp.
The primary usage of these sensors in our case is for direct aerobic exercise for
your brain. Normally you energize your brain through normal diet and exercise -
which add fuel and flexibility to your neurons. Aerobic exercise encourages good
blood flow and stronger capillary development.  This causes energy to be more
available to your system in general and for it to get more used to stress and strain.
Our brain cells require a lot of energy to be immediately available to fire. Neurons receive
their energy on-demand, chiefly through astrocytes connected to innumerable tiny capillary tubes
that wrap around your cells in order to sustain them. Stress, poor diet, dehydration,
or any number of things that can reduce your well-being have some of their strongest
impacts on brain health due to the incredibly sensitive and intricate ecosystem they form
in your noggin.
We can see correlations with poor health and poor state of mind directly with HEG by
massive reductions or even over-activity in normal blood flow levels, as well as improving
it through HEG-assisted exercise. This has overall benefits to your body and mind - which
are not really separate. The main benefits are you will feel more aware, quicker on your
feet, and able to make better choices when your brain is in shape. The directness of this
procedure seems to extend the benefits of normal exercise to your brain in very profound
ways, and may shed some light on important ideas about the nature of living consciousness and
memory.
Before you embark, however, it is important to understand the risks and the experimental
nature of this work. While general exposure to the HEG is safe, you can over-train and give
yourself headaches or fatigue - kind of like normal exhaustion after a hard exercise. So
please read our safety guide and disclaimers in the previous section.
Section 2: Web Demo guide
Note:
This web demo is a heavy work in progress. We are working on bringing a much fuller
suite of activities for our web demo, while what's currently in place is functional
enough for training.
How it works:
You will see a graph and a circle when you open the web demo. Turn your sensor on via the visible button. After a couple seconds of good data, the graph charts a score
based off the Simple Moving Average of the ratio.
The score is the cumulative difference between
1 second and 2 seconds of averaged data, representing a simple "effort" score. The score doesn't actually
mean anything other than to exaggerate the changes in ratio data being reported by comparing shorter and longer
term results. This then decides how much the circle increases or decreases in radius per frame.
The other data you will see are not used in the current rudimentary feedback setup.
Feedback Options:
There are 5 feedback methods currently, though each needs polish. The Circle and Audio
exercises are the most recommendable ones for now while we continue tuning them.
If you connect the device online, you will find an exciting ThreeJS option. This is a work-in-progress visual where you control the rotation of a planet and make the sun rise or set. ThreeJS enables much more, which we will be working on showing off.
Audio accepts MP3s, Video accepts MP4s.
There is a default video that plays when connected online, as a basic streaming example.
Graph Options:
XOffset: Lets you roll back data.
XScale: Changes the number of visible data points.
YScale: Changes the height of the y-axis to make larger or smaller values more visible.
Data Options:
The Data menu contains ways to send commands to the device and control the scoring sensitivity.
Annotating:
Click "Get Time" at any point in your exercise to get the current time stamp. You can then type in a quick (or extensive) note and click "Annotate" for it to show up in the saved CSV.
Saving and Replaying Data:
Click on the Data tab and look for "Save CSV". The window next to it lets you type in a name or will
use a default name otherwise. This will create a simple comma-separated-value spreadsheet of your raw session data.
Google Sheets is an excellent tool for quickly visualizing your data in more detail.
When you click "Replay CSV" a window will open asking for a CSV file in the same format. This will begin streaming the
data as if it was playing a session. We are still working on session exploration features as well as timestamped annotating.
We will soon also have backend support so data will be able to be saved online to a secure server.
Host:
This is an option that lets you define a custom EventSource host. This is for if you are not connected directly to the device and want to access it remotely or from a local development client for faster iteration.
Output:
This shows the raw data coming from the device, this data all is collected in the CSV along with your annotations.
Section 3: Technical Guide
Commands
't' - Turns sensor on, you'll see a data stream if the sensor is isolated, as in contacting your skin and not exposed to ambient light.
'f' - Sensor off.
'W' - Reset WiFi to default access point mode (wipes saved credentials).
'B' - Toggle Bluetooth Serial mode, resets devices to be in BTSerial (classic) mode. Access like standard USB serial after pairing.
'b' - Toggle BLE mode, resets the device to start in BLE mode, so you have to enter 'b' again through the serial or BLE connection to switch back to WiFi.
'R' - hard resets the ESP32.
's' - soft resets the sensor data.
'u' - toggles USB data stream.
'p' - really basic pIR setting. Just turns the LEDs off as the photodiode picks up radiant heat from your body.
'0','1','2','3' - Changes ADC channel the device reads, in the case of multiple light sensors.
'5' - Read differential between A0 and A1 on ADS1115 to reduce noise (e.g. connect A1 to signal ground).
'6' - Read differential between A2 and A3 on ADS1115.
'D' - toggles ADC debugging (USB Serial output only).
'L' - toggles LED ambient light cancellation.
Data Output Information
Output String:
"Current Microseconds | Red LED Sample Average | IR LED Sample Average | Red/IR Ratio Average | Ambient Sample | Velocity (ratio change/ms)| Acceleration (ratio change/ms^2) \r\n"
WiFi: Subscribe to a Server Sent Event stream (EventSource) at the IP of the device. Its update period is set at 50ms. The data stream comes through on "heg" events.
USB Serial: Via a serial monitor, set baud rate to 115200 on the correct COM port to read the data, debug, and send commands.
Bluetooth: Requires scanning for BLE device and subscribing to the correct UART characteristic, then sending the 't' command to activate the sensor stream.
API page
This is an experimental page that lets you call all of the user interface yourself and define what default features you want enabled. The initial command allows you to define arbitrary
EventSource location for if your HEG is not in its default setup or if you want to access it remotely.
It's possible to subscribe to multiple sessions remotely this way. We hope this
gives developers an easier ability to work with our applications and help unify open source development. We are developing a web-based way to access
the device too, to open up the vast software resources online connectivity provides.
External Links:


Over the last year or two, I have started to realise this boom of startup culture that is taking place in Australia. In particular, Studio39 and Startup Catalyst program were some of the first things that peaked my interest in the world of startup. But I needed to get my hands dirty. So, a month ago I decided to take action and decided to go to my first startup weekend.
Keep in mind, my knowledge about startup weekends was close to none. But with passion and hard work as my allies, forward I went.
This particular event was run by QUT Creative Enterprise Australia with the focus on Creative tech. It was a crazy 54-hour arrangement which saw hackers, hipsters and hustlers all coming together to create something they can validate and create a startup out of. Here are some good ol' stats for your amusement:
It may be hard to believe, but munching down on all the delicious food was not my main goal. I had an agenda of my own. After all, what is the point of attending such a great event and not taking advantage of the opportunities that present themselves one after the other. With that in mind, I kept my focus on 5 main things.
Did I achieve what I set out to do? Well, you have to read a little bit more to find out ;)
( If you really want to )
Ah the beginning of the madness. As soon as I got there, I could sense the energy that was flowing through the whole venue and the drinks and food did nothing but increase my enthusiasm for what was going to be my first startup experience.
There was a total of 44 Pitches. A staggering number by all accounts. No one was expecting that. It felt like every other person was up on the stage ready to share their ideas. Although inspiring, it also meant that most of them will need to put their ideas aside and work on one of the few selected pitches.
Ultimately, 14 teams were formed, of which we (me and few other peers from studio39 ) choose to be a part of Lunchbox Meals . A foodie startup idea to promote healthy eating by establishing central hubs in Brisbane to hand deliver healthy meals. Though it was not our idea, it was the one that attracted us the most because it provided something we all wanted in our life.
With the team of 9 talented hunks and few drinks in our hand, we were all set out to conquer the world the coming day.
Side note : Always check for stormy weather before you decide to walk for 30 minutes, we got wet. Really wet.
We started the day with delicious coffee which was graciously provided by Coffee Beans Deliver. Being short on time, we decided to get going and start building the idea more. With 5 hackers on the team we quickly started grinding gears and worked on the landing page, social media campaign and other graphics for the business model.
On the other end, the hustlers were truly hustling to get the business model on the paper and ready for valuation. Afterwards, we hit the nearby markets to consult with our potential customers and really understand what they wanted.
With time clicking past faster than normal, we quickly came to the decision that the LunchBox Meal’s business model and revenue stream was not a feasible task. The total cost of one meal was more than what our customers expected. Along with that, the mentors who came to our aid also implied hesitance in the execution of the idea.
Long story short, it was time to pivot.
It was around 6pm when we had the final discussion with the team, and when we decided our next move. That was to put our energy into the idea my peer, Joshua Holmes originally pitched. In essence, the concept was to create a simple web service that will help creative individuals aggregate all their portfolio services such as Dribbble, Behance, Github, Bitbucket, etc., into one. We called it Composit. However, it was clear that idea is far from being ready and requires tremendous amount of work. We had 20 hours to do that.
The most important part was that we did not give up. We prevailed.
As Sunday rolled around we get to the venue, only to find out 3 of our team members have decided to depart the team and go solo for the rest of the day. In a way it was beneficial to us because we now had a better control over the small team.
For rest of the day we hustled through to create the landing page, social media campaign, prototype and anything we could use to showcase our product. But the key thing we were missing was a strong business model with optimal revenue stream. This is when the mentors came as Angels in disguise and gave us few pointers about how we can turn our idea into a platform for HR companies to weed out and approach talent.
It wasn't long untill we realised pitch submission was only an hour away. Ergo, we changed our gears and started preparing the graphics and script for the slides. Meanwhile my friend Joshua was getting ready for the pitch, as it was originally his idea. In the matter of moments we were called on the stage to pitch our startup to the panel of industry proclaimed judges which included Steve Baxter, Elaine Stead, Michael Smellie, Drew Koven and Professor Carol Dickenson.
And I have to say that Joshua did a fantastic job, he spoke with confidence and had passion in his eyes throughout the pitch. As a team we presented ourselves in a calm manner and answered their hard hitting questions one by one.
The general consensus between the judges was that our overall product was not the best thing ever, but we completely nailed the problem statement. Some questions were also raised against out proposed ‘algorithm’ but I think they understood the constraints we were in while developing it.
The main eye-opening statement came straight from Steve Baxter when he bluntly said to
I agree completely. Something I will undoubtedly keep in mind for my next startup venture.
Finally, came the moment of truth. Did we pull a quick one and win over the judges? Sadly, no we did not win any of the prizes. But that was never the main objective. The point for me was to not pressure myself in the conditions of completion and actually take full advantage of the event to accomplish my numerous objectives.
That brings us to the final part of this blog…
As the heading says, I won. Did I win any prizes? no. Yet I did What I set out to do.
I learned, I increased my engagement skills, I grew my network, I made some new friends, and I am now fully embracing my ride on the startup train. Also, I had fun, a lot it ;)
I want to share exactly what I learned, and in essence that is the whole point of this blog ( may be I should have done that earlier). If you ever plan to attend an event similar to this, I would recommend reading through the list below to get yourself ready.
In closing thoughts, I would like to show my gratitude to the QUT CEA team that organised this incredible event and I would like to thank all the mentors and the judges who awarded us with some great insight about the world of startups. I simply cannot wait to participant again and leverage my learnings from this experience.
THANK YOU.


John Doe
Mexican Royal Rumble
HOME
DASHBOARD
FILES & TIMELINE
COMMITS ON BRANCH MASTER
CONTRIBUTIONS
See contributions of an user
Team Members


Before Change
found_valid = True
ori_img = Image.open(ori_file_path)
self.decensor_image(ori_img, colored_img, file_name)
continue
if not found_valid:
print("Corresponding original, uncolored image not found in {ori_file_path}. \nCheck if it exists and is in the PNG or JPG format.".format(ori_file_path = ori_file_path))
else:
self.decensor_image(colored_img, colored_img, file_name)
After Change
break
else: //for...else, i.e if the loop finished without encountering break
print("Corresponding original, uncolored image not found in {}.".format(ori_file_path))
print("Check if it exists and is in the PNG or JPG format.")
else:
self.decensor_image(colored_img, colored_img, file_name)
print("--------------------------------------------------------------------------")


WITNESS LIST
Higher Education
October 12, 2020 1:00 PM
Adult Learner Students
ON:
Beard, Peter Senior Vice President for Regional Workforce Development (also providing
written testimony) (Greater Houston Partnership), Houston, TX
Brunk-Chavez, Beth Dean of Extended University (also providing written testimony) (The
University of Texas at El Paso), El Paso, TX
Hellyer, Brenda Chancellor (Self; San Jacinto College), Pasadena, TX
Keller, Harrison Commissioner (also providing written testimony) (Texas Higher
Education Coordinating Board), Austin, TX
Rivers, Carlos Executive Director of the Institute for Competency-Based Education (also
providing written testimony) (Texas A&M University-Commerce), Commerce, TX
Data Transparency
ON:
Alander, Link Vice Chancellor of College Services (Lone Star College), The Woodlands,
TX
Ban, Eric Managing Director (also providing written testimony) (Commit Partnership),
Dallas, TX
Keller, Harrison Commissioner (also providing written testimony) (Texas Higher
Education Coordinating Board), Austin, TX
Riley, Rebecca President, Lone Star College-Montgomery (Lone Star College), The
Woodlands, TX
Scott, Kyle Vice Chancellor of Strategic Priorities (Lone Star College), The Woodlands, TX
Smith, Samuel Chief Analytics Officer (also providing written testimony) (The University
of Texas at Arlington), Arlington, TX
Monitoring: SB 25
ON:
Keller, Harrison Commissioner (Texas Higher Education Coordinating Board), Austin, TX


SBC Booking Systems
Welcome to our homepage - Please take time to familiarise yourself with the layout
Sign-in page
Do not click this link
Click here to find some useful links
Mess-about Link


operator fun Group.minusAssign(actor: Actor): Unit
Removes an actor from the group
operator fun Group.plusAssign(actor: Actor): Unit
Adds an actor to the group


The overall goal for this lab is to build a system that can
detect treasurers of different shapes and colors.
This consists of the following parts:
Arduino-Camera communication
Arduino-FPGA communication
Camera-FPGA communication
Color detection with the FPGA, Camera, and Arduino
Prelab Questions
From the FPGA’s specifications, what is the maximum size of the
buffer you can create? Given that each entry is ___, how many
entries large can the RAM be?
Total RAM = 594 Kbits = 74250 bytes
The OV7670 offers a variety of pixels formats to sample data.
Which of the formats available provides the most info on the base
colors making up each pixel?
Image sensor can output the following:
QCIF 176 x 144 = 24768 bytes can fit
YUV/YCbCr 4:2:2
RGB565/555
GRB 4:2:2
Raw RGB Data
Use RGB565 since it maintains the most information
Given that the input to the VGA adapter is RGB332, how can you
convert (downsize) the pixel format from Q2 to be accepted by the
VGA module?
Starting with the RGB565 pixel format, take the most significant
bits to downsample to the VGA-accepted RGB332 format
Now that you know the downsized memory per pixel (from Q3), you
need to know how many you can fit into memory. Which of the
predefined resolutions that the OV7670 supports provides the max
amount of pixels in an image, given the constrained max size of
the buffer (from Q1)? What’s the size of the buffer?
QCIF 176 x 144 = 24768 bytes can fit
Using the Register Set table on pages 10-23 of the OV7670
datasheet, find the registers you will need to set.
Take a look at the timing diagrams (Fig 5 and 6) on Page 7
(Ignore HSYNC, you won’t use it). Use both diagrams to determine
when you should sample your data. (Hint: You only want to sample
valid bytes, and each one only once)
HREF signal is high during readout of a single row, and low in between readouts of rows
VSYNC is set high after all rows of a single frame have been read out, signaling the start of a new frame
RGB565 uses 16 bits to represent a single pixel, so requires two cycles to output since the camera outputs 8 bits in parallel per cycle
Data is fully valid every other cycle when HREF is asserted
Timing diagrams shown below in Downsampler portion of the FPGA section
Discuss with your entire team, what method you want to use to
communicate information from the FPGA to the Arduino. Parallel?
Serial?
For this lab, we are going to use parallel communication
We have open pins on the Arduino we are using
Easy to implement
For the actual implementation on the robot, we are going to use software-serial
We have a pin-shortage
Sub-Teams
To begin, we split into two groups of two. Each group progressed
through the lab individually, as described below.
Arduino & Camera Team = Kenneth and Tyler
FPGA Team = Brian and Eric
Arduino & Camera Team
GOAL: setup the camera and create an FPGA-Arduino communication protocol
Tyler discovered how to do this on Mac (see Piazza post)
Without this, the I2C signals would be pulled up to 5V, which would break the camera
We wired a 5V input from the Arduino to a 3.3V regulator, with capacitors on the 5V input and 3.3V output to stabilize the power supply
NOTE - the regulator’s output will not be 3.3V unless it is loaded
For testing our regulator we added a 330 Ω resistor and measured the output pin
We wired up the schematic provided in the lab, which sets up I2C communication with the camera for programming
NOTE - pin names on the camera differ from the diagram below
SIOC = SCL
SIOD = SDA
MCLK = XCLK
Credit to Kirstin for both schematic diagrams
Camera-to-Arduino power schematic
Camera-to-Arduino I2C schematic
Full system wiring
Programming the Camera
The camera has control registers defined by their Serial Camera
Control Bus (SCCB) interface
We can use this interface via I2C from the Arduino
Here are the control bits we need to set, and in which register
(the format is REGISTER_NAME[bit_index], bits are 0-indexed):
COM7[7] = 1
COM7[3] = 1
COM7[2],[0] = 1, 1
COM7[1] = 1
COM3[3] = 1
COM9[6:4] = 000
COM9[0] = 1
COM15[7:6] = 11
COM15[5:4] = 01
COM17[3] = 1
CLKRC[7] = 1
CLKRC[6] = 1
MVFP[5] = 1
MVFP[4] = 1
← SCCB register reset
← Output format - QCIF selection
← Output format - RGB selection
← Color bar enable
← Scale enable
← Automatic Gain Ceiling (2x)
← Freeze AGC/AEC
← Data format - output full range enable
← RGB 565 enable
← DSP color bar enable
← Enable digital PLL option
← Use external clock directly
← Mirror image enable
← VFlip enable
The camera I2C slave addresses are found on page 10 of the camera datasheet
0x42 = write address
0x43 = read address
NOTE - Arduino’s Wire library fills in the LSB based on whether we are reading or writing
The actual address we use when calling the Wire library is 0x21 (the 7 MSB of the above slave addresses
NOTE - all values will be read in hexadecimal format
All addresses and write values should also be written in hex
Be sure you specify that format in your code (eg. 0xAB)
We used the provided read_register_value() function to create a function read_key_registers()
We use this as a diagnostic tool to print out the values in all of the target registers
It is the first function called, and then is called again after writing to the registers
This allows us to compare the results to make sure we set the correct registers to the desired value
Setting up the camera registers
Creating FPGA-to-Camera Communication Scheme
For the competition, we need to be able to detect the following:
Presence of a treasure
Color detection - blue or red
Shape detection - triangle, square, or circle
We created the below table to encode this information into 1 byte
Although we are using a full byte, the 7 possibilities fit into just 3 bits
In Lab 4, we only need to be able to detect color: Red or Blue
This is easily done with one wire from a GPIO pin on the FPGA to a
digital I/O pin on the Arduino
During the competition, when we need to transmit three bits at a time,
we plan to use software serial
This is more challenging to setup
Only requires two pins -> we only have two pins available
FPGA-to-Arduino communication scheme
FPGA Team
GOAL: setup the FPGA to perform shape and color detection
The 25 MHz clock is used for the downsampler, image processor, and VGA driver
Buffer Reader
Display test pattern across the VGA Driver by writing a test array to
memory and reading from it
Update the X_ADDR and Y_ADDR, since these form the write address in
memory corresponding to the pixel that is to be displayed
If X_ADDR < 50, write a green pixel
Else if X_ADDR < 80, write a blue pixel
Else write a red pixel
Once this is written to memory, VGA driver continuously reads all the
pixel values in memory and displays them
Buffer reader test image
Downsampler
The camera is set up to output RGB565 pixel format, thus there are:
5 bits for the red channel
6 bits for the green channel
5 buts for the blue channel
A total of 16 bits per image
Since the camera outputs 8 bits in parallel at a time per pixel,
2 clock cycles are needed to output all 16 bits that represent a
single pixel
The output is broken up as follows:
Byte on first cycle = 5 bits of red + 3 bits of green
Byte on second cycle = 3 bits of green + 5 bits of blue
See the RGB565 timing diagram below for more information
To downsample to RGB332, simply take the 3 MSB’s of red, 3 MSB’s of
green, and 2 MSB’s of blue
HREF signal is asserted during a readout of an entire row of pixels,
and is low in between row readouts
After all rows have been readout in a single frame, VSYNC is asserted
See the VGA frame timing diagram below for more information
Every two cycles of PCLK (clock at which pixels are readout from camera):
a valid RGB332 pixel value is produced
W_EN needs to be asserted
In top level, use readout sequence with HREF and VSYNC to determine
the address in memory that needs to be written to during readout and
when it is to be incremented
RGB565 timing diagram
VGA frame timing diagram
Color Detection
For this lab, the color detection task consisted of determining
whether a given image was primarily blue or primarily red
Determine this by counting frequency of pixels with an R value >
B value
Every VGA clock cycle, the image processing block reads a new pixel
from memory
The downsampler stores three bits of red information and two bits
of blue information
Given this, we count the number of times the two most significant
bits of red are greater than the two most significant bits of blue
If this counter exceeds half the number of pixels in the image
(12672) by the end of the frame, the image was majority red
Every time VSYNC rises to signal a new frame, we update an output
pin according to:
Majority red = HIGH
Majority blue = LOW
Full System Testing
This video demonstration shows our robot completing all required behaviors:
Uses the camera to capture a live image
Downsamples that image from RGB565 to RGB332 on the FPGA
Displays that image on the monitor through the VGA adapter
The FPGA processes the data to determine if the image is red or blue
The FPGA transmits that information to the Arduino
The Arduino prints the results onto the Serial monitor


Music Management Software
ID
Title
Artist
Label
Key
Genre
Year
Edit
Delete
Update Song
ID:
Title:
Artist:
Label:
Year:
Genre:
Key:
Enter the details of the song below:
Title:
Artist:
Label:
Year:
Genre:
Key:
Submit


Interpolate points based on Result Values
Loading...
Heatmap
Topographic
Streets
Oceans
Gray
Dark Gray
Imagery
Shaded Relief


1969: When the company first opened
2000: The company expanding and becoming well known
Present day company
Key features of our company
Responsive
We take pride in our customer service that is always ready to assist our partners and users
Passion
Our whole team is dedicated to making our projects better
Design
We know design well and are willing to give our customers the best designs
Support
Our team is always ready to support our partners in projects


{% include "dist/scanning.html" %}
{% include "dist/clones_drugs.html" %}
{% include "dist/fitting_overheating.html" %}
Miscellaneous
{% include "dist/scanning.html" %}
{% include "dist/clones_drugs.html" %}
{% include "dist/fitting_overheating.html" %}


Rangers 2-0 Porto: Steven Gerrard praises side after Europa League win
Steven Gerrard lauded Rangers' win over Porto as "being right up there" with the best of his managerial career after a special Europa League night at Ibrox.
The Portuguese side - quarter-finalists in last year's Champions League - were humbled 2-0 by Gerrard's men after being held 1-1 at home two weeks ago.
Rangers sit level with leaders Young Boys after four games, with Gerrard yet to taste defeat at home in Europe.
"We beat a good team tonight and we've beaten them comfortably," he said.
"They have good players and over two games we have dominated three halves.
"I thought Porto paid us a big compliment with their set-up, the formation and the personnel they picked.
"It caused us problems and for the first 20-30 minutes their quick movement and system rattled us a bit. But once we came to terms with it we grew into the game."
The game turned midway through the second half thanks to Alfredo Morelos' 11th European goal of the season, with the Colombian also providing an assist moments later for Steven Davis.
Morelos now sits on 21 goals from 25 games this term.
"That's the reason we talk about him every two or three days," said Gerrard, who insisted on Sunday the 23-year-old would not be sold in January.
"We'll never run out of things to say if he keeps providing performances and moments like that. Players who keep producing moments like that deserve praise.
"I will never get bored of talking about him. He is a top player and I can't describe how much I enjoy working with him. He's a massive, massive asset to this club."
Rangers now travel to Rotterdam to take on Feyenoord, knowing a victory would secure their place in the knockout stage of the tournament.
"It puts us in a good place in the group but still a lot of work to do, two tough games to go," said Gerrard.
"It's a fantastic carrot for us. It will be really tough. They have a new manager [Dick Advocaat] now, I'm sure there will be a bounce. We will have a game plan, we will work on it."
Meanwhile, Porto boss Sergio Conceicao bemoaned an injury which forced experienced defender Pepe off early in the second half.
"Rangers took advantage of our fragility," he said. "The first half was fairly balanced and I thought it was going OK. However, Pepe's injury affected the result."
'A great night for Scottish football' - analysis
Former Rangers striker Billy Dodds on Radio Scotland
I was there at the start of that run that took Rangers to the Uefa Cup final. We didn't start that season thinking 'we're going to get to the final'. I just remember it all happening and Walter Smith started taking it seriously. I'm not saying Rangers or Celtic are going to get to a final but that's where it starts. When you start defeating teams like Lazio and Porto then you begin to believe.
Former Rangers winger Neil McCann on Radio Scotland
I think the Old Firm are in a really good place at the moment. They're so finely balanced but I like that there's a bit of a swagger about both sides. To come and get results like they did tonight in European football is brilliant and it can't be overstated how good a night this is for Scottish football. We've done a number on two very good teams.


Go Game Demo
Your browser doesn't support WGo Player. Use some modern browser like IE9, Google Chrome or Mozilla Firefox.


This report is more of a glance back on the times I have taken Morning Glories, about 5 times now. Some trips have been successful, others worthless, most uncomfortable at one point or another. Most of the trouble comes from my inexperience with them, so I am working throught the trials. I feel these seeds have great potential.
The first time I dosed was largely a mistake. I had gotten 10 1.5 gram packages on a Sunday (by the by, all the seeds I have taken have come from the same source and are the same brand) and I was pretty eager to trip. From what I had read 200 seeds was pretty light, so I decided to try 178 (hand counted) at 5 after a light dinner. I ate about 30 seeds at a time, thoroughly chewing and following each nasty mouthful with a big gulp of water.  Was I wrong or what...
I remember laying on my couch, watching some tv, waiting for the trip, when I started to notice a twinge in my legs. I didn't really think anything of it but I started to pay more attention to my body and mind. I came to notice that my vision was flickering, not unlike an old movie reel does. That grew in intensity until it was undeniable but not too annoying. This all was about a half hour after ingestion.
I got up to get a drink and my legs jsut about gave out from under me. I had a HORRIBLE pain in my legs, and walking normally was quite difficult. I was a bit scared but I'd read about the vasoconstriction and I had an idea of what to expect. I also had experienced similar pains on amphetamine binges that ultimately turned out all right, so I used that fact to reassure myself.
I retired to my bedroom upstairs and waited for the trip, which came beautifully. I'll keep it short. Basically, enhanced coloring, undulating carpets, breathing walls, silent motion (you know, when things move far away and then back over and over...), trailers, tracers, the whole nine. Intensely mindraped me. Describing it to a friend who has done acid (I haven't) he said it soudned like a 2 blotter trip. Take that as you will, like I said I haven't done it before. This must have been a strong batch of seeds, or the dosing information I read applied to extracts and not the chew-chug method I used. Either way, that was the strongest experience I have had on the beauties.
I must also mention the intense discomfot I experienced on parts of the trip, mainly at the end. I simply could not find a comfortable place to sit, lay or stand. I was constantly moving, looking for that comfortable place, but it wasn't there. Finally I said the hell with it and laid down on my carpet and watched it swim and I just exsisted, my thoughts very disconnected from where I actually was. That is where I was the next morning when I was either awakened or had my attention drawn by the alarm I set every morning. I don't know if I slept, there are a good 4 hours of that night I don't remember. The positives, for me, far outweigh the negatives.
Between that trip and the last one were a few unnotable experiences, much weaker than that first one. I always allowed at least 2 weeks between experiences as is generally recommended, excepet once when I only went 2 days. That is not long enough for the tolerance to abate, fyi, at least it wasn't for me.
My last trip was an eventful one. I took approximately 240 seeds (I have found that every 1.5 gram package I get has around 60 seeds) and settled in for a fun evening. The odd thing about this trip was that I got little of the lag cramping on previous trips, I would say it was about a 1/4 as abd as usual, which was interesting. It did also turn out to be a fairly weak experience on its own. Which brings me to waht I really wanted to talk about-Nitrous Oxide.
I had read in numerous documents and user reports that Nitrous could work wonders on a trip but I was always a little skeptical. This time I was having a pretty uneventful trip, and I had about 4 whipped cream cans in the fridge. 'What the hell?' I said, and I got one. I took all the air off the can in 2 or 3 big inhalations and waited a second. The world slipped into a mass of swirling shapes with colors I have never even experienced before, and my entire body was lost in that Nitrous tingle, which seemed not to be confined to my body but spreading out through infinity. I can truly say I had no body for a minute that night. Next trip I will be ready with a cracker and balloons, to do it right.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Simple Webapp2 Google App Engine Example¶
In this tutorial we will create a simple Google App Engine Webapp2 application that will be able to log users in with Facebook, Twitter and OpenID and retrieve their 5 most recent tweets/statuses.
You can download all the source files we are about to create here.
First create the Config dictionary where you set up all the providers you want to use. Yo will need the consumer_key and consumer_secret which you can get here for Facebook and here for Twitter.
Note
Facebook and other OAuth 2.0 providers require a redirect URI which should be the URL of the login request handler which we will create in this tutorial and whose walue in our case will be http://[hostname]:[port]/login/fb for Facebook.
# config.py
from authomatic.providers import oauth2, oauth1, openid, gaeopenid
CONFIG = {
'tw': { # Your internal provider name
# Provider class
'class_': oauth1.Twitter,
# Twitter is an AuthorizationProvider so we need to set several other properties too:
'consumer_key': '########################',
'consumer_secret': '########################',
},
'fb': {
'class_': oauth2.Facebook,
# Facebook is an AuthorizationProvider too.
'consumer_key': '########################',
'consumer_secret': '########################',
# But it is also an OAuth 2.0 provider and it needs scope.
'scope': ['user_about_me', 'email', 'publish_stream', 'read_stream'],
},
'gae_oi': {
# OpenID provider based on Google App Engine Users API.
# Works only on GAE and returns only the id and email of a user.
# Moreover, the id is not available in the development environment!
'class_': gaeopenid.GAEOpenID,
},
'oi': {
# OpenID provider based on the python-openid library.
# Works everywhere, is flexible, but requires more resources.
'class_': openid.OpenID,
}
}
Create main.py file and import what’s needed.
# main.py
import webapp2
from authomatic import Authomatic
from authomatic.adapters import Webapp2Adapter
from config import CONFIG
Make an instance of the Authomatic class and pass the Config together with a random secret string used for session and CSRF token generation to it’s constructor.
authomatic = Authomatic(config=CONFIG, secret='some random secret string')
Create a simple request handler which accepts GET and POST HTTP methods and receives the provider_name URL variable.
class Login(webapp2.RequestHandler):
def any(self, provider_name):
Log the user in by calling the Authomatic.login() method inside the handler. You must pass it an adapter for your framework, in our case the Webapp2Adapter and one of the provider names that you defined in the Config, which we get from the URL path of the request.
The method will redirect the user to the specified provider to prompt him/her for consent and redirect him/her back to this handler.
result = authomatic.login(Webapp2Adapter(self), provider_name)
The login procedure is over when Authomatic.login() returns a LoginResult.
Warning
Do not write anything to the response unless the login procedure is over! The Authomatic.login() either returns None, which means that the login procedure si still pending, or a LoginResult which means that the login procedure is over.
if result:
self.response.write('Home')
Hopefully there is no LoginResult.error but rather the LoginResult.user. Most of the providers don’t provide user info on login. To get more user info we need to call the User.update() method.
if result.error:
self.response.write(u'
Damn that error: {}
'.format(result.error.message))
elif result.user:
if not (result.user.name and result.user.id):
result.user.update()
Now we can welcome the user by name.
self.response.write(u'
Hi {}
'.format(result.user.name))
self.response.write(u'
Your id is: {}
'.format(result.user.id))
self.response.write(u'
Your email is: {}
'.format(result.user.email))
Seems like we’re done, but we can do more:
If there are credentials the user has logged in with an AuthorizationProvider i.e. OAuth 1.0a or OAuth 2.0 and we can access his/her protected resources.
if result.user.credentials:
Each provider has it’s specific API. Let’s first get the user’s five most recent Facebook statuses.
if result.provider.name == 'fb':
self.response.write('Your are logged in with Facebook.
')
Prepare the Facebook Graph API URL.
url = 'https://graph.facebook.com/{}?fields=feed.limit(5)'
url = url.format(result.user.id)
Access the protected resource of the user at that URL.
response = result.provider.access(url)
Parse the response. The Response.data is a data structure (list or dictionary) parsed from the Response.content which usually is JSON.
if response.status == 200:
# Parse response.
statuses = response.data.get('feed').get('data')
error = response.data.get('error')
if error:
self.response.write(u'Damn that error: {}!'.format(error))
elif statuses:
self.response.write('Your 5 most recent statuses:
')
for message in statuses:
text = message.get('message')
date = message.get('created_time')
self.response.write(u'
{}
'.format(text))
self.response.write(u'Posted on: {}'.format(date))
else:
self.response.write('Damn that unknown error!
')
self.response.write(u'Status: {}'.format(response.status))
Do the same with Twitter.
if result.provider.name == 'tw':
self.response.write('Your are logged in with Twitter.
')
# We will get the user's 5 most recent tweets.
url = 'https://api.twitter.com/1.1/statuses/user_timeline.json'
# You can pass a dictionary of querystring parameters.
response = result.provider.access(url, {'count': 5})
# Parse response.
if response.status == 200:
if type(response.data) is list:
# Twitter returns the tweets as a JSON list.
self.response.write('Your 5 most recent tweets:')
for tweet in response.data:
text = tweet.get('text')
date = tweet.get('created_at')
self.response.write(u'
{}
'.format(text.replace(u'\u2013', '[???]')))
self.response.write(u'Tweeted on: {}'.format(date))
elif response.data.get('errors'):
self.response.write(u'Damn that error: {}!'.\
format(response.data.get('errors')))
else:
self.response.write('Damn that unknown error!
')
self.response.write(u'Status: {}'.format(response.status))
That’s it for the Login handler.
Now just for convenience that we don’t have to enter all the URLs manually let’s create a Home handler.
class Home(webapp2.RequestHandler):
def get(self):
Create links to our Login handler.
self.response.write('Login with Facebook.
')
self.response.write('Login with Twitter.
')
Create OpenID forms where the user can specify his/her claimed ID. The library by default extracts the identifier from the query string id parameter, but you can change its name to whatever you want.
self.response.write('''
<form action="login/oi">
<input type="text" name="id" value="me.yahoo.com" />
<input type="submit" value="Authenticate With OpenID">
</form>
''')
self.response.write('''
<form action="login/gae_oi">
<input type="text" name="id" value="me.yahoo.com" />
<input type="submit" value="Authenticate With GAEOpenID">
</form>
''')
Route URLs to your handlers.
ROUTES = [webapp2.Route(r'/login/<:.*>', Login, handler_method='any'),
webapp2.Route(r'/', Home)]
Finally instantiate the WSGI application.
app = webapp2.WSGIApplication(ROUTES, debug=True)
Don’t forget to set up the app.yaml file.
# app.yaml
application: authomatic-simple-example
version: 0
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /.*
script: main.app
That’s it. Now just run the application.
$ python dev_appserver.py [path to the root folder of this app]
Tip
Some of the providers don’t support authorization from apps running on localhost. Probably the best solution is to use an arbitrary domain as an alias of the <IP_ADDRESS> IP address.
You can do this on UNIX systems by adding an alias to the /etc/hosts file.
# /etc/hosts
<IP_ADDRESS> localhost
<IP_ADDRESS> yourlocalhostalias.com
And here is the complete app. Remember that you can download all the files we just created from GitHub.
# main.py
import webapp2
from authomatic import Authomatic
from authomatic.adapters import Webapp2Adapter
from config import CONFIG
# Instantiate Authomatic.
authomatic = Authomatic(config=CONFIG, secret='some random secret string')
# Create a simple request handler for the login procedure.
class Login(webapp2.RequestHandler):
# The handler must accept GET and POST http methods and
# Accept any HTTP method and catch the "provider_name" URL variable.
def any(self, provider_name):
# It all begins with login.
result = authomatic.login(Webapp2Adapter(self), provider_name)
# Do not write anything to the response if there is no result!
if result:
# If there is result, the login procedure is over and we can write to response.
self.response.write('Home')
if result.error:
# Login procedure finished with an error.
self.response.write(u'
Damn that error: {}
'.format(result.error.message))
elif result.user:
# Hooray, we have the user!
# OAuth 2.0 and OAuth 1.0a provide only limited user data on login,
# We need to update the user to get more info.
if not (result.user.name and result.user.id):
result.user.update()
# Welcome the user.
self.response.write(u'
Hi {}
'.format(result.user.name))
self.response.write(u'
Your id is: {}
'.format(result.user.id))
self.response.write(u'
Your email is: {}
'.format(result.user.email))
# Seems like we're done, but there's more we can do...
# If there are credentials (only by AuthorizationProvider),
# we can _access user's protected resources.
if result.user.credentials:
# Each provider has it's specific API.
if result.provider.name == 'fb':
self.response.write('Your are logged in with Facebook.
')
# We will access the user's 5 most recent statuses.
url = 'https://graph.facebook.com/{}?fields=feed.limit(5)'
url = url.format(result.user.id)
# Access user's protected resource.
response = result.provider.access(url)
if response.status == 200:
# Parse response.
statuses = response.data.get('feed').get('data')
error = response.data.get('error')
if error:
self.response.write(u'Damn that error: {}!'.format(error))
elif statuses:
self.response.write('Your 5 most recent statuses:
')
for message in statuses:
text = message.get('message')
date = message.get('created_time')
self.response.write(u'
{}
'.format(text))
self.response.write(u'Posted on: {}'.format(date))
else:
self.response.write('Damn that unknown error!
')
self.response.write(u'Status: {}'.format(response.status))
if result.provider.name == 'tw':
self.response.write('Your are logged in with Twitter.
')
# We will get the user's 5 most recent tweets.
url = 'https://api.twitter.com/1.1/statuses/user_timeline.json'
# You can pass a dictionary of querystring parameters.
response = result.provider.access(url, {'count': 5})
# Parse response.
if response.status == 200:
if type(response.data) is list:
# Twitter returns the tweets as a JSON list.
self.response.write('Your 5 most recent tweets:')
for tweet in response.data:
text = tweet.get('text')
date = tweet.get('created_at')
self.response.write(u'
{}
'.format(text.replace(u'\u2013', '[???]')))
self.response.write(u'Tweeted on: {}'.format(date))
elif response.data.get('errors'):
self.response.write(u'Damn that error: {}!'.\
format(response.data.get('errors')))
else:
self.response.write('Damn that unknown error!
')
self.response.write(u'Status: {}'.format(response.status))
# Create a home request handler just that you don't have to enter the urls manually.
class Home(webapp2.RequestHandler):
def get(self):
# Create links to the Login handler.
self.response.write('Login with Facebook.
')
self.response.write('Login with Twitter.
')
# Create OpenID form where the user can specify his claimed identifier.
# The library by default extracts the identifier from the "id" parameter.
self.response.write('''
<form action="login/oi">
<input type="text" name="id" value="me.yahoo.com" />
<input type="submit" value="Authenticate With OpenID">
</form>
''')
# Create GAEOpenID form
self.response.write('''
<form action="login/gae_oi">
<input type="text" name="id" value="me.yahoo.com" />
<input type="submit" value="Authenticate With GAEOpenID">
</form>
''')
# Create routes.
ROUTES = [webapp2.Route(r'/login/<:.*>', Login, handler_method='any'),
webapp2.Route(r'/', Home)]
# Instantiate the webapp2 WSGI application.
app = webapp2.WSGIApplication(ROUTES, debug=True)


Javascript Design Patterns
Making the transition from learning to create an app with Ruby on Rails, to using Javascript to create advanced front-end features and communicate with a database backend, it becomes apparent that the strict architecture and other conventions provided by Rails, while often complex, helped us stay organised within the MVC framework, ultimately created by somebody else.
If we take the metaphor of actual architecture - it is as if we are creating a home out of a pre-fab house. In the case of Rails, it is MVC.
"A modular, transportable, prefabricated off site, factory built, self build, flat pack, unit."
With Javascript, however, one of the most creative features of using the language is that essentially, you are asked to design your own architecture.
While at the beginning this may start with a tangle of different functions, each doing what the programmer feels might most quickly get them to their desired outcome, it becomes apparent after a while that the resulting code becomes incredibly complex to read, let alone to be used by someone else.
This would be like building a bedroom when you need a bedroom, a bathroom when you need a bathroom - essentially you'd end up with a home like this.
Which door leads to the bathroom? When did I build the kitchen again?
In the process of refactoring my code and thinking about organisation from a big-picture perspective, I started to wonder how programmers would begin to approach the architectural project, and I found that a whole host of existing design patterns, almost like blueprints for houses, existed.
Each of the design patterns represents a specific type of solution to a specific type of problem.
- The Comprehensive Guide to JavaScript Design Patterns, Marko Misura
Architectural Design Patterns
For example, the variations on the Model-View-Controller pattern are known as literally, architectural design patterns. In general, architectural patterns separate out the application logic into separate parts, promoting modularity and ease of collaboration and reuse.
MVC (Model View Controller)
The standard in Ruby on Rails, where the model handles creation/modification of data in the database, the view gathers user information, user-DOM interaction, and the controller manages the interaction between the two.
MVP (Model View Presenter)
A variation on MVC, where instead of a controller that manages interaction between model and view, you have a presenter, that also handles the presentation logic. This means the presenter doesnt communicate directly with the view, it does so through another interface.
MVVM (Model View ViewModel)
This structure is used primarily in projects where separate teams of developers - those working on the user interface and those working on the application logic, maintain separate areas within the same codebase, allowing them to work simultaneously. The ViewModel is maintained by UI developers, and the Model and View by application developers.
Creational Design Patterns
With projects that are heavily object-oriented (involve a lot of objects), in order to work with them in an optimised, efficient way, this kind of pattern is focused on controlling the creation of objects.
You will recognise, for example, the following:
Factory Pattern
const Dog = function(name){
const dog = {};
dog.name = name;
dog.walk = function(){
console.log(this.name + " walks");
}
return dog;
};
This is an example of a function that generates a Truck object. With the factory pattern, one would use constructor methods or ordinary functions to define multiple instances that would need to be used.
Abstract Factory Pattern
Related to the Factory Pattern, the Abstract Factory Pattern also emphasises a way to create objects in a controlled manner. However, instead of single objects at a time under a class name, it would generate families of interrelated objects, some of which might have no names.
Structural Design Patterns
These patterns handle the relationships between objects, such that if some part changes, the rest of it doesn't have to change as well. In the way that React separates things into components that may or may not be interdependent, structural design emphasises independence of certain key elements.
Examples of this are:
Adapter Pattern
The adapter pattern allows classes whose interfaces wouldn't otherwise by compatible, by using adapter functions that would allow them to work together. The interdependence of these two objects, therefore, is the remit of this third-party object, the adapter.
For example:
For an object of a Shopping Cart:
function ShoppingCart() {}
ShoppingCart.prototype.add = function(item) {
var items = localStorage.getItem('cart');
if (items) {
items = JSON.parse(items);
if (items[item.id]) {
items[item.id].quantity += 1;
} else {
item.quantity = 1;
items[item.id] = item;
}
} else {
items = {};
item.quantity = 1;
items[item.id] = item;
}
items = JSON.stringify(items);
localStorage.setItem('cart', items);
return item;
};
If suddenly you were asked to change part of the code to save the cart to server storage instead of local storage, it might mess up this function, and all the places it has been used in the rest of your project. Therefore, it'd be better to handle that part of the function with an adapter that could save the cart to either local storage or server storage.
For example, it could look like this:
var localStorageAdapter = {
findAll: function() {
var deferred = new $.Deferred();
var items = localStorage.getItem('cart');
if (items) {
items = JSON.parse(items);
}
deferred.resolve(items);
return deferred.promise();
},
save: function(items) {
var deferred = new $.Deferred();
items = JSON.stringify(items);
localStorage.setItem('cart', items);
deferred.resolve();
return deferred.promise();
}
};
Credit for example: https://thejsguy.com/2015/10/16/the-adapter-pattern-in-javascript.html
Bridge Pattern
The Bridge pattern allows a client and a service, to work together with each component having its own interface. You might think of this as a double adapter structure, where both the client and the service have their own adapters in order to access each other.
For example, this might apply where you have a server calling to an API. However, the API will need a different adapter depending on what kind of server you are using (SQLite vs. Postgresql, for example), and the server itself will also need an adapter depending on the kind of API that is being called.
This is a highly abstract pattern, and ultimately quite rare.
This is by no means the comprehensive list of design patterns - there are hundreds. For every developer who has a tried and true method of structuring a project, there is a new blueprint to be added to the list. And as with real architecture, you can certainly try to use a combination of different patterns to suit your needs. Have fun building!
Resources to Read about Design Patterns
JS: The Right Way
Refactoring Guru: Design Patterns
Essential JS Design Patterns
Do Factory: JS Design Patterns


Open Modal
Log In
Sign Up
Already Signed Up?
Email Address
Password
New Here?
Name
Email Address
Password
Check Password


defprintHelloWorld:Unit = println("hello world !")
Functions as Types
valname:(arg: type,...) => Returned Type = body
valmultiply:(Int, Int) => Int = (x,y) => x * y
val add1: Int => Int = (i:Int) => i + 1
val sub1: Int => Int = (i:Int) => i - 2
def compose[A, B, C](
f: B => C,
g: A => B,
): A => C = { a => f(g(a)) }
val add1AndSub2 = compose(add1, sub2)
add1AndSub1(1) == 0
(Int, Int) => Int becomes Int => Int => Int
val sum: (Int, Int) => Int = (x, y) => x + y
val curried: Int => Int => Int = x => (y => x + y)
curried(1)(3) == 4
"Currying is the technique of translating the evaluation of
a function that takes multiple arguments into evaluating a sequence of functions, each with a single
argument." - Wikipedia
val f3: (Int, Int, Int) => Int = (x, y, z) => x + y + z
val f2: (Int, Int) => Int = f3(0, _, _)
f2(40, 2) == 42
"Partial application refers to the process of fixing a number of arguments to a function, producing
another function of smaller arity" - Wikipedia
Traditionally, we rely on control-flow statements like for-loops to tell the program how a computation
should be done.
On abstrait le control-flow pour le rendre plus composable
Concretely, this means that we do not use any statement like for-loops, yields or gotos that would give
a hint about the order of execution. Having said that, we still need sometime to represent concepts like
computation dependency
Concat(Uppercase("hello"), UpperCase("world"))
Read { line => Write(line, loop) }
Maybe(mayReturnNull(/*...*/))
Examples of how functions are composed using currying and partial application
All those functions are actually called combinators
they abstract the control flow,
compose(g: A => B, f: B => C): A => C = f(g(_))
So far we'e combined computations having the Function type: A => B but what about other types like
Either or Maybe for example.
case class Func[A, B](f: A => B)
compose(f: Func[A, B], g: B => C): Func[A, C] = Func(g(f(_)))
def map[A, B, C](fab: Func[A, B], g: B => C): Func[A, C] = Func(a => g(fab.f(a)))
def flatMap[A, B, C](fab: Func[A, B], g: B => Func[A, C]): Func[A, C] = Func(a => g(fab.f(a)).f(a))
def map[A, B, C](fab: A => B, g: B => C): A => C = a => g(fab(a))
def flatMap[A, B, C](fab: A => B, g: B => A => C): A => C = a => g(fab(a))(a)
map[Int, Int, String](i => i +1, j => j.toString)
flatMap[Int, String, Int](res10, s => i => s.toInt + i)
res11(42)
simplify functions using multiple argument list (currying) and type inference
What about composing functions with effects like Maybe for example:
def map[A, B](ma: Maybe[A], g: A => B): Maybe[B] = ???
def flatMap[A, B](ma: Maybe[A], g: A => Maybe[B]): Maybe[B] = ???
type Result[A] = Either[Exception, A]
def map[A, B](ma: Result[A], g: A => B): Result[B] = ???
def flatMap[A, B](ma: Result[A], g: A => Result[B]): Result[B] = ???
// same logic, switch to algebra
Composition
trait Either[A, B]
case class Left[A, B](a: A) extends Either[A, B]
case class Right[A, B](b: B) extends Either[A, B]
val foo: Either[Exception, Int] = ???
val result = foo match {
case Right(y) => y + 1
case Left(ex) => ??? // what are we supposed to return here???
}
println(result)
val success: Either[Exception, Int] = Right(42)
val failure: Either[Exception, Int] =
Left(new RuntimeException())
map( _ + 1 )(success) // returns 43
map( _ + 1 )(failure) // return failure
def map[A, B](f: A => B)
(e: Either[Exception, A]): Either[Exception, B] =
e match {
case Right(v) => Right(f(v))
case Left(e) => Left(e)
}
val foo: Either[Exception, Int] = ???
val bar: Int => Either[Exception, String] = ???
// meh !
val fooBar: Either[Exception, Either[Exception, String]] =
map(bar)(foo)
val fooBar: Either[Exception, String] = chain(foo, bar)
def chain[E, B, C](f: B => Either[E, C])
(e: Either[E, B]): Either[E, C] = e match {
case Right(b) => f(b)
case Left(e) => Left(e)
}
def map[A, B](f: A => B)(m: Maybe[A]): Maybe[B] =
m match {
case Some(a) => Some(f(a))
case None() => None()
}
def chain[A, B](f: A => Maybe[B])(m: Maybe[A]): Maybe[B] =
m match {
case Some(a) => f(a)
case None() => None()
}
// Algebraic data types
1, 2, 3...
// Operations
1 + 2 = 3
3 * 2 = 6
// Laws
0 + x = x
1 * x = x
def map[A, B](f: A => B)(m: Maybe[A]): Maybe[B] = m match {
case Some(a) => Some(f(a))
case None() => None()
}
def noop[A](a: A): A = a
map(noop)(foo) == foo
val f: Int => Int = ???
val g: Int => String = ???
map(compose(f, g))(foo) == compose(map(f),map(g))(foo)
# identity law
map(noop)(foo) == foo
# composition law
map(compose(f, g))(foo) == compose(map(f),map(g))(foo)
Maybe[A]
Either[E, A]
A => B
type Function[A, B] = A => B
def f[A, B]: Function[A, B] = ???
def g[B, C]: Function[B, C] = ???
def map[E, A, B](f: A => B)
(g: Function[E, A]): Function[E, B] =
(a: A) => f(g(a))
def map[E, A, B](f: A => B)
(e: Either[E, A]): Either[E, B] = e match {
case Right(b) => Right(f(a))
case Left(e) => Left(e)
}
def map[A, B](f: A => B)
(m: Maybe[A]): Maybe[B] = m match {
case Some(a) => Some(f(a))
case None => None
}
trait Mappable[F[_]] {
def map[A, B](f: A => B)(fa: F[A]): F[B]
}
val f: Int => String = ???
val m: Maybe[Int] = ???
val x: ??? = m match {
case Some(i) => f(i)
case None => ???
}
implicit val maybeMappable: Mappable[Maybe] = new Mappable[Maybe] {
def map[A, B](f: A => B)(ma: Maybe[A]): Maybe[B] = ma match {
case Some(a) => Some(f(a))
case None => None
}
}
type Result[A] = Either[Exception, A]
implicit val resultMappable: Mappable[Result] = new Mappable[Result] {
def map[A, B](f: A => B)(ma: Result[A]): Result[B] = ma match {
case Right(a) => Right(f(a))
case Left(e) => Left(e)
}
}
type Conf[A] = Configuration => A
implicit val configurationMappable: Mappable[Conf] = new Mappable[Conf] {
def map[A, B](f: A => B)(ca: Conf[A]): Conf[B] = { (c: Configuration) => f(ca(c)) }
}
def int2String[F[_]: Mappable](fi: F[Int]): F[String] = {
val mapper: Mappable[F] = implicitly[Mappable[F]] // explain implicits if needed.
mapper.map(fi) { _.toString }
}
val mi: Maybe[Int] = ???
val ms: Maybe[String] = int2String(mi)
val ei: Either[Exception, Int] = ???
val es: Either[Exception, String] = int2String(ei)
val ci: Conf[Int] = ???
val cs: Conf[String] = int2String(ci)
// Algebraic data types
1, 2, 3...
// Operations
1 + 2 = 3
3 * 2 = 6
// Laws
0 + x = x
1 * x = x
trait Mappable[F[_]] {
def map[A, B](f: A => B)(fa: F[A]): F[B]
}
val m: Mappable[F] = ???
val fA: F[A] = ???
def noop[A](a: A): A = a
m.map(noop)(fA) == fA
val f: Int => Int = ???
val g: Int => String = ???
val fog : Int => String = compose(f, g)
val mFog: Int => String = compose(m.map(f), m.map(g))
m.map(gof)(fA) == mFog(fA)
trait Functor[F[_]] { // similar to Mappable[F[_]]
def pure[A](a: A): F[A]
def map[A, B](f: A => B)(fa: F[A]): F[A]
}
# identity law
m.map(noop)(fA) == fA
# composition law
m.map(gof)(fA) == mFog(fA)


First Name is required.
Last Name is required.
Email is required.
Confirm Email is required, and must match email above.
Password is required.
Confirm Password is required, and must match password above.
Register


Interface IBinaryTokenStreamReader
Namespace: Orleans.Serialization
Assembly: Orleans.Core.Abstractions.dll
Syntax
public interface IBinaryTokenStreamReader
Properties
| Improve this Doc View SourceCurrentPosition
Current read position in the stream.
Declaration
int CurrentPosition { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Length
Gets the total length.
Declaration
int Length { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Methods
| Improve this Doc View SourceCopy()
Creates a copy of the current stream reader.
Declaration
IBinaryTokenStreamReader Copy()
Returns
| Type | Description |
|---|---|
| IBinaryTokenStreamReader | The new copy |
ReadBlockInto(Array, Int32)
Read a block of data into the specified output Array
.
Declaration
void ReadBlockInto(Array array, int n)
Parameters
| Type | Name | Description |
|---|---|---|
| Array | array | Array to output the data to. |
| System.Int32 | n | Number of bytes to read. |
ReadBoolean()
Read a bool
value from the stream.
Declaration
bool ReadBoolean()
Returns
| Type | Description |
|---|---|
| System.Boolean | Data from current position in stream, converted to the appropriate output type. |
ReadByte()
Read an byte
value from the stream.
Declaration
byte ReadByte()
Returns
| Type | Description |
|---|---|
| System.Byte | Data from current position in stream, converted to the appropriate output type. |
ReadByteArray(Byte[], Int32, Int32)
Read the next bytes from the stream.
Declaration
void ReadByteArray(byte[] destination, int offset, int count)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Byte[] | destination | Output array to store the returned data in. |
| System.Int32 | offset | Offset into the destination array to write to. |
| System.Int32 | count | Number of bytes to read. |
ReadBytes(Int32)
Read the next bytes from the stream.
Declaration
byte[] ReadBytes(int count)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | count | Number of bytes to read. |
Returns
| Type | Description |
|---|---|
| System.Byte[] | Data from current position in stream, converted to the appropriate output type. |
ReadChar()
Read an char
value from the stream.
Declaration
char ReadChar()
Returns
| Type | Description |
|---|---|
| System.Char | Data from current position in stream, converted to the appropriate output type. |
ReadDateTime()
Declaration
DateTime ReadDateTime()
Returns
| Type | Description |
|---|---|
| DateTime |
ReadDecimal()
Read an decimal
value from the stream.
Declaration
decimal ReadDecimal()
Returns
| Type | Description |
|---|---|
| System.Decimal | Data from current position in stream, converted to the appropriate output type. |
ReadDouble()
Read an double
value from the stream.
Declaration
double ReadDouble()
Returns
| Type | Description |
|---|---|
| System.Double | Data from current position in stream, converted to the appropriate output type. |
ReadFloat()
Read an float
value from the stream.
Declaration
float ReadFloat()
Returns
| Type | Description |
|---|---|
| System.Single | Data from current position in stream, converted to the appropriate output type. |
ReadGuid()
Declaration
Guid ReadGuid()
Returns
| Type | Description |
|---|---|
| Guid |
ReadInt()
Read an Int32
value from the stream.
Declaration
int ReadInt()
Returns
| Type | Description |
|---|---|
| System.Int32 | Data from current position in stream, converted to the appropriate output type. |
ReadIPAddress()
Read an IPAddress
value from the stream.
Declaration
IPAddress ReadIPAddress()
Returns
| Type | Description |
|---|---|
| IPAddress | Data from current position in stream, converted to the appropriate output type. |
ReadIPEndPoint()
Read an IPEndPoint
value from the stream.
Declaration
IPEndPoint ReadIPEndPoint()
Returns
| Type | Description |
|---|---|
| IPEndPoint | Data from current position in stream, converted to the appropriate output type. |
ReadLong()
Read an Int64
value from the stream.
Declaration
long ReadLong()
Returns
| Type | Description |
|---|---|
| System.Int64 | Data from current position in stream, converted to the appropriate output type. |
ReadSByte()
Read an sbyte
value from the stream.
Declaration
sbyte ReadSByte()
Returns
| Type | Description |
|---|---|
| System.SByte | Data from current position in stream, converted to the appropriate output type. |
ReadShort()
Read an Int16
value from the stream.
Declaration
short ReadShort()
Returns
| Type | Description |
|---|---|
| System.Int16 | Data from current position in stream, converted to the appropriate output type. |
ReadSiloAddress()
Read an SiloAddress
value from the stream.
Declaration
SiloAddress ReadSiloAddress()
Returns
| Type | Description |
|---|---|
| SiloAddress | Data from current position in stream, converted to the appropriate output type. |
ReadString()
Read an string
value from the stream.
Declaration
string ReadString()
Returns
| Type | Description |
|---|---|
| System.String | Data from current position in stream, converted to the appropriate output type. |
ReadTimeSpan()
Declaration
TimeSpan ReadTimeSpan()
Returns
| Type | Description |
|---|---|
| TimeSpan |
ReadUInt()
Read an UInt32
value from the stream.
Declaration
uint ReadUInt()
Returns
| Type | Description |
|---|---|
| System.UInt32 | Data from current position in stream, converted to the appropriate output type. |
ReadULong()
Read an UInt64
value from the stream.
Declaration
ulong ReadULong()
Returns
| Type | Description |
|---|---|
| System.UInt64 | Data from current position in stream, converted to the appropriate output type. |
ReadUShort()
Read an UInt16
value from the stream.
Declaration
ushort ReadUShort()
Returns
| Type | Description |
|---|---|
| System.UInt16 | Data from current position in stream, converted to the appropriate output type. |
Reset(IList<ArraySegment<Byte>>)
Resets this instance with the provided data.
Declaration
void Reset(IList<ArraySegment<byte>> buffs)
Parameters
| Type | Name | Description |
|---|---|---|
| IList<ArraySegment<System.Byte>> | buffs | The underlying buffers. |


Mandatory student meal plans opposed at Alaska university
by The Associated PressFAIRBANKS, Alaska (AP) — A University of Alaska Fairbanks student has launched a protest campaign against the school’s mandatory meal plans for undergraduates living on campus.
The Fairbanks Daily News-Miner reported Sunday that 19-year-old freshman Brennan Lippert says mandated meal plans are an extra financial burden for students who already pay high costs.
A spokeswoman says the university requires undergraduate students residing on campus to buy a meal plan, with the exception of undergraduates in on-campus family housing.
The school began requiring freshmen to live on campus this year.
Lippert has carried a sign on campus reading, “Mandatory Meal Plans are a Scam,” while gathering student signatures on a petition.
Lippert says acceptable changes include allowing students to opt out of meal plans and providing another campus residential option without a meal plan.
___
Information from: Fairbanks (Alaska) Daily News-Miner, http://www.newsminer.com
The Associated Press


On March 8, 2020, Gov. Kate Browndeclared a state of emergency to address the spread of COVID-19 in Oregon. The Oregon Health Authority(OHA) serves as the lead agency for the public health response. The Office of Emergency Management (OEM) coordinates and supports state and local recovery efforts through the Emergency Coordination Center
In the effort to slow the spread of COVID-19, we are asking Oregonians around the state to share information on how to stay safe and save lives. These materials may not only save a life, but also ensure hospitals have the room, supplies and staffing to care for all those who need it. Please feel free to download these materials and to share them, unaltered, in any medium for any noncommercial use.
| Oregon Test Results as of 3/23/2020, 8:00 a.m. Updated daily. | |
|---|---|
| Positive | 191 |
| Negative | 3,649 |
| Total Completed Tests (cumulative since January 24, 2020) | 3,840 |
| County | Number of cases | Deaths | Negative test results |
|---|---|---|---|
| Baker | 0 | 0 | 2 |
| 4 | 0 | 121 | |
| Clackamas | 14 | 0 | 431 |
| Clatsop | 0 | 0 | 43 |
| Columbia | 0 | 0 | 49 |
| Coos | 0 | 0 | 44 |
| Crook | 0 | 0 | 5 |
| Curry | 0 | 0 | 12 |
| Deschutes | 10 | 91 | |
| Douglas | 1 | 48 | |
| Gilliam | 0 | 0 | 1 |
| Grant | 1 | 0 | 0 |
| Harney | 0 | 0 | 1 |
| Hood River | 1 | 0 | 38 |
| Jackson | 2 | 0 | 207 |
| Jefferson | 0 | 0 | 6 |
| Josephine | 1 | 0 | 29 |
| Klamath | 1 | 0 | 45 |
| Lake | 0 | 0 | 0 |
| Lane | 4 | 1 | 171 |
| Lincoln | 0 | 0 | 18 |
| Linn | 20 | 1 | 315 |
| Malheur | 0 | 0 | 13 |
| Marion | 30 | 1 | 295 |
| Morrow | 0 | 0 | 4 |
| Multnomah | 21 | 1 | 796 |
| Polk | 3 | 0 | 71 |
| Sherman | 0 | 0 | 1 |
| Tillamook | 0 | 0 | 9 |
| Umatilla | 2 | 0 | 34 |
| Union | 1 | 0 | 14 |
| Wallowa | 0 | 0 | 3 |
| Wasco | 0 | 0 | 19 |
| Washington | 69 | 1 | 612 |
| Wheeler | 0 | 0 | 1 |
| Yamhill | 6 | 0 | 100 |
| Total | 191 | 5 | 3,649 |
| Age group | Number of cases |
|---|---|
| 17 or younger | 4 |
| 18 to 24 | 5 |
| 25 to 34 | 15 |
| 35 to 54 | 64 |
| 55 + | 103 |
| Total | 191 |
| Hospitalized* | Number of cases |
|---|---|
| Yes | 56 |
| No | 106 |
| Not provided | 29 |
| Total | 191 |
OHA updates this data daily. Updates include:
Notes:
Information about who should be tested, where to get tested and what to expect.
English Español / Spanish اللغة العربية / Arabic 简体中文 / Simplified Chinese Русский / Russian Af Soomaali / Somali Tiếng Việt / Vietnamese
English Español / Spanish اللغة العربية / Arabic 简体中文 / Simplified Chinese 繁體中文 / Traditional Chinese Chuukese Lus Hmoob / Hmong Русский / Russian Af Soomaali / Somali Tiếng Việt / Vietnamese
English Español / Spanish اللغة العربية / Arabic 简体中文 / Simplified Chinese 繁體中文 / Traditional Chinese Chuukese Lus Hmoob / Hmong Русский / Russian Af Soomaali / Somali Tiếng Việt / Vietnamese
English Español / Spanish اللغة العربية / Arabic 简体中文 / Simplified Chinese 繁體中文 / Traditional Chinese Chuukese Lus Hmoob / Hmong Kajin Majol / Marshallese Русский / Russian Af Soomaali / Somali Tiếng Việt / Vietnamese
English Español / Spanish اللغة العربية / Arabic 简体中文 / Simplified Chinese 繁體中文 / Traditional Chinese Chuukese Lus Hmoob / Hmong Kajin Majol / Marshallese Русский / Russian Tiếng Việt / Vietnamese
English Español / Spanish اللغة العربية / Arabic 简体中文 / Simplified Chinese 繁體中文 / Traditional Chinese Chuukese Lus Hmoob / Hmong Kajin Majol / Marshallese Русский / Russian Af Soomaali / Somali Tiếng Việt / Vietnamese
English Español / Spanish اللغة العربية / Arabic 简体中文 / Simplified Chinese 繁體中文 / Traditional Chinese Lus Hmoob / Hmong Kajin Majol / Marshallese Русский / Russian Af Soomaali / Somali Tiếng Việt / Vietnamese
English Español / Spanish اللغة العربية / Arabic 简体中文 / Simplified Chinese 繁體中文 / Traditional Chinese Lus Hmoob / Hmong Русский / Russian Af Soomaali / Somali Tiếng Việt / Vietnamese
Oregon is seeing an increase in incidents of discrimination and harassment related to the COVID-19 virus. It is important that all people, businesses, and other organizations act on facts, not bias or xenophobia. Health officials confirm there are no links between COVID-19 infection and a person’s race, color, gender, sexual orientation, gender identity, religion, ability, or national origin. COVID-19 can infect anyone who is exposed to it, and anyone can spread COVID-19.
English Español / Spanish اللغة العربية / Arabic 简体中文 / Simplified Chinese 繁體中文 / Traditional Chinese Lus Hmoob / Hmong Русский / Russian Af Soomaali / Somali Tiếng Việt / Vietnamese
English Español / Spanish اللغة العربية / Arabic 简体中文 / Simplified Chinese 繁體中文 / Traditional Chinese Lus Hmoob / Hmong Русский / Russian Af Soomaali / Somali Tiếng Việt / Vietnamese
In consideration of staffing challenges and health concerns due to COVID-19, Governor Kate Brown announced a statewide closure of Oregon K-12 schools from Monday, March 16 through Tuesday, April 28.
OHA knows we are asking a lot of Oregonians in order to protect those who are particularly vulnerable to this virus, and there is a lot of fear and anxiety in our communities. Educators are the heart of our schools, which in turn are the heart of our communities. In the wake of COVID-19’s arrival in Oregon, our schools are facing operational and business challenges.
We stand with the governor and our education partners as they make difficult decisions in response to these operational challenges in their school communities.
In partnership with OHA, the Early Learning Division (ELD) has created new tools for addressing concerns in child care around COVID-19.
English Español / Spanish اللغة العربية / Arabic 简体中文 / Simplified Chinese 繁體中文 / Traditional Chinese Lus Hmoob / Hmong Kajin Majol / Marshallese Русский / Russian Af Soomaali / Somali Tiếng Việt / Vietnamese
The Centers for Disease Control and Prevention (CDC) leads the U.S. response. The World Health Organization (WHO) guides the global response.
Subscribe to receive OHA Coronavirus Updates - the latest news about COVID-19 in Oregon.
Thank you for signing up. You will begin receiving updates shortly.


About task-based language teaching:
Task-Based Language teaching,
Over the course of years Task-Based Language teaching has become more and more interesting. Teachers all over the world have grasped this new idea and developed it in their own way. But what is Task-based teaching? Williams and Burden (1997:168), tell us: "A task is any activity that learners engage in to a process of learning a language." Basically, task-based teaching is an approach which offers students opportunities to actively engage in communication in order to achieve a goal or complete a task. TBL seeks to develop students' interlanguage through providing a task and then using language to solve it. Our tasks, projects and webquests provide an enviroment to do just that. Helping students to achieve a goal, complete a task, to learn something which they can use in their lives.
- F. Uijtendaal & R. Groenbroek
About us:
This site was created by Rick Groenbroek and Frank Uijtendaal. Both studying at the NHL Hogeschool in Leeuwarden, the Netherlands. As teachers to be we have always been figuring out what the best way, for us, is to teach English to Dutch students. There are many ways to teach, standing in front of the classroom, or perhaps making the students work on their own. A new and popular way is Project/Task Based Learning. That’s what this website is about.


--- layout: post title: Mirror or backup a website and host it within minutes date: 2018-06-09 21:57:12.000000000 +05:30 type: post parent_id: '0' published: true password: '' status: publish categories: [] tags: - github - mirror website authors: - satu0king ---
Very often we need to take a backup of a website, i.e. download the website for offline use. There could be several reasons for this, one of-course is simply for backup purposes. Other reasons could be to view or modify the source code of a 3rd party website. It can also be used to take a "snapshot" of a dynamic website. Note any HTML content rendered using ajax may not get backed up.
wget -mkEpnp <URL of website to clone>
Yep, Thats it! This command will clone all HTML, CSS, JS, Images and other content accessible from this page. Its recursive in nature so it will also clone content from all pages linked from this page. Wget is a free software package for retrieving files using HTTP, HTTPS, FTP and FTPS the most widely-used Internet protocols. There are several options possible, check them out using wget -help
.
If efficiency is required, you can install Nginx or Apache and use it to host the static content. However for most cases that is overkill and defeats the purpose.
Simply navigate to the directory
python -m SimpleHTTPServer < port number >
Now simply share your local IP address, for the clients to view the static content.
To serve static content you can use Amazon AWS S3 Storage or setup a VM on DigitalOcean which will require configuring of nginx or apache. However this may take time and cost money and is therefore not desirable.
git init
, to create your repositorygit add .
, to add all static content to staging areagit commit -m "my static website"
to create a commit We are nearly done!
You should be able to see a URL now, congrats your website is live and global!
If you have a custom domain, you can link it to github pages


The week is packed full of events such as the Yell Like Hell Pep Rally, the Homecoming Parade, the Bobcat Bash, the football game and more. Rebecca Prater, director of alumni engagement said all Homecoming events are displayed on OU’s website.
Prater said many Homecoming events, including the parade, will have online and live-stream options available, allowing alumni to participate in classic Homecoming traditions regardless of where they are.
“One of the alumni favorites, of course, is the Homecoming Parade, so we wanted to make sure we could bring it to them,” Prater said.
Erin Essak Kopp, assistant vice president of Alumni Relations and executive director of OU’s Alumni Association, said the online option also serves as a safe way for viewers to watch the parade in accordance with existing COVID-19 protocols on campus. Similarly, the parade will follow an extended route in order to disperse the in-person crowds.
“We take everyone’s health and safety very seriously,” Essak Kopp said. “We have worked very hard to plan opportunities that do that.”
Greg Sheets II, a senior studying electrical engineering and the field commander of the Marching 110, said the performances the 110 puts on, specifically the football game performance, have a goal of creating a sense of normalcy and comfort for the audience. After more than a year of the pandemic and a year without Homecoming, Sheets II explained a lot of people have reason to still feel uneasy in daily life, but the band hopes to relieve that.
“(We hope) for at least the eight minutes that we’re on the field, (we can) have them forget about their daily lives and just enjoy the performance, that’s the biggest thing” Sheets II said.
Sheets II said Homecoming is very busy for the band. With rehearsals, concerts and performances multiple times a day, Sheets II said the 110 is suited up nearly all weekend.
“These big figures throughout the band’s history show up at the end of practice sometimes to talk to you,” Sheets II said. “It’s interesting hearing the history and knowing that you’re a part of something so much bigger than yourself.”
He said the Homecoming parade and football game will include both the current Marching 110 and the Alumni Band. He said this is another great way for the band to connect with former members as they get the chance to perform together.
Having the 110 alumni back to perform for the Homecoming game is a favorite aspect of Homecoming weekend for Ashley Saylor, a senior studying nursing. She explained that it is impactful to see the current 110 playing with all of the alumni, and she loves the atmosphere it creates.
Saylor said her favorite event from Homecoming weekend has been tailgating and watching the football game with her friends.
Saylor said, like past years, she will carry on the OU tradition of getting up early Saturday morning to prepare for the long day of events ahead.
“I love just getting ready with everyone and then just going out,” Saylor said. “When else can you be out at 5 a.m.?"
Aside from celebrating, Homecoming has allowed her to meet a lot of new people and alumni as well as be a part of a staple of OU culture.
“You can’t really describe it, it’s just the energy,” Saylor said. “Everyone is so happy to be there and so excited to get away from life, just to come back to the little Athens bubble for a weekend. I really think the alumni is what brings it together.”
Sheets II said the band has a lot of pressure to achieve a high-energy crowd any time they perform over Homecoming. He said each member of the 110 has a responsibility to do this while also ensuring a high quality performance.
“There’s a lot of personal accountability and emphasis on the history we (the 110) have placed,” Sheets II said. “This is obviously the biggest show of the year.”
As a senior, Saylor said she is excited to participate in one last Homecoming Week, but she wishes she could have had the experience last year.
“Homecoming is one of those weekends you look forward to the whole year,” Saylor said. “You only get four of them … it was just really sad to miss it and not get to see everyone.”
However, seeing the energy the alumni have when they return to campus has given Saylor a bright future to look ahead to.
“They’re just so excited to be here; it makes me excited to be an alumna,” Saylor said.
As an alumna herself, Prater emphasized the significance that Homecoming weekend has for alumni returning to campus.
“Home is where your heart is, and I think all Bobcats can relate to that,” Prater said. “There’s just something so exciting about getting to be truly where your heart is, and that’s in Athens at Ohio University.”


Urban Meyer Reveals His Score Prediction For Ohio State-Penn State
by Andrew McCartyOn Saturday afternoon, the biggest game of the college football weekend was set to kick off from Columbus. No. 2 Ohio State hosts No. 8 Penn state in a match-up of College Football Playoff contenders.
Just a few hours before they were scheduled to kick off, Ohio State and Penn State players decided to get the party started a little early. Over an hour before kickoff, players from both teams met a mid-field to share their distaste for one another.
Former Ohio State head coach Urban Meyer issued an ominous message to Penn State’s players before the game. “Be careful what you wish for,” he said.
Meyer later revealed his score prediction for the game. He thinks Ohio State is going to blow the doors off of Penn State this afternoon.
He likes Ohio State to win 42-20.
Ohio State enters as a heavy favorite. The opening line was set at 18, but shot up to 19.5 just before kickoff.
The Buckeyes are expected to dominate today. Will they?
Stay tuned for the latest.


2020 Husqvarna Svartpilen 200 revealed
by Staff WriterThe Svartpilen 200 is based on the KTM 200 Duke and gets the same 26hp, 200cc, single-cylinder engine.
Husqvarna has just entered the Indian market with the Svartpilen 250 and the Vitpilen 250. These two KTM 250 Duke-based models are set to be the company’s first offerings in India once they hit the market in February 2020. However, it looks like Husqvarna won’t be stopping there as their global website was recently updated with a new model – the Svartpilen 200.
Like the 250s, the Svartpilen 200 is based on a KTM as well. It uses the same 200cc, single-cylinder, fuel-injected liquid-cooled motor that makes 26hp. Mated to this DOHC engine is a 6-speed gearbox. Other mechanicals like the suspension and brakes remain similar too. Moreover, the Svartpilen 200 also uses the same alloy wheels as the Svartpilen 250 and not wire-spoke wheels like the 401. Other components like the body panels and LED lighting are identical to that of the Svartpilen 250. However, the 200 runs an underslung exhaust and not the side-mounted one like the 250.
Husqvarna could launch the Svartpilen 200 in India sometime next year as a more affordable version of the 250. We have seen KTM do this with the 200 Duke and 250 Duke. What remains to be seen is how they will be priced. We can expect the Husqvarna Svartpilen 200 to cost around Rs 10,000-15,000 more than the KTM 200 Duke, which sells for Rs 1.62 lakh (ex-showroom, Delhi).
Also see:


About
InversifyJS is a lightweight (4KB) inversion of control (IoC) container for TypeScript and JavaScript apps. A IoC container uses a class constructor to identify and inject its dependencies.
InversifyJS has a friendly API and encourage the usage of the best OOP and IoC practices.
Motivation
JavaScript now supports object oriented (OO) programming with class based inheritance. These features are great but the truth is that they are also dangerous.
We need a good OO design to protect ourselves from these threats. The problem is that OO design is difficult and that is exactly why we created InversifyJS.
InversifyJS is a tool that helps JavaScript developers to write code with a good OO design.
Philosophy
InversifyJS has been developed with 4 main goals:
-
Allow JavaScript developers to write code that adheres to the SOLID principles.
-
Facilitate and encourage the adherence to the best OOP and IoC practices.
-
Add as little runtime overhead as possible.
-
Provide a state of the art development experience.
Status
Testimonies
Nate Kohari - Author of Ninject
"Nice work! I've taken a couple shots at creating DI frameworks for JavaScript and TypeScript, but the lack of RTTI really hinders things. The ES7 metadata gets us part of the way there (as you've discovered). Keep up the great work!"
Michel Weststrat - Author of MobX
"Dependency injection like InversifyJS works nicely"
The Basics
Installation
You can get the latest release and the type definitions using npm:
npm install inversify reflect-metadata --save
The InversifyJS type definitions are included in the inversify npm package.
InversifyJS requires TypeScript 2.0 and the experimentalDecorators
, emitDecoratorMetadata
, types
and lib
compilation options in your tsconfig.json
file:
{
"compilerOptions": {
"target": "es5",
"lib": ["es6", "dom"],
"types": ["reflect-metadata"],
"module": "commonjs",
"moduleResolution": "node",
"experimentalDecorators": true,
"emitDecoratorMetadata": true
}
}
InversifyJS requires a modern JavaScript engine with support for:
- Reflect metadata
- Map
- Promise (Only required if using provider injection)
- Proxy (Only required if using activation handlers)
The reflect-metadata
polyfill should be imported only once in your entire application because the Reflect object is mean to be a global singleton. More details about this can be found here.
If your environment don't support one of these you will need to import a shim or polyfill.
Check out the Environment support and polyfills page in the wiki and the Basic example to learn more.
Strongly Typed
InversifyJS is powered by TypeScript. TypeScript enable JavaScript developers to use highly-productive development tools and practices when developing JavaScript applications.
Universal
InversifyJS compiles to clean, simple JavaScript code which runs on any browser, in Node.js, or in any JavaScript engine that supports ECMAScript 5 (or newer).
Pluggable
Inversifyjs is framework-agnostic and has been designed to in a way that makes possible its integration with popular frameworks and libraries like hapi, express, react or backbone.
Features and API
InversifyJS is powerful IoC container and supports the following features:
- Support for classes
- Support for Symbols
- Container API
- Declaring container modules
- Container snapshots
- Controlling the scope of the dependencies
- Declaring optional dependencies
- Injecting a constant or dynamic value
- Injecting a class constructor
- Injecting a Factory
- Auto factory
- Injecting a Provider (asynchronous Factory)
- Activation handler
- Middleware
- Multi-injection
- Tagged bindings
- Create your own tag decorators
- Named bindings
- Default target
- Support for hierarchical DI systems
- Contextual bindings & @targetName
- Property injection
- Circular dependencies
- Inheritance
Please refer to the wiki for additional details.
Ecosystem
In order to provide a state of the art development experience we are also working on:
For example, we have been working on the official InversifyjS development tools browser extension:Please refer to the ecosystem wiki page to learn more.
Support
If you are experience any kind of issues we will be happy to help.
You can report an issue using the issues page
or the chat.
You can also ask questions at Stack overflow
using the inversifyjs
tag.
If you want to share your thoughts with the development team or join us you will be able to do so using the Gitter chat. You can check out the wiki to learn more about InversifyJS internals.
Acknowledgements
Thanks a lot to all the contributors, all the developers out there using InversifyJS and all those that help us to spread the word by sharing content about InversifyJS online. Without your feedback and support this project would not be possible.
License
License under the MIT License (MIT)
Copyright © 2015 - 2017 Remo H. Jansen
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


BOOM -Computer Science
This is my body, given up for computer science
This is a form of header
To articulate this article, I will place it among the body
This section is where I have the section