<<上篇 | 首页 | 下篇>>

我收藏的链接(44)

我收藏的链接(44)
PI开发面面谈(转)_西部骑士
说起基于PI的软件开发主要包括两方面, 1:利用PIAPI直接操作PI,此种方式的好处在于高效率,容易掌控任何操作,缺点在于需要购买PIAPI,下面会详细介绍此类方法; 2:通过国际工业组织约定的OPC通讯协议访问PI,此种方式的好处在于通用,因为只要是实时数据库都会支持OPC协议,有关OPC方面的请参考我的 "[原创]为中华崛起而学习系列[原创]" 下面有关OPC的资料.
InfoQ: 给成功敏捷开发的26条建议
比如“先写测试再写代码”以及“没有必要就永远不要去实现”这些对他们来说就是很激进的概念。他们自豪于“全面”实现功能,甚至去杜撰客户并未提出的用例。结果当然就是代码过度,这是另一种浪费。他们有时候等6个月来完成测试。对于在严格的瀑布模式中进行实施的人们来说,测试只是一种“辅助”,正确工作的程序员不需要它。很惊奇哦
InfoQ: XP与Scrum,只取其一,两者都取,还是全都抛弃?
Scrum还是XP,哪个更好呢?是其中一个比另一个更适用,还是另有其他选择?
JNative : Java to native interface | Get JNative : Java to native interface at SourceForge.net
This library allows developers to access native libraries (DLL and lib.so) from java. You do NOT need to compile a line of C/C++ to use it: it's dynamic !! Now Win32 DLL and shared libraries are usable with Java ;)
OTN Discussion Forums : IllegalArgumentException: Bad Date ...
IllegalArgumentException: Bad Date Header dwr
Sending Email From Your Application Using Java Mail
典型的使用Javamail发送电子邮件Java代码,未认证发送用户
http://code.google.com/p/svgweb/
SVG Web is a JavaScript library which provides SVG support on many browsers, including Internet Explorer, Firefox, and Safari. Using the library plus native SVG support you can instantly target ~95% of the existing installed web base.
Set ulimit parameters on ubuntu
Set ulimit parameters on ubuntu
http://www.blogjava.net/ruoyoux/archive/2009/04/14/265441.html
java.net.SocketException: Too many open files; Linux命令 lsof -p 29733 | wc -l;lsof -p 29733
Too many open files - 白云天-但愿人长久! - JavaEye技术网站
java.net.SocketException: Too many open files
常用中文分词- 整理收集 - 热爱Java,学习Java - BlogJava
各种分词工具集合
ik-analyzer - Project Hosting on Google Code
IKAnalyzer是一个开源的,基于java语言开发的轻量级的中文分词工具包。从2006年12月推出1.0版开始,IKAnalyzer已经推出了3个大版本。最初,它是以开源项目Luence为应用主体的,结合词典分词和文法分析算法的中文分词组件。新版本的IKAnalyzer3.0则发展为面向Java的公用分词组件,独立于Lucene项目,同时提供了对Lucene的默认优化实现。
绿色下载站:打造国内第一绿色软件免费下载网站 - Greendown.cn
绿色下载站:打造国内第一绿色软件免费下载网站
ictclas4j - Project Hosting on Google Code
ictclas4j中文分词系统是sinboy在中科院张华平和刘群老师的研制的FreeICTCLAS的基础上完成的一个java开源分词项目,简化了原分词程序的复杂度,旨在为广大的中文分词爱好者一个更好的学习机会。
smallseg - Project Hosting on Google Code
中文分词工具
BlazeDS 与Spring集成指南 | 出家如初,成佛有余
Springsource与Adobe合作发布了Spring与BlazeDS集成的项目Spring BlazeDS Integration,通过Spring BlazeDS Integration可以把Spring的Bean暴露为BlazeDS的Flex Remoting Service,这样Flex客户端就能够通过AMF调用Spring 暴露出来的Bean,有效简化BlazeDS配置及开发难度。
Birt的Servlet扩展 - 企业应用 - Java - JavaEye论坛
自己实现Birt 报表展现
Barbecue - Java barcode generator | Get Barbecue - Java barcode generator at SourceForge.net
Barbecue是一个可用的Java打印条形码的开发包 Barbecue is a Java library that enables the creation of barcodes in a variety of standard formats that can be displayed as Swing/AWT components, included in printed output, generated as EPS and SVG and displayed in a web application.
人人都是领域专家-用例图 - 幸福的懦夫 - JavaEye技术网站
一个好的设计能使开发事半功倍,好的设计来源于好的需求。这就需要需求分析师帮我们开发人员提供精炼,清晰,准确的需求报告。需分将采集来的需求用UML(Unified Modeling Language )描述出来,我称之为需求建模。 需求阶段建模的过程中涉及到的有用例图(usecase diagram)和活动图(activity diagram)。 下面就对网上购物的应用进行用例建模,以此举例用例建模的过程。
Sun官方出品!JavaFX模拟器,支持雅黑字体!比Jbed效果好! - Windows Mobile 5.0/6.X Pocket PC软件技术讨论区 - 口袋数码手机论坛 口袋数码手机网-智能手机第一站! - Powered by Discuz!
手机上Windows ce,mobile Java虚拟机
Google Ranking Factors - SEO Checklist
There are "over 200 SEO factors" that Google uses to rank pages in the Google search results (SERPs). What are the search engine optimization rules? Here is the speculation - educated guesses by SEO webmasters on top webmaster forums. Should you wish to achieve a high ranking, the various confirmed and suspected Google Search Engine Optimization (SEO) Rules are listed below.

