1. 程式人生 > 實用技巧 >【筆記記錄】2020-09-07

【筆記記錄】2020-09-07

【安卓】

1.glEnableVertexAttribArray():開啟定點屬性訪問,預設情況下頂點著色器的屬性是禁用的,即使你的資料已經上傳到 GPU,如果不開啟也是無法訪問的。

2.glClear():清屏,把螢幕的顏色清空,空顏色由glClearColor()指定。

3.NotificationChannel:

NotificationChannel notificationChannel = new NotificationChannel("channelid1", "channelname", NotificationManager.IMPORTANCE_HIGH);
manager.createNotificationChannel(notificationChannel);

4.Color:

1. alpha():獲取透明值
2. red():獲取紅色通道的值
3. green():獲取綠色通道的值
4. blue():獲取藍色通道的值

5.[Android] MediaRecorder.AudioSource:These constants are for instance used in MediaRecorder#setAudioSource(int) or AudioRecord.Builder#setAudioSource(int).

6.過度繪製:在多層次重疊的UI結構裡面,如果不可見的UI也在做繪製的操作,會導致某些畫素區域被繪製了多次,這樣就會浪費大量的CPU以及GPU資源。

【後端】

1.[SpringMVC] 全域性異常處理:控制器丟擲異常,可以轉入被@ControllerAdvice註解的類中的@ExceptionHandler(Exception.class)註解的方法中處理。

2.[Apache] 預設錯誤日誌目錄:/var/log/httpd/error_log

3.`ping`命令是基於`ICMP協議`來實現的,而ICMP協議又是通過IP協議來發送的,即ICMP報文是封裝在IP包中:[IP首部 [ICMP報文]]

4.shutdown ([-t time] | [-h time] | [-c] ) [message]

5.rwx許可權可以用數字來表示,分別表示為r(4)、w(2)、x(1)

【前端】

1.[CSS] 絕對單元格居中法

<!DOCTYPE html>
<html>
    <head>
        <title>test</title>
    </head>

    <body>
        <div style="position: relative;background-color: red;overflow: hidden;height: 100px;">
            <div style="position:absolute; top:0; bottom:0;right: 0;padding-left: 20px;background-color: rosybrown;">
                <div style="display: table-cell;vertical-align: middle;height: 100px;background-color: green;">
                    <div style="display:inline-block;">CC</div>
                    <div style="display:inline-block;">BB</div>
                    <div style="display:inline-block;">AA</div>
                </div>
            </div>
        </div>
    </body>
</html>

【其他】

1.[Crypt] RSA加密系統:RSA 加密系統中,D 和 E 會相互抵消。

1. 分解質因數:把一個合數用質因數相乘的形式表示出來,叫做分解質因數,如30=2×3×52. 互質:互質是公約數只有1的兩個整數,叫做互質整數(互質數)。
3. 尤拉函式:尤拉函式是小於或等於n的正整數中與n互質的數的數目。

2.[SVN] 檢視本地與伺服器的差異

【TortoiseSVN】
右鍵 -> TortoiseSVN -> Check for modifications -> 右擊某個檔案 -> Compare with base

【SnailSVN】
右鍵 -> SnailSVN -> 檢測改動

3.vim剪貼

dd    剪貼遊標所在行整行 
d^    剪貼至行首,或d0
d$    剪貼至行尾 
dw   剪貼一個word 
dG   剪貼至檔案尾