Skip to content

Instantly share code, notes, and snippets.

View marsimaria's full-sized avatar

Maria Fang marsimaria

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<script src="data:application/x-javascript,%28function%28%29%20%7B%0A%20%20%2F%2F%20If%20window%2EHTMLWidgets%20is%20already%20defined%2C%20then%20use%20it%3B%20otherwise%20create%20a%0A%20%20%2F%2F%20new%20object%2E%20This%20allows%20preceding%20code%20to%20set%20options%20that%20affect%20the%0A%20%20%2F%2F%20initialization%20process%20%28though%20none%20currently%20exist%29%2E%0A%20%20window%2EHTMLWidgets%20%3D%20window%2EHTMLWidgets%20%7C%7C%20%7B%7D%3B%0A%0A%20%20%2F%2F%20See%20if%20we%27re%20running%20in%20a%20viewer%20pane%2E%20If%20not%2C%20we%27re%20in%20a%20web%20browser%2E%0A%20%20var%20viewerMode%20%3D%20window%2EHTMLWidgets%2EviewerMode%20%3D%0A%20%20%20%20%20%20%2F%5Cbviewer%5Fpane%3D1%5Cb%2F%2Etest%28window%2Elocation%29%3B%0A%0A%20%20%2F%2F%20See%20if%20we%27re%20running%20in%20Shiny%20mode%2E%20If%20not%2C%20it%27s%20a%20static%20document%2E%0A%20%20%2F%2F%20Note%20that%20static%20widgets%20can%20appear%20in%20both%20Shiny%20and%20static%
@marsimaria
marsimaria / Smoke
Created December 4, 2014 00:00
Processing code of my marijuana article count project
// A simple Particle class, renders the particle as an image
class Particle {
PVector loc;
PVector vel;
PVector acc;
float lifespan;
PImage img;
@marsimaria
marsimaria / README.md
Last active August 29, 2015 14:10 — forked from robynitp/README.md

Networked Media Week 5 Assignment

I continued my marijuana word cout project and created three pages. I didn't have time to figure out how to call my css stylesheet in servi, so I left it out. It looks very raw but the functions are working.

The first page shows the title of a webpage. The second one is just for fun. It lets you type in any keyword to show what you smoke. The third one shows snippets of three randomly chosen articles that have the word marijuana in its designated year.