2019年

C#中AppDomain.CurrentDomain.BaseDirectory与Application.StartupPath的区别

// 获取程序的基目录。
System.AppDomain.CurrentDomain.BaseDirectory

// 获取模块的完整路径。
System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName

// 获取和设置当前目录(该进程从中启动的目录)的完全限定目录。
System.Environment.CurrentDirectory

// 获取应用程序的当前工作目录。
System.IO.Directory.GetCurrentDirectory()

// 获取和设置包括该应用程序的目录的名称。
System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase

// 获取启动了应用程序的可执行文件的路径。
System.Windows.Forms.Application.StartupPath

// 获取启动了应用程序的可执行文件的路径及文件名
System.Windows.Forms.Application.ExecutablePath

C# WinForm中AppDomain.CurrentDomain.BaseDirectory与Application.StartupPath的区别示例如下:

private void Frm_Server_Load(object sender, EventArgs e)
        {
            MessageBox.Show(AppDomain.CurrentDomain.BaseDirectory);
            MessageBox.Show(Application.StartupPath );
         }

说明:

  1. AppDomain.CurrentDomain.BaseDirectory 返回结果为: D:mycode\

    Application.StartupPath 返回结果为: D:\mycode
  2. Application.StartupPath 只能用于WinForm窗体中,而AppDomain.CurrentDomain.BaseDirectory既可以用于WinForm窗体中,也可以用于类库DLL文件中.

香蕉

  对症:压力和焦虑

  在你感到疲惫不堪的时候,吃个香蕉吧,美国新奥尔良Ochsner’s Elmwood健身中心的运动营养专家Molly Kimball如是说道。一根中等大小的香蕉仅有105卡的热量,含14克得糖,足够让你消除饥饿感,让你的血糖达到中等水平,还能为你提供维生素B6日摄取量的30%(这有助于大脑制造丰富的血清素,让你的情绪平稳度过危机)。

葡萄干

  对症:高血压

  60颗葡萄干——大概就是一把——含有1g的纤维,212mg的钾,这两样东西都是预防高血压膳食法所推荐的。大量的研究发现,葡萄制品,如葡萄干,葡萄酒以及葡萄汁里都富含多酚,有助于维持心血管健康,包括降低血压。

酸奶

  对症:便秘或放屁

  2002年美国《食品药理学和治疗》杂志上的一项研究发现,一杯半的益生菌酸奶(富含肠道益生菌)能让食物更有效地在胃肠道推送。酸奶中有益的细菌能改善肠道消化豆类和乳糖的功能,肠道对这些物质消化不良的时候会产生气体,这也就是为什么豆子吃多了容易放屁的原因,而酸奶能帮助你解决这个问题。

  对症:防止肾结石

  美国营养协会的发言人Christine Gerbastadt博士说,8粒干杏含有2g纤维,仅3mg的盐,以及325mg的钾——这些物质都有利于防止矿物质在尿中积累,形成草酸钙的结石(最常见的肾结石类型)。

三文鱼罐头

  对症:坏心情

  一个3盎司的的三文鱼罐头含有大约800mg的欧米伽-3脂肪酸,研究发现,欧米伽-3脂肪酸有助于改善抑郁,治疗情绪低落和焦虑。美国精神病学协会已经肯定了这种富含于鱼中的脂肪酸对治疗抑郁有一定作用。

姜茶

  对症:呕吐

  Gerbstadt说,多项研究表明,生姜(1/4茶勺的姜粉,1/2到1茶勺的生姜末,或者一本姜茶)能缓解晕车、晕船等造成的呕吐症状。研究者尚不清楚是生姜中的何种油或何种化合物抑制了呕吐,但使用生姜治疗的安全性高,无任何类似使用非处方药时会产生的副作用(如口干,头晕)。

