发布新日志

  • 数据库解锁

    2015-05-28 10:23:14


    命令视窗:
    sqlplus /as sysdba
    password:orcl
    alter user system account unlock;
    (注意一定要加后面的分号,否则输出结果是2,若修改成功。会有提示user alter的信息)
    alter user oadb account unlock;(同上)
    alter user system identified by password;---无需知道历史密码,直接修改为新的密码
  • oracle 删除用户,表空间和物理文件

    2015-05-20 11:20:42

    1.查看用户所在的缺省表和临时表的名称
    select default_tablespace,temporary_tablespace  from  dba_users where USERNAME = 'DB0824'

    2. 删除掉用户
    drop user DB0824 cascade

    3.删除缺省表和临时表
    drop tablespace FIRSTFRAME_DATA including contents and datafiles
    drop temporary_tablespace FIRSTFRAME_TEMP including
    contents and datafiles

    4.查询数据库物理文件所在的地址
    select * from dba_data_files  where tablespace_name='FIRSTFRAME_DATA'
    不过一般删除表之后,物理文件也会被删除掉的
  • parseInt()函数

    2013-10-31 11:26:29

    JavaScript. 是弱类型语言,为了保证数值的有效性,在处理数值的时候,我们可以对数值字符串进行强行转换。如 parseInt 取整和 parseFloat 取浮点数。Java 也有 Integer.parseInt() 方法, 但是 JavaScript. 的 parseInt 处理方式与 Java 等强整型语言不太一样, 所以经常有人因为对这个方法的使用不当而获得异常返回。

    之前阿里巴巴的前端面试有一道这样的题,是关于parseInt()的用法的,题目如下:

    1 var b = parseInt("01");
    2 alert("b="+b);
    3 var c = parseInt("09/08/2009");
    4 alert("c="+c);

    答案是b=1,c=0。

    parseInt()是用来解析字符串,返回值是整数。有几个特点:

    1. 无视被解析字符串最前和最后的空格,即:" 111 "和"111"是一样的
    2. 正规格式是parseInt(string,radix)。radix可以省略,为0或者2-36之间的整数,用来表示被解析数值的进制。(注意不是解析返回结果的进制)。如果radix不在此范围内,返回NaN
    3. 如果radix 省略或者为0,则按默认进制对string进行解析。
    4. string的首字符为0,则默认解析为8进制。string首字符为0x则默认解析为16进制。其他情况默认为10进制。
    5. 解析从第一个可以解析的字符开始,到第一个不能解析的字符(如空格,标点符号等)结束。后面的字符不再解析。
    6. 如果第一个字符不可以解析,则返回NaN。如"a8989"

    现在我们再回头来看这个题就容易理解了。

    b的值首字母是0,按8进制解析后面的数值,也就是8进制的1。自然返回值为1。

    难点在第二个。

    c的首字符是0,一般想法是按8进制进行解析。但是我们发现第二个字符9已经不是8进制数,也就是说9是第一个不能解析的字符。parseInt("09/08/2009")也就变成了parseInt("0");结果再明显不过,是0。

    如果我们稍加变化parseInt("0119/08/2009"),首字符是0,按八进制解析,同样读到9的时候不能解析。也就变成了parseInt("011"),结果也很明显,是9。

    下面的代码大家可以自己测试一下,只要把等价的string写出来,结果就显而易见了。还有提示大家注意分辨网上杂乱的资料。不要被错误的分析误导。

    一个例子:

    1 parseInt("10");         //返回 10
    2 parseInt("19",10);      //返回 19 (10+9)
    3 parseInt("11",2);       //返回 3 (10+9)
    4 parseInt("17",8);       //返回 15 (8+7)
    5 parseInt("1f",16);      //返回 31 (16+15)
    6 parseInt("010");        //未定:返回 10 或 8
  • 判断增加/删除元素是否成功

    2013-09-05 10:18:33

    场景:自动化脚本断言时,经常会遇到新增或删除某个元素的情况。
    思路:通过传入的常量,来区分是新增,还是删除。把新增或删除元素放在一个方法进行判断,通过返回值来确定是否成功。true则成功,false则失败。
    脚本:(JAVA实现)
    /**
    *判断增加/删除元素是否成功
    *@param else:目前元素的数目
    *@name: the text of ele.
    *@param option: 0->增加;1->删除
    */
    public static boolean isSaveOrRemove(List<WebElement> eles,String name,int option){
     boolean mathch=false;
     switch(option){
     case 0:
           for(WebElement ele:eles){
             if(ele.getText().contains(name)){
              match=true;
              break;}}
              break;
     case 1:
           for(WebElement ele:eles){
              if(ele.getText().contains(name)){
                  break;
              else;
              match=true;
              break;}}
            return match;
      }
    }
  • WebDriver JS实现操作日期控件

    2013-08-29 18:54:51

    专题七:WebDriver JS实现操作日期控件
    场景:web系统中,日期控件是常用到的。
    思路:通过执行JS脚本直接给元素赋值来实现选择日期。
    脚本:(JAVA实现)
    public static void dateTime(String name,String date){
         String js="var dateTime=document.getElementsByName('"+name+"')[0];dateTime.removeAttribute('readOnly');dateTime.setAttribute('value','"+date+"');";
         CommonActions.runScript(js);
    }
     
  • 获取菜单下隐藏的元素

    2013-08-28 09:47:36

    场景:鼠标移上去之后,显示下拉菜单。鼠标离开,下拉菜单不显示。
    思路:执行JS,将元素的style.display设置为:block,因为隐藏的时候,其display:null.
    实现:(JAVA脚本)
    public static void FuncOperationMenu(String id){
    getDriver.manage().timeouts().implicitlyWait(50,TimeUnit.SECNODS);
    String js="var div=doucment.getElementByID('"+id+"');div.style.display='block';div.fireEvent('onclick')";
    CommonMethods.runScript(js);
    }
  • weboffice控件-新建、装载office文档

    2013-08-27 19:25:31

    场景:使用第三方控件web office打开本地文档
    控件的信息:<object name="FrameContrl1" id="FrameControl1" classid="clsid:Exxxxxx">
    思路:通过执行JS调用其提供的方法,来实现打开本地文档。
    实现:(JAVA脚本)
    /**
    * weboffice 控件-新建、装载office文档
    * @param ul:FileN
    * @param type:the type of file,such as .doc,.xls,.ppt,.wps
    * @return
    */
    public static void loadOriginalFile(String ul,String type){
      String js="document.all.FrameControl1.LoadOriginalFile('"+ul+"')"l;
      CommonActions.runScript(js);
    }
    /**
    * weboffice 控件-打印文档
    * @param i:0 不显示打印对话框,直接打印;非0:显示打印对话框
    * @return
    */
    public static void printDoc(int i){
      String js="document.all.FrameControl1.PrintDoc('"+i+"')";
      CommonActions.runScript(js);
    }
  • 实现元素左移右移

    2013-08-13 19:01:29

    场景:导航栏上显示模块名称,右击,左击,每点击一次,导航栏上的元素若超过3个,则移动3个。否则有几个,移动几个。
    思路:移动一次,导航栏上的元素的下标(index)会相应移动,在【1,7】之间的,可以取到元素,若其他区间的,则会隐藏在左边或者隐藏在右边。所以若想点击到该元素,则必须要让元素移动到范围【1,7】。这里设定了一个参数:counter,来记录相对于原始下标【1,2,3,4,5,6,7】,此时元素应该要移动多少位,才能被取到。
     
    public class NaviModule{
          private int counter=0;
          /**
         *find the module's index and name into map.
         *@param counter; the index +-3 when perform. "leftMove()"/rightMove()
         *@param name; the module's name
         *return the index of module.
         public int index(String name,int counter){
               int index=0;
               int num=NaviBarPage.navigationModules().size();
               Map<Integer,String>map=new HashMap<Integer,String>;
               for(ing i=1;i<num+1;i++){
               WebElement td=Table.getCell(By.xpath("xxx"));
               String text=td.getText();
               int j=i-counter;
               map.put(j,text);
              }
           for(int j=1-counter;j<num+1-counter;j++){
             i(map.get(j).equals(name)){
             index=j;
             break;
            }
           return index;
           } 
    }
     
  • 实现获取table元素的类

    2013-08-01 10:16:29

    专题六:实现获取table元素的类
    场景:html中存在很多table类型的元素。表格就是一个很典型的,在第几行第几列存放一些内容。
    思路:先找tr,再找td.
    脚本:(JAVA实现)
    public class Table extends pageSourceFiles{
       public static int[] getIndex(String tableCellAddress){
        //将传入的字符串转化成行和列
       int index =tableCellAddress.trim().indexof('.');
       int row=Integer.parseInt(tableCellAddress.substring(0,index));
       int cell=Integer.parseInt(tableCellAddress.substring(index+1));
       int[] a=new int[2];
       a[0]=row;
       a[1]=cell;
       return a;
       }
       public static WebElement getRow(final By,int row){
       //找到tr元素
       WebDriverWait wait=new WebDriverWait(getDriver(),60);
       List<WebElement>rows=wait.until(new ExpectedCondition<List<WebElement>>{
       List<WebELement> apply(WebDriver d){
       return d.findElement(by).findElements(By.tagName("tr"));
     }});
       WebElement Row=rows.get(row);
       return Row;
      }
      //通过行元素,找到cell元素
      public static WebElement getCell(final By by,int row,int cell){
      //找到tr元素对象
      WebDriver wait =new WebDriverWait(getDriver(),60);
      List<WebElement> rows=wait.until(new ExpectedCondition<List<WebElement>>(){
      public List<WebElemen> apply(WebDriver d){
      return d.findElement(by).findElements(By.tagName("tr"));
      } });
     //取第几行
      WebElement Row=rows.get(row);
      List<WebElement>cells=Row.findElements(By.tagName("td"));
      WebElement target=null;
      //取cell元素(tr行td列)
      if(cells.isEmpty()){
       cells=Row.findElements(By.tagName("th"));
       target=cells.get(cell);}
      else target=cells.get(cell);
      return target;
      }
      //获取某列下的子元素
      public static WebElement Ele(String index,By by1,By by2){
      int[] a=new int[2];
      a=getIndex(index);
      WebElement td=getCell(by1,a[0],a[1]);
      return td.findElement(by2);
     }
      //获取cell元素的text
      public static String getText(By by,int row,int cell){
      String text=getCell(by,row,cell).getText();
      return text;
     }
      //根据单元格的文本获取所在表格的位置
       public static int[] tablePosition (final By by,String menuName)
      //找到tr元素对象
      WebDriverWait wait=new WebDriverWait(getDriver(),60);
      List<WebElement> rows=wait.until(new ExpectedCondition<List<WebElement>>()){
       public List<WebElement> apply(WebDriver d){
       return d.findElement(by).findElements(By.tagName)("tr"));
       }});
       int[] a=new int[2];
       int i=0;
       for(WebElement row:rows){
        //得到当前tr里td的集合
       List<WebElement>cols=row.findElements(By.tagName("td"));
       int j=0;
       for(WebElement col:cols){
         if(col.getText().trim().equasl(menuName)){
           a[0]=i+1;
           a[1]=j+1;
           break;}
           j++;}
           i++;}
          return a;
    }
    }
  • WebDriver实现自动截图

    2013-07-25 10:21:58

    专题五:脚本run的过程中,出现异常时,实现自动截图。
    场景:在执行自动化测试过程中,难免会出现异常的时候。这个时候,若能把当时的图截取下来,这对我们对问题现象的分析很有帮助。
    思路:在网上搜了很多资料后,发现很多人提到这个(cause instance of ScreenshotException),下面我也会给出相关代码。但目前本人才疏学浅,还没很好的弄明白,什么时候出现的异常属于ScreenshotException。所以现在实现的截图,是只要出现异常就截图,而不会再判断是否匹配instance of ScrrenshotException。
    脚本:(JAVA语言实现)
    public class EventListener extends AbstractWebDriverEventListener{
     @Override
     public void onException(Throwable throwable,WebDriver driver){
         SimpleDateFormat formatter=new SimpleDateFormat("yyyy-MM-dd-hh-mm-ss");
         Strubg dateString =formatter.format(new Date());
         String imgDir=System.getProperty("user.dir");
    //    System.out.println("imgDir::"+imgDir);
         try{
          //截图并保存在D盘下
         File screenShotFile=((TakeScreenshot)driver).getScreenshotAs(OutputType.FILE);
         FileUtils.copyFile(screenShotFile,new File(imgDir+dateString+".jpg"));
    //     System.out.println("开始截图");
         }
          catch(IOException e){
          System.out.println(Fail to capture screenshot:" +e.getMessage());
          }
        }
      }
    封装driver的脚本
    public class pageSourceFiles{
          private static WebDriver driver;
          protected static WebDriver getDriver(){
          if(driver==null){
          DesiredCapabilities ieCapabilities = DesiredCapabilities.internetExplorer();
          ieCapabilities.setCapability(InternetExplorerDriver.INTROUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,true);
          driver = new InternetExplorerDriver(ieCapabilities);
          WebDriverEventListener eventListener = new EventListener();
          driver = new EventFiringWebDriver(driver);
         ((EventFiringWebDriver)driver).register(eventListener);
         }
        return driver;
      }
     
    另给出cause instance of ScreenshotException 对应的脚本:
       private String extractScreenShot(Throwable ex){
           Throwable cause=ex.getCause();
           if(cause instanceof ScreenshotException){
                return ((ScreenshotException)cause).getBase64EncodedScreenshot();
           }
           return null;
       }
  • 对FCK的操作

    2013-07-24 17:04:21

    专题四:对(富文本框)FCK的操作
    场景:WEB系统中,有很多时候我们会用到FCK编辑器,比如电子邮件,文档。
    思路:通过执行JS来获取FCK框。FCK控件ID查找方法:定位到FCK所属的div下<textarea>元素的ID值。
    脚本:(JAVA语言实现)
    //执行javascript
    public static void runScript(String script){
        JavascriptExecutor js=(JavascriptExecutor)getDriver();
        js.executeScript(script);
    }
    //设置FCK正文内容
    public static void FCKSetcontent(String fckid,String content){
    String js="var ck=CKEDITOR.instances['"+fckid+"'];ck.setData(''"+content+")";
    runScript(script);
    }
    //获取FCK正文内容
    public static String FCKGetcontent(String fckid){
          String fck="";
          String str="return CKEDITOR.instances['"+fckid"'].getData()";
    //      JavascriptExecutor js=(JavascriptExecutor)getDriver();
    //      fck=(String)js.executeScript(str);
            runScript(str);
          return fck;
    }
     
  • eclipse@Override 报错

    2013-07-24 14:58:55

    首先说下@Override的用法
    Override:
    java.lang.Override是一个marker annotation类型,它被用作标注方法。它说明了被标注的方法重载了父类的方法,起到了断言的作用。这个annotation常常在我们试图覆盖父类方法而又写错了方法名时发挥威力。使用方法很简单,在使用此annotation时,只要在被修饰的方法前面加上@Override。
    @Override
    public String toString(){...} ----正确的
    一旦写错,写成这样
    @Override
    public String tostring(){...} 编译器可以检测出这种协防是错误的,这样能保证你重写的方法正确。而如果此时不加@Override,编译器是不会报错的,它只会认为这是你自己新加的一个方法而已。
    我之前遇到这个报错的问题,因为不明白@Override的意义,基本都是注视掉://@Override。今天仔细看了这个问题,才明白@Override的真正用意。解决这个报错的方法:Window->Preferences->java->Complier->complier compliance leverl修改成1.6就可以了,然后点击apply。
  • 切换至动ID是动态的iframe

    2013-07-24 10:56:06

    专题三:切换至ID是动态的iframe
    场景:iframe无name属性,且id又是动态产生的
    思路:切换至iframe的语句,这里我们使用:driver.switchTo().frame(nameOrId);事实上webdriver提供了3种。1.WebDriver frame(int index);2.WebDriver frame(String nameOrId);3.WebDriver frame(WebElement frameElement)。因为遇到的iframe无name属性,且id又是动态产生的。所以先找到此iframe,然后通过getAttribute获取其ID,然后再切换之。
    脚本:(JAVA语言实现)
    public static Boolean switchToDynamiciframe(WebDriver driver,final WebElement iframe){
            return (new WebDriverWait(driver,100)).until(new ExpectedCondition<Boolean>()){
            public Boolean apply(WebDriver driver){
            String id=iframe.getAttribute("id");
            if(id!=null){
            driver.switchTo().frame(id);
            return true;
             }
            else{
            System.out.println(Not find any id);
            return false;
             }
      }
    });
    }
  • 窗口切换

    2013-07-23 18:12:23

    专题二:窗口切换
    场景:使用webdriver开展自动化过程中,经常会遇到窗口间的切换。因为在通过执行脚本将web页面打开的时候,并不能如我们手工操作时,理所当然的就可以在新打开的页面上进行操作,而是通过窗口跳转的脚本来完成的。
    思路:通过获取窗口句柄,来实现窗口间的切换。
    脚本:(JAVA语言实现)
     
    方法一:适用于窗口有标题作为判断唯一依据的场景
    public static boolean switchToNewWindow(WebDriver driver,final String windowTitel){
          driver.manage().timeouts().implicitlyWait(50,TimeUnit.SECONDS)
             return(new WebDriverWait(driver,200)).until(new ExceptedCondition<Boolean>){
                 public Boolean apply(WebDriver driver){
                  //获取所有窗口的句柄
                 Set<String>Handles = driver.getWindowHands();
    //             System.out.println(Handles.size());
                 //循环进入所有的窗口
                 for (String handle:Handles)
                {
                  driver.switchTo().window(handle);
     //             System.out.println(driver.getCurrentUrl());
                 //窗口的Title值对比
                  if(driver.getTitle().equals(windowTitle))
                     {
                     return true;//跳出函数
                      }
                 }
                      return false;//跳出函数
                }
         }
       );
       }
     
    方法二:窗口切换通用的方法,即使在窗口没有title标识的时候也一样适用。(传递的参数:数组)
    public static boolean switchToNewWindow(WebDriver driver,final Set<String>handles){
            return (new WebDriverWait(driver,200)).until(new ExpectedCondition<Boolean>(){
              public Boolean apply(WebDriver driver){
              Set<String> newHandles = driver.getWindowHandles();
              newHandles.removeAll(handles);
     //       System.out.println(newHnadles.size());
              if(newHandles.size()>0){
              driver.switchTo().window(newHandles.iterator().next());
    //        System.out.println("driver switch to pop up window.");
    //        System.our.println(driver.getCurrentUrl());
              return true;//跳出函数
                }
              System.out.println("Not find any other handle.Go to current window.");
             return false;//跳出函数
           }
       }
      );
     }
  • 从树中进行选取元素,执行双击操作

    2013-07-23 17:35:24

    专题一:树中获取元素。
    场景:使用webdriver开展自动化测试时,从树中取值是经常遇到的场景,比如栏目树。
    思路:若class contains"x-tree-node-leaf",说明是叶节点,直接点击;
         若 class contains "x-tree-node-collapsed",说明未展开,双击操作;
         若class contains"x-tree-node-expand",则已展开,无需操作;
    脚本:(JAVA 语言实现)
    public static void DMTree(WebDriver dr,ArrayList<String>menus,String xpath){
    WebElement doc_treeview=dr.findElement(By.xpath(xpath));
        for (String menu:menus){
              WebElement doc_div=doc_treeview.findElement(By.xpath(".//span[text()
                  ='"+menu+"']/ancestor:div[1]"));
          //判断是不是叶子节点
          if(doc_div.getAttribute("class").contains("x-tree-node-leaf")){
              doc_div.click();
    //        System.out.println("叶子节点");
              return;
                }
          else{
              //判断是否展开
              if(doc_div.getAttribute("class").contains("x-tree-node-collapsed")){
     //         System.out.println("节点未展开");
                //调用双击操作
                CommonActions.doubleClick(dr,doc_div);
                }
                else{
                System.out.println("节点已展开");
                 }
          }
       }
    }
    补充:最近发现,上面的这个方法中,树中的元素可以直接找到,而不需要找到根节点,再通过根节点再找其树中元素。故这里补充一个“去掉根节点参数”的方法。
    脚本如下:
    public static void DMTree(WebDriver dr,ArrayList<String>menus){
    for (final String menu:menus){
         WebDriverWait wait=new WebDriverWait(getDriver(),60)
         WebDriver doc_div=wait.until(new ExpectedCondition<WebELement>(){
             public WebElement apply(WebDriver d) {
                 return d.findElement(By.xpath());}});
             //判断是不是叶节点
            if (doc_div.getAttribute("class").contains("x-tree-node-leaf")){
                doc_div.click();
                  return; }
             //判断是否展开
             else if(doc_div.getAttribute("class").contains("x-tree-node-collapsed"))         
                   CommonActions.doubleClick(dr,doc_div);
              else;
         }                     
     }
  • Let me be your hero

    2013-07-01 15:05:40

    Would you dance, if I asked you to dance?
    如果我邀请,你愿否伴我共舞?
    Would you run, and never look back?
    你是不是会,离去后永不回眸?
    Would you cry, if you saw me crying?
    看到我哭泣,你是否也会流泪?
    And would you save my soul, tonight?
    你在今夜里,能否拯救我心灵?

    Would you tremble, if I touched your lips?
    触碰你的唇,能否会让你颤抖?
    Would you laugh? Oh please tell me this
    请你告诉我,我是否有些可笑?
    Now would you die, for the one you love?
    为了心上人,你愿否献出一切?
    Hold me in your arms, tonight.
    就在今夜里,请你紧紧抱着我。

    I can be your hero, baby.
    心爱的人啊,我要做你的英雄!
    I can kiss away the pain.
    我可以吻去,你所遭遇的伤痛。
    I will stand by you forever.
    我将会永远,伴随在你的左右,
    You can take my breath away.
    你总能带来,出乎意料的感动。

    Would you swear, that you'll always be mine?
    你能否发誓,你会永远属于我?
    Or would you lie? would you run and hide?
    你可会说谎?会否离去或躲藏?
    Am I in too deep? Have I lost my mind?
    我是否因爱,失去所有的理智?
    I don't care. You're here, tonight.
    我不会在意,只因你在我身旁。

    I can be your hero, baby.
    心爱的人啊,我要做你的英雄!
    I can kiss away the pain.
    我可以吻去,你所遭遇的伤痛。
    I will stand by you forever.
    我可以永远,伴随在你的左右,
    You can take my breath away.
    你总能带来,出乎意料的感动。

    Oh,I just wanna to hold you.I just wanna to hold you.
    我只是想要,紧紧地拥抱着你。
    Am I in too deep? Have I lost my mind?
    我是否因爱,失去所有的理智?
    I don't care. You're here, tonight.
    我不会在意,只因你在我身旁。

    I can be your hero, baby.
    心爱的人啊,我要做你的英雄!
    I can kiss away the pain.
    我可以吻去,你所遭遇的伤痛。
    I will stand by you forever.
    我可以永远,伴随在你的左右,
    You can take my breath away.
    你总能带来,出乎意料的感动。

    I can be your hero.
    我能够成为你的英雄
    I can kiss away the pain.
    我会吻去你所有的痛
    And I will stand by you, forever.
    我可以永远伴你左右
    You can take my breath away.
    你能带来意外的感动
    You can take my breath away.
    你能带来意外的感动
    I can be your hero.
    我定要成为你的英雄
  • 美国俚语there was no snap in his turtle

    2011-02-15 23:11:32

    There was no snap in his turtle for two years. ---《老友记》 第一季 第一集

    snap是吸,turtle是海龟,但这里指的是男人的那个玩意儿,用英文解释可以是:
    The "snap in his turtle" refers to sexual performance, it's kind of a "clean" way of saying a vulgar idea (also known as a euphemism). A man who has no snap in his turtle is impotent; or, unable to have an erection.
    I do have an idea on how it was created. "Snap," of course, has many meanings, but most of them have to do with making a quick, sudden movement (or sound), often of a closing or biting nature. In North America, there is an animal known as a "snapping turtle," which is a type of turtle that is known to bite (or "snap") humans and other animals. From what I have heard, if one of those things bites you, it hurts a lot. Now, if one of these turtles can't snap, then there's not so much to fear--if they can't bite you, they can't hurt you. A snapping turtle with no (abilty to) snap, then, is powerless, and from there the slang was created. The word "impotent," aside from its sexual definition, also means "without power."
    In the case of "Friends," they decided to use the word "turtle" in this way, and so a turtle without "snap" is understood by Franny and Monica to mean a man without (sexual) power or capability.

  • take credit for用法

    2011-02-15 23:04:41

     

    在生活中,总有一些人喜欢“抢军功”。那么在英语中,“争名夺利”怎么表达呢?请看对话:

    A: Mary? I'd like to talk to you for a second, please.

    B: Okay, Mark, What's up?

    A: I'd like to know why you're always taking credit for work we've done together like that line in the new Ice Cream ad?

    B: That was my line, Mark. I know we worked on the ad together, but that was definitely my line.

    对话里的take credit to oneself for就是“把……归功于自己,自称某事是自己干的”的意思。在这里,指的是“抢功劳、争名夺利”的意思。Take credit for也有“为某事负责”之意,例如:

    He took credit for the attack that killed his girlfriend.

    大家是否还记得,在"Friends "中,Monica去上班,她的同事和她谈到Paul,那位女士说:I take credit for Paul. 这个是说“Paul还多亏了我呢”,一般自己在给某人帮忙之后炫耀可以这么说。

    经典小句子:

    I cannot take credit for what I did not do.
    无功不受禄。

  • 心静如水,人淡如菊

    2009-03-28 16:22:11

       一件事无论太晚或是太早,都不会阻拦你成为你想成为的那个人,这个过程没有时间的期限,只要你想,随时都可以,要改变或者保留原状都无所谓,做事本来不应有所束缚,我们可以办好这件事,却也可以把它搞砸,但我希望,最终你能成为你想成为的人,我希望你有时可以驻足于这个令你感到惊叹的世界,体会你从未有过的感觉,我希望你能见到其他与你观点不同的人们,我希望你能有一个值得自豪的一生,如果和你想象的生活不一样,我希望你能有勇气,重新启程.

    这是我在一个博文中看到的话,喜欢那个女孩子的生活方式和态度,更羡慕她能自由的,幸福的过自己想过的生活,看到那些她去过的,自己一直想去但都没去的地方,看到相片上淡定,安静的脸,似乎是远离了城市的喧嚣的梦幻,似乎感受到内心深处的回归,我在想...是不是所有的繁华,喧闹之后,最终的我们还是要回到这个地方呢?

     

  • 无题

    2008-09-27 11:56:33

    一个人总要走陌生的路,看陌生的风景,听陌生的歌,然后在某个不经意的瞬间,你会发现,原本费尽心机想要忘记的事情真的就这么忘记了.----> 摘自郭敬明语录

     

    我们真的很善良, 善良到受了伤都不想去伤害对方,而对方却不会知道自己真实的想法. 感情没了,没关系, 婚姻没了没关系, 但人活着的底线是尊严,  到两个人纠缠的时候, 我们的尊严不能丢掉!

    我们还年轻,真的什么都可以再来, 感情会再有,婚姻也会有, 谁也不可以否分我们会遇到更好的所以我们要好好的活着, 把你的感情和爱给那个值得爱和也同样疼你,爱你的人.

    两个人如果只是一方爱另一方, 那么时间长了,我们就会入不敷出, 所以不会长久不管他是否是有了另外的情感,还是其他, 你这样僵持着,折磨的仍然是自己,  给自己一个出路吧, 痛苦过了,其实就没什么了

                                                                                     ---> 写给一个面临婚姻感情危机的朋友

     

381/212>
Open Toolbar