Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Thursday, May 30, 2013

libxml2 - process node in the tree.

Because the original code example which libxml2 demo tree1.c how to traverse the tree was using Recursive to process the relationship between the children node and the next node, but I think it is dangerous because we don't know when the stack overflow problem happen and it will happen sometime in the future.

the original code example

static void print_element_names(xmlNode * a_node)
{
 xmlNode *cur_node = NULL;

 for (cur_node = a_node; cur_node; cur_node = cur_node->next) {
   if (cur_node->type == XML_ELEMENT_NODE) {
     printf("node type: Element, name: %s\n", cur_node->name);
   }
   print_element_names(cur_node->children);
 }
}

So I checked the xmlNode structure and find out the parent node is the useful hint to traverse the xml node tree.
  1. Process the current node first.
  2. Check the node if there is any children node and yes, process the children node.
  3. Check the node if there is any next node and yes, process the next node.
  4. If there is no children and next node,
    1. check if there is any parent node and yes, go back to the parent node
    2. When in the parent node, because it should be processed in step 0, check if there is any next node.
    3. If there is a next node, repeat step 3.
    4. If there is no any next node, repeat step 4.
  5. Finally there is no next and parent node, the node should be the XML_DOCUMENT_NODE.
void do_indent(int indent)
{
  for (; indent; --indent) {
    putchar(' ');
    putchar(' ');
  }
}

int getNextNode( xmlNode **pCurr, int *deepth )
{
  xmlNode *curr = *pCurr;

  if ( curr->children!=NULL ) {
    /* Move to the children node.
     */
    curr = curr->children;
    *deepth += 1;
  } else if ( curr->next==NULL && curr->parent) {
    /* Go back to the parent node.
       then go to the next node of the parent node or
       go to the parent node of the parent node if there is no any next node behind.
       if there is no any parent node, it should be the XML_DOCUMENT_NODE.
     */
    curr = curr->parent;
    *deepth -= 1;
    while ( curr->next==NULL && curr->parent!=NULL ) {
      curr = curr->parent;
      *deepth -= 1;
    }
    if ( curr->next!=NULL ) {
      curr = curr->next;
    } else {
      /* It should be XML_DOCUMENT_NODE.
       */
      curr = NULL;
    }
  } else {
    curr = curr->next;
  }

  *pCurr = curr;

}

void process_node(xmlNode *pNode)
{
  xmlNode *curr=NULL;

  int indent=0;

  if ( !pNode ) {
    printf("No Node exist\n");
    return;
  }

  for ( curr=pNode ; curr ; getNextNode(&curr, &indent)) {

    if (curr->type == XML_ELEMENT_NODE) {
      do_indent(indent);
      printf("node type: Element, name: %s", curr->name);

      if ( curr->properties ) {
        process_attr(curr->properties);
      }

      printf("\n");
    } else if ( curr->type==XML_TEXT_NODE ) {
      do_indent(indent);
      printf("node type: Text, name: %s\n", curr->content);
    }
  }
}

Tuesday, May 28, 2013

perl - lwp implement

#!/usr/bin/env perl

use strict;
use LWP;
use File::Basename;
use warnings;
use constant false => 0;
use constant true => 1;

my $host = "192.168.1.1";
my $prot = "https://";
my ($user, $pwd) = ("admin", "1234");
my @pathes = qw(/status_quickview.cgi);
my $ua = LWP::UserAgent->new();

$ua->cookie_jar({ file => "$ENV{HOME}/.cookies.txt", autosave=>1 });
push @{ $ua->requests_redirectable}, 'POST';
$ua->show_progress(true);

if ( is_login()==false ) {  do_login(); }
foreach my $p (@pathes) {
  do_get($p);
}
do_logout();

sub do_post {
  my ($path, $query) = @_;
  print "do_post($path)\n";
  my $url = $prot . $host . $path;
  my $req = HTTP::Request->new(POST => $url);
  $req->content_type('application/x-www-form-urlencoded');
  $req->content($query);
  # print $req->as_string(),"\n";
  my $resp = $ua->request($req);
  if ( $resp->is_error() ) {
    print $resp->status_line(), "\n";
    exit();
  }
  # print $resp->content, "\n"; return $resp;
}

