https://www.bwgyhw.com/bandwagonhost-build-page-domain-choose/
注意还要 unlock domain name
For all the girls I loved
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
#include <iostream> #include <mysql/mysql.h> #include <stdio.h> using namespace std; #define SERVER "localhost" #define USER "root" #define PASSWORD "Piercing77#" #define DATABASE "shfuture" int main() { MYSQL *connect; connect=mysql_init(NULL); if (!connect) { cout<<"MySQL Initialization failed"; return 1; } connect=mysql_real_connect(connect, HOST, USER, PASSWORD , DATABASE ,0,NULL,0); if (connect) { cout<<"connection Succeeded\n"; } else { cout<<"connection failed\n"; } |
1 |
g++ -g -o connAndQuery connAndQuery.c $(mysql_config --libs) |
1 |
gdb ./connAndQuery |
break line number : 在某行下断点 ,centos 显示行号 ctrl + c
run 执行
next 执行一步
c : 执行到完
break
1 |
gdb --args executablename arg1 arg2 arg3 |
http://www.math.bas.bg/~nkirov/2005/netb151/debugging-with-gdb.html
http://kirste.userpage.fu-berlin.de/chemnet/use/info/gdb/gdb_6.html
root Piercing77#
liuyang liuyang.2345
jdk cd /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.141-1.b16.el7_3.x86_64
tshark -i wlp2s0 -w out1.pcap
蓝色部分 是当前正在使用的 internet interface , 可以由这样决定
/sbin/ifconfig -a , 从图中可以看到
不能表示成y=ax+b ,(a,b为常数),即非线性关系,非线性关系可以是二次,三次等函数关系,也可能是没有关系。
2018.12.18 办签证 ,预计元旦后取
亚航可以普吉到, 曼谷回吗
马来西亚转机要签证吗
需要的软件 : Google翻译 ,map,打车软件 (Grab,用泰国手机号注册)
要买: 手机卡(happy卡) 3张 , 70.6
1 泰铢= 2毛钱
大象 , 泰拳 , 岛,spa , 射击
phi phi island : 皮皮岛
patong beach : 巴东海滩
phuket town night market : 普吉镇夜市 周六日
ferry schedule : 渡轮船期
Rassada pier : 拉沙达码头
: 查龙码头
去普吉需要注意的: 带笔,飞机上写出入境卡 ,出境卡放护照里,回来还要用
熊猫巴士巴东站在 best western 酒店停车场 , 终点是 普吉镇 central phuket
2019年1月去时, 汇率是 4.57 ,不要在机场换钱
tutu车巴东境内200,去卡伦400
let ‘s relax 不需预约
learn c++ from game development : https://books.google.com/books?id=XAfXAwAAQBAJ&pg=PA214&lpg=PA214&dq=SendEvent+to+c%2B%2B+class&source=bl&ots=NpViEUChC3&sig=qtt8g6uK0RJrwDKEtFoX5I8hDdY&hl=en&sa=X&ved=2ahUKEwjf97fm2ojfAhWQLXwKHVxBCL0Q6AEwBXoECAkQAQ#v=onepage&q=SendEvent%20to%20c%2B%2B%20class&f=false
google key word : c++ SendEvent to class
reference article :
http://www.cplusplus.com/forum/general/70012/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
/* Context of the CLI interface */ typedef struct _TBX_CLI_TOOLS_CLI_CONTEXT { TBX_CLI_TOOLS_INIT_PARAMS Params; /* Display buffer and log file */ TBX_BOOL fPrintAllowed; TBX_BOOL fFirstRunDone; PTBX_CLI_TOOLS_DISPLAY_BUFFER pDisplayBuf; PTBX_CLI_TOOLS_DISPLAY_BUFFER pPrevDisplayBuf; PTBX_UINT8 pafEscapeChars; #ifdef TBX_CLI_TOOLS_USE_LOG_FILE FILE* pLogFile; TBX_CHAR szCurrentLogFileTime[ 64 ]; TBX_CHAR szCurrentLogFilePath[ 512 ]; TBX_UINT32 un32CurrentLogFileSize; TBX_UINT32 un32CurrentLogFileSegment; #endif /* Buffer to gather user input */ TBX_CLI_TOOLS_CMD_PRIVATE CmdInput; /* Timestamps and other flags used for display */ TBX_UINT32 un32LastRefreshTimestamp; TBX_BOOL fRefreshRequired; TBX_BOOL fKeyPressedRefreshRequired; TBX_BOOL fClsRequired; TBX_BOOL fImmediateValidation; TBX_BOOL fNoWrap; TBX_UINT32 un32ScrollPositionMax; /* Current maximum scroll position */ TBX_UINT32 un32ScrollPosition; TBX_UINT32 un32ScrollPositionHor; /* Horizontal scroll position */ TBX_UINT32 un32ScrollSpeed; TBX_UINT32 un32ScrollSpeedTimestamp; TBX_UINT32 un32ScrollSpeedAccelerateTimestamp; TBX_UINT32 un32NbLogLinesDisplayed; TBX_UINT32 un32SelectedLineToBlink; TBX_UINT32 un32CheckpointCounter; TBX_UINT32 un32RefreshCounter; TBX_UINT32 un32BlinkCounter; TBX_UINT32 un32BlinkTimestamp; /* Circular buffer log */ TBX_BOOL fCircularLogFull; TBX_UINT32 un32CircularLogNextLineIndex; TBX_UINT32 un32CircularLogCurrentNbLines; TBX_UINT32 un32LastLogDisplayNbLines; PTBX_CLI_TOOLS_DISPLAY_LINE_PRIVATE paCircularLog; PTBX_UINT8 pafCircularLogCheckpoints; PTBX_CHAR pszTmpLine; #ifdef TBX_CLI_TOOLS_USE_LOG_FILE /* Disk write buffer */ PTBX_CHAR pszDiskWriteBuffer; TBX_UINT32 un32DiskWriteBufferCurLen; TBX_UINT32 un32DiskWriteBufferTimestamp; #endif /* Fifo of 'forced' keys */ TBX_INT aForcedKeysFifo[ TBX_CLI_TOOLS_MAX_FORCED_KEYS ]; TBX_UINT32 un32ForcedKeysFifoPopIndex; TBX_UINT32 un32ForcedKeysFifoCount; /* Status of the usage of hostlib */ TBX_BOOL fUseHostlib; TBX_BOOL fHostlibInUse; /* Hostlib message to send remote screen updates */ TBX_BOOL fGenerateRemoteScreen; TBX_MSG_HANDLE hEvtRemoteScreen; PTBX_CLI_TOOLS_EVT_NOTIF_CLI_TOOLS_SCREEN_UPDATE pEvtRemoteScreen; TBX_UINT32 un32EvtRemoteScreenMaxStrlen; TBX_UINT32 un32RemoteCurrentWidth; TBX_UINT32 un32RemoteCurrentHeight; TBX_UINT32 un32RemoteClsTimestamp; TBX_UINT32 un32RemotePollTimestamp; TBX_UINT32 un32LastRemoteRefreshSendTimestamp; TBX_HOST_INFO RemoteControllingHostInfo; TBX_BOOL fActuallyRemoteControlled; TBX_BOOL fRemoteRefreshRequested; /* Used when remote controlling other host */ TBX_FILTER_HANDLE hRemoteScreenFilter; /* Array of detected remote hosts */ TBX_CLI_TOOLS_REMOTE_HOST_CTX aRemoteScreenHosts[ TBX_CLI_TOOLS_MAX_REMOTE_SCREEN_HOSTS ]; TBX_UINT32 un32RemoteScreenCurrentIdx; TBX_UINT32 un32LastEscapePressedTimestamp; TBX_CHAR szRemoteScreenHostName [TBX_API_NAME_MAX_LEN]; TBX_CHAR szRemoteScreenApplicationName [TBX_API_NAME_MAX_LEN]; /* Threads and semaphores */ TBX_CLI_TOOLS_THREAD_CONTEXT CliThreadContext; TBX_MUTEX Mutex; TBX_UINT32 un32StartTimestamp; TBX_UINT32 un32CurrentTimestamp; } TBX_CLI_TOOLS_CLI_CONTEXT, *PTBX_CLI_TOOLS_CLI_CONTEXT;this |
this struct include another import struct TBX_CLI_TOOLS_INIT_PARAMS
other modules first include “tbx_cli.h” and “tbx_cli_tools.h” , then initial TBX_CLI_TOOLS_INIT_PARAMS , then call TbxCliToolsInit to init cli tools
One example is tb_watchdog.c
create a command lin update thread : TbxCliToolsCliThread in file “tbx_cli_tools.c”
in this thread , switch buffer like this code show
1 2 3 4 5 6 7 |
/* Swap the current and previous display buffers */ { PTBX_CLI_TOOLS_DISPLAY_BUFFER pbySwapTmp = pCliToolsCtx->pDisplayBuf; pCliToolsCtx->pDisplayBuf = pCliToolsCtx->pPrevDisplayBuf; pCliToolsCtx->pPrevDisplayBuf = pbySwapTmp; pDisplayBuffer = pCliToolsCtx->pDisplayBuf; } |
the thread is created in function “TbxCliToolsStart” in file “tbx_cli_tools.c”
in this thread , call “TBXCliToolsLine_fprintf” ——-> “TBXCli_fprintf” to actually print on the screen
tbx_cli.c : 全是函数, 比如清屏,cursor移动到最开始的位置等
tbx_cli_tools.c :
最重要的函数是 : TbxCliToolsCliThread , 这是一个线程函数, 不停的在双缓存之间切换
TBXCliHome : 设置 cursor位置回点 (0,0)
TbxCliToolsCliUserPromptDisplay
已解决
CmdInput
CmdType