Skip to content

Instantly share code, notes, and snippets.

View claudhu's full-sized avatar

ClaudHu claudhu

  • Taipei
View GitHub Profile
@claudhu
claudhu / nextCloudResolve.md
Last active May 8, 2019 02:53
無法刪除Nextcloud的檔案,使用Docker處理

無法刪除Nextcloud的檔案(顯示檔案目前被LOCK),使用Docker處理

以下未經過嚴格驗證,使用前請先做好備份

目前遇到一個問題,就是無法使用刪除nextcloud的檔案,

  1. 開啟維護模式
docker exec nextcloud occ maintenance:mode --on
@claudhu
claudhu / SelectionSort.java
Last active May 8, 2017 06:49
java 選擇排序
/**
author: Claud Hu
desc: Selection Sort依序由小到大的排列從第0個位置開始排序
舉例來說
original array: [632,33,55,1,88]
round 1 : [1,632,55,33,88] 第1輪結束第0個位置是最小值
round 2 : [1,33,632,55,88] 第2輪結束比第0個位置大但比其他數值小
round 3 : [1,33,55,632,88] 第3輪結束比第1個位置大但比其他數值小
round 4 : [1,33,55,88,632] 第4輪結束比第2個位置大但比其他數值小
finish: [1,33,55,88,632]
@claudhu
claudhu / BubbleSort.java
Last active May 2, 2017 05:10
如何使用Bubble Sort排序後,運用Binary Search進行搜尋...
/**
* Author: Claud Hu
* 2017 / 4 / 28 日
*/
import java.util.Scanner;
/** 如何使用Bubble Sort排序,然後使用BinarySearch進行搜尋**/
class BubbleSort{
public static void main(String args[]){
import java.util.Scanner;
class BubbleSort{
public static void main(String args[]){
final int ARRAY_SIZE = 10; // the size that you want
int [] randomIntArray = new int[ARRAY_SIZE];
for(int i = 0 ; i < ARRAY_SIZE ; i++){
randomIntArray[i] = (int) (Math.random()*10); //Push value into Array
}
//Check our Array value
for(int i = 0 ; i < ARRAY_SIZE ; i++){