sub do_get {
  my ($fullpath) = @_;
  my ($name, $path, $suffix) = fileparse($fullpath);
  print "do_get($fullpath)\n";
  my $url = $prot . $host . $fullpath;
  my $req = HTTP::Request->new(GET => $url);
  # my $resp = $ua->request($req, $name);
  my $resp = $ua->request($req);
  if ( $resp->is_error() ) {
    print $resp->status_line(), "\n";
    exit();
  }
  # print $resp->content(), "\n";
  return $resp;
}

sub do_login {
  print "do_login()\n";
  my $path = "/login_handler.cgi";
  my $query = sprintf("username=%s&password=%s&Signin=Login", $user, $pwd);
  my $resp = do_post($path, $query);
  if ( 1 and $resp->content=~m/type=(\w+)/ ) {
    # print "type=$1\n";
    $ua->cookie_jar->set_cookie(0, 'type', $1, '/', $host);
    $ua->cookie_jar->save();
  }
}

sub is_login {
  print "is_login()\n";
  my $path = "/status_quickview.cgi";
  my $resp = do_get($path);
  if ( index($resp->content, "login.cgi")!=-1 ) {
    return false;
  } else {
    return true;
  }
}

sub do_logout {
  print "do_logout()\n";
  my $path = "/tools_logout.cgi";
  my $resp = do_post($path, "apply=");
  # print $resp->content, "\n";
}

C - Key/Value Pair Programming

/* conf.txt a=1 b=2 c=3 x=4 y=5 z=6 */ #include <stdio.h> #include <stdlib.h> #include <string.h> struct { char *a; int b; char *c; int x; char *y; int z; } conf; struct config_t { char *key; enum { TYPE_STR, TYPE_INT, } value_type; union { char **str_var; int *int_var; }; } config_table[] = { {"a", TYPE_STR, {.str_var=&conf.a} }, {"b", TYPE_INT, {.int_var=&conf.b}}, {"c", TYPE_STR, {.str_var=&conf.c}}, {"x", TYPE_INT, {.int_var=&conf.x}}, {"y", TYPE_STR, {.str_var=&conf.y}}, {"z", TYPE_INT, {.int_var=&conf.z}}, {NULL, TYPE_STR, {NULL} } }; int main(int argc, char *argv[]) { char buf[80]; FILE *fp; struct config_t *pConfig; char *k, *v, *found; fp=fopen("conf.txt", "r"); if ( !fp ) { perror("fopen failed"); exit(1); } while ( fgets(buf, sizeof(buf), fp)!=NULL ) { found=strchr(buf, '\n'); if ( found ) { *found=0x00; } found = strchr(buf, '='); if ( !found ) { continue; } *found=0x00; k=buf; v=found+1; pConfig = config_table; for (; pConfig->key ; ++pConfig) { if ( strcmp(k, pConfig->key)==0 ) { if ( pConfig->value_type==TYPE_STR ) { *pConfig->str_var = strdup(v); } else if ( pConfig->value_type==TYPE_INT ) { *pConfig->int_var = atoi(v); } } } } printf("a:%s\nb:%d\nc:%s\n", conf.a, conf.b, conf.c); printf("x:%d\ny:%s\nz:%d\n", conf.x, conf.y, conf.z); return 0; }

Sunday, May 26, 2013

Perl experience - misc

In Perl, when to call subroutine with ampersand or parentheses. It's always confusing to me. Finally, I have some conclusion on it.

1. if perl can see the subroutine definition before invocation, ampersand can be omitted.
2. if perl can tell from the syntax that it's a subroutine call, for example sub(), ampersand can be omitted.
3. Otherwise, use &. Or you will get compilation error when using strict.

Correct Example
#!/usr/bin/env perl
use strict;
use warnings;

&sub1;

#
# the parentheses tell it's subroutine.
#
sub1();

sub sub1 { print "sub1\n"; }

#
# the subroutine defintion before invocation.
#
sub1;

Incorrect Example
#!/usr/bin/env perl
use strict;
use warnings;
sub1;
sub sub1 { print "sub1\n"; }

The Perl will complain
Bareword "sub1" not allowed while "strict subs" in use at sub.pl

