Sign in

我也不知道我幹嘛寫這個,但我想寫

C (I), Dm (II), Em (III), F (IV), G (V), Am (VI), Bdim (VII)

Introduction

Why

How

Create a project and push it to github with https

git remote add origin 'the url'
git branch -M main
git push -u origin main
echo "# exchange" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin 'the url'
git push -u origin main

Create a project and push it to github with ssh

Download a project

$ git clone "github path"

Delete the repository

Push


Introduction

new project

$ rails new instant_message

new controller for chat rooms

$ rails g controller rooms show
<div id="main">
<h2>Chat room</h2>
<div>
<div id="messages">
<p class="received">Hello</p>
<p class="sent">Hi</p>
<p class="received">How are you doing?</p>
<p class="sent">I am doing alright</p>
</div>
<form id="send_message">
<input type="text" id="message" name="message">
<button>Send</button>
</form>
</div>
</div>

Introduction

Why?

How?

The searching procedure


Introduction

environment:

How

create a project

$ rails new GoogleMap

scaffold

$ rails generate scaffold Location name:string latitude:float longitude:float

migration

rails db:migrate

Add Gem to Gemfile

gem 'geocoder’

bundle install for gem file

bundle install

Add geocode to the model

class Location < ApplicationRecord
geocoded_by :name
after_validation :geocode, if: :name_changed?
end


Introduction

reference: https://developer.mozilla.org/en-US/docs/Web/HTTP/Overview

Why?


What Is Internet Protocol Suite & How Do The Layers Work?

Introduction

What Is Internet Protocol Suite?

https://www.khanacademy.org/computing/computers-and-internet/xcae6f4a7ff015e7d:the-internet/xcae6f4a7ff015e7d:the-internet-protocol-suite/a/the-internet-protocols

How Do The Layers Work?

Link layer:

Network layer (IP):


Transition

<a href="#" class="btn">send</a>
.btn{
display: inline-block;
padding: 10px 20px;
background-color: red;
color: black;
}
.btn:hover{
background-color: green;
}

Relative

Preparation

ul>li*50.item${$}
li{
display: inline-block;
width: 100px;
height: 100px;
background-color: #aaa;
}
<link rel="stylesheet" href="reset.css">

Flex

<div class="warp">
<div class="item">
lorem
</div>
<div class="item">
lorem
</div>
<div class="item">
lorem
</div>
</div>
.warp {
width: 960px;
margin: auto;
background: #ccc;
display: flex;
}
.item {
width: 300px;
margin: 0 10px 10px;
background-color: #ffa;
}

YCChen

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store