- Casting
- Boxing and Unboxing
- Byte addition exception
- Protected access specifier
- Object type vs reference type (reference type is used when accessing instance data, static data and static methods, object type is used in every other case)
- Finally block special case with return statements
- Special handling of exceptions thrown by AutoCloseable interface's close function using the
getSuppressed()
function - Just this slide is very important
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# source: https://docs.oracle.com/javase/8/docs/technotes/guides/collections/reference.html | |
Collections Framework: | |
Interfaces: | |
Set: | |
- boolean add(E e) | |
- boolean addAll(Collection<? extends E> c) | |
- void clear() | |
- boolean contains(Object o) | |
- boolean containsAll(Collection<?> c) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){ | |
const host = window.location.hostname; | |
const path = window.location.pathname; | |
let destination_path = ""; | |
switch(host) { | |
case 'themes.svn.wordpress.org': | |
destination_path = '/themes'; | |
case 'plugins.svn.wordpress.org': | |
destination_path = `/wp${destination_path}${path}`; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Function Composition | |
*/ | |
const compose_rtl = (...functions: ((..._: any[]) => any)[]) => { | |
const [first, ...rest] = functions; | |
if(!first) return (...argv) => argv; | |
return (...args) => first.apply(null, rest.length > 0 ? [compose_rtl(...rest)(...args)] : args); | |
} | |
const compose = (...functions: ((..._: any[]) => any)[]) => { |
variable[] = [] # append new item in the array
variable[integer] = [] # alter the (already-available/pre-existing) index in the array
variable[non-integer] = {} # object
y[][non-integer] = [{}] # create an object as a newly created array element
variable[integer][non-integer] = [{}] # alter the object at the pre-existing indexed position
y[non-integer][] = {[]} # append a new array element to the key
variable[non-integer][integer] = {[]} # alter the pre-existing array index of the key-value object
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default function format(formatString: string): string { | |
const day = this.getDate(); | |
const month = this.getMonth(); | |
const year = this.getFullYear(); | |
const isLeapYear = (year % 4 == 0 && year % 100 != 0) || year % 400 == 0; | |
const data = { | |
weekdays: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], | |
months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], | |
dayCount: [31, Number(isLeapYear) + 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function forwarder(toggle_script_execution = false) { | |
const start_alert = () => console.log("%c Forwarder script started running...", "color: green"); | |
const stop_alert = () => console.log("%c Forwarder script stopped running!", "color: red"); | |
/* toggling the execution of this whole script */ | |
if(toggle_script_execution && 'ff_set' in window) { | |
window.ff_set = !window.ff_set; | |
if(window.ff_set) start_alert(); | |
} else if(!('ff_set' in window)) { | |
window.ff_set = true; |
Handouts
Practice material: workbook
%%{
init: {
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:latest | |
ARG UID | |
ARG GID | |
RUN apt update -y \ | |
&& apt upgrade -y | |
USER $UID:$GID |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){ | |
document.querySelector('meta[name="viewport"]').content = 'width=device-width, initial-scale=1.0'; | |
const st = document.body.lastChild.tagName === 'STYLE' ? document.body.lastChild : document.createElement('style'); | |
document.body.append(st); | |
document.body.style.zoom = window.devicePixelRatio; | |
const frame = document.getElementsByClassName('_1XkO3')[0]; | |
window.onpopstate = e => { | |
let btn = document.querySelector('button.bmJTq'); | |
if(btn){ | |
btn.click(); |
NewerOlder