- 博客(15)
- 收藏
- 关注
原创 oracle
1.三大范式原子性依赖于主键不能有传递依赖2.条件表达式:case when end , decode3.分组数据 group by4.多表查询 :笛卡尔积,左外,右外,自连接5.约束:主键,唯一,非空,自增,外键6.事务特征:ACID, 原子,一致,隔离,持久原子:全部操作要么全部完成,要么均不执行一致性:两个相同事务执行结果一致隔离:事务的执行不受其他事务干扰 , read uncommited , read commited , repeated read , ser
2020-11-15 16:42:32
116
原创 锁类型
1.互斥锁2.条件变量:在条件满足时,发送信号通知阻塞队列3.读写锁:在同一时刻只有读锁时,其它线程可以获取读锁。4.递归锁:可以多次加锁5.自旋锁:等待锁时线程空转,不阻塞:不用从用户态转为内核态 , 适用于可以短时间获取锁的情况...
2020-11-12 17:03:09
142
原创 2020-10-05
LeetCode 671 二叉树中第二小的结点Given a non-empty special binary tree consisting of nodes with the non-negative value, where each node in this tree has exactly two or zero sub-node. If the node has two sub-nodes, then this node’s value is the smaller value among
2020-10-05 09:50:17
100
原创 二叉树所有路径(非递归)
给定一个二叉树,返回所有从根节点到叶子节点的路径。说明: 叶子节点是指没有子节点的节点。struct Node{ int value; Node* left; Node* right;};vector<string> printRoutes(Node* root){ stack<Node*> s; s.push(root); string str = ""; vector<string> ret; while(!s.empty()) {
2020-10-04 18:17:42
453
2
原创 重塑二维矩阵
Input:nums =[[1,2],[3,4]]r = 1, c = 4Output:[[1,2,3,4]]Explanation:The row-traversing of nums is [1,2,3,4]. The new reshaped matrix is a 1 * 4 matrix, fill it row by row by using the previous list.#include<iostream>#include<unistd.h>
2020-09-27 10:07:10
113
原创 合并二叉树
#include<iostream>#include<unistd.h>#include<vector>#include<stack>#include<queue>using namespace std;struct Node{ int value; Node* left; Node* right;};vector<int> layerTraversal(Node* root){ vector<i
2020-09-25 17:51:29
66
原创 makefile依赖所有头文件用法
TGT = encryptSRCS = $(wildcard ./src/*.cpp)HEADFILES = $(wildcard ./include/*.h)LIBS = -L./tasscard_engine/tassl/lib/ -lssl -lcrypto -ldl -lpthread -ltass_pcie_apiINCPATH =-I./include/ -I./tasscard_engine/tassl/include/CC = g++CFLAGS = -Wall$(TGT)
2020-09-25 15:44:57
728
原创 二叉排序树BST
#include<iostream>#include<unistd.h>#include<vector>#include<stack>#include<queue>using namespace std;struct Node{ Node(int input):value(input) { } int value; Node* left = nullptr; Node* right = nullptr;};ve
2020-09-23 16:34:12
74
原创 二叉树非递归遍历
层序遍历#include<iostream>#include<vector>#include<queue>using namespace std;struct Node{ int value; Node* left; Node* right;};vector<int> layerTraversal(Node* root){ vector<int> result; queue<Node*> q; q.pu
2020-09-23 14:23:47
77
原创 模式匹配
TGT = testSRCS = test.c tst.cOBJS = test.o tst.oCC = g++(TGT):(TGT):(TGT):(OBJS)$(CC) $^ -o $@%.o:%.c$(CC) $< -cclean:rm -rf $(TGT) $(OBJS)
2020-09-22 19:47:02
67
原创 变量形式makefile
TGT = testSRCS = test.c tst.cOBJS = test.o tst.oCC = g++(TGT):(TGT):(TGT):(OBJS)$(CC) $^ -o $@test.o:test.c$(CC) $^ -c -o $@tst.o:tst.c$(CC) $^ -c -o $@clean:rm -rf $(TGT) $(OBJS)
2020-09-22 19:43:42
91
原创 三种特殊变量
all:f1 f2 f3@echo $@ #目标@echo $^ #所有依赖@echo $< #第一个依赖@echo $$$$ # 进程号f1:@touch f1f2:@touch
2020-09-22 19:28:07
116
原创 makefile四种变量
B := $A #立即赋值C = $A #延迟赋值A = 10D = 20D ?= $A #条件赋值E = 30E += $A #追加赋值all:@echo "B"@echo′B" @echo 'B"@echo′C’@echo “D"@echo"D" @echo "D"@echo"E”...
2020-09-22 19:17:59
395
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人