GuoXin Li's Blog

GuoXin Li's Blog

Binary Search
12345678910111213141516171819202122232425262728#include <iostream>#include <vector>int binarysear(std::vector<int> &nums, int target){ int left = 0; int right = nums.size(); while(left <= right){ int mid = left+(right - left) / 2 ; if(nums...
记一次苹果天才吧维修记录
记一次苹果天才吧维修记录因为我用了3年的 MBP 笔记本电脑的键盘有两个键松动了并且有粘连响应(就是按一个字母的时候会输入两个),这种情况发生了大概有半年多的时间了,并且我也知道是我买的这个系列的笔记本有这种设计缺陷,苹果也提出了对应的维修计划:https://support.apple.com/zh-cn/keyboard-service-program-for-mac-notebooks 但我一直懒的去修,直到最近频繁的影响到我的使用,我预约了天才吧的服务。(强烈建议如果有类似的问题,维修之类的,最好去苹果官方的零售店,而不是第三方合作的。) 预约流程预约到天才吧大概有两种方式: ...
Learnopengl-note
着色器顶点着色器 vertex shader 如果我们打算做渲染的话,现代OpenGL需要我们至少设置一个顶点和一个片段着色器。 #version 330 core layout (location = 0) in vec3 aPos; void main() { gl_Position = vec4(aPos.x, aPos.y, aPos.z, 1.0); } #version 330 core 声明版本和核心模式 in , out关键字,每个着色器都有输入和输出进行数据交换。 layout (location = 0) 设定了输入变量的位置值。 着色器的开头总是要声明版本...
Analysis of "Dual Attention Network for Scene Segmentation"
Dual Attention Network for Scene SegmentationAbstractUnlike previous works that capture contexts by multi-scale feature fusion. Author propose Dual attention: adaptively integrate local fetures with their global dependecies two types of attention model spatial dimension selectively aggregates ...
Docker notes
Docker基本概念镜像操作系统分为 内核 和 用户空降。Linux 系统内核启动后,会挂载 root 文件系统为其提供用户空间支持。 Docker 镜像相当于一个 root 文件系统,如 官方镜像 ubuntu:18:04 就包含了完整的一套 ubuntu18.04最小系统 root 文件系统。 Docker 镜像是一个特殊的文件系统,除了提供容器运行时所需要的程序、库、资源、配置等文件外,还包含了一些为运行时准备的一些配置参数(匿名卷、环境变量、用户等)。镜像 不包含 任何动态数据,其内容在构建之后也不会被改变。 镜像只是一个虚拟的概念,其实际体现并非由一个文件组成,而是由一组文件系...
Hongyi-Lee Machine Learning Spring 2021 Mandarin
Hongyi-Lee Machine Learning Spring Mandarin —NotesLesson 1Basic Conceptions OF MLDifferent type of FunctionsRegression: The function outputs a scalar Classification: Given options(classes), the function outputs the correct one. How to find the FunctionThree steps Function with Unknown Paramete...
CPP refresh
CPP refresh内存模型代码区存放函数体的二进制代码,由操作系统进行管理 全局区存放全局变量和静态变量以及常量. 栈区 由编译器自动分配释放 存放函数的参数值 存放局部变量 堆区由程序员分配和释放,若不手动释放,最后将由操作系统回收 程序运行前程序编译后,生成 exe 可执行程序,未执行该程序前分为两个区域 代码区: 存放 CPU 执行的机器指令 代码区是共享的,共享的的目的是对于频繁被执行的程序,只需要在内存中由一份代码即可 代码区为 只读,防止程序意外地修改了它的指令 全局区 全局变量和静态变量存放在此 常量区 字符串 其他常量 ==该区域的数据在程序结束后由操作...
752. Open the Lock
752. Open the LockYou have a lock in front of you with 4 circular wheels. Each wheel has 10 slots: ‘0’, ‘1’, ‘2’, ‘3’, ‘4’, ‘5’, ‘6’, ‘7’, ‘8’, ‘9’. The wheels can rotate freely and wrap around: for example we can turn ‘9’ to be ‘0’, or ‘0’ to be ‘9’. Each move consists of turning one wheel one s...
Iteratively. 144.Binary Tree Preorder&Inorder Traversal
144. Binary Tree Preorder TraversalGiven the root of a binary tree, return the preorder traversal of its nodes’ values. Example 1: Input: root = [1,null,2,3]Output: [1,2,3]Example 2: Input: root = []Output: []Example 3: Input: root = [1]Output: [1]Example 4: Input: root = [1,2]Output: [1,2]Exampl...
LeetCode 111. Minimum Depth of Binary Tree
111. Minimum Depth of Binary TreeGiven a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node. Note: A leaf is a node with no children. Example 1: Input: root = [3,9,20,null,null,15,7]Output: 2Exampl...
full permutation with backtracking
1, 2, 3 full permutation example in conventional “for circle” full permutation. with vector path. then backtracking method. 123456789101112131415161718192021222324#include <iostream>#include <vector>using namespace std;void fun(int level, vector<int>&path ){ if(le...
高光谱分类-Hyperspectral Classification
HybridSN阅读论文: HybridSN: Exploring 3D-2D CNN Feature Hierarchy for Hyperspectral Image Classification 背景知识高光谱图像 hyperspectral image: 高光谱遥感指具有高光谱分辨率的遥感数据获取、处理、分析和应用的科学与技术,通常采用覆盖一定波谱范围的成像光谱仪和非成像光谱仪两种传感器获取数据,利用大量窄波段电磁波获取感兴趣目标的理化信息,其基础是光谱学(Spectroscopy) 高光谱图像分类: 分类是高光谱遥感影像处理和应用的一项重要内容,其最终目标是给影像中的每个像元赋...
LeetCode 322. Coin Change
322. Coin ChangeYou are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you need to make up that amount. If that amount of money cannot be made up by any combination of the coins, return -1. You may assume that...
LeetCode509. Fibonacci Number
LeetCode 509. Fibonacci NumberThe Fibonacci numbers, commonly denoted F(n) form a sequence, called the Fibonacci sequence, such that each number is the sum of the two preceding ones, starting from 0 and 1. That is, F(0) = 0, F(1) = 1F(N) = F(N - 1) + F(N - 2), for N > 1.Given N, calculate F(...
Learn AndrewNg-MachineLearning notes
Supervised Leaning:e.g. Housing price prediction. (Regression) 房屋租价预测 Breast cancer(maligant, benign). (Classification) 乳腺癌的恶性良性预测 Unsupervised Leaning:e.g. Google news. 谷歌新闻的分类(采用聚类的方法) DNA Classification. DNA的分类,聚类算法 组织计算机集群(什么样的机器易于协同工作,进而高效) Facebook、Google+ 的圈子分类 大公司大型数据,存储消费者信息进行,市...
avatar
Jax