2 USB drives > 2GB
- Grab the latest Ubuntu Desktop iso image
Zach Caceres
Javascript does not have the typical 'private' and 'public' specifiers of more traditional object oriented languages like C# or Java. However, you can achieve the same effect through the clever application of Javascript's function-level scoping. The Revealing Module pattern is a design pattern for Javascript applications that elegantly solves this problem.
The central principle of the Revealing Module pattern is that all functionality and variables should be hidden unless deliberately exposed.
Let's imagine we have a music application where a musicPlayer.js file handles much of our user's experience. We need to access some methods, but shouldn't be able to mess with other methods or variables.
Regular expression for JavaScript:
/((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/
/*------------------------------------------ | |
Responsive Grid Media Queries - 1280, 1024, 768, 480 | |
1280-1024 - desktop (default grid) | |
1024-768 - tablet landscape | |
768-480 - tablet | |
480-less - phone landscape & smaller | |
--------------------------------------------*/ | |
@media all and (min-width: 1024px) and (max-width: 1280px) { } | |
@media all and (min-width: 768px) and (max-width: 1024px) { } |
/*------------------------------------------ | |
Responsive Grid Media Queries - 1280, 1024, 768, 480 | |
1280-1024 - desktop (default grid) | |
1024-768 - tablet landscape | |
768-480 - tablet | |
480-less - phone landscape & smaller | |
--------------------------------------------*/ | |
@media all and (min-width: 1024px) and (max-width: 1280px) { } | |
@media all and (min-width: 768px) and (max-width: 1024px) { } |
function useResponsiveCanvas<T>( | |
initialSize?: MinMaxPair, | |
): State { | |
const canvasRef = useRef<HTMLCanvasElement>(); | |
const mountRef = useRef<HTMLDivElement>(); | |
const [size, setSize] = useState<MinMaxPair>([0, 0]); | |
// set initial svg and size | |
useEffect(() => { | |
const canvas = document.createElement('canvas'); |
/* in fragment shader, using derivatives extension enabled */ | |
//vertex: | |
vec4 mvPosition = modelViewMatrix * vec4(position, 1.0); | |
vViewPos = mvPosition.xyz; //pass to the fragment shader | |
//fragment: | |
vec3 X = dFdx(vViewPos); | |
vec3 Y = dFdy(vViewPos); | |
vec3 normal = normalize(cross(X, Y)); |