现在的位置: 首页 > 软件开发
0℃
2013年08月17日 程序设计 ⁄ 被围观 3,120+
AOP通俗来讲,就是在不改变既有代码的基础上增加新功能,比如常用的地方有日志记录,可能我们已经上线了产品,代码也已经进行了发布,如何在此种情况下,增加log记录,打印出后台函数的调用记录,参数传递情况等等。在面向对象的设计过程中,已经有其他的方式可以利用,比如继承,组合,代理等,但是相对于AOP来说,都没有后者灵活。本文基于JavaScript语言进行介绍。 Aspect Oriented Programming (AOP) is a technique for augmenting the behavior of objects, methods, and functions non-invasively. AOP all...
阅读全文
0℃
2013年08月15日 Web设计 ⁄ 被围观 3,144+
在编程的过程中,尤其是文本的处理,我们很多时候都需要正则表达式,比如,验证用户输入的Email是否格式正确,电话号码是否符合规范,或者其他的自定义规则。对新手来说,熟记正则表达式的规则比较困难,那么有没有一种更符合自然语义的正则表达式呢,本文会给你答案。 Most newbie (and some seasoned) programmers have difficultly constructing Regular Expressions. Many a times one needs to create a Regexp quickly to test a a particular piece of code. However, not being comfortable withe Regexp...
阅读全文
0℃
2013年08月15日 Web设计 ⁄ 被围观 3,269+
php中使用session的场合主要是用户登录信息的记录和页面之间数据的传递,session的有效期为浏览器的生存期,直到用户关闭浏览器,服务器中的session数据才清除。本文介绍了怎么样利用session来存储变量。 In this article I’m going to show you some simple things to work with sessions in php, these are mostly used to store information about your users, like usernames, choices selected by users and similar, these however are stored on the server and deleted once the user closes the browser....
阅读全文
0℃
2013年08月15日 程序设计 ⁄ 被围观 3,931+
上一篇文章《libiec61850在OpenSCADA系统中的使用》介绍了libiec61850和OpenSCADA系统的混合编译,编译是没有问题,但是做成模块的话运行起来还是会出现问题,其中最主要的问题就是库的链接,导致运行时函数找不到,原因出在C和C++函数相互调用的关系,libiec61850是C库,OpenSCADA是C++。 本文采用将libiec61850编译成动态库的方式供OpenSCADA系统调用,步骤如下: 动态库的编译安装 1. 修改libiec61850的 "lib61850\make\target_system.mk" 文件,编译选项添加fPIC CFLAGS += -g CFLAGS += -fPIC 2. 修改libiec...
阅读全文
0℃
2013年08月15日 Web设计 ⁄ 被围观 3,105+
在页面设计的过程中,总会使用CSS来进行样式设计,样式的选择器也无非常用4种,ID,Class,Tag和Universal,优先级从高到底,那么怎么样设计选择器和样式,可以提高CSS的解析效率,平时的设计中又会出现哪些误区,那么如下的文章值得一看。 Writing good CSS code can speed up page rendering. Essentially, the fewer rules the engine has to evaluate the better. MDN groups CSS selectors in four primary categories, and these actually follow the order of how efficient they are: ID Rules Class Rul...
阅读全文
0℃
2013年08月13日 移动开发 ⁄ 被围观 3,411+
Google I/O 2013 大会推出了一款新的Android开发工具Android Studio IDE,与Eclipse相差不多,实际的开发选择哪一款随个人喜好,像我平时的开发都是以Eclipse为主,ant辅助进行构建,也支持了一种新的构建工具Gradle,Android Studio IDE内置的默认构建工具就是Gradle,关于Gradle的详细资料可以参照官方网站。本系列文章介绍了Android开发过程中的Gradle Build,共有7篇文章,由浅入深。 At Google I/O 2013 Google announced some new developer tools including the new Android Studio IDE, and a new build s...
阅读全文
0℃
2013年08月13日 程序设计 ⁄ 被围观 3,154+
在开发Java的过程中,怎么样合理的利用Object,资源的申请与释放,每种类型的Object占用的内存大小是多少,有没有可以替换的lib可以使用。鉴于效率的考量和内存占用的考量,我们应该选择什么样的数据结构,那么如下的文章将会找到答案。 This article will give you the general advices on memory consumption optimization in Java. Memory usage optimization is the most important type of optimization in Java. Current systems are limited by memory access times rather than by CPU frequency (otherwi...
阅读全文
1℃
2013年08月09日 程序设计 ⁄ 被围观 4,612+
libiec61850 是一套开源的C库,它实现了大多数的61850的协议转换,原理同样是基于MMS协议的映射。本文要将libiec61850用在OpenSCADA系统中,使OpenSCADA系统可以提供智能变电站61850协议的接入。 简介 libiec61850 is an open-source (GPLv3) implementation of an IEC 61850 client and server library. It is implemented in C to provide maximum portability. It can be used to implement IEC 61850 compliant client and server applications on embedded systems and PCs running Linux and Windows. Inclu...
阅读全文
×
腾讯微博