2016年9月28日 星期三

Expressing Agreement

Expressing strong agreement 這些詞語可用來表示您完全同意他人的話,表達出強烈的贊同之意。

  • I completely agree.
  • Absolutely.
  • Definitely.
A:I thought the conference we attended on emerging technologies was extremely informative.
B: I completely agree.
A: The networking meeting was a great way to meet potential clients.
B: Absolutely.

Expressing partial agreement 這些詞語表示您同意某人部份的意見,而非完全同意。表達出部份贊同之意。

  • I would tend to agree with you.
  • I agree in principle. 
  • I agree in general.


A: I think the increase in interest rates is a good thing for the economy.
B: I agree in general, but there are some negative points as well.
部份同意詞語的後面通常會接相反的意見,例如:"I agree in general, but..."

Expressing simple agreement 某些詞語只顯示贊同之意,不強調任何事情。

  • I agree with you on that.
  • You're right.
  • I have the same opinion.


Traffic is getting worse now that so many companies are opening office in this part of town. 
You're right.

2016年9月27日 星期二

Past Perfect

過去完成式的句型為 "had" + 過去分詞。它用來表示某項動作是在過去另一項動作之前完成的。第一個事件 (had left for New York) 用過去完成式。第二個事件 (arrived at the airport) 則用簡單過去式。




如果句中有 "before" 或 "after" ,通常就不需要使用過去完成式,因為時間的關係十分明顯。所以可以改用簡單過去式,像第二句一樣。兩個句子的意義相同。
在這些句子中,過去完成式用來表達未實現的願望。在第一個句子中,說話者希望訂期相會,但是未能如願。在第二句中,說話者未能接獲 Mike 將會晚到的通知,但是希望之前若是能接到就好了。
I had hoped to make an appointment with him before he left.
I wish you had told me Mike was going to be late.
否定句的句型為將 "not" 置於助動詞 "had" 之後。
問句的句型為將助動詞 "had" 置於主詞之前。

THE PAST PERFECT TENSE

Use the past perfect to show that an action was completed before another action in the past. Use the past perfect to describe the first action and use the simple past to describe the second action.
Positive Statement
+ had + past participle
She had already left for New York when I arrived at the airport.
Negative Statement
+ had + not + past participle
He hadn't called me in a few days, so I called him.
Question
Had + S + past participle?
Had you met him before this evening?
She had already left for New York when I arrived at the airport.
(First she left for New York, and then I arrived at the airport.)
In sentences with before or after, the past perfect is optional because the time relationships are already clear.
Mike had left for London before I arrived at his house.
Mike left for London before I arrived at his house.
The past perfect can also be used to express an unrealized hope or wish.
I had hoped to make an appointment with him before he left.
I wish you had told me Mike was going to be late.
補充: https://www.youtube.com/watch?v=7sXGfQ6R6nc















片語

rolling in money(expression) = 花大筆錢
[informal]
used to say that someone is very rich

片語

表達禮貌:
By your leave : 失禮了
If you please : 勞駕您
Don't bother : 別費心


rolling in money(expression) = 花大筆錢
[informal]
used to say that someone is very rich

2016年9月6日 星期二

Analysis pass rate for CCSN consistency

Code:
$LC_LOG = $ARGV[0];
$index_X = $ARGV[1];
$index_Y = $ARGV[2];
open(h2,"+>temp.log");

my @all_fail = 0;

##### Get X index values #####
open(XFile,"<$index_X");
while(<XFile>){
chop $_;
@X_ary=split(",",$_);
}
foreach $X_value (@X_ary)
{
print "X array vlues:$X_value\n";
}


##### Get Y index values #####
open(YFile,"<$index_Y");
$i=0;
while(<YFile>){
chop $_;
@Y_ary=split(",",$_);
$Y0[$i]=$Y_ary[0] ;
$Y1[$i]=$Y_ary[1] ;
$Y2[$i]=$Y_ary[2] ;
$Y3[$i]=$Y_ary[3] ;
$Y4[$i]=$Y_ary[4] ;
$Y5[$i]=$Y_ary[5] ;
$Y6[$i]=$Y_ary[6] ;
$i=$i+1;
}
#$i=0;
#foreach $Y_value (@Y1)
#{
# #print "Y0 array vlues:$Y_value counter $i ";
# print "$Y_value";
# $i++;
#}

