现在的位置: 首页 > 软件开发
1℃
2013年09月20日 程序设计 ⁄ 被围观 5,380+
最新在做Ubuntu上面的C++开发,其中用到了部分C库,那么就涉及到C和C++之间的混合调用,C++调用C语言比较方便,反之则要稍作变通。 1. C++ 调用 C 语言 头文件包含: extern "C" { #include "iec61850_server.h" #include "iso_server.h" #include "acse.h" #include "thread.h" #include "model.h" } 函数调用: IedServer_observeDataAttribute(iedServer, (DataAttribute*)mmsi.dmm, observerCallback); 回调函数observerCallback的声明和实现如下: extern "C" { void observerCallback(DataAttrib...
阅读全文
4℃
2013年09月16日 云计算 ⁄ 被围观 7,268+
上个星期初步接触了物联网,正好工作手头有这些基本的器件,可以打造一个最简单的物联网环境,体验一下。本文的目的是展示一个基于温湿度数据采集的报警系统,当温度或者湿度达到一定的临界值,自动打开报警器,并且微信通知系统管理员,系统管理员也可以通过微信查询当前环境的实时温湿度数据。 【系统整体架构】 1. PC端本地通过OpenScada系统采集温湿度的数据 2. PC端本地将采集到的温湿度数据定时上报到云端,供PAD查询 3. PC端本地检测温湿度的阀值,启动或者关闭报警设备 4. PC端本地检测到报警信息,及时...
阅读全文
0℃
2013年09月07日 移动开发 ⁄ 被围观 3,684+
在Android的开发过程中,经常需要用到后台服务来完成非UI的工作,比如文件的下载,那么本文提到的IntentService便是一个很好的选择,可以利用它的队列机制,放入一系列的任务,然后系统会依次启动单独的Service来执行任务,免去了自己维护队列的麻烦。 In the new category Read the code I’m going to show the internals of the Android framework. Reading the code of the framework can give you a good impression about what’s going on under the hood. In addition to that knowing how the framework de...
阅读全文
0℃
2013年09月07日 Web设计 ⁄ 被围观 3,331+
JS代码有一个特殊的规则,那就是hoisted提升规则,函数的调用可以放在函数实现的前面,但是仅限于函数是以非表达式的场合声明实现的,那么变量的提升又有什么不同呢,在开发过程中还会出现哪些经常犯的错误,本文对此进行了介绍。 One of the trickier aspects of JavaScript for new JavaScript developers is the fact that variables and functions are "hoisted." Rather than being available after their declaration, they might actually be available beforehand. How does that work? Let's take a look...
阅读全文
0℃
2013年08月31日 程序设计 ⁄ 被围观 3,446+
不论什么语言的开发,都会涉及到下面的几个问题,代码的运行时间,性能出现的瓶颈,内存的占用情况,是否有内存的泄露等等,同样Python也不例外,本文介绍了几个优秀的Python工具,可以实现如上所述问题的检测机制,通过动态运行跟踪代码的执行情况,从而发现问题点。 While it’s not always the case that every Python program you write will require a rigorous performance analysis, it is reassuring to know that there are a wide variety of tools in Python’s ecosystem that one can turn to when the...
阅读全文
0℃
2013年08月31日 Web设计 ⁄ 被围观 3,375+
本文详细解读了Javascript语言中的作用域Scope和上下文Context。JS是一种特殊的解释型语言,尤其是闭包的概念,使得JS更灵活,还有事件的绑定bind,this指针的用法等,相信本文有所帮助。 JavaScript’s implementation of scope and context is a unique feature of the language, in part because it is so flexible. Functions can be adopted for various contexts and scope can be encapsulated and preserved. These concepts are behind some of the most powerful design patterns JavaScript has to offe...
阅读全文
0℃
2013年08月30日 程序设计 ⁄ 被围观 3,332+
ubuntu的版本支持的时间都有限, 如果过了支持的时间,更新源会被停用,那么只能采取old-releases源了。 查看当前系统的版本信息 chs@chs-VirtualBox:~/project/openscada$ sudo lsb_release -a [sudo] password for chs: No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 11.04 Release: 11.04 Codename: natty 可以发现当前的系统版本是11.04,代号为natty。 old-releases源信息如下 deb http://old-releases.ubuntu.com/ubuntu/ natty main restricted universe multiverse de...
阅读全文
0℃
2013年08月30日 Web设计 ⁄ 被围观 3,399+
在优化网站的过程中,其中一个规则就是尽量减少HTTP的请求数量,比如图片的合并,JS,CSS代码的合并等,本文介绍了一款PHP的自动合并脚本,可以在网站中使用,只要将原来需要引用JS和CSS的地方,换成该脚本的函数调用,那么脚本就会自动将过个请求合并成一个请求,重而提高网站的打开速度。 Combining Assets One of the basic tenets of making a web-page load quickly is reducing the number of HTTP requests that your page makes. One very common way of doing this, is assuring that all of your CSS fi...
阅读全文
×
腾讯微博