原创 【OS】操作系統瑣碎知識點整理
1、CS:段指針,IP:偏移指針;一個扇區有512字節。X86計算機啓動時,cpu首先處於實模式;開機時,CS=0xFFFF,IP=0x0000,尋址
原创 WIN10主機Ubuntu18.04 nat模式設置靜態ip地址
花了一上午,一把辛酸淚,遂記錄以備不時之需及供網友參考虛擬機VMware Workstation Pro安裝及ubuntu系統安裝此處不做介紹,我的Ubuntu是用的最簡安裝,且網絡連接模式按默認的選擇nat模式,一切就緒後就開始進行靜態
原创 【C++】實現JAVA中的split方法
JAVA中的split函數可謂相當好用,可惜我沒在C++中找到類似方法...於是乎我在網上找到了兩種自己實現的函數,簡單介紹下,之後進行簡單比較討論: 常規方法: vector<string> split(string str){
原创 Repeated String Match【重複字符串匹配】
PROBLEM:Given two strings A and B, find the minimum number of times A has to be repeated such that B is a substring of
原创 Second Minimum Node In a Binary Tree【特定數中第二小的數】
PROBLEM:Given a non-empty special binary tree consisting of nodes with the non-negative value, where each node in this
原创 Sum of Two Integers【不用+ -,算加法】
PROBLEM: Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -. SOLVE: class
原创 Word Pattern【熟練map容器】
PROBLEM:Given a pattern and a string str, find if str follows the same pattern.Here follow means a full match, such tha
原创 Longest Univalue Path【數的最長路徑】
PROBLEM:Given a binary tree, find the length of the longest path where each node in the path has the same value. This p
原创 【C++】Visual定位內存泄漏方法
原博客地址:https://blog.csdn.net/sinat_20265495/article/details/51763084方法一:#ifdef _DEBUG #define New new(_NORMAL_BLOCK,
原创 Power of Three【判斷一個數是否爲3的冪】
PROBLEM:Given an integer, write a function to determine if it is a power of three.Follow up:Could you do it without usi
原创 【C++】關於 std::set_intersection( ) 函數用法
C++ STL 提供求交集的函數 set_intersection( ) 、求集合差的函數 set_difference( ) 和合並兩個集合的函數 set_union( ) 。以 set_intersection( ) 爲例,分析兩端程
原创 Second Highest Salary
PROBLEM:Write a SQL query to get the second highest salary from the Employee table.+----+--------+ | Id | Salary | +---
原创 【彙編】看基礎課程知識點記錄
學習每個指令注意其指令執行原理,嘗試用其他組合指令去替代有利於理解,不要只停留於指令語法!1、每個應用程序都會有自己的獨立的4GB內存空間,彙編中通常說的內存正是這進程對應的內存,而不是物理內存或內存條。2、32位機上的一塊內存的尋址寬度
原创 Java類轉fastjson字符串踩坑筆記
今天,在使用fastjson時,發現Java類中的個別屬性無法轉換爲json字符串的字段,如類Student中的studentName會被過濾掉: public class Student { private String st
原创 gRPC nodejs踩坑
用nodejs寫的gRPC流式服務端,在循環體外部創建了proto消息體,在循環內部set值,並write回客戶端,結果客戶端收到的每個包內容都相同。 看到這結果,也能猜到個大概了,必定和node的異步機制有關,循環結束後才真正調用之前的