##### Replace Y values to Y symbol  #####
open(Validation_data,"<$LC_LOG");
while(<Validation_data>){
foreach $Y_value_0 (@Y0)
{
s/,$Y_value_0 /,Y_0 /g ;
}
foreach $Y_value_1 (@Y1)
{
s/,$Y_value_1 /,Y_1 /g ;
}
foreach $Y_value_2 (@Y2)
{
s/,$Y_value_2 /,Y_2 /g ;
}
foreach $Y_value_3 (@Y3)
{
s/,$Y_value_3 /,Y_3 /g ;
}
foreach $Y_value_4 (@Y4)
{
s/,$Y_value_4 /,Y_4 /g ;
}
foreach $Y_value_5 (@Y5)
{
s/,$Y_value_5 /,Y_5 /g ;
}
foreach $Y_value_6 (@Y6)
{
s/,$Y_value_6 /,Y_6 /g ;
#print ",$Y_value_6 ";
}
print "$line ";
$line++;
print h2 $_;
}
close (h2);
rename("temp.log","interpolation.data");

$X0Y0=0; $X0Y1=0; $X0Y2=0; $X0Y3=0; $X0Y4=0; $X0Y5=0; $X0Y6=0;
$X1Y0=0; $X1Y1=0; $X1Y2=0; $X1Y3=0; $X1Y4=0; $X1Y5=0; $X1Y6=0;
$X2Y0=0; $X2Y1=0; $X2Y2=0; $X2Y3=0; $X2Y4=0; $X2Y5=0; $X2Y6=0;
$X3Y0=0; $X3Y1=0; $X3Y2=0; $X3Y3=0; $X3Y4=0; $X3Y5=0; $X3Y6=0;
$X4Y0=0; $X4Y1=0; $X4Y2=0; $X4Y3=0; $X4Y4=0; $X4Y5=0; $X4Y6=0;
$X5Y0=0; $X5Y1=0; $X5Y2=0; $X5Y3=0; $X5Y4=0; $X5Y5=0; $X5Y6=0;
$X6Y0=0; $X6Y1=0; $X6Y2=0; $X6Y3=0; $X6Y4=0; $X6Y5=0; $X6Y6=0;

