Tuesday, July 21, 2015

把汽车卖给二手车行 trade in trade-in

 trade in就是把二手车卖给车行,单独把车卖给dealer也行,以旧换新也可以。

trade in一般以旧换新,旧的折算成一定金额。你买50000的车,trade-in值35000,那只付差价的15000就可以了,税也只付差价的税而不是全部的税。

Saturday, July 18, 2015

温哥华钓鱼/捕蟹注意事项

在特定水域
捕到下列
几种鱼要在licence上记录下来:

*steelhead硬头鳟(Kootenay库特奈湖 或者 Shuswap 舒斯韦普湖)
*成年Chinook salmon切努克鲑鱼(Kootenay湖 或者 Shuswap湖)
*超过半米的rainbow trout虹鳟鱼(Kootenay湖 或者 Shuswap湖)
*超过60cm的Char红点鲑鱼(Shuswap湖)


英语学习 学习英语 exclusive of

The ship has a crew of 57 exclusive of officers不包括,把…排除在外

Monday, July 13, 2015

_vbaRedim vbaRedim

__cdecl SAFEARRAY*
    __vbaRedim(arg0__Flags_HAVEVARTYPE,arg4__SizeOfVbLong_4,arg8__ppSAFEARRAY_40D060,argC__VARTYPE_vbLong,arg10__cDims_1,
    arg14__Dim0High,arg18__Dim0Low,...DimNHigh,DimNLow,...)
{
    sub_660DAEFA(
        arg0__Flags_HAVEVARTYPE,
        arg4__SizeOfVbLong_4,
        argC__VARTYPE_vbLong,
        arg10__cDims_1,
        &LowHighBounds,
        arg8__ppSAFEARRAY_40D060);
   
    return *arg8__ppSAFEARRAY_40D060;
}

void __stdcall
sub_660DAEFA(arg0__Flags_HAVEVARTYPE, arg4__SizeOfVbLong_4, arg8__VARTYPE_vbLong, argC__cDims_1, arg10__LowHighBounds, arg14_ppSAFEARRAY)
{
    //loc_660DAFEA
    SafeArrayAllocDescriptorEx(arg8__VARTYPE_vbLong,argC__cDims_1,arg14_ppSAFEARRAY);
    pSAFEARRAY->fFeatures = arg0__Flags_HAVEVARTYPE;
    pSAFEARRAY->cbElement = arg4__SizeOfVbLong_4;
   
    arg4__SizeOfVbLong_4=0;
    arg8__VARTYPE_vbLong  = &pSAFEARRAY->lLbound;//The lower bound of the dimension.
   
    for(iDim=0;iDim<cDims;++iDim)
    {
        pSAFEARRAY->rgsabound[iDim].cElements = arg10__LowHighBounds[iDim].High - arg10__LowHighBounds[iDim].Low + 1;
        pSAFEARRAY->rgsabound[iDim].lLbound = arg10__LowHighBounds[iDim].Low;
    }
   
    pSAFEARRAY->pvData = SafeArrayAllocData(pSAFEARRAY);
}

HRESULT SafeArrayAllocDescriptorEx(arg0__VARTYPE_vbLong,arg4__cDims_1,arg8_ppSAFEARRAY)
{
    val = (VAL*)new BYTE[0x10+sizeof(SAFEARRAY)+sizeof(SAFEARRAYBOUND)*arg4__cDims_1];
    SAFEARRAY* pSAFEARRAY = val + 1;
   
    memset(val,0);
   
    val->Type = arg0__VARTYPE_vbLong;//
   
    pSAFEARRAY->cDims = arg4__cDims_1;
    pSAFEARRAY->fFeatures = FADF_HAVEVARTYPE;
    
     
    *arg8_ppSAFEARRAY = pSAFEARRAY;
    return 0;
}

Friday, July 10, 2015

open VS fopen VS fdopen

open will return a filedes(int), while fopen and fdopen return a FILE*.

 #include <fcntl.h>
#include <stdio.h>

int main(void)
{
    char      pathname[] = "/tmp/myfile";
    int       filedes;
    FILE      *fp;

    if ((filedes = open(pathname, O_RDONLY)) == -1) {
        printf("open error for %s\n", pathname);
        return 1;
    }

    if ((fp=fdopen(filedes, "r")) == NULL) {
        printf("fdopen error for %s\n", pathname);
    } else {
        printf("fdopen seccess for %s\n", pathname);
        fclose(fp);
    }

    return 0;
}

Sunday, July 5, 2015

加拿大高速公路注意事项

如果从紧急停车带出来,一定检查轮胎内外侧和附近路面,因为这种地方可能会有废弃的长螺丝和较大的石头; 尽量在行车道行驶,左右都有回旋余地。

Thursday, June 25, 2015