Presentation is loading. Please wait.

Presentation is loading. Please wait.

Piazza Piazza: https://piazza.com/uchicago/summer2014/mpcs51 037/home Course website:

Similar presentations


Presentation on theme: "Piazza Piazza: https://piazza.com/uchicago/summer2014/mpcs51 037/home Course website:"— Presentation transcript:

1 Piazza Piazza: https://piazza.com/uchicago/summer2014/mpcs51 037/home Course website: http://java-class.cs.uchicago.edu/adv/

2 Lecture 02 Agenda: 1/ intro 2/ bitBucket register 3/ setup dev environment JDK, maven, git, sourcetree, p4merge, netBeans 8, glassfish 4/ intro to maven, netbeans, & git

3 Registering Bitbucket account Remote source-control: http://java-class.cs.uchicago.edu/adv/

4 Pass by value and reference

5 pass by value pass by reference Action: Tell my accountant how much I intend to spend on a new car. Change in bank account: no change. Action: Swipe debit card and enter pin at the Bently dealership. Change in bank account: -125k.

6 If a tree falls in a forest and no one is around to hear it, does it make a sound?

7

8 Event (onClick) No Event-Listener listening No Catcher Event-Source (Button) No Event Listener

9 Event (onClick) Event-Listener listening Catcher ready to catch Event-Source (Button) OnClick- Listener Any Object

10 Wrong Event

11 Event source not registered

12 Event (onClick) Event-Listener listening Catcher ready to catch OnClick- Listener Event-Source (Button) Any Object OnMouse- Listener Event (onMouse)

13 Fork-and-Clone projects

14

15

16

17

18 Clone Labs

19

20

21 GIT architecture

22 git config --global user.name "Your Name" git config --global user.email "your_email@whatever.com"

23 add/reset/commit: move files from working-dir to stage-dir(aka index) git add. git add src/. git add src/lec01/glab/DigitalToBinary.java move files from stage-dir(aka index) to working-dir git reset HEAD. git reset head src/. git reset head src/lec01/glab/DigitalToBinary.java git commit -m “your commit message.”

24 Amending: Every commit is associated with a sha-1 hash. That hash is derived from 1/ the file changes in that commit and 2/ the previous commit. You can not change any commit unless that commit is at the head. Since no other commits depend on the head, you may safely change the head. To change the head, use git commit --amend -m “your message” git commit --amend --no-edit

25 Reverting: You can roll back a commit (reverse it) by identifying it's sha1 hash like so. git revert --no-edit 71ac

26 Branching: To list the branches in a project: git branch git branch -r git branch --all To create a branch: git checkout -b branchName c39b git checkout -b branchName To delete a branch: git branch -D branchName To checkout a branch: git checkout 7afe git checkout master

27 Pushing to remotes: To see the remotes: git remote -v show To push to a remote: git push origin master:master git push origin master git push --all

28 Pulling from remotes: To see the remotes: git remote -v show To pull from a remote: git pull --all git pull origin eval

29 NetBeans keymap


Download ppt "Piazza Piazza: https://piazza.com/uchicago/summer2014/mpcs51 037/home Course website:"

Similar presentations


Ads by Google