($sid) { session_delete(array('sid' => $sid)); session_data_delete(array('sid' => $sid)); return TRUE; } function sess_gc($maxlifetime) { global $time; $expiry = $time - $maxlifetime; $arrlist = session_find(array('last_date' => array('<' => $expiry)), array(), 1, 10000, '', array('sid', 'bigdata', 'last_date')); if (!$arrlist) return TRUE; $expiry = $time - 21600; // 超6小时未提交丢弃上传图片和附件 $sidarr = array(); foreach ($arrlist as $val) { if ($val['last_date'] > $expiry && $val['bigdata']) continue; $sidarr[] = $val['sid']; } if (empty($sidarr)) return TRUE; session_delete(array('sid' => $sidarr)); session_data_delete(array('sid' => $sidarr)); return TRUE; } function sess_start() { global $conf, $sid, $g_session; ini_set('session.name', $conf['cookie_pre'] . 'sid'); ini_set('session.use_cookies', TRUE); ini_set('session.use_only_cookies', TRUE); ini_set('session.cookie_domain', $conf['cookie_domain']); // 为空则表示当前目录和子目录 ini_set('session.cookie_path', $conf['cookie_path']); // 打开后只有通过 https 才有效 ini_set('session.cookie_secure', FALSE); ini_set('session.cookie_lifetime', 8640000); // 打开后 js 获取不到 HTTP 设置的 cookie, 有效防止 XSS,对于安全很重要,除非有 BUG,否则不要关闭。 ini_set('session.cookie_httponly', TRUE); // 活动时间 ini_set('session.gc_maxlifetime', $conf['online_hold_time']); // 垃圾回收概率 = gc_probability/gc_divisor ini_set('session.gc_probability', 1); // 垃圾回收时间 5 秒,在线人数 * 10 / 每1000个请求回收一次垃圾 ini_set('session.gc_divisor', 1000); session_set_save_handler('sess_open', 'sess_close', 'sess_read', 'sess_write', 'sess_destroy', 'sess_gc'); // register_shutdown_function 会丢失当前目录,需要 chdir(APP_PATH) $conf['url_rewrite_on'] > 1 and function_exists('chdir') and chdir(APP_PATH); // 这个必须有,否则 ZEND 会提前释放 $db 资源 register_shutdown_function('session_write_close'); session_start(); $sid = session_id(); return $sid; } // 刷新页面清理附件缓存 废弃 function sess_clear_attach() { global $sid, $time; $arr = session_read($sid); if (!$arr || 0 == $arr['bigdata']) return TRUE; session_update($sid, array('bigdata' => 0, 'last_date' => $time)); session_data_delete(array('sid' => $sid)); return TRUE; } function online_count() { return session_count(); } function online_list_cache() { static $cache = array(); $key = 'online_list'; if (isset($cache[$key])) return $cache[$key]; $cache[$key] = cache_get($key); if (NULL === $cache[$key]) { $cache[$key] = session_find(array('uid' => array('>' => 0)), array('last_date' => -1), 1, 1000); foreach ($cache[$key] as &$online) { $user = user_read_cache($online['uid']); $online['username'] = $user['username']; $online['gid'] = $user['gid']; $online['ip_fmt'] = safe_long2ip($online['ip']); $online['last_date_fmt'] = date('Y-n-j H:i', $online['last_date']); } cache_set('online_list', $cache[$key], 300); } return $cache[$key]; } function online_user_list_cache() { static $cache = array(); $key = 'online_user_list'; if (isset($cache[$key])) return $cache[$key]; $cache[$key] = cache_get($key); if (NULL === $cache[$key]) { $cache[$key] = session_find(array('uid' => array('>' => 0)), array(), 1, 1000, 'uid', array('uid')); cache_set('online_user_list', $cache[$key], 300); } return $cache[$key]; } ?>almost和nearly的用法区别_用法辨析 英语语法|江阴雨辰互联

almost和nearly的用法区别_用法辨析 英语语法

almost和nearly的用法区别_用法辨析 英语语法


2024年5月13日发(作者:红米6pro处理器)

almost和nearly的用法区别_用法辨析

1. almost [nearly] 都可用来修饰不定代词、形容词、副词、动词、介词短语等,此

时两者常可换用。如:

My car almost [nearly] stood still because of a traffic block. 我的车子因为交通

阻塞而几乎动弹不得。

I lost my concentration and almost [nearly] drove into a bridge. 我走神了,驾

车时几乎撞上了一座桥。

It is almost [nearly] late for you to catch the last bus. 天晚了,你快赶不上末班公

共汽车了。

With so much loud music, conversation was almost [nearly] impossible. 音乐声

那么大,几乎没法交谈。

We almost [nearly] came to blows over what colour our new carpet should be.

我们为了用什么颜色的新地毯险些打了起来。

要注意它们与被修饰词的位置关系。比较并体会以下正误句子:

据说这个报社平均每天要收到百来篇来稿。

正:It’s said that the paper receive an average of nearly 100 articles a day.

误:It’s said that the paper nearly receive an average of 100 articles a day.

另外,再比较:

Everything was almost double the normal price. 样样东西几乎都是平时价格的两

倍。

Almost everything was double the normal price. 几乎样样东西都是平时价格的

两倍。

2. almost 可用于 any 以及 no, none, nobody, nothing, never 等否定词之前,但

nearly 一般不这样用。如:

He almost never remarks on how she looks. 他几乎从来不说她长相如何。

He is very practicalhe can make or mend almost anything. 他很能干,几乎会制

造或修理任何东西。

The plots in her books are very strong but there’s almost no characterization.

她写的书情节性很强,可是几乎没有对人物的塑造。

How am I expected to conjure up a meal for six of his friends with almost

nothing in the fridge? 冰箱里几乎甚么都没有,我怎么可能给他的六个朋友变出一顿饭

来?

Tolerant of human frailty in whatever form, she almost never judged people.

她对人性的各种弱点都能够包容,几乎从不评价他人。

His father found him a cushy job in the office, with almost nothing to do and a

whacking great salary. 他父亲给他在事务所找到了一份轻松舒适的工作,几乎什么都不

用做,工资还极高。

但是,两者都可用在否定动词之前。如:

He almost [nearly] didn’t catch the bus. 他差点没赶上公共汽车。

3. nearly 前可用 very, pretty, not 等词修饰,但 almost 之前不能用这些词。如:

There are not nearly enough members present to hold a meeting. 出席的会员

远没有达到可以开会的人数。

The shock of Pat’s death pretty nearly killed Roy. 帕特的死几乎毁了罗伊。

They very nearly succeeded in blowing up the parliament building. 他们只差一

点儿炸毁议会大厦。

4. 有时 almost 可表示十分相似(但又不完全相同),此时不用 nearly。如:

I almost wish I’d stayed at home. 我真有点后悔没在家里呆着。

Our cat understand everythinghe’s almost human. 我们这只猫什么都懂 快通

人性了。


发布者:admin,转转请注明出处:http://www.yc00.com/num/1715599790a2642923.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信