Simple circular buffer implement

circular implement

#include
#include

#define BUF_SIZE 4

typedef struct {
  enum {
    BUFF_STATUS_EMPTY=0,
    BUFF_STATUS_NOTEMPTY,
    BUFF_STATUS_FULL
  } status;
  int b[BUF_SIZE];
  int i;
  int o;
} buff_t ;

void in(buff_t *buf)
{
  int newp;
  do {
    newp= (buf->i+1)%BUF_SIZE;
    if ( newp == buf->o ) {
      buf->status=BUFF_STATUS_FULL;
      break;
    } else {
      buf->status=BUFF_STATUS_NOTEMPTY;
      buf->i=newp;
      buf->b[buf->i]=buf->i;
    }
  } while (1) ;
}

void out(buff_t *buf)
{
  int newp;
  do {
    newp=(buf->o+1)%BUF_SIZE;
    if ( newp==buf->i ) {
      buf->status = BUFF_STATUS_EMPTY;
      break;
    } else {
      buf->o=newp;
      printf("%d:%d\n", buf->o, buf->b[buf->o]);
      buf->b[newp]=0x00;
    }
  } while (1);
}

int main(int argc, char *argv)
{
  buff_t b1;
  memset(&b1, 0x00, sizeof(b1));
  for (;1;) {
    if ( b1.status != BUFF_STATUS_FULL)
      in(&b1);
    if (b1.status != BUFF_STATUS_EMPTY)
      out(&b1);
  }
}

Stuff interested

List the stuff which I am interested.

Blackberry
C
C++
C#
Erlang
Java
Lua
Object C
Perl
Python
Ruby
Ubuntu

Tuesday, February 19, 2013

boot from PXE


  1. pxe client 選擇 pxe 開機, 透過 dhcp 取得本身 IP 與 某個 file, 這個 file 也就是 pxe server 希望 pxe client 拿到 IP 之後, 再向 pxe server 透過 tftp 下載這個 file, 一般為 pxelinux.0
  2. pxe client 拿到 pxelinux.0 之後, 會嘗試下載本身 ether mac address 相關的檔案, 直到 pxelinux.cfg/default
  3. pxe server 可以透過 pxelinux.cfg/default, 提供開機選單訊息
  4. 此次實驗, pxe server 希望 pxe client 透過 nfs 掛載 bt5r3


Take bt5r3 as the pxe server
1. apt-get install dhcp3-server
   /etc/dhcp3/dhcpd.conf
   subnet 192.168.0.0 netmask 255.255.255.0 {
        range 192.168.0.100 192.168.0.200;
        filename "pxelinux.0";
   }  
   設定本身 ip 為 192.168.0.100
 
   /etc/init.d/dhcp3-sever restart

2. apt-get install tftpd-hpa
3. apt-get install nfs-kernel-server
   /etc/export
   /tftpboot *(rw,sync,no_subtree_check,no_root_squash,insecure)
   /tftpboot/bt5r3 *(sync,insecure,no_root_squash,ro,no_subtree_check)

   portmap
   /etc/init.d/nfs-kernel-server restart
