markdown Windows下安装Vim x64

Windows下安装Vim x64

vim_win_x64.md
# Windows下安装Vim x64
1. 从下面两个地址选一个下载vim x64的zip包
  - https://github.com/vim/vim-win32-installer/releases
  - https://tuxproject.de/projects/vim/

2. 创建文件夹`C:\Program Files\Vim\vimxx`(xx为vim版本,如8.1版本就是vim81),将解压的文件复制到该文件夹

3. 使用管理员运行cmd命令,进入该目录,执行install.exe命令。

4. 如果鼠标右键没有"Edit with Vim"菜单,检查`C:\Program Files\Vim\vimxx`目录下是否有`GvimExt`文件夹,将其重命名为`GvimExt64`,然后重新执行第3步操作。

# 安装Vundle
1. 首先安装git for windows,然后使用Git BASH进入用户主目录,执行命令:
```zsh
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

# 复制.vimrc文件到主目录
git clone https://github.com/guoli100/conf.git
cp ~/conf/.vimrc ~
```
2. 进入Gvim,安装插件
```vim
:PluginInstall
```

# 安装YouCompleteme插件的注意事项
原文参考https://github.com/Valloric/YouCompleteMe#windows
  - 安装的Python和Vim应该同为32位或同为64位
  - 系统安装的Python版本应该与Vim编译时使用的python2或python3版本一致,可以在Vim中使用`:version`命令,查看`-DDYNAMIC_PYTHON_DLL=\"python27.dll\" and -DDYNAMIC_PYTHON3_DLL=\"python36.dll\"`,该命令指出Vim编译时是使用的Python2.7和Python3.6版本。

markdown 配置AMPPS para directorios personales

ampps serverhost

la receta
el mejor modo creo que es
# primero
buscar en el archivo de conf de apache (q puede ser C:/ > MAMP > conf > apache > httpd.conf)
la linea que originalmente dice:  
~~~
DocumentRoot "{$path}/www"
~~~

cambiarla para la nueva ruta

~~~
DocumentRoot "E:\_lanoosferasync\w_pagweb"
~~~

y lineas mas abajo 
cambiamos la configuracion por defecto para cada directorio
y que quede así:
~~~
<Directory />
    #Options FollowSymLinks
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Order deny,allow
    Allow from all
    Require all granted
</Directory>
~~~

mas abajo parece unas lineas para el anterior directorio (<Directory "{$path}/www">) se puede obviar/ ignorar

# segundo
asegurate que en tu nuevo directorio, no haya archivos de configuracion .httaccess o wp-config u otros

# tercero
reiniciar servidor



# antiguo modo -----------------------

# primero
buscar en el archivo de conf de apache (q puede ser C:/ > MAMP > conf > apache > httpd.conf)
la linea
~~~
# Virtual hosts
#Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf
~~~

y asegurrse que quede sin comentarios, de esta manera

~~~
# Virtual hosts
Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf
~~~


# segundo
abrir ese archivo que indicamos (conf/extra/httpd-vhosts.conf) con un editor de texto cualquiera

y que quede maso menos así:

~~~
<VirtualHost *:80>
DocumentRoot "E:/_lanoosferasync/w_pagweb/"
ServerName localhost
</VirtualHost>

<Directory />
    #Options FollowSymLinks
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Order deny,allow
    Allow from all
    Require all granted
</Directory>

~~~

# tercero
hay mas cosas que se pueden agregar
aunq he visto que no son tan necsarias

la fuente de estos datos para los pasos extras es:

https://www.taniarascia.com/setting-up-virtual-hosts/

----------------------------






markdown 无瑕的程式码─整洁的软体设计与架构篇心得

无瑕的程式码─整洁的软体设计与架构篇心得

Clean_Architecture.md
# 無瑕的程式碼 ─ 整潔的軟體設計與架構篇 心得

## 簡介

