Oct 22
最近工作上用到MS SQL跨数据库查询,这里来个小小的总结,跨数据库查询这里分为两种情况:
- 数据库在同一台电脑上
现在有一台数据库服务器分别有数据库A和B,要访问在数据库A的user 和数据库B的deluser表中status=1的数据,中间通过userId关联
这种情况,只需要在访问的表名前加上数据库的名称B.dbo.就可以了
1
2
3
| SELECT *
FROM A.dbo.user u, (SELECT * FROM B.dbo.olduser WHERE STATUS=1) ou
WHERE u.userId = ou.userId |
Read the rest of this entry »
Apr 20
在maven中如何使用Jboss,在网上找了下,一般都是使用cargo-maven2-plugin这个插件来操作的,但是maven中明明提供了jboss-maven-plugin为啥不能用呢?历经千辛万苦终于找到了使用方法
1,配置pom.xml文件,增加
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.0.2</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jboss-maven-plugin</artifactId>
<version>1.3.1</version>
<configuration>
<jbossHome>/opt/jboss-4.2.2.GA</jbossHome><!-- jboss 安装目录 -->
<port>8080</port> <!-- jboss使用端口 -->
</configuration>
</plugin>
Read the rest of this entry »
Jan 04

XML/SWF Charts is a simple, yet powerful tool to create attractive charts and graphs from XML data.
通过XML和SWF生成图表,由于使用了Flash所以效果很酷的说。
但是生成数据时要按它的格式生成XML格式觉得很是繁琐,人个还是比较喜欢Open Flash Chart这类,支持JSON数据的。与生成XML比起来JSON生成起来就简单多了,而且现在流行的编程语言对JSON格式支持已经很完善了(或者通过第三方的包)。
Dec 18

Yahoo! makes a lot of structured data available to developers through its Web services, like Flickr and Local, and through other sources like RSS (news) or CSV documents (finance). There are also numerous external Web services and APIs outside of Yahoo! that provide valuable data. These disparate services require developers to locate the right URLs for accessing them and the documentation for querying them. Data remains isolated and separated, requiring developers to combine and work on the data once it’s returned to them.
用SQL的方式来访问Yahoo的提供服务的一些数据,如social, flickr, geo, search等。非常好的创意。
目前提供了三个类SQL的命令:SELECT, DESC, SHOW
使用和SQL基本一致:SELECT what FROM table WHERE filter,同时还能在后面加入LIMIT, OFFSET等命令。同时还支持"."语法,XML文件的节点也可通过"."语法进行访问(详见Dot-style syntax)。
返回结果可以是XML/JSON。
这时有两个地址可以运行YQL
http://query.yahooapis.com/v1/yql?q=[command] (需要认证)
http://query.yahooapis.com/v1/public/yql?q=[command] (不需认证)
它还提供有一个console(需要Yahoo帐号登录),如上面所抓图所示。
Link: YQL
Dec 06
TODO: I’ll convert the swf to other format, and upload to youtube or other video sites.
Intellij IDEA一个用于Java开发的IDE,功能非常出色,插件也有不少。(老鸟可以直接跳过)
除了Eclipse以外的,另一天空,只可惜是收费软件。
无聊制作了一个初级的视频教程,包括:创建Web Project, 配置WebLogic服务器和一个SQL Query插件。
I make a intellij IDEA beginner tutorial, including: create web project, config weblogic server adn SQL Query plugin.
intellijidea(点击观看 click me)
才发现WP不支持swf :<
PS:第一次制作这种教程,存在一些问题,没有考虑到分辨率大小,窗口边框和任务栏没有录下(由于使用了WindowBlind),等等
This’s my first video tutorial, so some problem exist: not consider screen resolution, window border and taskbar disappear(Because of WindowBlind), and so on.
Sep 16
Link: improve web application performance(Wordpress的站,自己加代理)
作者提到了几个提高Web程序性能的方法:
1. Minimize HTTP based Requestss
2. HTTP Compression
3. Correct Formatted Images at the Right Place
4. Compress CSS, JavaScript and Images
5. CSS at Top
6. Javascript at Bottom
7. Content Delivery Network: (CDN)
8. Ajax
9. Ajax vs. Callback
10. Reduce Cookie size
11. Use Cache appropriately
12. Upload compiled code rather than source code
13. Conclusions
具体内容请到作者网站查看。
Aug 31
Link: WaveMaker

The WaveMaker platform consists of two components: WaveMaker Visual Ajax Studio™ for developing rich internet applications and WaveMaker Rapid Deployment Server™ for deploying applications into a standard and secure Java environment.
网站上说的是WYSIWYG(所见即所得)的Web2.0开发工具,即是可以通过拖拽组件等方式,可视化的来创建一个Ajax工程。还包括数据库的连接,对后台Java环境的支持。有不清楚,可以看看它的演示视频看起来很是不错。
这里还有几个用它做好的Demo
可以从这里下载,下载相应操作系统的版本
Aug 01
Link: What’s the Fastest Way to Code a Loop in JavaScript
作者对JS的几种循环方式作了详细的测试,测试页面在这里,具体测试结果可以进入网站查看。
通过测试结果可以看出
var i = arr.length; while (i--) {}
这种方式速度是最快的。
在测试过程中,作者有个有趣的发现,对于HTML的集合,使用hColl.item(i) 比 hColl[i] 慢2-6倍(在Safari中除外)
Recent Comments