4. apt-get install syslinux
   取得 pxelinux.0 執行檔

 mount -t iso9660 -o loop bt5r3.iso /mnt
 mkdir -p /tftpboot/bt5r3
 cp -r /mnt/* /tftpboot/bt5r3

/tftpboot/pxelinux.0
 cp /usr/lib/syslinux/pxelinux.0 /tftpboot/

/tftpboot/isolinux.msg
 type bt5r3 to boot Backtrack 5 R3.

/tftpboot/pxelinux.cfg/default
 TIMEOUT 100
 DEFAULT bt5r3
 PROMPT 1
 DISPLAY /isolinux.msg
 LABEL bt4
   KERNEL bt5r3/casper/vmlinuz
   APPEND initrd=bt5r3/casper/initrd.gz BOOT=casper boot=casper nopersistent rw quiet vga=0x317 netboot=nfs nfsroot=192.168.0.100:/tftpboot/bt5r3

參考資料

  1. http://www.backtrack-linux.org/forums/showthread.php?t=1470
  2. https://help.ubuntu.com/community/PXEInstallServer


Sunday, December 16, 2012

perl experience - ssh implement

my @key = ("/root/.ssh/id_rsa");
my $ssh = Net::SSH::Perl->new($host,
        identity_files=>\@key,
#        debug => 1
    );
$ssh->login('root');

Thursday, June 14, 2012

mount in ubuntu

在 ubuntu 上, mount fat32 與 ntfs 的磁碟

1) 首先, 先看目前已經找到的磁碟區, 透過
>fdisk -l

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc05fc05f

Device Boot Start End Blocks Id System
/dev/sda1 * 1 2550 20482843+ 7 HPFS/NTFS
/dev/sda2 2551 9728 57657285 f W95 Ext'd (LBA)
/dev/sda5 2551 6374 30716248+ b W95 FAT32
/dev/sda6 6375 9728 26940973+ b W95 FAT32

Disk /dev/sdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x2527a2c7

Device Boot Start End Blocks Id System
/dev/sdb1 1 3916 31455238+ 7 HPFS/NTFS
/dev/sdb2 3917 9729 46692922+ 7 HPFS/NTFS

2) mount 磁碟區

mkdir /tmp/sda1 /tmp/sda5 /tmp/sda6 /tmp/sdb1 /tmp/sdb2
mount -t ntfs-3g /dev/sda1 /tmp/sda1
mount -t vfat -o iocharset=utf8 /dev/sda5 /tmp/sda5
mount -t vfat -o iocharset=utf8 /dev/sda6 /tmp/sda6
mount -t ntfs-3g /dev/sdb1 /tmp/sdb1
mount -t ntfs-3g /dev/sdb2 /tmp/sdb2

其中,
mount as ntfs, 在 ubuntu 或 samba, 閱讀中文沒有問題
mount as vfat, 必須指定 iocharset=utf8, 在 ubuntu 或 samba, 才能閱讀中文

Monday, February 27, 2012

Wireless Packet Howto

介紹Windows環境下, 如何架設環境
1) Wireless Adapter, 如 Edimax EW-7711UAn
2) Omnipeek driver, 以 Ralink Wireless Adapter 為例, 可以到 http://www.ralinktech.com/en/04_support/support.php?sn=500 (提供 1.4.0.16)

或 http://www.wildpackets.com/support/omni/omnipeek_basic/wireless (提供 1.4.0.18 for Windows 32/64 )

3) 安裝 driver




4) 執行  Omnipeek, 就可以開始抓取空氣中Wireless Packet


DD-WRT

手上有台機器 RT3050 / 4M Flash / 32M RAM, 改成 DD-WRT
1) 先在 http://www.dd-wrt.com/wiki/index.php/Supported_Devices 找相同規格的型號(Model)與製造商(Manufacturer)

2) 再到 http://www.dd-wrt.com/site/support/router-database 打入該製造商(Manufacturer), 然後點選該型號(Model)

3) 之後開始下載 Firmware

4) 接下來, 接 RS-232 Console, 進 Uboot bootloader, 進行 tftp firmware upgrade

一開始找到D-Link DIR-300這個型號, 不過燒錄了相對應的Firmware, 結果無法開機。接著找到 Asus RT-N10+, 有2個firmware, factory-to-ddwrt.trx 與 asus-rt-n10plus-ddwrt-webflash.bin 

在  Uboot 下, 用 tftp 燒錄 factory-to-ddwrt.trx, 完成後, 可以開機
之後進 Webui, 可以用 asus-rt-n10plus-ddwrt-webflash.bin 做 firmware upgrade



Thursday, March 26, 2009

perl experience - module installation

perl安裝新的 module 步驟
>perl -MCPAN -e shell
>install Bundle::CPAN
>reload cpan
或其他 module
經常會遇到 Permission denied 的問題

此時,可以嘗試
>o conf make_install_make_command 'sudo make'
每次 make 時, 會先 su , 再執行 make
>o conf commit
儲存上述設定

出現這種錯誤
500 Can't connect to secure.ogone.com:443 (Invalid argument)
or
501 Protocol scheme 'https' is not supported (Crypt::SSLeay or IO::Socket::SSL not installed)
>install Crypt::SSLeay

>apt-get install perl-doc

Symptom
when executing widget, the error message "no event type or button # or keysym..." shown out.
My Tk version seemed Tk-804.028 installed by CPAN.

Solution
Manually download and install Tk-804.028_501
http://search.cpan.org/CPAN/authors/id/S/SR/SREZIC/Tk-804.028_501.tar.gz

install occurred "permission denied"
>o conf mbuild_install_build_command 'sudo ./Build'
>o conf commit

Thursday, June 05, 2008

ubuntu as NAT

剛好遇到兩張網卡, 所以特別記錄下來

最近遇到2個NIC的問題, 手邊有第2張網卡, 今天就把它setup好了
開完機後, linux抓到2張網卡, eth0, eth1
然後我把eth1當做lan port, eth0當做wan port
另外接一台電腦client, 到lan port
設定步驟,
1) echo 1 > /proc/sys/net/ipv4/ip_forward
2) iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
到這裡, 假如eth1設定static ip, 而且client也設static ip, 也在同一網段
基本上, client應該可以透過linux pc上網了

3) edit /etc/udhcpd.conf
4) 啟動 udhcpd
這樣子, client應該可以透過dhcp拿到linux pc所給的ip, 並且可以上網

5) apt-get install bind9
6) edit /etc/bind/named.conf.local
7) edit /etc/bind/named.conf.options
這樣子, client應該可以把linux pc當做dns server source, 並且可以上網
---------------------------------------------------------------------------------------------------------------------
如果還是不能從LAN上網, 請再檢查是否有打開Firewall

Tuesday, November 27, 2007

troubleshooting

一些troubleshooting的記錄

M$N不能上?
帳號密碼已經確定沒錯, 只差還沒把M$N移掉 重新安裝
檢查一下IE的proxy是否有設定
因為M$N會參考這個設定連上網路
========================================================
while (-1) ; // <-- it's infinite loop
========================================================
char str[]="string";
strlen(str); // 6
sizeof(str); // 7
========================================================
signed char sc8=0x80;
sc >>= 1; // 0xC0
unsigned char
uc8=0x80;
uc >>= 1; // 0x40
========================================================
global 變數重覆定義問題 (未給初始值)
01.c
------------
#include <stdio.h>

char buf[1024];

int main(){}

02.c
-----------
#include <stdio.h>

char buf[1024];

>gcc -o output 01.c 02.c
這時候可以編譯成功, 也可以執行
但會有個風險, 就是2份file, 各自以為這個global變數僅屬於自己擁有而已
因此, 當其中一個改變global變數的內容, 也會反應到另一個上面

解決辦法
1) 加static在global變數之前
2) gcc -fno-common
========================================================
fgets的問題

避免用fgets抓binary的資料, 因為這個函式會預設抓出一行字串出來, 也就是遇到"換行字元", "檔案結尾", 或"達到給定字數"之後, 就會跳出, 而binary檔, 可能會含0x0A, 這會使得程式增加更多不確定性.
建議用fread()或read()代替
========================================================
sol1,
while ( curr=head; curr; curr=curr->next) {
del(curr);
}
sol2,
while ( curr=head; curr; curr=next ) {
next=curr->next;
del(curr);
}
sol1的問題在於下一個node會在del()時就被修改, 導致要取下一個node,造成問題
sol2可以解決這個問題

========================================================

int opt;
while ( (opt=getopt(argc, argv, ""))>0 ) {
...
}

opt must be decleared as integer.
When opt declared as char, the loop will not terminate.

Wednesday, October 24, 2007

infinite loop

生活本身就是個無窮迴圈

早上起床之後
刷牙洗臉 噴香水 準備出門
繞著同樣的路
吃著一樣的早餐
瀏覽習慣的網站
跟一樣的同事工作
中午吃同樣的午餐
時間到了 又開始睡午覺
起來之後 看一下相同的網頁
開始做了點事 專心一下子之後
起身走走 串串門子
準備下班
又走相同的路回家
晚餐永遠不知道吃什麼
洗澡完後 睡覺前 看了點電視 上網一下子

明天繼續一樣的日子

Sunday, October 21, 2007

強烈的信念

上星期只為解了一個bug

嗯 最後那個問題解了

這個bug很特別
平常這個功能是不會有問題的
不過系統loading重的時候 就會有問題
所以打從一開始 我就沒有打算解它
因為我一直認為是系統內部的問題

要不是我主管一直窮追猛打
我可能也沒有機會知道真正的原因
這是一個不該出錯的問題
只能在很critical的時候 才會發現

我覺得我主管對邏輯與理性的信念 十分執著
不過也就因為他的執著 所以最後問題解了

在事情尚未明朗之前 唯有尋著真理前進
才能有撥雲見日的一天

Friday, October 05, 2007

我們需要不經意的bug

一個小程式, 搞了一個晚上跟白天

這次將輸出存成一個檔案 順便當做debug用
程式慢慢地一步一步邊寫邊測試
快到結尾時 發現怎樣也不像是理想的結果

回頭來, 修正一些可能有問題的點之後
結果一樣不理想

問題總是可以解決的 只是要先知道問題在哪

最後 原來存檔時 永遠都是加在檔案的後面
所以不管怎麼檢查檔案差異性 會發現永遠都有問題存在

不過 重點不在這裡
如果今天沒有這個不經意的錯
我還會回頭去"重新檢視"程式碼嗎?
並且發現這些有問題的點嗎?

有時候 要停下腳步 重新檢視以前
放慢腳步 比起 一步登天 還要踏實 而且比較不會出錯
慢才會穩 穩才會快

Tuesday, August 07, 2007

態度

對project的態度, 對bug的態度

對project的態度
我喜歡 我希望可以愈早做完愈好
而且不是指盡力就好

這麼說 看不出個內涵
我是指 prototype 可以愈早完成愈好
1st, 可以儘早確定這個project是可行的
2nd, 有剩餘的時間 繼續進化
(schedule前70%是完成所有功能 後面30%是用來處理critical的問題)
3rd, 儘早看出實際面的應用及反應, 使用經驗等, 持續進化
4th, 更重要的 可以早點放假

對bug的態度
很難過 竟然會有問題出現
特別是自己測試之後 認為不會再有問題
不過 經過這麼多次的經驗
排除掉人為操作的疏忽外
bug絕對不是憑空出現的
一定是某個地方出錯所導致
這時候更需要耐心與毅力的支持...

沒有解不了的bug
只有不想去解的人

想想CSI影集 是如何重建還原現場的
相較下來 這些bug真是渺小

加判斷式檢查的看法
有些判斷式可能極小機率會有用
但又不能沒有
這時候有2點可以考慮
1) 要看加這個判斷式對整體的影響,比如10行比100或500行,
也就代表說幾個micro second內多跑了幾個nano second.
2) 極小的機率 需要這個判斷 那表示極大部分的情況已經在這之前就被過濾掉了
所以也只有極小的特殊條件才會全部的判斷跑過一次!

Monday, August 06, 2007

"else" or not after if ?

到底 if 之後要不要接 else 呢?

問題總是沒有永遠對的答案
if statement 後面可以沒有 else statement
但有 else statement 總是不會出錯

有多少的bugs, 是掛在這種邏輯問題上面

大部分的人會先注意如何 function work
等到 function work 之後, 也接近準備 release 階段
很容易沒有考慮到 exception 的發生

這對應到 code 的本身
也就是
只注意到 if 成立之後, 而忽略 if 失敗的另一面

為了避免遇到這樣的問題
最好是根據code的大小來安排code配置
比如先寫比較短的程式碼 再寫比較長的程式碼

if (1) {
/* short successful statement */
} else {
/*
...
long failure statement
...
*/
}

or on the contrary,

if (!0) {
/* short failure statement */
} else {
/*
...
long successful statement
...
*/
}

Friday, July 20, 2007

冰山一角的bug

有些測試部發現的bug, 有時候只是冰山一角的bug
通常這些問題可能來自於相同的原因
簡單點比如, 資料庫讀取與寫入的欄位搞混

像這種問題很容易造成
發現1個bug, 但還有9個bug沒發現
但以工程師而言
1st, 要避免這樣的錯誤
2nd, 既然錯誤已經造成了, 試著尋找是否類似的問題, 通常"Find"是很好用的

FYI