C++ Basic
感觉多少有点复杂
Def
A dangling pointer is a pointer that points to a location whose memory is deallocated.
dynamic objects are managed by heap, and stack vice versa. Temporary objects are managed by stack. And rvalue reference is an alias of a temporary object/value.
const int* is different from int* const. int* const相当于我们让一个const变量成为指针,比如int* const ptr = & x,那么实际上ptr作为一个const变量是不可变的,但是他指向的x的值是可变的,即* x = 5编译是可以通过的。相较之下,const int* ptr = & x则是ptr是changeable,x是unchangeable。
我告诉你一个小的技巧,就是c++k ...
Paddle Learning Notebook
Normalized Training ModelStage 1: Load DataDivide the stage into four sub-stage:
load data file
separate data into groups according to the number of features
divide the dataset into training & test dataset
normalize data to the range of [0, 1]
1.1.1 load data file
12345678import paddleimport numpy as npimport jsondef load_data (): # load data file datafile = '.../.../.../' data = np.fromfile (datafile, sep = ' ')
np.fromfile is used for constructing data from ...
It's Time To Learn PYTHON! (record of python challenges)
It’s Time To Learn PYTHON! (record of python challenges)Sometimes refer to the solutions to all the passes: HackingNote Python Challenges Solutions
The First PassThe gibberish displayed on the screen is a passcode which is coded with Caeser cipeher, one of the simplest encryption techniques. From the Wikipedia, we can know that
It is a type of substitution cipher in which each letter in the plaintext is replaced by a letter some fixed number of positions down the alphabet. For example, with a l ...