Cat

cat -> catenate, Concatenate
$ cat dictionary.txt

rm -> remove
$ rm SillyFile.txt
$ rm -i ValuableFile.txt

$ rm -i google.html
rm: remove regular file 'google.html'? y

$ rmdir hogehoge

$ grep shell dictionary.txt
bombshell
bombshell’s
bombshells
bushelled
bushelling
cockleshell
cockleshell’s
cockleshells
eggshell
eggshell’s
eggshells
nutshell
nutshell’s
nutshells
seashell
seashell’s
seashells
shell
shell’s
shellac
shellac’s
shellacked
shellacking
shellacs
shelled
sheller
shellfish
shellfish’s
shellfishes
shelling
shells
tortoiseshell
tortoiseshell’s
tortoiseshells

curl

curl -> C URL -> see URL

$ curl 'http://google.com'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   259  100   259    0     0   1106      0 --:--:-- --:--:-- --:--:--  2072
302 Moved

302 Moved

The document has moved here.
$ curl -o google.html -L 'http://google.com'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   261  100   261    0     0   1197      0 --:--:-- --:--:-- --:--:--  1864
100 10726    0 10726    0     0  17612      0 --:--:-- --:--:-- --:--:-- 85808
$ curl -L -o dictionary.txt 'https://tinyurl.com/zeyq9vc'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
100  916k  100  916k    0     0   217k      0  0:00:04  0:00:04 --:--:--  598k

Opening Git Bash

$ echo Hello, shello!
Hello, shello!

this is wired, isn’t it?

$ echo Hello, shello!!
echo Hello, shelloecho Hello, shello!
Hello, shelloecho Hello, shello!

improve with single quote

$ echo 'Hello, shello!!'
Hello, shello!!

ls = list
$ ls
$ ls Downloads

cd = Change Directory
$ cd Downloads
$ cd .. ; ls

pwd = Print Working Directory
“ls .” is just same as “ls”
$ ls .

all of the files matched pdf.
$ ls -l Documents/*.pdf

$ mkdir Documents/Books
$ mv 'Documents/1911 Webster Dictionary.epub' Documents/Books/
$ mv Documents/*.epub Documents/Books

Unix shell

> echo "Hello, $LOGNAME"
Hello, Karl
> git clone https://github.com/*

Needs to remember the words like below
less, ls, pwd, mkdir, cat, curl, echo, git

console.log("hello!");
hello!

bash

Research

Brain Storm -> Create a Skelelon UI -> Research APIs and Libraries
Choose an Idea -> Create a paper prototype -> get user feedback -> Build APP

Developing nice graphic design
Building the user interface with UIKit
Downloading data from an API
Persisting the data
Working through problems and bug to get the app working well.
Posting the app to the App Store

-Create a Paper Prototype

Default Befaviors

Street Names
isStreetNamesEnabled()
setStreetNamesEnabled(boolean)
Zoom Gestures
isZoomGesturesEnabled
setZoomGesturesEnabled(boolean)
User Navigation
isUserNavigationEnabled
setUserNavigationEnabled(boolean)

@Override
public void onStreetViewPanoramaReady(StreetViewPanorama panorama){

	panorama.setPosition(new LatLng(37.400546,-112.108668));
	panorama.setStreetNamesEnabled(false);
	StreetViewPanoramaCamera camera = new StreetViewPanoramaCamera.Builder()
		.bearing(180)
		.build();
	panorama.animateTo(camera,1000);
}

User Interaction
Detect Camera Changes
setOnStreetViewPanoramaCameraChangeList
Detect User Touches on Panorama
setOnStreetViewPanoramaClickListener
Detect Changes to the Panorama
setOnStreetViewPanoramaChangeListener

Adding a Polyline

PolylineOptions().geodesic(true).add(LatLng);
PolylineOptions().geodesic(true).add(LatLng)
								.add(LatLng)
								.add(LatLng)
								.add(LatLng);

Use a streetViewPanoramaFragment

<fragment
	android:name="com.google.adroid.gms.maps.StreetViewPanoramaFragment"
	android:id="@+id/streetviewpanorama"
	android:layout_width="match_parent"
	android:layout_height="match_parent" />

StreetView Main Activity
Edit Activity
Implement OnStreetViewPanoramaReadyCallback
In OnCreate
Create a StreetViewPanoramaFragment Object
Call .getStreetViewPanoramaAsync(this) on it
Override onStreetViewPanoramaReady
Parameter: StreetViewPanorama
setPosition() for Location
Create a StreetViewPanoramaCamera
animate To(camera, ms)

@Override
prtected void onCreate(Bundle savedInstanceState){
 StreetViewPanoramaFragment StreetViewPanoramaFragment
  (StreetViewPanoramaFragment) getFragmentManager()
  	.findFragmentById(R.id.streetviewpanorama);

  	streetViewPanoramaFragment.getStreetViewPanoramaAsync(this);
 }

@Override
public void onStreetViewPanoramaReady(StreetViewPanorama panorama){

	panorama.setPosition(new LatLng(36.0579667,-112.1430996));
	StreetViewPanoramaCamera camera = new StreetViewPanoramaCamera.Builder()
		.bearing(180)
		.build();
	panorama.animateTo(camera,1000);
}

Using MarkerOptions

MarkerOptions class
position property takes a LatLng
title property takes a string

MarkerOptions renton =
	new MarkerOptions()
		.position(new LatLng(47.89805,-122.120502))
		.title("renton");
renton = new MarkerOptions()
	.position(new LatLng(47.48905, -122.120502))
	.title("Renton");
renton = new MarkerOptions()
	.position(new LatLng(47.48905, -122.120502))
	.title("Renton")
	.icon(BitmapDescriptorFactory.fromResource(
		R.drawable.ic_launcher));

Camera Position

Target, Zoom, Bearing, Tilt
class code: CameraPosition

CameraPosition cp=CameraPosition.builder()
	.target(LatLong)
	.zoom(val)
	.bearing(val)
	.tilt(val)
	.build();

	map.moveCamera(CameraUpdateFactory.newCameraPosition(cp));

	map.animateCamera(CameraUpdateFactory.newCameraPosition(cp),
		<time in ms>, <callback function>);

Making the map move
Seattle: 47.6204, -122.3491
New York: 40.7127, 74.0059
Dublin: 53,3478, 6.2597

Create and Configure the App

1. Create Blank Activity App
2. Edit build.grade
3. Edit Android.manifest
– meta for Google Service
– meta for API key
– permissions for internet, network state and write external storage
– meta for OpenGL

activity_main.xml

<fragment xmlns:android="http://schemas.android.com/apk/res/android"
	android:id="@+id/map"
	andorid:layout_width="match_parent"
	android:layout_height="match_parent"
	android:name="com.google.anroid.gms.maps.MapFragment"/>