自己看天瓏[簡介](https://www.tenlong.com.tw/products/9789864342945)

## 你需要這本書嗎?

如果你還沒看過 clean code 我建議你先看 clean code ,但本書與 clean code 無相關,會這樣說純粹是 clean code 比較符合一般工程師的需求。
本書是給架構師看的,所以有許多抽象的地方。

## 翻譯狀況

我覺得譯者是很有主見,也很努力翻這本書,不過本書還是有些不太順暢,我想可能是因為是為了在地化的犧牲 p148 跟 p167 都有說明為何要這樣翻,
整體而言是可以接受的。

## 心得

首先,本書關於 code 的地方很少,大部分的地方都是 uml , 不過 uml 的部份不會很難懂。
本書主要分成三部份:簡介、架構、與細節

簡介主要在講架構的演進史,像多型的誕生,繼承之類的
架構在講 solid 原則 DI 之類的
細節的部份比較有趣,比如 web 跟 資料庫都是細節。

它裡面最令我印象最深刻的地方在於我們應當要把任何細節都推遲決定。
它之所以這樣說我認為是因為,一個好的架構在任何細節上都是可擴充的。
web gui 是細節,我們架構應該要可以很快的遷移平台,比如從 web 遷移到 app
資料庫是細節,我們理當可以很快從 mysql to postgresql。

但大部份的時候這些細節都會給我們帶來莫大的痛苦,常常需要爆破 code 才有辦法遷移。

## 最後

推薦各位可以買來看看,看看大師是怎樣設計架構的。

markdown EngineYard技巧

峰会/ Accucold

engineyard.md
### New Migrations in engines/core
* If there are new feilds or other migration changes added to the core, then click the options
for `migrate` on EngineYard! **ONLY NEEDS TO BE DONE FOR SUMMIT, NOT ACCUCOLD**
* Deploy
* To update Accucold, since it shares the Summit database, just hit `deploy`

---
* If the deploy takes more than a minute to complete, you will need to cancel and retry the
deployment
    * Click on `deployment history` and then click on `mark as timeout`
* If you need to rollback to a previous commit history, go to `deployment history`
    * Copy the head of the commit you want to restore to
    * Paste the commit number into the `deploy` area and then click deploy

markdown 树莓派について

树莓派关连についてまとめる

raspi_to_pc.md
# PCからRaspberrypiにアクセスする
## PCをwifiモバイルホストにして接続する
### windowsの場合
windows10にて設定=>ネットワークとインターネット=>モバイルホットスポットに移動する
モバイルホットスポットをオンにしてwi-fiを選択すると自動的にホットスポットにできる  
ホットスポットを設定すると接続された機器のipを確認できるのでそこからraspberrypiのipにアクセスする

### Ubuntu18.04の場合
windows10と同様にwifiの設定から右上の3本線の部分をクリックし、wifiアクセスポイントをONにする  
ONにするとPCをwifiスポットとして利用できる  
**ipの確認方法**
接続されている機器のipの確認には下記のコマンドを利用するなおこれはどんなwifiでも利用できそう  

+ ```nmap``` 
+ ```netdiscover```

## Ubuntu18.04からraspberrypiに有線lanで接続する
raspberrypiとUbuntuPCとを有線で接続しsshで操作する方法
### Raspberrypi
こちらは設定はとくに必要なし、しいていうならSSHをONにすること
### UbuntuPC
PCとraspberrypiの接続だがイメージとして**PCをDHCPサーバーとしてそこにraspberrypiを接続することとなる**  
また,Ubuntuにはデフォルトではいっているらしいが**Bonjour**がインストールされていることを想定している
1. ``` sudo apt-get install isc-dhcp-server```
2. ```systemctl restart isc-dhcp-server```
3. ```ssh pi@raspberrypi.local```
4. 上記の作業でraspberrypiに接続可能になる

raspi_zero_ros.md
# Raspberrypi_zero_whにROSをインストールする

markdown 在Domainfactory上的托管主机上安装Composer

在Domainfactory上的托管主机上安装PHP Composer。

readme.md
# Install Composer on Managed Hosting at Domainfactory

## Step 1:

Log in to your Managed Hosting Server via SSH.
Create your `.bashrc`:
```
touch .bashrc
```

## Step 2:

Add these two lines to the `.bashrc`:
```
alias php7cli='/usr/local/bin/php7-71LATEST-CLI'
alias composer='php7cli ~/composer.phar'
```

## Step 3:
Reload .bashrc with
```
$ source .bashrc
```

## Step 4:
Install Composer with
```
$ curl -sS https://getcomposer.org/installer | php7cli
```

## Step 5:
Done.

Check the installation with
```
$ composer --version
```

You should see something like this:
```
Composer version 1.7.3 2018-11-01 10:05:06
```

Your version will probably differ.

markdown isNan

#javascript

isnan.md
# isNan

- isNan: is Not a Number

```javascript
isNan("4")      // false
isNan("four")   // true
isNan(4)        // false
```

markdown 数学

#javascript

math.md
# Math

```javascript
Math.PI     // 파이 값을 출력
Math.abs(-4.7)      // 절대값
Math.random()       // 랜덤값
Math.pow(2, 4)      // 2^4
Math.round(3.4999)  // 가장 근접한 정수로 변환
```

markdown 排列

#javascript #string

array.md
# Array 

## 배열 선언

```javascript
var star = new Array();
star[0] = "Polaris";
star[1] = "Deneb";
star[2] = "Vega";
star[3] = "Altair";
```
와
```javascript
var star = var star = ["Polaris", "Deneb", "Vega", "Altair"];
```
는 같다.

```javascript
var myArray = new Array(5); // 5개의 배열을 만든다.
```

## 메소드

- concat()

```javascript
var myArray = new Array(); 
myArray[0] = "first"; 
myArray[1] = "second";
var newArray = myArray.concat("third");
// newArray is now [first,second,third]


var myFirstArray = [51,67];
var mySecondArray = [18,"hello",125]; 
var newArray = myFirstArray.concat(mySecondArray);
// newArray is [51,67,18,"hello",125]
```

- join()

```javascript
var star = ["Polaris", "Deneb", "Vega", "Altair"];
var starString = star.join();
// starString is now "Ploaris,Deneb,Vega,Altair"

var star = ["Polaris", "Deneb", "Vega", "Altair"];
var starString = star.join();
// starString is now "Polaris*Deneb*Vega*Altair"
```

- push(), pop()

push()는 객체의 길이를 리턴하고, pop()은 제거된 객체를 리턴한다.

```javascript
var star = ["Polaris", "Deneb", "Vega", "Altair"]; star.push("Aldebaran");
// star is now 5 elements

var star = ["Polaris", "Deneb", "Vega", "Altair"];
var removedElements = star.pop();
// removedElements is Altair
```

- shift(), unshift()
push()와 pop()과 유사하지만, 객체의 맨 앞에서 작동한다.

```javascript
var star = ["Polaris", "Deneb", "Vega", "Altair"]; star.unshift("Aldebaran");
// The star array is: ["Aldebaran", "Polaris", "Deneb", "Vega", "Altair"]

var star = ["Polaris", "Deneb", "Vega", "Altair"]; 
var removedElement = star.shift();
// The star array now contains: ["Deneb", "Vega", "Altair"]
```

- slice()
원본의 내용을 바꾸지 않고 특정 객체의 일부를 리턴한다. 마지막 인자는 제외한다.

```javascript	
var fruits = ['Banana', 'Orange', 'Lemon', 'Apple', 'Mango'];
var citrus = fruits.slice(1, 3);
// citrus contains ['Orange','Lemon']
```

- sort()
알파벳순으로 정렬한다. 숫자는 안됨.

```javascript
var star = ["Polaris", "Deneb", "Vega", "Altair"]; 
var sortedStars = star.sort();
// sortedStars is now "Altair,Deneb,Polaris,Vega"
```

- forEach()

```javascript
var candies = ["chocolate","licorice","mints"]; 
candies.forEach(function(candy) { 
    alert(candy);
});
```

- map()

```javascript
arr.map(callback, [thisArg])
```

- `callback`:새로운 배열의 요소를 생성하는 함수로서, 다음 세가지 인수를 가진다.
    - `currentValue` 현재 처리되고 있는 요소
    - `index` 현재 처리되고 있는 요소의 index 값
    - `array` 메소드가 불려진 배열
- `thisArg(선택항목)` callback 함수 내부에서 사용 할 this 값을 설정

```javascript
var numbers = {1, 2, 3, 4, 5};
var processed = numbers.map(function(num) {
    return num*num;
});
// numbers = {1, 4, 9, 16, 25}
```

markdown

#javascript #string

string.md
# String

## 관련 함수
```javascript
x.length    // 길이
x.substring(a)  // 처음 a만큼의 문자를 출력
x.substring(a, b)   // 처음 a에서 처음 b까지의 문자를 출력
x.slice(a, b)   // substring과의 차이점은 마이너스 값을 구분함

x.substr(a, b)  // 처음 a에서 b만큼의 문자열 출력
x.concat("ab")  // ab를 뒤에 붙음

x.toUpperCase() // 대문자로 변환
x.toLowerCase() // 소문자로 변환
x.toLocaleLowerCase()
x.toLocaleUpperCase()
```

## slice, substring, substr 비교
```javascript
var str = 'coding everybody';
```

|예시|str.slice|str.substr|str.substring|
|---|---|---|---|
|function(7)|everybody|everybody|everybody|
|function(0,7)|coding|coding|coding|
|function(3,7)|ing|ing eve|ing|
|function(7,2)|-|ev|diing|
|function(-7)|erybody|erybody|coding everybody|
|function(-7,2)|-|er|co|
|function(7,7)|-|everybo|-|