快速設定網址 http://mymeshdevice.home
登入帳密 ( 帳號 / 密碼 )
user / user
cht / 23tc + (MAC 後 4 碼)
密碼共 8 碼,英文小寫
參考資訊
adb connect 192.168.8.32:7272
adb install d:\ticwatch\c.apk
| TRIM SUPPORTED | DRAT SUPPORTED | RZAT SUPPORTED | Description |
| 0 | Should be 0 | Should be 0 | 不支援Trim功能。 |
| 1 | 0 | Should be 0 | Device不保證每次Read Trimmed LBA會回一樣的數據。 |
| 1 | 1 | 0 | Device保證每次Read Trimmed LBA的到的結果都是固定的,但FW可以選擇要寫什麼值進去。(換句話說,只要你能夠保證資料不變,讓它維持在原先的值也是可以的。) |
| 1 | 1 | 1 | Device保證每次Read Trimmed LBA的結果都是固定且為零。 |
1. Add dump.sh #!/bin/sh env >> /Customer/helper.log echo "CMD:" $@ >> /Customer/helper.log echo "---------- end ----------" >> /Customer/helper.log 2. echo /Customer/dump.sh > /proc/sys/kernel/hotplug 3. 之後重新插拔device 去看 /Customer/helper.log 有沒有印出 變數 cat /Customer/helper.log
caption always "%{=u .G} %-w%<%{=ub .y}%n %t%{=u .G}%+w "
#caption always "%{= wk} %{= KY} [%n]%t %{-} %="
#caption always "%{= wk} %{= KY} [%n]%t @ %H %{-} %= %{= KR} %l %{-} | %{= KG} %Y-%m-%d %{-} "
#caption always "%{=B Bb} %{=B WK}%-w%<%{=B Yk} %n %t /%{=B WK}%+w%-02=%{=B B"
#hardstatus alwayslastline "%{=b bW} {%l}%018= %{=B WK} $HOST %-027=%{YK} %Y-%m"
bindkey ^[z prev
bindkey ^[x next
bindkey ^[, prev
bindkey ^[. next
defscrollback 10000
altscreen
autodetach on
vbell off
termcapinfo xterm|xterms|xs ti@:te=\E[2J
# ------------------------------------------------------------------------------ # STARTUP SCREENS # ------------------------------------------------------------------------------ screen bash screen emacs -nw chdir /home/me/src screen -t code
Re-create the screen windows Populate them with the session history you once had before the reboot Log you into your previously logged in host via ssh Place you into the same working directory you were once in. Most of this data is derived from the prompt. Running any previously ran commands would be extremely dangerous, so this is as far as I can get you.
export PS1='\[\033[01;35m\][\A]\[\033[00;32m\][\h \[\033[32m\]\W]\[\033[m\]\$ ' //PS:原先使用這種方式會有游標無法對齊的情況,將replace "\e[" to "\[\033[" 即可解決。 export PS1='\e[\[0;32m[\A][\h \W]$ \e[m'
uboot源代碼的tools/目錄下有mkimage工具,這個工具可以用來製作不壓縮或者壓縮的多種可啟動映像檔案。 mkimage在製作映像檔案的時候,是在原來的可執行映像檔案的前面加上一個0x40位元組的頭,記錄參數所指定的訊息,這樣uboot才能識別這個映像是針對哪個CPU體系架構的,哪個OS的,哪種類型,加載內存中的哪個位置,入口點在內存的那個位置以及映像名是什麼 root@Glym:/tftpboot# ./mkimage Usage: ./mkimage -l image -l ==> list image header information ./mkimage -A arch -O os -T type -C comp -a addr -e ep -n name -d data_file[:data_file...] image -A ==> set architecture to 'arch' -O ==> set operating system to 'os' -T ==> set image type to 'type' -C ==> set compression type 'comp' -a ==> set load address to 'addr' (hex) -e ==> set entry point to 'ep' (hex) -n ==> set image name to 'name' -d ==> use image data from 'datafile' -x ==> set XIP (execute in place) 參數說明︰ -A 指定CPU的體系架構︰ 取值 表示的體系架構 alpha Alpha arm A RM x86 Intel x86 ia64 IA64 mips MIPS mips64 MIPS 64 Bit ppc PowerPC s390 IBM S390 sh SuperH sparc SPARC sparc64 SPARC 64 Bit m68k MC68000 -O 指定作業系統類型,可以取以下值︰ openbsd、netbsd、freebsd、4_4bsd、linux、svr4、esix、solaris、irix、sco、dell、ncr、lynxos、vxworks、psos、qnx、u-boot、rtems、artos -T 指定映像類型,可以取以下值︰ standalone、kernel、ramdisk、multi、firmware、script、filesystem -C 指定映像壓縮模式,可以取以下值︰ none 不壓縮 gzip 用gzip的壓縮模式 bzip2 用bzip2的壓縮模式 -a 指定映像在內存中的加載位址,映像下載到內存中時,要按照用mkimage製作映像時,這個參數所指定的位址值來下載 -e 指定映像營運的入口點位址,這個位址就是-a參數指定的值加上0x40(因為前面有個mkimage添加的0x40個位元組的頭) -n 指定映像名 -d 指定製作映像的源檔案Reference from http://www.wretch.cc/blog/poemsoul/15441093
#include#include using namespace std; class A { private: int y; public: A(){ y=0; } int f1(int x) const // 此const代表此function不可以修改Data Member { x++; // y++; // Error! y為Data Member,因此不可以修改 return y; } const int f2(int x) // 回傳值為const { x++; y++; return y; } int f3(int const x) // 參數為const { // x++; // Error! x為const,不可以修改 y++; return y; } void f4(int const *x) // x is variable pointer to a constant integer,也可以寫成f4(const int *x) { // (*x)++; // Error! pointer x所指向的實體為const,因此不可以修改其值 *x++; // 此行的意思是*(x++),先修改pointer x的值,在指向實體 } void f5(int const &x) // x is variable reference to a constant integer { // x++; // Error! x就是一個const } void f6(int *const x) // x constant pointer to a variable integer { (*x)++; // *x++; // Error! Constant pointer x 不可以指向其他實體 } const char * f7() // 回傳一個variable pointer to a constant char { return "ABC"; } void f8(const int * const x) // x is constant pointer to a const integer { // (*x)++; // Error! x所指向的實體為const,因此不可以修改其值 // *x++; // Error! Constant pointer x 不可以指向其他實體 } }; int main(){ A a; int x=3; a.f1(x); a.f2(x); a.f3(x); // int x 會自動轉成const int x傳入 a.f4(&x) ; a.f5(x) ; const char *s = a.f7(); // 必須使用一個const來接const // s[0]='0'; // Error! 無法對const 變數進行改變動作 return 0; }
cpplint.py –output=vs7 helloworld.cpp
struct sockaddr {
unsigned short sa_family; /* address family, AF_xxx */
char sa_data[14]; /* 14 bytes of protocol address */
};
struct sockaddr_in {
short int sin_family; /* Address family AF_INET */
unsigned short int sin_port; /* Port number */
struct in_addr sin_addr; /* Internet address */
unsigned char sin_zero[8]; /* Same size as struct sockaddr */
};
struct in_addr {
unsigned long s_addr; /* Internet address */
};
struct sockaddr_in6 {
sa_family_t sin6_family; /* AF_INET6 */
in_port_t sin6_port; /* transport layer port # */
uint32_t sin6_flowinfo; /* IPv6 traffic class & flow info */
struct in6_addr sin6_addr; /* IPv6 address */
uint32_t sin6_scope_id; /* set of interfaces for a scope */
};
struct in6_addr {
uint8_t s6_addr[16]; /* IPv6 address */
};
struct addrinfo{
int ai_flags; /* AI_PASSIVE,AI_CANONNAME,AI_NUMERICHOST */
int ai_family; /* AF_INET,AF_INET6 */
int ai_socktype; /* SOCK_STREAM,SOCK_DGRAM */
int ai_protocol; /* IPPROTO_IP, IPPROTO_IPV4, IPPROTO_IPV6 */
size_t ai_addrlen; /* Length */
char *ai_cannoname; /* */
struct sockaddr *ai_addr; /* struct sockaddr */
struct addrinfo *ai_next; /* pNext */
};
int array[100];
for (int i = 0; i < 100; i++)
{
int start, end, mid;
start = 0;
end = i - 1;
mid = 0;
int temp = array[i];
while (start <= end)
{
mid = (start + end) / 2;
if (array[mid] > temp)//目標元素在陣列左邊
{
end = mid - 1;
}
else
{
start = mid + 1;
}
}
for (int j = i - 1; j > end; j--)//找到插入的位置,將其後的元素後移一位
{
array[j + 1] = array[j];
}
array[end + 1] = temp;
}