何強豪

@pramho05

Trying to compute the world by parsing available environmental variables within its constraint.

Joined on Sep 4, 2023

  • :::success Let's Discuss with Bagas: pram.hao@gapp.nthu.edu.tw ::: In this notespace, I will share my original journey of thinkering with IoT. I hope through this notespace, beginner (like me) can replicate and maintain any entry-level IoT project. Cheat sheet of internet related tech from this Giga Chad: https://mpolinowski.github.io/docs/intro 1. First Consideration: Communication Module and MCU Well, this problem is relatively easy if you use off-the-shelf part like the ESP32. Why ESP32? Because it has good performance. Why does it perform well?
     Like  Bookmark
  • :::warning v1 Datasheet v2 Datasheet AT Commands: https://drive.google.com/file/d/1_7T8yJUBVWVXtiO25tX-RsHotYatrYCC/view Edu Platform: https://drive.google.com/file/d/1Lx2RdiiX-Yj7bRdBKsf9aHPhf_hYKUBq/view NBIOT/GW/3bf90242ac110003 0 => Fan
     Like  Bookmark
  • :::success by Ken Chen, former CEO Global Uni Chip ::: What is a strategy? Strategy is a plan of change to achieve an objective (Dr. Morris Chang) Different from normal/conventional operation Horizontal Expansion: just changing the variable is not a strategy Effectiveness?
     Like  Bookmark
  • If you are new to IoT or microcontroller system, you can follow this walkthrough: https://hackmd.io/@pramho05/basic_iot Project requirement and Deliverables Basic control requirements: Adjustable blower speed from web On/Off cut-off Basic sensor requirements:
     Like  Bookmark
  • Topics Type Date & Link Activity Terminology, DFS, BFS Class 2 ✅04/29 ✅DFS; ✅Graph
     Like  Bookmark
  • Idea and Pseudocode for each vertex v:     dist[v] = infinity     prev[v] = none dist[source] = 0 set all vertices to unexplored ~ start empty max/min heap while destination is not explored (max/min heap is not empty):     v = least-valued unexplored vertex (auto implement if using heap)     set v to explored (heap pop)     for each edge connected with v:
     Like  Bookmark
  • #include <iostream> #include <list> #include <vector> using namespace std; class portfolio { public: portfolio() { _id = 0;
     Like  Bookmark
  • #include <iostream> class Pair { public: int *pa,*pb; Pair(int, int); Pair(const Pair &); ~Pair(); };
     Like  Bookmark
  • #include <iostream> #include <vector> #include <deque> #include <string> using namespace std; class solver { public: vector<deque<char> *> tubes;
     Like  Bookmark
  • #include <iostream> #include <iomanip> #include <iterator> #include <list> #include <algorithm> #include <math.h> using namespace std; class planets {
     Like  Bookmark
  • Parse input to array Inject the array to flipped stack while(command--) do check if it is DIG OR USE If DIG then check whteher it need to be added to the item queue or loot queue or immediately active Don't bother to implement the function first, just make sure that when the specify item is found, you cout "Bomb active" or "Gold Found" Make Sure the input and the flow are correct untill the end Do from small test case first If you need idea or intuition, we can discuss block by block and not the overall program For reference:
     Like  Bookmark
  • 100% Tested with Dartmouth x IMT Online Judge/Task Grader Unit 5.1 Structures Define and Use Structures Basic Syntax #include <stdio.h> struct student{ char firstName[30];
     Like  Bookmark
  • var merge = function(array, p, q, r) { // This code has been purposefully obfuscated, // as you'll write it yourself in next challenge. var a=[],b=[],c=p,d,e; for(d=0;c<=q;d++,c++){ a[d]=array[c]; } for(e=0;c<=r;e++,c++){ b[e]=array[c]; }
     Like  Bookmark
  • #include <stdio.h> #include <string.h> #include <stdlib.h> #include "function.h" //implement split string function, return 2d char array to store result, set correct number of splitted strings char **split(char* string, char* pattern, int* splittedStrings); //free memory space void free_(char **result, int splittedStrings);
     Like  Bookmark
  • !!! Prof. Hu said to learn this problem !!! Mechanism: image Ideas: Use binary placement to create possible moves Explore the moves through loop and mask
     Like  Bookmark
  • Ideas: pointer and malloc Problem There are 10 tables (indexed from 0 to 9) and no cards on them initially. Given a command S, Sakura has to follow the instructions below: (1) print: print the status of each table with the format :"table_idx: cards_on_the tables\n", e.g. "0: 1 3 3 4 5\n". Note that if there are no cards, print "No card".
     Like  Bookmark
  • The 8-puzzle problem is a classic problem in artificial intelligence that involves a 3x3 board with 8 numbered tiles and one empty space. The objective is to place the numbers on tiles to match the final configuration using the empty space. There are several algorithms to solve this problem, including depth-first search (DFS), breadth-first search (BFS), and branch and bound. DFS and BFS are brute-force algorithms that can be used to solve the problem, but they are not efficient for large problems. Branch and bound is an intelligent algorithm that uses a ranking function to avoid searching in sub-trees that do not contain an answer node. The cost function is useful for determining the next E-node. The next E-node is the one with the least cost. The cost function is defined as C (X) = g (X) + h (X) where g (X) = cost of reaching the current node from the root h (X) = cost of reaching an answer node from X. The ideal Cost function for an 8-puzzle Algorithm : We assume that moving one tile in any direction will have a 1 unit cost. Keeping that in mind, we define a cost function for the 8-puzzle algorithm as below: c (x) = f (x) + h (x) where f (x) is the length of the path from root to x (the number of moves so far) and h (x) is the number of non-blank tiles not in their goal position (the number of misplaced tiles). There are at least h (x) moves to transform state x to a goal state ¹. Source: Conversation with Bing, 11/26/2023 (1) 8 puzzle Problem using Branch And Bound - GeeksforGeeks. https://www.geeksforgeeks.org/8-puzzle-problem-using-branch-and-bound/. (2) What can be the efficient approach to solve the 8 puzzle problem?. https://stackoverflow.com/questions/1395513/what-can-be-the-efficient-approach-to-solve-the-8-puzzle-problem. (3) 8-Puzzle Solver - Deniz. https://deniz.co/8-puzzle-solver/. (4) How to check if an instance of 8 puzzle is solvable?. https://www.geeksforgeeks.org/check-instance-8-puzzle-solvable/. Problem Let's call a grid 8-puzzle board if the gridsize is 3 x 3 and there is exactly one cell is 'x' and others are '1' or '0'.
     Like  Bookmark
  • 100% Tested with Dartmouth x IMT Online Judge/Task Grader Unit 4.1: Memory and Pointers Defining and dereferencing pointers Review image When you parse variable into a function block, the function block only copy the value and cannot access the real variable in the main block. So we need to find the address of the variable to be able to change it from a function block.
     Like  Bookmark
  • #include <stdio.h> int getSize(int larger_dim){ if(larger_dim <= 1){ return 0; } int msb = 0; while(larger_dim > 1){ larger_dim >>= 1;
     Like  Bookmark
  • #include <stdio.h> int isSafe(int row, int col, int N, int board[N][N]){ int i, j; //1. Check row left for(i = 0; i < col; i++){ if(board[i][row]){ if(board[i][row] == -1){ continue; }else{
     Like  Bookmark