现在的位置: 首页 > 程序设计
0℃
2013年08月05日 程序设计 ⁄ 被围观 3,687+
在开发Java的过程中,怎么样来监测一个对象占用的内存大小,对于调试程序,优化程序来说,有很大的帮助,本文介绍了一个开发包,JAMM (Java Agent for Memory Measurements),可以很方便的在程序的运行过程中动态监测对象的内存占用情况。 This short article shows how to measure java object memory size at runtime with JAMM, a java agent dedicated to measure actual object memory use including JVM overhead. JAMM uses the Instrumentation implementation provided by the JVM to compute memory usa...
阅读全文
0℃
2013年08月05日 程序设计 ⁄ 被围观 3,110+
在基于Java语言的开发过程中,DB相关的开发相信大家都接触过SQL语句,增删改查作为基本的操作,比较熟悉,那么JOIN,UNION, MERGE, DISTINCT这些高级的操作使用过没有呢?使用的过程中有哪些误用呢?有没有可能改善现在的SQL语句来提高程序的性能。本文介绍了几种常见的SQL误用场合,有语法方面的,改善效率方面的,下次,自己再做开发的时候,想想当前的SQL处理语句有没有可以完善的情况。 Java developers mix object-oriented thinking with imperative thinking, depending on their levels of: Skill (anyon...
阅读全文
1℃
2013年08月05日 程序设计 ⁄ 被围观 4,289+
简介 SCADA(Supervisory Control And Data Acquisition)系统,即数据采集与监视控制系统。SCADA系统是以计算机为基础的DCS与电力自动化监控系统;它应用领域很广,可以应用于电力、冶金、石油、化工等领域的数据采集与监视控制以及过程控制等诸多领域。详细可以从百度百科和维基百科了解。 安装环境 OS: Ubuntu 11 openscada-0.8.0.5 依赖包的安装 ####### 文字处理相关 sudo apt-get install gettext sudo apt-get install zlib1g-dev sudo apt-get install libgd2-xpm-dev sudo apt-get install libpcre3 ...
阅读全文
0℃
2013年08月04日 程序设计 ⁄ 被围观 3,146+
我们都知道发布Python模块的时候需要准备几份文件,其中就包括了setup.py和requirements.txt,这两份文件中都需要填写待发布模块的依赖关系,那么是不是这样就会出现信息的重复,维护起来也不方便呢? 如下的文章解释了这两个文件中重复信息的不同功用,前者为“虚引用”,后者为“具体引用”,那么他们利用的场合和背后的机制是什么样子的,马上就会知晓了。 There's a lot of misunderstanding between setup.py and requirements.txt and their roles. A lot of people have felt they are duplicated information ...
阅读全文
0℃
2013年08月03日 程序设计 ⁄ 被围观 3,115+
相信开发过C++语言的同学都知道,inline内联函数,get和set函数通常都写成内联机制,为的是提高程序的运行效率,缩短函数调用的时间。那么开发过Android的同学,也应该知道,android程序优化中有一条机制就是尽量不用get和set函数,因为Java中不支持C++的内联机制,所以只能舍弃get和set方法,尽管有失面向对象的访问机制,但是对手持设备来说,合理利用有限资源,提高运行效率才是首选。 本文中讲的是怎样在Python语言中利用内联机制,Python是解释性的语言,没有编译过程,那么怎么在Python中实现内联机制呢?相...
阅读全文
0℃
2013年08月03日 程序设计 ⁄ 被围观 3,401+
怎么样打包自己的Python模块,并且分享到PyPI,相信下面的文章会给你一个满意的答案! A completely incomplete guide to packaging a Python module and sharing it with the world on PyPI. Abstract Few things give me caremads like Python modules I want to use that aren’t on PyPI (pronounced “pie pee eye”, or “cheese shop”, not “pie pie”!). On the other hand – aspydanny points out – the current situation on packaging is rather confusing. Therefore I want to help everyone who has some...
阅读全文
0℃
2013年05月19日 程序设计 ⁄ 被围观 4,717+
昨天,测试了PHP方式登录百度空间,可以参见博文《PHP 登录百度空间》,今天通过抓包工具的分析,分析了博文的发布过程,实现了博文的自动发布。 参照代码如下: private function postArticle($baiduzoneurl, $title, $content, $category, $blogpower) { $post_data = array(); $post_data["title"] = $title; $post_data["tags[]"] = $category; $post_data["content"] = $content; $post_data["private"] = $blogpower == 0? "" : "1"; $post_data["imgnum"] = "0"; $post_data["bdstoken"] = $this-&...
阅读全文
1℃
2013年05月18日 程序设计 ⁄ 被围观 3,751+
前几天,先测试了利用Python脚本登录百度空间,问题已解决,可以参照我的博文《python 脚本登录百度空间》,今天完善了php方式的登录过程,原理同python脚本的登录。 代码如下: 登录代码 private function loginBaiduZone($user,$password) { //get Cookie $ret = $this->doHttpPost("https://passport.baidu.com/v2/api/?getapi&class=login&tpl=mn&tangram=false", "", ""); //get token $ret = $this->doHttpPost("https://passport.baidu.com/v2/api/?getapi&class=login&tp...
阅读全文
×
腾讯微博