分类目录归档:Lab

关于MQTT介绍非常清晰简洁的文章

A Brief, but Practical Introduction to the MQTT Protocol and its Application to IoT

https://zoetrope.io/tech-blog/brief-practical-introduction-mqtt-protocol-and-its-application-iot

MQTT is a standardised publish/subscribe messaging protocol. It was designed in 1999 for use on satellites and as such is very light-weight with low bandwidth requirements making it ideal for M2M or IoT applications. As such, it has become one of the most common protocols for those situations.

What follows is a brief introduction to the protocol and some examples of its use. It is not intended to be a comprehensive reference on MQTT, but it should give enough information to get developers up and running. If you’re looking for a more complete discussion of the protocol, HiveMQ have published a series of articles available here.
Publish / Subscribe

The publish / subscribe (often called pub-sub) pattern lies at the heart of MQTT. It’s based around a message broker, with other nodes arranged around the broker in a star topology. This is a very different model to the standard client/server approach, and at first it might seem a little strange, but the decoupling it provides is a huge advantage in many situations.

Clients can publish or subscribe to particular topics which are somewhat like message subjects. They are used by the broker to decide who will receive a message. Topics in MQTT have a particular syntax. They are arranged in a hierarchy using the slash character (/) as a separator, much like the path in a URL. So a temperature sensor in your kitchen might publish to a topic like ‘sensors/temperature/home/kitchen’.

Let’s look at an example: Imagine a weather service which has a network of internet connected temperature sensors all over the world. All of these sensors maintain a connection to a broker and every ten minutes, they report the current temperature. They publish to a particular topic based on their location in the following format:

sensors/temperature/{country}/{city}/{street name}

So a sensor on Baker Street in London would publish to ‘sensors/temperature/uk/london/baker_street’ with a message containing the current temperature.

 

END.

 

 

感悟自然,BBC励志小视频《永不放弃的鬣蜥》

Never giving up iguana from BBC Planet Earth II

永不放弃的鬣蜥 

这段视频来自 BBC《Planet Earth 地球脉动 II》,BBC纪录片导演保Paul Williams把刚出生不久的鬣蜥成功到达目的地的励志景象“拍出了史诗大片的感觉”。由于该视频在世界瞬间广为流传,2017 年 5 月 15 日,英国学院奖(BAFTA)将“最佳瞬间”(Virgin TV's Must See Moment)奖,颁给了这惊心动魄的 2 分钟。这段视频浓缩了好莱坞大片的所有要素,能给人传递一种震撼的励志力量。

腾讯视频链接:Never giving up iguana from BBC Planet Earth II

References:

[1] This Planet Earth 2 iguana vs. snake scene plays out like a chase from The Bourne Identity
https://www.independent.co.uk/arts-entertainment/tv/news/planet-earth-2-ii-episode-1-iguana-snake-chase-scene-a7404201.html
We spoke to the editor of the scene being hailed as potentially the 'greatest TV moment ever'

[2] The iguana v snakes chase gives Planet Earth II its first breakout moment
https://www.theguardian.com/tv-and-radio/shortcuts/2016/nov/08/iguana-racer-snakes-planet-earth-ii-bbc
The nailbiting showdown between the racer snakes and baby iguana of Fernandina island on the BBC nature show was already impressive – but then the internet got hold of it
I am guessing that in the great battle of racer snakes v marine iguana, you were on the side of the iguana. It’s hard to find people who were cheering on the snakes of Fernandina island during Sunday night’s episode of Planet Earth II. In the standout scene of the show, one baby iguana, just hatched, starts its run as dozens of chaser snakes emerge, like ropes thrown out of the rocks, slaloming across the shingle, red tongues zipping and unzipping mouth holes.

END

考试成绩百分制转五级制Excel公式

假设分数在D列,从第三行开始,那么计算五级制的公式如下,可根据需要将公式中的D3替换为你表格中的情况。

=if(D3>90,"A+",if(D3>85,"A",if(D3>80,"B+",if(D3>75,"B",if(D3>70,"C+",if(D3>65,"C",if(D3>60,"D+",if(D3=60,"D","F"))))))))