此照片是我在一間大陸飯店吃午飯時拍下的,當時伙記們很落力地捉老鼠,完全沒有顧慮到在座客人的感受,但是大陸人也很奇怪,這好像是平常事,而我也跟其它客人一樣,留在座位觀看,只求老鼠不要躲過來便算,這就是大陸的生活。如果事情發生在香港,客人會奪門而走,而這飯店肯定要見報被投訴,可是在大陸,這便是一件很平常普通的小事。
IT人在工廠日記 – 和諧號火車晚點
URL block List for a China Company
1. Introduction
To protect company network from malware, worm, virus, spam, etc in suspected malicious web sites, we need to define an URL block list (in next section), and setup to restrict those URLs in our network Firewall. This post will list out those suspected URLs, and we will submit this document to management review and approve.
2. URL Block List
2.1 Sports
2.1.1 General Suspected URL:
2.1.2 China Suspected URL:
http://www.xinhuanet.com/sports/
- Streaming Video:
- General Suspected URL:
- China Suspected URL:
http://player.baidu.com/yingyin.html
http://www.ku6.com/client_ku6speed/
- Social Media
- General Suspected URL:
- China Suspected URL:
https://messenger.yahoo.com/web/
- Software downloads
- General Suspected URL:
- China Suspected URL:
- P2P sharing
- General Suspected URL:
- China Suspected URL:
http://www.btchina.net/
http://www.verycd.com/
http://www.btpig.com/
http://www.3e-online.com/
http://www.bbsmovie.com/
http://www.21ou.com/。
http://www.jlpzj.com/
http://www.dream2008.cn/
http://www.cnxp.com/
http://www.btbbt.com/
- Torrents
- General Suspected URL:
- China Suspected URL:
http://thepiratebay.org/
http://isohunt.com/
http://torrentz.com/
http://btjunkie.org/
http://torrentportal.com/
http://www.gamestorrents.com/
http://www.torrentreactor.net/
http://www.sumotorrent.com/
http://www.seedpeer.com/
Reference Sites:
http://urlblacklist.com/?sec=download
http://www.squidguard.org/blacklists.html
http://www.business-in-site.com/webmaster-articles/huge-list-of-156-video-streaming-sites/
http://www.blogsdna.com/923/top-20-best-peer-2-peer-p2p-file-sharing-programs-applications-software.htm
https://torrentfreak.com/top-10-largest-file-sharing-sites-110828/
Introduction of ITIL v3 Framework
WHAT IS ITIL?
ITIL is the most widely adopted approach for IT Service Management in the world. It provides a practical, no-nonsense framework for identifying, planning, delivering and supporting IT services to the business.
ITIL: OVERVIEW AND BENEFITS
ITIL advocates that IT services must be aligned to the needs of the business and underpin the core business processes. It provides guidance to organizations on how to use IT as a tool to facilitate business change, transformation and growth.
The ITIL best practices are currently detailed within five core publications which provide a systematic and professional approach to the management of IT services, enabling organizations to deliver appropriate services and continually ensure they are meeting business goals and delivering benefits.
The five core guides map the entire ITIL Service Lifecycle, beginning with the identification of customer needs and drivers of IT requirements, through to the design and implementation of the service into operation and finally, on to the monitoring and improvement phase of the service.
Adopting ITIL can offer users a huge range of benefits that include:
- improved IT services
- reduced costs
- improved customer satisfaction through a more professional approach to service delivery
- improved productivity
- improved use of skills and experience
- improved delivery of third party service.
ITIL USERS
ITIL has been adopted by thousands of organizations worldwide, such as NASA, the UK National Health Service (NHS), HSBC bank and Disney™. ITIL is also supported by quality services from a wide range of providers including examination institutes, accredited training providers and consultancies, software and tool vendors and well known service providers such as IBM, Telefonica, HP and British telecom (BT).
A comprehensive qualifications scheme offering a variety of training courses and certifications has been developed against the guidance. This scheme can help organizations to effectively implement ITIL, achieving success by ensuring that employees have the relevant knowledge, skills and techniques, but most importantly, ensuring the entire organization is using a common language and are fully invested in the process.
ITIL Best Practices also underpin the foundations of ISO/IEC 20000 (previously BS15000), the International Service Management Standard for organizational certification and compliance. Organizations can therefore implement ITIL to achieve organizational certification.
How to protect you against Android phone loss/theft
How to protect you against Android phone loss/theft
(1) At Android smartphone
1. Select “Settings” icon, then “Location and security”
2. Select “Device administration”
3. Enable “Android Device Manager”
(2) At PC
1. Go to https://www.google.com/android/devicemanager
2. Login your Android related Gmail account
3. Now you can LOCATE, RING or LOCK your phone or ERASE your phone’s data in case of theft or loss.
中國內地遺失回鄉卡/證的補領手續
由即日起,香港中旅社為應付港人於中國內地遺失回鄉卡/證的情況,現可替港人即日辦妥出境證件(即臨時入出境通行證)。 因此,如在內地失卡,必須於當日下午3:30前到羅湖補卡中心代辦補領手續一般來說,可即日領取臨時入出境通行證返港,免遭滯留內地。如於當日黃昏及/或晚上才到羅湖補卡中心代辦補領手續則可於第二天中午12:30前領取臨時入出境通行證返港。
該補卡中心之地址及辦公時間如下:
地址:羅湖中旅社補領中心 ─ 連廊2樓C4室 (即羅湖商業城對面)
辦公時間:星期一至星期日(上午8:30至下午9:30)
查詢電話 : 852-2334-8833 或 86-755-8234-7136
費用:人民幣230-250元(如能提供證件相片2張,費用為人民幣 230元,否則需支付人民幣250元)
補領手續及時間由中旅社作最後的決定。返港後 , 必須到香港的中旅社辦理補領回鄉卡的手續。
中旅社亦提醒市民到內地前應影印身份證、回鄉卡及護照。如對以上有任何問題, 請致電 852-2334-8833 或 86-755-8234-7136作出查詢。
Refresh to display a web page using Python
Python Program Example 1.
If you’re going to need a refresh on the same tab, you’ll need selenium webdriver. After installing selenium using pip, you can use the following code:
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
driver = webdriver.Firefox()
driver.get("http://www.python.org")
while True:
time.sleep(10)
driver.refresh()
If you are browsing a static page, you can pass a parameter in it and run, for example passing "pycon" to search as below script:
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Firefox()
driver.get("http://www.python.org")
assert "Python" in driver.title
elem = driver.find_element_by_name("q")
elem.clear()
elem.send_keys("pycon")
elem.send_keys(Keys.RETURN)
assert "No results found." not in driver.page_source
driver.close()
Python Program Example 2.
from link http://geekinessthecoolway.blogspot.hk/2013/05/tired-of-refreshingscript-for-automatic.html
A script will automatically refresh the page after every few seconds,so that my keyboard’s F5 button is spared. But still there is redundancy, one has to keep looking at the same thing again and again to check if any change has happened. So,I added few more lines to the script. Now whenever the result will be declared (or there will be any new notification) a song will start playing automatically.
import urllib
import time
import os
import pygame
uri = “http://upresults.nic.in” #url where result will be declared
source = urllib.urlopen(uri).read()
nw_source=source
cntr=0
flg=True
while nw_source==source:
if flg:
time.sleep(5) #refresh every 5 seconds
try:
nw_source = urllib.urlopen(uri).read()
except IOError:
print “Error in reading url”
flg=False
continue
cntr+=1
print cntr,” times refreshed”flg=True
pygame.init()
pygame.mixer.music.load(“kar_chale _hum_vida.mp3”) #pass the path to the music file
pygame.mixer.music.play()
while True:
pass
Using Webdriver under Selenium:
WebDriver是主流Web应用自动化测试框架,具有清晰面向对象 API,能以最佳的方式与浏览器进行交互。
支持的浏览器:
- Mozilla Firefox
- Google Chrome
- Microsoft Internet Explorer
- Opera
- Safari
- Apple iPhone
- Android browsers
Selenium WebDriver 又称为 Selenium2。
Selenium 1 + WebDriver = Selenium 2
标准的安装步骤
- 选择Python的版本。Python主流的有两个大的版本,2.7和3.5(请注意,从Python的3.5版本开始,不再支持Windows XP操作系统,Windows XP用户请安装3.4版本)。我们的例子将会选用面向未来的3.5版本。
- 在Windows安装Selenium2.0,有两种途径。使用pip命令行或者源码安装。以下两种方法,使用任何一个均可。推荐pip的方式。
- 方法一:pip命令行安装,运行 | cmd,打开命令行,
-U
其实就是--upgrade
,升级安装。pip install -U selenium
- 方法二:源码解压安装,前往https://pypi.python.org/pypi/selenium下载最新版的PyPI版本的Selenium,解压后执行
python setup.py install
- 方法一:pip命令行安装,运行 | cmd,打开命令行,
Source Information: http://www.jianshu.com/p/3ce95cbc65be
Selenium 3.0.1 出现的问题以及解决
3.0.1 更新以后,需要做两个操作:
- Geckodriver executable needs to be in PATH。Geckodirver的下载地址:https://github.com/mozilla/geckodriver/releases
报错内容:WebDriverException:Message:'geckodriver'executable needs to be in Path
geckodriver是一原生态的第三方浏览器,对于selenium3.x版本都会使用geckodriver来驱动firefox,所以需要下载geckodriver.exe。放置在Path 环境变量可以访问到的地方。例如 C:python34
- 需要将火狐的安装路径放到path,然后重启(必须重启电脑)
报错内容:selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.
What is “China Manufacturing 2025” ?
Industry 4.0是实体物理世界与虚拟网络世界融合的时代。但德国业界对Industry 4.0的响应者却不多,原因之一是所谓的虚拟网络-实体物理系统(Cyber-Physical System,CPS)融合的主要思想,美国早在若干年前就已提出。未来 10 年,基于信息物理系统(Cyber-PhysicalSystem,CPS)的智能化,将使人类步入以智能制造为主导的第四次工业革命。产品全生命周期、全制造流程数字化以及基于信息通信技术的模块集成,将形成一种高度灵活、个性化、数字化的产品与服务新生产模式。
013 年 12 月 12 日,美国白宫召开了第一次CPS成员会议。李杰教授作为专家组成员参加了会议。他们要讨论的事情,与德国的Industry 4.0其实是一样的内容。虽然德国先提出了概念,但他们刚刚起步、着手转型,而美国一直在做以CPS为概念的先进制造。或许正是这方面的原因,德国也于2013年10月邀请李杰教授前往分享他们在美国的成功案例。
对于 CPS 的概念,李杰教授认为可以用日常生活中常见事物来解释。正如人们在 facebook 里建立的各种关系,在物理世界里是不可见的,却可以得出这个人的生活社群、行为习惯、过往经历等等。同样,任何产品都有虚拟和实体两个世界(譬如:苹果手机是实体,但APP是虚体),如何将虚拟世界里的关系透明化,正是Industry 4.0时代需要做的。未来产品(譬如:机床、飞机、汽车、等等)都应该会有实与虚的价值接合。这样的道理,是德国人提出概念的依据,但是李杰教授团队在美国已经自2001年开始积累大量和工业界成功合作建立的案例。
需要强调的是,德国提出的Industry 4.0和美国的CPS,核心要义都是制造业基于数据分析的转型。
结语
德国制造业是世界上最具竞争力的制造业之一,在全球制造装备领域拥有领头羊的地位。这在很大程度上源于德国专注于创新工业科技产品的科研和开发,以及对复杂工业过程的管理。
德国拥有强大的设备和车间制造工业基础,在世界 “信息技术” 领域拥有很高的能力水平,在 “嵌入式系统” 和 “自动化工程” 方面也有很专业的技术,这些因素共同奠定了德国在制造工程工业上的领军地位。通过 “Industry 4.0” 战略的实施,将使德国成为新一代工业生产技术(即: 信息物理系统)的供应国和主导市场,会使德国在继续保持国内制造业发展的前提下再次提升它的全球竞争力。
China Manufacturing 2025
中国国务院于2015年5月8日由李克强总理签批,公布了“China Manufacturing 2025”,这是是中国版的“Industry 4.0”规划。
“China Manufacturing 2025”规划提出了中国制造强国建设三个十年的“三步走”战略,是第一个十年行动纲领。
China Manufacturing 2025
指导思想
以促进制造业创新发展为主题,以提质增效为中心,以加快新一代信息技术与制造业深度融合为主线,以推进智能制造为主攻方向,以满足经济社会发展和国防建设对重大技术装备的需求为目标,强化工业基础能力,提高综合集成水平,完善多层次多类型人才培养体系,促进产业转型升级,培育有中国特色的制造文化,实现制造业由大变强的历史跨越。
基本方针
创新驱动、质量为先、绿色发展、结构优化、人才为本。
战略目标
力争用十年时间,迈入制造强国行列;到2035年,我国制造业整体达到世界制造强国阵营中等水平;新中国成立一百年时,制造业大国地位更加巩固,综合实力进入世界制造强国前列。
Info Source: http://www.digitser.net/en-US/enterprise_culture/pro_advice/pro_advice_004.html
What is Industry 4.0 ?
Industrial Applications« BACK TO INDUSTRIAL APPLICATIONS
Industry 4.0 – What’s That About?
By John Donovan for Mouser Electronics
First we had inflection points; then paradigm shifts were all the rage. Now we are hearing about a new Industrial Revolution – Industry 4.0. According to its proponents it is a new method of production that is creating a fourth Industrial Revolution. Really? What’s that about?
To back up a bit – actually about 250 years – James Watt’s improvements to the Newcomen steam engine in the late 18th century kick started the First Industrial Revolution. Watt did not invent the steam engine, but his numerous innovations increased the productivity of the textile industry by three orders of magnitude. Mechanized factories had arrived.
The Second Industrial Revolution dates from Henry Ford’s introduction of the assembly line in 1913, which resulted in a huge increase in production of Model T’s – over 15 million by the time they were discontinued in 1927. Soon every other manufacturing industry was using assembly lines to increase efficiency and productivity as well as cut costs. The days of mass production had arrived.
The Third Industrial Revolution resulted from the introduction of the computer onto the factory floor in the 1970s, giving rise to the automated assembly line. For mechanical work, computers increasingly replaced humans, another major inflection point in productivity. Today, seemingly every manufacturing function that can be automated has been. Highly automated factories turn out the complex consumer electronics products that we take for granted at prices we can afford.
Industry 4.0
But wait – there is more. The vision of Industry 4.0 is for “cyber-physical production systems” in which sensor-laden “smart products” tell machines how they should be processed; processes would now govern themselves in a decentralized, modular system. Smart embedded devices start working together wirelessly either directly or via either the Internet ‘cloud’ – the Internet of Things (IoT) – to once again revolutionize production. Rigid, centralized factory control systems give way to decentralized intelligence as machine-to-machine (M2M) communication hits the shop floor. This is the Industry 4.0 vision of the Fourth Industrial Revolution.
The concept of cyber-physical systems (CPS) was first defined by Dr. James Truchard, CEO of National Instruments, in 2006, based on a virtual representation of a manufacturing process in software. In January 2012, the German Federal Ministry of Education and Research set up a working group to draft comprehensive strategic recommendations for implementing “Industry 4.0”, a term coined by the group. The Industry 4.0 Project is now part of the German government’s official High-Tech Strategy, which it is actively pursuing in conjunction with private sector partners. Discussions about Industry 4.0 took center stage at April’s Hannover Fair, which is why we are suddenly hearing about it.
Industry 4.0 is currently more of a vision than a reality, but it is one with potentially far reaching consequences; and the concept continues to evolve as people think of innovative ways to implement it. However, some things are already clear:
Sensors will be involved at every stage of the manufacturing process, providing the raw data as well as the feedback that is required by control systems.
Industrial control systems will become far more complex and widely distributed, enabling flexible, fine-grained process control.
RF technologies will tie together the distributed control modules in wireless mesh networks, enabling systems to be reconfigured on the fly in a way that is not possible with hard-wired, centralized control systems.
Programmable logic will become increasingly important since it will be impossible to anticipate all the environmental changes to which control systems will need to dynamically respond.
Smart, connected embedded devices will be everywhere, and designing and programming them will become that much more challenging – not to mention interesting and rewarding.
Most of the techniques and technologies needed to implement Industry 4.0 exist today. For example, the radios, sensors, and GPS modules used for asset tracking could just as easily track circuit board assets around the factory floor as they evolve from slabs of FR4 into server blades. The Industry 4.0 spin is that instead of simply attaching an RFID tag and passively tracking the PCB down a linear assembly line, the pick-and-place module could alert inventory when it was running short of memory chips. If the response was that they could not be restocked in time, then all the relevant machines in the entire factory – from the cutting machines and drill presses right through to the systems assembly robots – would reprogram themselves to begin producing the next product for which all parts were in stock, drawing them down from remote inventory as needed, automatically delivered to the right machine just-in-time. Meanwhile, second-source suppliers would be alerted and their assets automatically reconfigured accordingly. The result would be an enormous savings in time and cost versus what even current heavily automated factories can deliver.
Revolution or Evolution?
Earlier Industrial Revolutions did not happen overnight, nor were they recognized as such at the time. For its part, Industry 4.0 may or may not be recognized as revolutionary – rather than evolutionary – in retrospect. Yet it is a natural consequence of M2M communication further automating the factory floor, and like its predecessors it should result in more plentiful, lower cost products which is a net benefit for all concerned.
Whether revolution or evolution, industrial production is about to become a lot more efficient. Stay tuned for more exciting developments. Better yet, get involved in making them happen.
Info Source: http://www.mouser.cn/applications/industry-40/
Reference Info/Link for Python’s Django Development
A great document for more complex installations—those that host multiple Django Web sites (projects) using only one instance of Apache—can be found at –>
http://forum.webfaction.com/ -> search for ‘Django’
You can find out more about some of the possible Web server arrangements at –>
http://code.djangoproject.com/wiki/ServerArrangements.
More about Django and database installation at –>
http://docs.djangoproject.com/en/dev/topics/install/#database-installation.
You can download Django-nonrel from –> http://www.allbuttonspressed.com/projects/django-nonrel
followed by one of the adapters, –> https://github.com/FlaPer87/django-mongodb-engine (Django with MongoDB), or –> http://www.allbuttonspressed.com/projects/djangoappengine (Django on Google App Engine’s datastore).
Because Django-nonrel is (at the time of this writing) a fork of Django, you can just install it instead of a stock
Django package. The main reason for doing that is because you want to
use the same version for both development and production. As stated at
–> http://www.allbuttonspressed.com/projects/django-nonrel, “the modifications to Django are minimal (maybe less than 100 lines).” Django-nonrel is available as a Zip file,
You can find all of the runserver options at –>
http://docs.djangoproject.com/en/dev/ref/django-admin/#django-admin-runserver.
To learn more about templates and tags, check out the official documents page at –> http://docs.djangoproject.com/en/dev/ref/templates/api/
#basics.
To read more about using render_to_response(), check out these pages from the official documentation: –>
• http://docs.djangoproject.com/en/dev/intro/tutorial03/#ashortcut-render-to-response
• http://docs.djangoproject.com/en/dev/topics/http/shortcuts/#render-to-response
To find out when a QuerySet is evaluated, check out the official
documentation at –> http://docs.djangoproject.com/en/dev/ref/models/querysets/.
Explanations of CSRF are beyond the scope of this book, but you can read more about them here: –>
• http://docs.djangoproject.com/en/dev/intro/tutorial04/#writea-simple-form
• http://docs.djangoproject.com/en/dev/ref/contrib/csrf/
To learn more about testing in Django, check out the documentation at –>
http://docs. djangoproject.com/en/dev/topics/testing.
You can read more about how OAuthworks at the following locations: –>
http://hueniverse.com/oauth
http://oauth.net
http://en.wikipedia.org/wiki/Oauth
more details on this at –>
http://docs.djangoproject.com/en/dev/howto/deployment/modwsgi/#serving-the-admin-files
Twitter maintains a list of the most popular ones at –>
http://dev.twitter.com/pages/libraries#python.
To find out more about Django’s authentication system, check the documentation at –>
https://docs.djangoproject.com/en/dev/topics/auth/.