罗勒

  对症:胃肠道疾病

  研究发现,罗勒中的一种化学物质丁香油酚能安全有效地治疗胃痛、反胃以及胃肠道痉挛,或者通过杀死沙门氏菌和利斯塔氏菌而防止痢疾。美国圣路易斯大学,营养膳食系的主席Mattfeldt-Beman说,丁香油酚具有防止痉挛的特性。因此,可以试着将新鲜的罗勒末加入酱料中,有助于防止胃肠道疾病。

  对症:高胆固醇

  一个中等大小的梨含有5g的膳食纤维,大部分的纤维都是以胶质的形式存在,这有助于冲走坏胆固醇(坏胆固醇的堆积是心脏病的危险因素之一)。

荞麦蜂蜜

  对症:咳嗽

  美国宾夕法尼亚州立大学的一项研究发现,两茶勺浓郁、深棕色的蜂蜜比非处方的止咳药还要有效,它能缓解咳嗽,减少孩子咳嗽的频率。加州Chef诊所的主管John La Puma博士说,蜂蜜的抗氧化物质杀菌特性能润滑发炎红肿的喉部组织。

卷心菜

  对症:溃疡

  2002年美国约翰霍普金斯医学院的一项研究发现,卷心菜中含有一种化学物质——莱菔硫烷,这种化学物质能彻底有效地消除幽门螺旋杆菌(这种细菌能造成胃部和消化道溃疡)。在幽门螺旋杆菌到达肠道之前,莱菔硫烷就能将其清除,有助于防止消化道肿瘤的产生。每天一小碗卷心菜大概仅有34卡路里的热量,却能提供3g的纤维和75%的维生素C。

火鸡

  对症:失眠

  一份3盎司的火鸡治疗失眠的效果几乎等于你一天所需的全部色氨酸(一种必须氨基酸,有助于帮助机体产生血清素和褪黑素,这两种激素能调节睡眠)。研究发现,患有失眠的人都缺乏色氨酸。

无花果

  对症:痔疮

  四粒无花果含有3g纤维,有助于通便,从而防止痔疮的发生。无花果还能为人们提供钾日摄入量的5%,以及锰日摄入量的10%。

橘子汁

  对症:疲惫

  一杯4盎司的果汁中含有的果糖是最完美的提神饮品。一些研究发现,维生素C能有效对抗自由基引起过氧化产生的压力,能为机体提供能量,而且维生素在代谢铁时也起着重要的作用,这有助于加强机体通过血液循环将氧运送到各个组织,氧气充足也会让你感到精力充沛。

甘菊茶

  对症:胃灼热

  新泽西临床草药医生Dale Bellisfield说,“甘菊能缓解消化道炎症,痉挛和排气”。两茶勺甘菊,10盎司的开水冲泡20分钟,盖上杯盖,使精油溶于水中。你可以每天喝上几杯这样的茶,能完全治愈胃灼热。

土豆

  对症:头痛

  一个中等大小的土豆中含有37g的碳水化合物,能通过升高血清素水平来缓解头痛症状,而且你摄入的脂肪和蛋白质仅在2g以下。

如何挑鱼呢?

①闻味道:尽量不要买那种闻起来有酸臭味、氨水味儿的鱼。

②看鱼眼:尽量买鱼眼是清晰明亮、有一点鼓起的鱼。

③看鱼鳃:尽量买鱼鳃是鲜红色的鱼。

④看背部肌肉:尽量挑选鱼背有弹性(弯了能收回的)的鱼。

注意:现杀的活鱼,可以先放冰箱冷藏2小时,经历了排酸过程再烹饪。

22705-wrmjwysc95.png

延伸阅读,鱼身上的其它宝贝

鱼鳞

被你丢弃的“宝贝”
杀鱼的时候,很多人最痛恨的就是鱼鳞,腥味重、还硬,往往“除之而后快”。但其实鱼鳞不仅能吃,营养价值还很高!

1、卵磷脂
鱼鳞中含有较多的卵磷脂,其能增强大脑记忆力、延缓细胞衰老。

2、不饱和脂肪酸
能帮助胆固醇代谢,调节血液中脂肪和胆固醇的含量。

鱼鳞冻

①先将鱼鳞放入漏勺,用清水冲洗干净,沥去水分,放入干净的容器;

②葱切段、姜切片放在鱼鳞上,并撒上一小勺盐,接着加入清水(水量没过鱼鳞约1cm);