Java通过jnative调用pi实时数据库dll

Java通过jnative调用pi实时数据库dll


JNative : Java to native interface,This library allows developers to access native libraries (DLL and lib.so) from java. You do NOT need to compile a line of C/C++ to use it: it's dynamic !! Now Win32 DLL and shared libraries are usable with Java ;)
PI System, the world's leading highly-scalable and secure infrastructure for the management of real-time data and events
import org.xvolks.jnative.JNative;
import java.text.SimpleDateFormat;
import org.xvolks.jnative.Type;
import org.xvolks.jnative.exceptions.NativeException;
import org.xvolks.jnative.pointers.Pointer;
import org.xvolks.jnative.pointers.memory.HeapMemoryBlock;
import org.xvolks.jnative.pointers.memory.MemoryBlock;
import org.xvolks.jnative.pointers.memory.MemoryBlockFactory;
/**
 * Java通过jnative调用pi实时数据库dll类库piapi32.dll获取tag标签数据
 * <a href="http://itindex.net">http://itindex.net</a>
 */
public class PIClientUtil {
    private static PIClientUtil piClientUtil=new PIClientUtil();

    public static void main(String[] args) throws Exception {
        PIClientUtil.getPIClientUtil().getTagValue("SCADA#ME-60331");
        PIClientUtil.getPIClientUtil().getTagValue("SCADA#ME-60332");
        PIClientUtil.getPIClientUtil().getTagValue("SCADA#ME-60333");
        PIClientUtil.getPIClientUtil().getTagValue("SCADA#ME-60334");
        PIClientUtil.getPIClientUtil().getTagValue("SCADA#ME-60335");
    }
   
    public static PIClientUtil getPIClientUtil(){
        return piClientUtil;
    }

