- A component always consists of CSS and HTML (JS is optional)
- HTML and JS of a component are located in
ComponentName.js
- Styles of a component are located in
ComponentName.scss
- Each CSS class starts with the unique component name
- The HTML of each component only uses its own prefixed classes
- Components can use other components, but never overwrite their styles
/** | |
* `interface {struct}` and `interface {*struct}` manipulation in Golang using reflect. | |
* | |
* Use case: To instantiate a struct using reflect and use libraries like JSON.Decode at runtime. | |
*/ | |
package main | |
import "reflect" |
// Shader created with Shader Forge v1.38 | |
// Shader Forge (c) Neat Corporation / Joachim Holmer - http://www.acegikmo.com/shaderforge/ | |
// Note: Manually altering this data may prevent you from opening it in Shader Forge | |
/*SF_DATA;ver:1.38;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:1,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:False,hqlp:False,rprd:False,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:1,dpts:2,wrdp:True,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:True,igpj:False,qofs:0,qpre:2,rntp:3,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:1,fgcg:1,fgcb:1,fgca:1,fgde:0.01,fgrn:5,fgrf:15,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False,fsmp:False;n:type:ShaderForge.SFN_Final,id:4904,x:33076,y:32617,varname:node_4904,prsc:2|diff-5996-OUT,clip-8651-A;n:type:ShaderForge.SFN_Color,id:848,x:32 |
The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.
The correct way of creating a private frok by duplicating the repo is documented here.
For this assignment the commands are:
- Create a bare clone of the repository.
(This is temporary and will be removed so just do it wherever.)
git clone --bare [email protected]:usi-systems/easytrace.git
Git for Windows comes bundled with the "Git Bash" terminal which is incredibly handy for unix-like commands on a windows machine. It is missing a few standard linux utilities, but it is easy to add ones that have a windows binary available.
The basic idea is that C:\Program Files\Git\mingw64\
is your /
directory according to Git Bash (note: depending on how you installed it, the directory might be different. from the start menu, right click on the Git Bash icon and open file location. It might be something like C:\Users\name\AppData\Local\Programs\Git
, the mingw64
in this directory is your root. Find it by using pwd -W
).
If you go to that directory, you will find the typical linux root folder structure (bin
, etc
, lib
and so on).
If you are missing a utility, such as wget, track down a binary for windows and copy the files to the corresponding directories. Sometimes the windows binary have funny prefixes, so
using UnityEngine; | |
using System; | |
// Finds the slope/grade/incline angle of ground underneath a CharacterController | |
public class GroundChecker : MonoBehaviour { | |
[Header("Results")] | |
public float groundSlopeAngle = 0f; // Angle of the slope in degrees | |
public Vector3 groundSlopeDir = Vector3.zero; // The calculated slope as a vector |
'use strict'; | |
module.exports = function CustomError(message, extra) { | |
Error.captureStackTrace(this, this.constructor); | |
this.name = this.constructor.name; | |
this.message = message; | |
this.extra = extra; | |
}; | |
require('util').inherits(module.exports, Error); |
/** | |
* Author: Ian Gallagher <[email protected]> | |
* | |
* This code utilizes jBCrypt, which you need installed to use. | |
* jBCrypt: http://www.mindrot.org/projects/jBCrypt/ | |
*/ | |
public class Password { | |
// Define the BCrypt workload to use when generating password hashes. 10-31 is a valid value. | |
private static int workload = 12; |
var p1 = { | |
x: 20, | |
y: 20 | |
}; | |
var p2 = { | |
x: 40, | |
y: 40 | |
}; |