③水开后,放入锅内中火蒸25-30分钟;

④将蒸好的鱼鳞过滤,取滤汁晾凉,用容器盛起,放进冰箱冷藏2小时以上;

⑤鱼鳞冻成型后是晶莹剔透的,可以加黄瓜丝、少许蒜末和香油凉拌,也可以直接蘸酱。

The Ministry of Human Resources and Social Security, the General Administration of Market Supervision, and the Bureau of Statistics jointly released new occupational information, including artificial intelligence engineering and technical personnel, IoT engineering and technical personnel, big data engineering and technical personnel, cloud computing engineering and technical personnel, digital management engineers, and building information model technicians. E-sports operators, e-sportsmen, drone drivers, agricultural managers, IoT installation and commissioners, industrial robotic systems operators, industrial robotic systems operators and other 13 new occupations.

84721-hi2x58802ub.png

On April 1, 2019, the Ministry of Human Resources and Social Security, the General Administration of Market Supervision, and the Bureau of Statistics officially released artificial intelligence engineering technicians, IoT engineering and technical personnel, big data engineering and technical personnel, cloud computing engineering technicians, and digital management personnel. 13 new career information such as building information model technicians, e-sports operators, e-sportsmen, drone drivers, agricultural managers, IoT installation and commissioners, industrial robot system operators, and industrial robot system operators. This is the first new occupation since the promulgation of the 2015 National Occupational Classification. The Ministry of Human Resources and Social Security organizes occupational classification experts, which are selected in accordance with the new professional assessment standards and procedures, and are selected from the new occupational proposals submitted by the relevant reporting units, and are widely publicized after consultation with the public. The first batch of new occupations are mainly concentrated in the high-tech field, with the following characteristics:

The upgrading of the industrial structure has spawned a new career in high-end professional technology. At present, China's economy has shifted from a high-speed growth stage to a high-quality development stage, which puts new demands on the scientific and cultural quality and ability level of workers. In recent years, with the extensive use of artificial intelligence, Internet of Things, big data and cloud computing in China, the high-tech industry related to this has become a new growth point for China's economy. The demand for employees has increased significantly, forming a relatively stable working population. Four professional and technical new occupations, such as artificial intelligence engineering technicians, IoT engineering technicians, big data engineering technicians and cloud computing engineering technicians, came into being. These new occupations are high-tech industries, supported by high professional technical knowledge and ability, and practitioners generally have higher education.

The advancement of science and technology has triggered traditional career changes. With the adoption of emerging technologies, the traditional first and second industries are becoming more and more intelligent. The practice of industrial robots replacing simple labor on production lines has been promoted in some areas, and robot-related production, service and training companies have flourished. The large-scale use of industrial robots has dramatically increased the demand for industrial robot system operators and system operators, making it a new profession in the modern industrial production line. With the maturity of drone technology, it is possible to use drones to complete high-risk and toxic and harmful work that is difficult for humans to complete. Plant maintenance, mapping, photography, high-voltage cables and agricultural and forestry inspections can be carried out by drones. It also has a wide application space in the fields of logistics and so on. The use of a large number of drones has made drone drivers a veritable emerging profession.

The widespread application of informatization has spawned new professions. Informatization is like a catalyst, which transforms the content of professional activities in traditional occupations, and thus derives new occupations, such as digital managers and building information model technicians. With the widespread application of the Internet of Things in the fields of office and residential, the informatization and the modern manufacturing industry are deeply integrated, and the demand for the staff of the Internet of Things installation and debugging has surged. In recent years, driven by international competitions, computer-based competitive projects have developed rapidly, and e-sports has become a huge emerging industry. The professionalization of e-sports operators and e-sportsmen is imperative. In the agricultural sector, agricultural economic cooperative organizations such as farmers' professional cooperatives have developed rapidly. The demand for management services such as agricultural production organization, equipment operation, technical support, product processing and sales is strong, and agricultural managers have emerged.

免责声明
本博客部分内容来自于互联网,不代表作者的观点和立场,如若侵犯到您的权益,请联系[email protected]。我们会在24小时内进行删除。