open(h3,"<interpolation.data");
open(h2,">interpolation.result");
print "\n";
while(<h3>){
if (/$X_ary[0],Y_0/) { $X0Y0++ ; }
if (/$X_ary[0],Y_1/) { $X0Y1++ ; }
if (/$X_ary[0],Y_2/) { $X0Y2++ ; }
if (/$X_ary[0],Y_3/) { $X0Y3++ ; }
if (/$X_ary[0],Y_4/) { $X0Y4++ ; }
if (/$X_ary[0],Y_5/) { $X0Y5++ ; }
if (/$X_ary[0],Y_6/) { $X0Y6++ ; }
if (/$X_ary[1],Y_0/) { $X1Y0++ ; }
if (/$X_ary[1],Y_1/) { $X1Y1++ ; }
if (/$X_ary[1],Y_2/) { $X1Y2++ ; }
if (/$X_ary[1],Y_3/) { $X1Y3++ ; }
if (/$X_ary[1],Y_4/) { $X1Y4++ ; }
if (/$X_ary[1],Y_5/) { $X1Y5++ ; }
if (/$X_ary[1],Y_6/) { $X1Y6++ ; }
if (/$X_ary[2],Y_0/) { $X2Y0++ ; }
if (/$X_ary[2],Y_1/) { $X2Y1++ ; }
if (/$X_ary[2],Y_2/) { $X2Y2++ ; }
if (/$X_ary[2],Y_3/) { $X2Y3++ ; }
if (/$X_ary[2],Y_4/) { $X2Y4++ ; }
if (/$X_ary[2],Y_5/) { $X2Y5++ ; }
if (/$X_ary[2],Y_6/) { $X2Y6++ ; }
if (/$X_ary[3],Y_0/) { $X3Y0++ ; }
if (/$X_ary[3],Y_1/) { $X3Y1++ ; }
if (/$X_ary[3],Y_2/) { $X3Y2++ ; }
if (/$X_ary[3],Y_3/) { $X3Y3++ ; }
if (/$X_ary[3],Y_4/) { $X3Y4++ ; }
if (/$X_ary[3],Y_5/) { $X3Y5++ ; }
if (/$X_ary[3],Y_6/) { $X3Y6++ ; }
if (/$X_ary[4],Y_0/) { $X4Y0++ ; }
if (/$X_ary[4],Y_1/) { $X4Y1++ ; }
if (/$X_ary[4],Y_2/) { $X4Y2++ ; }
if (/$X_ary[4],Y_3/) { $X4Y3++ ; }
if (/$X_ary[4],Y_4/) { $X4Y4++ ; }
if (/$X_ary[4],Y_5/) { $X4Y5++ ; }
if (/$X_ary[4],Y_6/) { $X4Y6++ ; }
if (/$X_ary[5],Y_0/) { $X5Y0++ ; }
if (/$X_ary[5],Y_1/) { $X5Y1++ ; }
if (/$X_ary[5],Y_2/) { $X5Y2++ ; }
if (/$X_ary[5],Y_3/) { $X5Y3++ ; }
if (/$X_ary[5],Y_4/) { $X5Y4++ ; }
if (/$X_ary[5],Y_5/) { $X5Y5++ ; }
if (/$X_ary[5],Y_6/) { $X5Y6++ ; }
if (/$X_ary[6],Y_0/) { $X6Y0++ ; }
if (/$X_ary[6],Y_1/) { $X6Y1++ ; }
if (/$X_ary[6],Y_2/) { $X6Y2++ ; }
if (/$X_ary[6],Y_3/) { $X6Y3++ ; }
if (/$X_ary[6],Y_4/) { $X6Y4++ ; }
if (/$X_ary[6],Y_5/) { $X6Y5++ ; }
if (/$X_ary[6],Y_6/) { $X6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("Slew-07 %-5s %-5s %-5s %-5s %-5s %-5s %-5s \n", $X6Y0,$X6Y1,$X6Y2,$X6Y3,$X6Y4,$X6Y5,$X6Y6 ) ;

printf h2 ("        %-7s %-7s %-7s %-7s %-7s %-7s %-7s \n", "Load-1","Load-2","Load-3","Load-4","Load-5","Load-6","Load-7", ) ;
printf h2 ("Slew-01 %-7s %-7s %-7s %-7s %-7s %-7s %-7s \n", $X0Y0,$X0Y1,$X0Y2,$X0Y3,$X0Y4,$X0Y5,$X0Y6 ) ;
printf h2 ("Slew-02 %-7s %-7s %-7s %-7s %-7s %-7s %-7s \n", $X1Y0,$X1Y1,$X1Y2,$X1Y3,$X1Y4,$X1Y5,$X1Y6 ) ;
printf h2 ("Slew-03 %-7s %-7s %-7s %-7s %-7s %-7s %-7s \n", $X2Y0,$X2Y1,$X2Y2,$X2Y3,$X2Y4,$X2Y5,$X2Y6 ) ;
printf h2 ("Slew-04 %-7s %-7s %-7s %-7s %-7s %-7s %-7s \n", $X3Y0,$X3Y1,$X3Y2,$X3Y3,$X3Y4,$X3Y5,$X3Y6 ) ;
printf h2 ("Slew-05 %-7s %-7s %-7s %-7s %-7s %-7s %-7s \n", $X4Y0,$X4Y1,$X4Y2,$X4Y3,$X4Y4,$X4Y5,$X4Y6 ) ;
printf h2 ("Slew-06 %-7s %-7s %-7s %-7s %-7s %-7s %-7s \n", $X5Y0,$X5Y1,$X5Y2,$X5Y3,$X5Y4,$X5Y5,$X5Y6 ) ;
printf h2 ("Slew-07 %-7s %-7s %-7s %-7s %-7s %-7s %-7s \n", $X6Y0,$X6Y1,$X6Y2,$X6Y3,$X6Y4,$X6Y5,$X6Y6 ) ;

Usage:
perl analysis_consistancy.pl LC.log index_X index_Y


Generate index_X and index_Y :
grep index_1 a.lib | sort -u > index_X
grep index_2 a.lib | sort -u > index_Y
note: need to remove pre-fix and space ...etc

index_X :
0.002,0.0154552,0.062686,0.15288,0.293398,0.490561,0.75,

index_Y :
0.001,0.00106724,0.00130329,0.00175404,0.0024563,0.00344165,0.00473823
0.001,0.00109782,0.00144119,0.00209692,0.0031185,0.00455189,0.00643805
0.001,0.00110011,0.00145154,0.00212263,0.00316816,0.00463515,0.00656552
0.001,0.00110183,0.00145928,0.00214189,0.00320536,0.00469752,0.00666101
0.001,0.00110373,0.00146783,0.00216315,0.00324641,0.00476635,0.00676639

Results:
              Load-1  Load-2  Load-3  Load-4  Load-5  Load-6  Load-7
Slew-01 656       771       1032    1683    1802    1353    639  
Slew-02 599       714       919     1548    1475    878     330  
Slew-03 613       733       867     1295    982     365     205  
Slew-04 781       841       844     971     590     255     176  
Slew-05 800       809       632     535     344     196     167  
Slew-06 774       641       397     284     196     186     158  
Slew-07 1242     898       519     355     131     143     155  

標籤