×

be responsible for for to

be responsible for 与 be responsible to 什么区别?photograph和picture有什么区别

admin admin 发表于2022-07-03 01:36:41 浏览435 评论0

抢沙发发表评论

be responsible for 与 be responsible to 什么区别


1.be responsible for
对……负责;负责某事
例句:
1)Do you want to be responsible for your own life decisions?
你是否真的想要为你自己的人生决定负责?
2)be responsible for sth. 或 be responsible for doing sth. 也可表示“负责(做)某事“
例:be responsible for sales 负责销售
Our client wanted to be responsible for testing the application.
我们的客户想要负责测试这个应用程序。
He should be responsible for that.
他应该对此事负有责任。
2.be responsible to do 负责做某事 ;对某人负责
例句1:They are to be responsible to you and are to perform all the duties of the Tent, but they must not go near the furnishings of the sanctuary or the altar, or both they and you will die.
他们要守所吩咐你的, 并守全帐幕, 只是不可挨近圣所的器具和坛, 免得他们和你们都死亡.
例句2:But we just have to be responsible to ourselves.
但是,我们只需要对自己负责。
-----to后面接人就表示“对……负责”,to后面接动词就表示“负责做……(事情)”

photograph和picture有什么区别


一、词义广泛性不一样

1、photograph

英 [ˈfəʊtəgrɑ:f]   美 [ˈfoʊtəgræf]  

n. 相片

vi. 拍照,摄影;被照相

vt. 给 ... 照相

2、picture

英 [ˈpɪktʃə(r)]   美 [ˈpɪktʃɚ]  

n. 照片;影片;描述;图画

vt. 想像;画;拍照

二、变形词不一样

1、photograph

第三人称单数: photographs 复数: photographs 现在分词: photographing 

过去式: photographed 过去分词: photographed

2、picture

第三人称单数: pictures 复数: pictures 现在分词: picturing 过去式: pictured 过去分词: pictured

三、词语用法不一样

1、photograph

1)photograph用作名词的基本意思是“照片,相片”,是可数名词。

例句:This photograph flatters you.  

这照片比你本人漂亮。

2)photograph用作动词时意思是“给某人或某事物拍照”,其后接副词可表示在照片上显出某种样子来。如:

例句:I always photograph badly. 

我照相总是照不好。

2、picture

1)picture用作名词的基本意思是“画,图画”,可指各种图片及照片,是可数名词。

例句:May I take a picture of you? 

我可以给你照相吗?

2)picture通常只用作及物动词,可接名词、代词、that或疑问词引导的从句作宾语,还可接以as短语或现在分词充当补足语的复合宾语。

例句:The artist used red and orange to picture the sun set.

那位画家用红色和橙色画落日。


如何使用cruator监听zookeeper事件变化


