- welcome to the course
- no stupid questions
- who here at one point did not know what javascript is?
- musician, songwriter, generative artist
- been wriitng songs and to a lesser degree, releasing music since 2005
- started web dev in 2005
| public void TestRandomIdGenerator() | |
| { | |
| // create five IDs of six, base 62 characters | |
| for (int i=0; i<5; i++) Console.WriteLine(RandomIdGenerator.GetBase62(6)); | |
| // create five IDs of eight base 36 characters | |
| for (int i=0; i<5; i++) Console.WriteLine(RandomIdGenerator.GetBase36(8)); | |
| } | |
| public static class RandomIdGenerator |
| import { updateChild } from '../utils' | |
| export default () => | |
| AFRAME.registerComponent('grabber', { | |
| schema: { | |
| hand: { type: 'string' }, | |
| }, | |
| init() { | |
| console.log('grabber init', this.data.hand) | |
| this.otherEl = null |
| impor { state } from './state' | |
| button.onclick = () => { | |
| console.log("state.count", state.count) | |
| } |
| import Axios from 'axios' | |
| import React, { createContext, useContext } from 'react' | |
| type Props = { | |
| children: React.ReactNode | |
| baseURL?: string | |
| } | |
| type Context = { | |
| get: <T>(path: string) => Promise<T> |
| // TO USE THIS: | |
| import { useEffect, useState } from 'react' | |
| import { FormInstance } from 'antd/lib/form' | |
| type Props<T> = { | |
| form: FormInstance<T> | |
| id: string // some unique identifier that matches whatever you're editing | |
| } |
| class Agent { | |
| float a; | |
| float b; | |
| Agent(float _a, float _b) { | |
| a = _a; | |
| b = _b; | |
| } |
| #!/usr/bin/env python | |
| import socket,sys,subprocess,os,json,pygame,time,bs4,requests,random,fnmatch,urllib,tweepy,datetime,sqlite3 | |
| from glob import glob | |
| print 'dankbot is born...' | |
| #establish working and database paths | |
| homedir = '/home/pi/dankbot/' | |
| dirsb = '/home/pi/soundboard/' | |
| db_file = '/var/www/dank.db' |
| import React, { createContext, useContext, useState, useEffect } from "react" | |
| type Props = { | |
| children: React.ReactNode | |
| } | |
| type Context = { | |
| count: number | |
| increment: () => void | |
| } |
| server { | |
| server_name example.com; | |
| access_log /var/log/nginx/example.com.access.log; | |
| error_log /var/log/nginx/example.com.error.log; | |
| gzip on; | |
| gzip_types text/css application/javascript application/json image/svg+xml; |