diff --git a/.vscode/launch.json b/.vscode/launch.json index 326e487..a43ae58 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -4,6 +4,41 @@ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ + { + "type": "java", + "name": "CodeLens (Launch) - One", + "request": "launch", + "mainClass": "ClassProblems.Class2.One", + "projectName": "H212_e5d32889" + }, + { + "type": "java", + "name": "CodeLens (Launch) - strings0", + "request": "launch", + "mainClass": "ClassProblems.Class2.strings0", + "projectName": "H212_e5d32889" + }, + { + "type": "java", + "name": "CodeLens (Launch) - bigdecimal1", + "request": "launch", + "mainClass": "ClassProblems.Class2.bigdecimal1", + "projectName": "H212_e5d32889" + }, + { + "type": "java", + "name": "CodeLens (Launch) - class2", + "request": "launch", + "mainClass": "ClassProblems.class2", + "projectName": "H212_e5d32889" + }, + { + "type": "java", + "name": "CodeLens (Launch) - HelloWorld", + "request": "launch", + "mainClass": "PrincetonJava.HelloWorld", + "projectName": "H212_e5d32889" + }, { "type": "java", "name": "Debug (Launch) - Current File", diff --git a/BookProblems/fill.txt b/BookProblems/fill.txt new file mode 100644 index 0000000..e69de29 diff --git a/ClassProblems/Class1/helloworld.java b/ClassProblems/Class1/helloworld.java new file mode 100644 index 0000000..e69de29 diff --git a/ClassProblems/Class2/One.java b/ClassProblems/Class2/One.java new file mode 100644 index 0000000..9ad46c4 --- /dev/null +++ b/ClassProblems/Class2/One.java @@ -0,0 +1,29 @@ +package ClassProblems.Class2; +import javax.swing.JComponent; +import javax.swing.JFrame; +import java.awt.*; +/** + * strings0 are IMMUTABLE + */ +public class One extends JComponent { + + public One { + this.p = new Penguin(); + } + public static void main(String[] args) { + JFrame a = new JFrame("Blue pill, or red?"); + a.setVisible(true); + a.setSize(500,400); + + One b = new One(); + // System.out.println(b); + a.add(b); + } + + public void paintComponent(Graphics g){ + // g.setColor(Color.YELLOW); + // g.fillOval(100, 100, 200, 200); + this.p.draw(); + } + +} \ No newline at end of file diff --git a/ClassProblems/Class2/Penguin.java b/ClassProblems/Class2/Penguin.java new file mode 100644 index 0000000..f17fac3 --- /dev/null +++ b/ClassProblems/Class2/Penguin.java @@ -0,0 +1,32 @@ +package ClassProblems.Class2; +import java.awt.*; +/** + * penguin + */ +public class Penguin { + + public Penguin(String name) { + this.name = name; + } + + private String name = "Tommy Gufano"; + String nickname = "The Big Sleazy"; + public void talk() { + System.out.println("Howdy" + this.name + " otherwise known as, " + this.nickname); + } + public void draw(Graphics g){ + // THis is Lab2 + g.setColor(Color.YELLOW); + g.fillOval(100, 100, 200, 200); + + } +} + + +// public class Penguin() { +// String name = "Tommy The Big Sleazy Gufano"; +// public void talk() { +// System.out.println("Howdy" + name + " otherwise known as, " + this); +// } +// } + diff --git a/ClassProblems/Class2/bigdecimal0.java b/ClassProblems/Class2/bigdecimal0.java new file mode 100644 index 0000000..7dd4c7b --- /dev/null +++ b/ClassProblems/Class2/bigdecimal0.java @@ -0,0 +1,28 @@ +package ClassProblems.Class2; +import java.math.BigDecimal; +/** + * class2 + */ +public class bigdecimal0 { + + public static void main(String[] args) { + BigDecimal a, b, c; + + a = new BigDecimal("2"); + b = new BigDecimal("3"); + c = new BigDecimal("4"); + + + System.out.println(a.add(b)); + System.out.println(a.add(b.multiply(c))); + System.out.println(a.multiply(b).add(c)); + System.out.println(a.add(a).multiply(b).divide(c).subtract(b)); + System.out.println(a.add(b.multiply(c.divide(a.subtract(b))))); + + // a.add(b); + // a.add(b.multiply(c)); + // a.multiply(b).add(c); 2*3 6+3 + // a.add(a).multiply(b).divide(c).subtract(b); 2+2 4*3 12/4 3-3 0 + // a.add(b.multiply(c.divide(a.subtract(b)))); + } +} \ No newline at end of file diff --git a/ClassProblems/Class2/bigdecimal1.java b/ClassProblems/Class2/bigdecimal1.java new file mode 100644 index 0000000..5a99a94 --- /dev/null +++ b/ClassProblems/Class2/bigdecimal1.java @@ -0,0 +1,26 @@ +package ClassProblems.Class2; + +import java.math.BigDecimal; + +/** + * bigdecimal1 + */ +public class bigdecimal1 { + + public static void main(String[] args) { + BigDecimal a,b,c; + a = new BigDecimal("10"); + b = new BigDecimal("2"); + c = new BigDecimal("3"); + + System.out.println( a.add(b) ); //10 + 2 + BigDecimal result; + result = (new BigDecimal("10").add(b.multiply(c))); + System.out.println(result); + // result = (new BigDecimal("10") + // System.out.println(result); + // result = (new BigDecimal("10") + // System.out.println(result); + // result = (new BigDecimal("10") + } +} \ No newline at end of file diff --git a/Homework/fill.txt b/Homework/fill.txt new file mode 100644 index 0000000..e69de29 diff --git a/LaTeX 241/LogicSymbols.tex b/LaTeX 241/LogicSymbols.tex new file mode 100644 index 0000000..5752aa1 --- /dev/null +++ b/LaTeX 241/LogicSymbols.tex @@ -0,0 +1,125 @@ +\documentclass[10pt]{beamer} +\usepackage[orientation=landscape, +size=custom,width=32,height=18.0,scale=.75]{beamerposter} +% 設定紙張大小 +\title{symbol-table} +\begin{document} + +\begin{frame} +\begin{tabular}{ll} +$\leq$ & $\backslash$leq \\ +$\geq$ & $\backslash$geq \\ +$\neq$ & $\backslash$neq \\ +$\nleq$ & $\backslash$nleq \\ +$\ngeq$ & $\backslash$ngeq \\ +$\cong$ & $\backslash$cong \\ +$\equiv$ & $\backslash$equiv \\ +$\sim$ & $\backslash$sim \\ +$\approx$ & $\backslash$approx \\ +$\doteqdot$ & $\backslash$doteqdot \\ +$\times$ & $\backslash$times \\ +$\cdot $ & $\backslash$cdot \\ +$\ast $ & $\backslash$ast \\ +$\div$ & $\backslash$div \\ +$\pm$ & $\backslash$pm \\ +$\mp$ & $\backslash$mp \\ +$\bigcirc$ & $\backslash$bigcirc \\ +$\oplus$ & $\backslash$oplus \\ +$\otimes$ & $\backslash$otimes \\ +\end{tabular} +\hspace*{1ex} +\begin{tabular}{ll} +$\propto $ & $\backslash$propto \\ +$\cdots $ & $\backslash$cdots \\ +$\dots $ & $\backslash$dots \\ +$\because$ & $\backslash$because \\ +$\therefore$ & $\backslash$therefore \\ +$\forall$ & $\backslash$forall \\ +$\exists$ & $\backslash$exists \\ +$\in$ & $\backslash$in \\ +$\subset $ & $\backslash$subset \\ +$\subseteq $ & $\backslash$subseteq \\ +$\varnothing $ & $\backslash$varnothing \\ +$\cap $ & $\backslash$cap \\ +$\cup $ & $\backslash$cup \\ +$\setminus $ & $\backslash$setminus \\ +$\wedge $ & $\backslash$wedge \\ +$\vee $ & $\backslash$vee \\ +$\Rightarrow$ & $\backslash$Rightarrow \\ +$\rightarrow$ & $\backslash$rightarrow \\ +$\mapsto$ & $\backslash$mapsto \\ +\end{tabular} +\hspace*{1ex} +\begin{tabular}{ll} +\$ & $\backslash$\$ \\ +\& & $\backslash$\& \\ +\% & $\backslash$\% \\ +$\backslash$ & $\backslash$backslash \\ +$\sharp$ & $\backslash$sharp \\ +$\partial$ & $\backslash$partial \\ +$90^\circ$ & 90$^\wedge\backslash$circ \\ +$\parallel$ & $\backslash$parallel \\ +$\bot$ & $\backslash$bot \\ +$\triangle$ & $\backslash$triangle \\ +$\nabla$ & $\backslash$nabla \\ +$\square$ & $\backslash$square \\ +$\angle$ & $\backslash$angle \\ +$\Pi$ & $\backslash$Pi \\ +$\Theta$ & $\backslash$Theta \\ +$\Gamma$ & $\backslash$Gamma \\ +$\Delta$ & $\backslash$Delta \\ +$\Omega$ & $\backslash$Omega \\ +$\Sigma$ & $\backslash$Sigma \\ +\end{tabular} +\hspace*{1ex} +\begin{tabular}{ll} +$\alpha$ & $\backslash$alpha \\ +$\beta$ & $\backslash$beta \\ +$\epsilon$ & $\backslash$epsilon \\ +$\zeta$ & $\backslash$zeta \\ +$\eta$ & $\backslash$eta \\ +$\kappa$ & $\backslash$kappa \\ +$\lambda$ & $\backslash$lambda \\ +$\mu$ & $\backslash$mu \\ +$\xi$ & $\backslash$xi \\ +$\rho$ & $\backslash$rho \\ +$\tau$ & $\backslash$tau \\ +$\phi$ & $\backslash$phi \\ +$\psi$ & $\backslash$psi \\ +$\pi$ & $\backslash$pi \\ +$\theta$ & $\backslash$theta \\ +$\gamma$ & $\backslash$gamma\\ +$\delta$ & $\backslash$delta \\ +$\omega$ & $\backslash$omega \\ +$\sigma$ & $\backslash$sigma \\ +\end{tabular} +\hspace*{1ex} +\begin{tabular}{ll} +$\infty$ & $\backslash$infty \\ +$f\;' $ & f$\backslash$;$\prime$\\ +$\int $ & $\backslash$int \\ +$\oint $ & $\backslash$oint \\ +$\mathbb{Z} $ & $\backslash$mathbb\{Z\} \\ +$\mathbb{R} $ & $\backslash$mathbb\{R\} \\ +$\mathbb{Q} $ & $\backslash$mathbb\{Q\} \\ +$\sqrt[3]{2}$ & $\backslash$sqrt[3]\{2\} \\ +$\frac{2}{3}$ & $\backslash$frac\{2\}\{3\} \\ +$\lceil x \rceil$ & $\backslash$lceil x $\backslash$rceil \\ +$\lfloor x \rfloor$ & $\backslash$lfloor x $\backslash$rfloor \\ +$\{ x \}$ & $\backslash$\{ x $\backslash$\} \\ +$\widehat{p} $ & $\backslash$widehat\{p\} \\ +$\overline{AB} $ & $\backslash$overline\{AB\} \\ +$\overleftrightarrow{AB} $ & {\scriptsize $\backslash$overleftrightarrow\{AB\} }\\ +$\overset{\LARGE\frown}{\small{AB}} $ & {\scriptsize $\backslash$overset\{$\backslash$LARGE $\backslash$frown\}\{$\backslash$small\{AB\}\}}\\ +%$\overrightharp{AB} $ & {\scriptsize $\backslash$overrightharp\{AB\} }*\\ +%$\overset{\large \rightharpoonup}{\small{AB}} & {\scriptsize \overset{\large \rightharpoonup}{\small{AB}}}\\ +%$\overset{\LARGE \frown}{\small{AB}}$ & {\scriptsize $\backslash$overset\{$\backslash$frown\}\{AB\}}\\ +$ /\!\! /$ & / $\backslash$ ! $\backslash$ ! /\\ + $\overset{\large \rightharpoonup}{\small{AB}}$ & {\scriptsize + $\backslash$overset\{$\backslash$large$\backslash$rightharpoonup\}\{$\backslash$small\{AB\}\} } +\end{tabular} + +\end{frame} + + +\end{document} \ No newline at end of file diff --git a/LaTeX 241/homeworkTemplate.tex b/LaTeX 241/homeworkTemplate.tex new file mode 100644 index 0000000..aec0659 --- /dev/null +++ b/LaTeX 241/homeworkTemplate.tex @@ -0,0 +1,14 @@ +\input{settings} % add packages, settings, and declarations in settings.tex + +\begin{document} + +\lhead{Tony Dattolo} +\rhead{CSCI-H241 Spring '20 \\ Discrete Structures \\ Homework #1} +\cfoot{\thepage\ of \pageref{LastPage}} + + \begin{enumerate} + \item \input{problem_1} + % add more problem files here + \end{enumerate} + +\end{document} diff --git a/LaTeX 241/resume0.tex b/LaTeX 241/resume0.tex new file mode 100644 index 0000000..52b2970 --- /dev/null +++ b/LaTeX 241/resume0.tex @@ -0,0 +1,102 @@ +%!TEX TS-program = xelatex +%!TEX encoding = UTF-8 Unicode +% Awesome CV LaTeX Template for CV/Resume +% +% This template has been downloaded from: +% https://github.com/posquit0/Awesome-CV +% +% Original author: +% Claud D. Park +% http://www.posquit0.com +% +% Modifications by: +% Junhao Dong +% +% Template license: +% CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/) +% + + +%------------------------------------------------------------------------------- +% CONFIGURATIONS +%------------------------------------------------------------------------------- +% A4 paper size by default, use 'letterpaper' for US letter +\documentclass[11pt, a4paper]{awesome-cv} + +% Configure page margins with geometry +\geometry{left=1.4cm, top=.8cm, right=1.4cm, bottom=1.8cm, footskip=.5cm} + +% Specify the location of the included fonts +\fontdir[fonts/] + +% Color for highlights +% Awesome Colors: awesome-emerald, awesome-skyblue, awesome-red, awesome-pink, awesome-orange +% awesome-nephritis, awesome-concrete, awesome-darknight +\colorlet{awesome}{awesome-skyblue} +% Uncomment if you would like to specify your own color +% \definecolor{awesome}{HTML}{CA63A8} + +% Colors for text +% Uncomment if you would like to specify your own color +% \definecolor{darktext}{HTML}{414141} +% \definecolor{text}{HTML}{333333} +% \definecolor{graytext}{HTML}{5D5D5D} +% \definecolor{lighttext}{HTML}{999999} + +% Set false if you don't want to highlight section with awesome color +\setbool{acvSectionColorHighlight}{true} + +% If you would like to change the social information separator from a pipe (|) to something else +\renewcommand{\acvHeaderSocialSep}{\quad\textbar\quad} + +\makeatletter +\patchcmd{\@sectioncolor}{\color}{\mdseries\color}{}{} +\makeatother + +%------------------------------------------------------------------------------- +% PERSONAL INFORMATION +% Comment any of the lines below if they are not required +%------------------------------------------------------------------------------- +% Available options: circle|rectangle,edge/noedge,left/right +% \photo[rectangle,edge,right]{profile} +\name{Junhao}{Dong} +\position{Software Engineer} +% \address{address} + +\mobile{(678) 343-1817} +\email{junhao.dong96@gmail.com} +% \homepage{homepage} +\github{junhaodong} +\linkedin{junhaodong} +% \gitlab{gitlab-id} +% \stackoverflow{SO-id}{SO-name} +% \twitter{@twit} +% \skype{skype-id} +% \reddit{reddit-id} +% \extrainfo{extra informations} + +%------------------------------------------------------------------------------- +\begin{document} + +% Print the header with above personal informations +% Give optional argument to change alignment(C: center, L: left, R: right) +\makecvheader[C] + +% Print the footer with 3 arguments(,
, ) +% Leave any of these blank if they are not needed +% \makecvfooter +% {\today} +% {Junhao Dong~~~·~~~Résumé} +% {\thepage} + +%------------------------------------------------------------------------------- +% CV/RESUME CONTENT +% Each section is imported separately, open each file in turn to modify content +%------------------------------------------------------------------------------- +\input{resume/education.tex} +\input{resume/skills.tex} +\input{resume/experience.tex} +\input{resume/projects.tex} + +%------------------------------------------------------------------------------- +\end{document} diff --git a/LaTeX 241/resume1.tex b/LaTeX 241/resume1.tex new file mode 100644 index 0000000..eff17e1 --- /dev/null +++ b/LaTeX 241/resume1.tex @@ -0,0 +1,147 @@ +%------------------------- +% Resume in Latex +% Author : Sourabh Bajaj +% Website: https://github.com/sb2nov/resume +% License : MIT +%------------------------ + +\documentclass[letterpaper,11pt]{article} + +\usepackage{latexsym} +\usepackage[empty]{fullpage} +\usepackage{titlesec} +\usepackage{marvosym} +\usepackage[usenames,dvipsnames]{color} +\usepackage{verbatim} +\usepackage{enumitem} +\usepackage[pdftex]{hyperref} +\usepackage{fancyhdr} + + +\pagestyle{fancy} +\fancyhf{} % clear all header and footer fields +\fancyfoot{} +\renewcommand{\headrulewidth}{0pt} +\renewcommand{\footrulewidth}{0pt} + +% Adjust margins +\addtolength{\oddsidemargin}{-0.375in} +\addtolength{\evensidemargin}{-0.375in} +\addtolength{\textwidth}{1in} +\addtolength{\topmargin}{-.5in} +\addtolength{\textheight}{1.0in} + +\urlstyle{same} + +\raggedbottom +\raggedright +\setlength{\tabcolsep}{0in} + +% Sections formatting +\titleformat{\section}{ + \vspace{-4pt}\scshape\raggedright\large +}{}{0em}{}[\color{black}\titlerule \vspace{-5pt}] + +%------------------------- +% Custom commands +\def \ifempty#1{\def\temp{#1} \ifx\temp\empty } + +\newcommand{\resumeItem}[2]{ + \item\small{ + \ifempty{#1}#2\else\textbf{#1}{: #2 \vspace{-2pt}}\fi + } +} + +\newcommand{\resumeSubheading}[4]{ + \vspace{-1pt}\item + \begin{tabular*}{0.97\textwidth}{l@{\extracolsep{\fill}}r} + \textbf{#1} & #2 \\ + \textit{\small#3} & \textit{\small #4} \\ + \end{tabular*}\vspace{-5pt} +} + +\newcommand{\resumeSubItem}[2]{\resumeItem{#1}{#2}\vspace{-4pt}} + +\renewcommand{\labelitemii}{$\circ$} + +\newcommand{\resumeSubHeadingListStart}{\begin{itemize}[leftmargin=*]} +\newcommand{\resumeSubHeadingListEnd}{\end{itemize}} +\newcommand{\resumeItemListStart}{\begin{itemize}} +\newcommand{\resumeItemListEnd}{\end{itemize}\vspace{-5pt}} + +%------------------------------------------- +%%%%%% CV STARTS HERE %%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +\begin{document} + +%----------HEADING----------------- +\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r} + \textbf{\Large Name} & Email : \href{mailto:mail@mail.com}{mail@mail.com}\\ + \href{https://website/}{https://website/} & Mobile : +4400000000 \\ +\end{tabular*} + + +%-----------EDUCATION----------------- +\section{Education} + \resumeSubHeadingListStart + \resumeSubheading + {University of Somewhere}{Somewhere} + {Some course}{Sept 2010 - May 2014} + \resumeItemListStart + \resumeItem{Relevant Modules} + {Modules...} + \resumeItemListEnd + \resumeSubHeadingListEnd + + +%-----------EXPERIENCE----------------- +\section{Experience} + \resumeSubHeadingListStart + \resumeSubheading + {Experience 1}{Some Place} + {Short Description}{Sept. 2018 - Dec. 2018} + \resumeItemListStart + \resumeItem{} + {Some stuff} + \resumeItem{} + {More stuff} + \resumeItemListEnd + \resumeSubheading + {Experience 2}{Some Place} + {Short Description}{Sept. 2018 - Dec. 2018} + \resumeItemListStart + \resumeItem{} + {Some stuff} + \resumeItem{} + {More stuff} + \resumeItemListEnd + + \resumeSubHeadingListEnd + +\section{Some Section} + \resumeSubHeadingListStart + \resumeSubheading + {Some Stuff}{} + {Some Description}{Dec. 2016} + \resumeItemListStart + \resumeItem{} + {Some stuff} + \resumeItem{} + {More stuff} + \resumeItemListEnd + \resumeSubHeadingListEnd +% +%--------PROGRAMMING SKILLS------------ +\section{Programming Skills} + \resumeSubHeadingListStart + \item{ + \textbf{Languages}{: C++, Python } + \hfill + \textbf{Technologies}{: Git, Kubernetes } + } + \resumeSubHeadingListEnd + + +%------------------------------------------- +\end{document} diff --git a/LaTeX 241/symbol-table.pdf b/LaTeX 241/symbol-table.pdf new file mode 100644 index 0000000..8c5fd22 Binary files /dev/null and b/LaTeX 241/symbol-table.pdf differ diff --git a/Labs/Lab0/E1-15.java b/Labs/Lab0/E1-15.java new file mode 100644 index 0000000..e69de29 diff --git a/Labs/Lab0/E1-16.java b/Labs/Lab0/E1-16.java new file mode 100644 index 0000000..e69de29 diff --git a/Labs/Lab0/E1-17.java b/Labs/Lab0/E1-17.java new file mode 100644 index 0000000..e69de29 diff --git a/Labs/Lab0/E1-18.java b/Labs/Lab0/E1-18.java new file mode 100644 index 0000000..e69de29 diff --git a/Labs/Lab0/E1-8.java b/Labs/Lab0/E1-8.java new file mode 100644 index 0000000..e69de29 diff --git a/Labs/Lab0/R1-7.java b/Labs/Lab0/R1-7.java new file mode 100644 index 0000000..e69de29 diff --git a/Labs/Lab0/R1-8.java b/Labs/Lab0/R1-8.java new file mode 100644 index 0000000..e69de29 diff --git a/Labs/Lab0/R1-9.java b/Labs/Lab0/R1-9.java new file mode 100644 index 0000000..e69de29 diff --git a/Labs/Lab0/R2-5.java b/Labs/Lab0/R2-5.java new file mode 100644 index 0000000..e69de29 diff --git a/BookProblems/Week1_class2.java b/Labs/Lab0/Week1_class2.java similarity index 100% rename from BookProblems/Week1_class2.java rename to Labs/Lab0/Week1_class2.java diff --git a/Labs/fill.txt b/Labs/fill.txt new file mode 100644 index 0000000..e69de29 diff --git a/PrincetonJava/Booknotes/Chapter1.txt b/PrincetonJava/Booknotes/Chapter1.txt index b5d4c5c..2929048 100644 --- a/PrincetonJava/Booknotes/Chapter1.txt +++ b/PrincetonJava/Booknotes/Chapter1.txt @@ -51,3 +51,16 @@ Characters and Strings \' single quote \" double quote \\ backslash + String Concatenation + + String to int conversion + If you add two variables together, one string one int, it'll be string + String a = "1234"; String a = "1234"; + int b = 99; String b = "99"; + String c = a + b; String c = a + b; //same "123499" + Convert strings to number for input + Integer.parseInt(args[0]) + Double.parseDouble() + +Integers + +