掌握zookeeper事件监听机制,非常重要,可以说是跨入了进阶的门槛,只有掌握了如何监听某个节点或路径,我们才能在节点变化后,做一些我们想做的事,包括: 1,配置文件同步 2,主从切换 3,分布式队列 4,分布式锁 5,其他 散仙,在以前的文章里面有写过使用zookeeper原生的api,监听zk节点变化,那么本篇我们就来看下,如何使用curator来完成监听,代码如下: 《pre name=“code“ class=“java“》package com.qin.curator.zk; import javax.sound.midi.Patch; import org.apache.curator.RetryPolicy; import org.apache.curator.framework.CuratorFramework; import org.apache.curator.framework.CuratorFrameworkFactory; import org.apache.curator.framework.CuratorFrameworkFactory.Builder; import org.apache.curator.framework.api.CuratorWatcher; import org.apache.curator.framework.recipes.cache.NodeCache; import org.apache.curator.framework.recipes.cache.NodeCacheListener; import org.apache.curator.framework.recipes.cache.PathChildrenCache; import org.apache.curator.framework.recipes.cache.PathChildrenCacheEvent; import org.apache.curator.framework.recipes.cache.PathChildrenCacheListener; import org.apache.curator.retry.ExponentialBackoffRetry; import org.apache.curator.utils.ZKPaths; import org.apache.zookeeper.WatchedEvent; /** * * 使用curator监听zookeeper节点 * @author qindongliang * **/ public class CuratorWatch { static CuratorFramework zkclient=null; static String nameSpace=“php“; static { String zkhost=“192.168.46.22:2181“;//zk的host RetryPolicy rp=new ExponentialBackoffRetry(1000, 3);//重试机制 Builder builder = CuratorFrameworkFactory.builder().connectString(zkhost) .connectionTimeoutMs(5000) .sessionTimeoutMs(5000) .retryPolicy(rp); builder.namespace(nameSpace); CuratorFramework zclient = builder.build(); zkclient=zclient; zkclient.start();// 放在这前面执行 zkclient.newNamespaceAwareEnsurePath(nameSpace); } public static void main(String args) throws Exception{ watch(); Thread.sleep(Long.MAX_VALUE); } /** * * 监听节点变化 * * */ public static void watch()throws Exception{ PathChildrenCache cache = new PathChildrenCache(zkclient, “/zk“, false); cache.start(); System.out.println(“监听开始/zk........“); PathChildrenCacheListener plis=new PathChildrenCacheListener() { @Override public void childEvent(CuratorFramework client, PathChildrenCacheEvent event) throws Exception { switch ( event.getType() ) { case CHILD_ADDED: { System.out.println(“Node added: “ + ZKPaths.getNodeFromPath(event.getData().getPath())); break; } case CHILD_UPDATED: { System.out.println(“Node changed: “ + ZKPaths.getNodeFromPath(event.getData().getPath())); break; } case CHILD_REMOVED: { System.out.println(“Node removed: “ + ZKPaths.getNodeFromPath(event.getData().getPath())); break; } } } }; //注册监听 cache.getListenable().addListener(plis); } } 《/pre》 运行后的控制台打印: 《pre name=“code“ class=“java“》18:33:07.722 [main] INFO o.a.c.f.imps.CuratorFrameworkImpl - Starting 18:33:07.727 [main] DEBUG o.a.curator.CuratorZookeeperClient - Starting 18:33:07.727 [main] DEBUG org.apache.curator.ConnectionState - Starting 18:33:07.727 [main] DEBUG org.apache.curator.ConnectionState - reset 18:33:07.734 [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT 18:33:07.734 [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:host.name=QINDONGLIANG.dhgatecn.msf 18:33:07.734 [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:java.version=1.7.0_04 18:33:07.734 [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:java.vendor=Oracle Corporation 18:33:07.734 [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:java.home=D:\Java\jdk1.7.0_04\jre 18:33:07.734 [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:java.class.path=D:\eclipseworkspace2yw\opzk\bin;D:\eclipseworkspace2yw\opzk\lib\curator-client-2.6.0.jar;D:\eclipseworkspace2yw\opzk\lib\curator-examples-2.6.0.jar;D:\eclipseworkspace2yw\opzk\lib\curator-framework-2.6.0.jar;D:\eclipseworkspace2yw\opzk\lib\curator-recipes-2.6.0.jar;D:\eclipseworkspace2yw\opzk\lib\curator-test-2.6.0.jar;D:\eclipseworkspace2yw\opzk\lib\curator-x-discovery-2.6.0.jar;D:\eclipseworkspace2yw\opzk\lib\curator-x-discovery-server-2.6.0.jar;D:\eclipseworkspace2yw\opzk\lib\curator-x-rpc-2.6.0.jar;D:\eclipseworkspace2yw\opzk\lib\log4j-1.2.15.jar;D:\eclipseworkspace2yw\opzk\lib\zookeeper-3.4.5.jar;D:\eclipseworkspace2yw\opzk\lib\commons-io-2.1.jar
-for