Skip to content

Instantly share code, notes, and snippets.

View Jimmy-Hu's full-sized avatar
🎯
Focusing

jimmyhu Jimmy-Hu

🎯
Focusing
View GitHub Profile
@Jimmy-Hu
Jimmy-Hu / CodingPracticing2022.md
Last active June 10, 2022 00:49
Practice programmng
@Jimmy-Hu
Jimmy-Hu / AlgorithmOnlinePresentation.md
Last active May 25, 2023 05:05
AlgorithmOnlinePresentation
  • Install Octave Software

    %  Reference: https://blog.eldernode.com/install-gnu-octave-on-ubuntu-20-04/
    sudo apt install -y octave
    sudo apt-get install -y octave-parallel
  • Install Apache server

@Jimmy-Hu
Jimmy-Hu / MDArrayExistsTestInCSharp.md
Created March 22, 2021 02:13
Test Part 2: Large Multi-dimensional Array Test

Test Part 2: Large Multi-dimensional Array Test

var largeArray = Array.CreateInstance(typeof(int), 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);
MDArrayHelpers.Fill(largeArray, 1);

Predicate<int> isOne = delegate (int number) { return number == 1; };
Predicate<int> isFour = delegate (int number) { return number == 4; };

System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();
@Jimmy-Hu
Jimmy-Hu / TestCasesOfArrayExists.md
Created March 19, 2021 16:06
Test cases of Array.Exists

Update: Add test cases of large two dimensional array (int[*,*])

int size = 10000;
var largeArray = new int[size, size];
MDArrayHelpers.Fill(largeArray, 1);

Predicate<int> isOne = delegate (int number) { return number == 1; };
Predicate<int> isFour = delegate (int number) { return number == 4; };
@Jimmy-Hu
Jimmy-Hu / DCT_3D.md
Last active February 15, 2021 01:14
Three Dimensional Discrete Cosine Transform Test Cases

N = 16

0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0
0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0
0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0
0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0
0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0
0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0
0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0
// A Ones Function for Boost.MultiArray
#include <algorithm>
#include <array>
#include <cassert>
#include <chrono>
#include <complex>
#include <concepts>
#include <deque>
#include <exception>
@Jimmy-Hu
Jimmy-Hu / ElementIncrementAndDecrementOperator
Created November 6, 2020 01:10
Element Increment and Decrement Operator
#include <algorithm>
#include <array>
#include <cassert>
#include <chrono>
#include <complex>
#include <concepts>
#include <deque>
#include <exception>
#include <functional>
#include <iostream>
@Jimmy-Hu
Jimmy-Hu / recursive_transformFunctionWithMultiArray
Created November 4, 2020 22:10
A recursive_transform Function with boost::multi_array
#include <algorithm>
#include <array>
#include <cassert>
#include <chrono>
#include <complex>
#include <concepts>
#include <deque>
#include <exception>
#include <functional>
#include <iostream>
@Jimmy-Hu
Jimmy-Hu / PlaneV2WithTransformAllMethod
Last active November 4, 2020 03:20
The full version of PlaneV2 class
public class PlaneV2<T>
{
public int Width { get; } = 0;
public int Height { get; } = 0;
private T[,] Grid = null;
public int Length => Width * Height;
public PlaneV2() : this(1, 1) { }
public PlaneV2(int width, int height)
Bootstrapping qmake ...
cl -c -Fo./ -Fdqmake.pdb -W2 -nologo -O2 /MP /wd4577 -ID:\GitHub\vcpkg\buildtrees\qt5-base\src\5.12.5-0f870116d4\qmake -ID:\GitHub\vcpkg\buildtrees\qt5-base\src\5.12.5-0f870116d4\qmake\library -ID:\GitHub\vcpkg\buildtrees\qt5-base\src\5.12.5-0f870116d4\qmake\generators -ID:\GitHub\vcpkg\buildtrees\qt5-base\src\5.12.5-0f870116d4\qmake\generators\unix -ID:\GitHub\vcpkg\buildtrees\qt5-base\src\5.12.5-0f870116d4\qmake\generators\win32 -ID:\GitHub\vcpkg\buildtrees\qt5-base\src\5.12.5-0f870116d4\qmake\generators\mac -ID:\GitHub\vcpkg\buildtrees\qt5-base\src\5.12.5-0f870116d4/include -ID:\GitHub\vcpkg\buildtrees\qt5-base\src\5.12.5-0f870116d4/include\QtCore -ID:\GitHub\vcpkg\buildtrees\qt5-base\src\5.12.5-0f870116d4/include\QtCore\5.12.5 -ID:\GitHub\vcpkg\buildtrees\qt5-base\src\5.12.5-0f870116d4/include\QtCore\5.12.5\QtCore -I..\src\corelib\global -ID:\GitHub\vcpkg\buildtrees\qt5-base\src\5.12.5-0f870116d4\mkspecs\win32-msvc -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS -DQT