    private PIClientUtil()  {
        try {

            MemoryBlock[] tim = new MemoryBlock[3];
                tim[0] = MemoryBlockFactory.createMemoryBlock(8);
   
            Pointer[] timed = new Pointer[100];
            timed[0] = new Pointer(tim[0]);
   
            tim[1] = MemoryBlockFactory.createMemoryBlock(8);
            timed[99] = new Pointer(tim[1]);
   
            MemoryBlock mm = MemoryBlockFactory.createMemoryBlock(4);
            Pointer count1 = new Pointer(mm);
            count1.setIntAt(0, 100);
   
            int[] pt = { 17999, 18000, 18001 };
            float[] rvals = new float[3];
            int[] istats = new int[3];
   
            System.out.println(System.currentTimeMillis());
           
            // *********************连接PI数据库**************************//
            // **********************************************************//
            JNative messageBox = new JNative("piapi32.dll", "piut_setservernode");
            messageBox.setRetVal(Type.INT);
            messageBox.setParameter(0, Type.STRING, "88.148.76.208");
            messageBox.invoke();
           
            System.out.println("piut_setservernode:"+messageBox.getRetValAsInt());
   
            // ***********************获取时间点**************************//
            // **********************************************************//
            String tt = "07-Aug-17   18:00:00 ";
   
            messageBox = new JNative("piapi32.dll", "pitm_parsetime");
            messageBox.setRetVal(Type.INT);
            messageBox.setParameter(0, Type.STRING, tt);
            messageBox.setParameter(1, Type.INT, " " + 0);
            messageBox.setParameter(2, timed[0]);
            messageBox.invoke();
            System.out.println(messageBox.getRetValAsInt());
            System.out.println(timed[0].getAsInt(0));
   
            messageBox = new JNative("piapi32.dll", "pitm_parsetime");
            messageBox.setRetVal(Type.INT);
            messageBox.setParameter(0, Type.STRING, "+10h ");
            messageBox.setParameter(1, Type.INT, " " + timed[0].getAsInt(0));
            messageBox.setParameter(2, timed[99]);
            messageBox.invoke();
            System.out.println(messageBox.getRetValAsInt());
            System.out.println(timed[99].getAsInt(0));
           

        } catch (NativeException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (IllegalAccessException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

    }
    /**
     * 获取tag最新值,可能需要线程同步synchronized
     * @param tagName
     * @return
     */
    public  float getTagValue(String tagName){

        try {
            JNative messageBox = new JNative("piapi32.dll", "pipt_findpoint");
            messageBox.setRetVal(Type.INT);
            messageBox.setParameter(0, Type.STRING, tagName);
            Pointer p=new Pointer(new HeapMemoryBlock(1024));
            messageBox.setParameter(1, p);
            messageBox.invoke();
            System.out.println("pipt_findpoint:"+messageBox.getRetValAsInt());
            int ptId=p.getAsInt(0);
           
           
            messageBox = new JNative("piapi32.dll", "pisn_getsnapshot");
            messageBox.setRetVal(Type.INT);
            messageBox.setParameter(0, Type.INT, "" + ptId);
            Pointer pp=new Pointer(new HeapMemoryBlock(1024));
            messageBox.setParameter(1, pp);
            messageBox.setParameter(2, new Pointer(new HeapMemoryBlock(1024)));
            messageBox.setParameter(3, new Pointer(new HeapMemoryBlock(1024)));
            messageBox.invoke();
            System.out.println(tagName+"retValue:"+messageBox.getRetVal());       
            System.out.println(tagName+"tagValue:"+pp.getAsFloat(0));       
            return pp.getAsFloat(0);
        } catch (NativeException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (IllegalAccessException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return 0;
    }
}

标签 : , ,

我热爱的canon卡农音乐

非常喜欢卡农(canon)!

下面的来自维基百科

卡农canon)是一种音乐谱曲技法,和赋格一样是复调音乐的写作技法之一,也是利用对位法的模仿技法。卡农同时也指以此种技法创作出来的音乐作品,比如巴赫的《五首卡农变奏曲》。

卡农的所有声部虽然都模仿一个声部,但不同高度的声部依一定间隔进入,造成一种此起彼伏,连绵不断的效果,轮唱也是一种卡农。在卡农中,最先出现的旋律是导句,以后模仿的是答句。

根据各声部高度不同的音程差,可分为同度卡农,五度卡农,四度卡农等;根据间隔的时间长短,可分为一小节卡农,两小节卡农等;此外还有伴奏卡农,转位卡农,逆行卡农,反行卡农等各种手法。

相关历史

  • 卡农(canon)起源于意大利法国,约出现于十三、十四世纪。
  • 卡农的名称最早作“caccia”,古法语作“canon”,故一般认为其称谓来源于古法语,意思是“依靠”。(此说存疑,维基英文版的相关词条说古法语的“canon”意为“learned”——博学的,学术的。疑是误将learned写成leaned,leaned意为“依靠”。)
(这一古法语的“canon”从语源上说来自于德文的“kanon”,意为“规律、法则”,因此一般认为卡农的原意为“规则”。)
  • 卡农曲在十五世纪上半期至十六世纪中期(尼德兰乐派(Netherland School)时期)迎来了它的黄金岁月。

代表作(卡农曲)

今天我们最熟悉的卡农作品乃是帕赫贝尔(Johann Pachelbel)的《D大调卡农》(Canon in D Major),也称作《帕赫贝尔的卡农》(Pachelbel's Canon)。

此曲一般的演奏法是以大提琴启奏,三把小提琴间隔八拍先后加入。小提琴全部拉奏完全相同旋律,前后仅三段不同的旋律,每段仅两小节的旋律供重复拉奏;大提琴从头到尾也仅有两小节,重复达二十八次之多。这段音乐虽然不断回旋往复,但其旋律之美不让人觉得单调,反而感觉动听悦耳。

影响

  • 动画Kanon京都版的第14话亦有使用此曲,并在第24话用此曲解释标题

试听不同版本的canon

 

标签 : ,