Overblog Tous les blogs Top blogs Technologie & Science Tous les blogs Technologie & Science
Suivre ce blog Administration + Créer mon blog
MENU

Top articles

  • Spring中transaction

    04 janvier 2014 ( #spring, #java )

    Spring中transaction // 如果有事务,那么加入事务,没有的话新建一个(不写的情况下) @Transactional(propagation=Propagation.REQUIRED) // 容器不为这个方法开启事务 @Transactional(propagation=Propagation.NOT_SUPPORTED) // 不管是否存在事务,都创建一个新的事务,原来的挂起,新的执行完毕,继续执行老的事务 @Transactional(propagation=Propagation.REQUIRES_NEW)...

  • Hibernate 入门

    04 septembre 2013 ( #hibernate, #java )

    其实Hibernate本身是个独立的框架,它不需要任何web server或application server的支持。然而,大多数的Hibernate入门介绍都加入了很多非Hibernate的东西,比如: Tomcat, Eclipse, Log4J,Struts, XDoclet, 甚至JBoss。这容易让人产生Hibernate复杂难懂的误解,特别是打击了初学者的积极性。 在这篇文章将不涉及Eclipse, log4j, Struts, Tomcat, XDoclet,和JBoss。本文的目的是演示一下Hibernate的安装过程以及最基本的功能,从而给初学者一个低得不能再低的入门门槛。...

  • oracle index

    04 mai 2014 ( #oracle, #sql )

    基本知识: 1.index需要储存空间和I/O操作。 2.index的目的是加快select的速度的。 3.insert,update,delete数据oracle会同时对索引进行相应的调整,因此会增加一定的消耗。 4.使用index一定能加快select速度吗?不是的,数据少和巨大时index会影响select的速度,因此如果查询速度可以满足,就不要建index。 5.Index 对null 无效。 创建index时的注意事项: 1.balance query and DML needs: 索引的目的是为了提高查询速度,但它会加重DML的负担。...

  • strcpy() destination is not enough

    01 mai 2013 ( #c-c++ )

    char *array1 = "Happy Birthday to You"; char array3[1]; strcpy(array3,array1); cout<

  • Compilation Clucene avec Cmake

    29 décembre 2012 ( #c-c++, #clucene, #opensource )

    Pour compiler Clucene (http://clucene.sourceforge.net/ ), vous devez utiliser Cmake, vous pouvez suivre les étapes suivantes : 1. Télécharger & installer Cmake http://www.cmake.org/cmake/resources/software.html 2. Télécharger Zlib http://zlib.net/ ou...

  • WS client Eclipse + Tomcat

    10 mars 2013 ( #tomcat, #webservice, #java )

    refer : http://www-inf.it-sudparis.eu/~nguyen_n/teaching_assistant/web_services/webservice_client_generation WS Client deployment with Eclipse WTP In this tutorial we will see how Eclipse generate the Client stub. We start with the HelloWorld service...

  • Java generic

    30 octobre 2013 ( #java )

    一 介绍: 在Java SE 1.5之前,没有泛型的情况的下,通过对类型Object的引用来实现参数的“任意化”,“任意化”带来的缺点是要做显式的强制类型转换,而这种转换是要求开发者对实际参数类型可以预知的情况下进行的。对于强制类型转换错误的情况,编译器可能不提示错误,在运行的时候才出现异常,这是一个安全隐患。 泛型的好处是在编译的时候检查类型安全,并且所有的强制转换都是自动和隐式的,提高代码的重用率。 二、泛型参数: class Gen { private T ob; //定义泛型成员变量...

  • apache story

    15 avril 2014 ( #apache, #tomcat, #jboss )

    跟apache(阿帕奇)相关的软件名词随处可见,例如: 1 hadoop:2 tomcat:3 s4: 那么apache是个什么样的存在呢?一个软件工具或者框架是apache项目意味着什么? 首先,他是一个维护开源软件项目的非盈利组织。也就是说,这个叫阿帕奇组织的团队,维护了很多开源项目,包括开源代码管理,项目补丁,升级等。这些项目都称为阿帕奇的顶级项目或者孵化器项目。至于为什么会有这样一个组织,他是怎么来的。可以打一个比方,说一个故事来说明: 原来有一群技术达人,设计出了一款跑车(apache...

  • functional test

    04 novembre 2013 ( #java )

    在系统工程中,经常需要有functional test或者integration test来保证新的开发没有影响到之前的程序。作为需要和数据库交互的系统,写测试程序的时候一定要在最后进行删除数据库操作。另外对于某些错误信息测试需要用catch来抓获错误信息。 否则:1.数据库容易越来越繁重。2.已存数据可能会对其他测试程序进行影响。 所以这里简单举一个unctional test的例子,可以看出中常用的java知识。

  • 处理文件字符串中的mapping

    02 février 2015 ( #java )

    假定有一个文件,每一行对应着两个String,每当遇到逗号前的String,我希望得到逗号后面的String。类似于一个翻译dictionary。此时可以建立一个dictionary mapping。code如下

  • MongoDB training report

    10 juin 2014 ( #nosql, #json, #xml )

    严禁转载,使用请注明出处:http://alex2012-c.j.overblog.com/ 有机会参加了两天的MongoDB training,写了一下报告(报告节选一部分): You will find here the notes that I’ve taken during the “Advanced MongoDB” training. First the overall impression I’ve had about Mongo as a DB solution for airport...

  • Creation and use the DLL in Visual Studio

    17 janvier 2013 ( #c-c++, #library )

    We will, in the article, see some examples for creating and using the DLL in VS. What's DLL? Dynamic-link library , or DLL, is Microsoft's implementation of the shared library concept in the Microsoft Windows and OS/2 operating systems. These libraries...

  • windows下配置Tomcat7.0

    27 février 2013 ( #apache, #tomcat )

    一、安装JDK 1.7 1、添加环境变量:在 我的电脑->属性->高级->环境变量 2、新建系统变量,变量名:JAVA_HOME 变量值:C:\Program Files\Java\jdk1.7.0 (JDK的安装目录) 3、在原有的系统变量 Path后面加上英文分号,再添加%JAVA_HOME%\bin;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\jre\bin; 不要删除原来的。看清楚,它们之间的分号,是英文的分号。 4、重启电脑生效(因为添加的是系统变量,如果你的系统是win7,则不需要重启)。...

  • DTO/Domain converter

    05 novembre 2014 ( #java, #opensource )

    在大型Web Service的项目中,从客户端接收到的信息格式和app内部处理信息的格式是不同的,此时需要有一层converter来转换。 但是长期的项目,使得converter很难维护,有些重复,也有些是无用的,造成了一些bug。 网上查找,有两种解决方案比较合适,有待继续研究: http://stackoverflow.com/questions/1432764/any-tool-for-java-object-to-object-mapping 通过比较更有利于项目的可能是: Dozer和ModelMapper...

  • Hibernate 中拷贝Object数据的问题

    22 avril 2015 ( #java, #hibernate )

    有以下数据表格 Flight Table : FlightID FlightNumber Timing Table : TimingID FlightID TimingName TimingValue 由以上结构看出来,flightID是flight表格的key,timingID是timing表格的key,flightID是timing表格的foreign key。 有object:FlightA(12,FR123) FlightB(13,FR456) TimingA(90,12,LandingTime,12:00)...

  • Java中的toString

    16 août 2014

    Q:toString() 方法实现了什么功能? A:toString() 方法将根据调用它的对象返回其对象的字符串形式,通常用于 debug。 Q:当 toString() 方法没有被覆盖的时候,返回的字符串通常是什么样子的? A:当 toString() 没有被覆盖的时候,返回的字符串格式是 类名@哈希值,哈希值是十六进制的,举例说,假设有一个 Employee 类,toString() 方法返回的结果可能是 Empoyee@1c7b0f4d. Q:能提供一个正确覆盖 toString() 方法的例子吗?...

  • First blog

    14 décembre 2012 ( #life )

    I will soon finish my internship in SNCF(La Société nationale des chemins de fer français), here I learned a lot of new knowledge and I appreciate the chance here and all my colleges, and my interests of programming is increasing, so i create a Blog to...

  • Libraries statiques et dynamiques

    12 février 2013 ( #library )

    http://www.siteduzero.com/forum-83-190884-p1-difference-entre-librairie-dynamique-et-statique.html tu as 3 moyens pour "lier" une bibliothèque : un .a/.lib seul : toute la bibliothèque est "intégrée" dans l'exécutable. un .a/.lib + .dll/.so : la partie...

  • java array

    13 avril 2013 ( #java )

    在java类中,添加一个数组作为成员,以及如何实例化这个类。并把几个实例化的对象存在一个数组内。 public class Hotel { private String hotelId; private String hotelName; private int numberRooms; private int[] numberRest = new int[364]; public Hotel(){}; public Hotel(String hotelId, String hotelName,...

  • Basic knowledge C/C++ (1)

    02 mars 2013 ( #c-c++ )

    1. storage qualifiers Volatile : keyword for variables, the value will change every time we use it, we should read the value in the memory. const: cannot be changed 2.static: 2.1 for variable: it means the value cannot be changed when the function/method...

  • C/C++中static关键字详解

    02 janvier 2013 ( #c-c++ )

    http://www.cnblogs.com/yc_sunniwell/archive/2010/07/14/1777441.html 静态变量作用范围在一个文件内,程序开始时分配空间,结束时释放空间,默认初始化为0,使用时可以改变其值。 静态变量或静态函数只有本文件内的代码才能访问它,它的名字在其它文件中不可见。 用法1:函数内部声明的static变量,可作为对象间的一种通信机制 如果一局部变量被声明为static,那么将只有唯一的一个静态分配的对象,它被用于在该函数的所有调用中表示这个变量。这个对象将只在执行线程第一次到达它的定义使初始化。...

  • Basic knowledge C/C++ (2)

    15 mars 2013 ( #c-c++ )

    Difference between C++ and java Java runs in a virtual machine C++ supports unsigned arithmetic C++ allows operator overriding C++ àmultiple inheritance of class Java has a build-in garbage collection In java, parameters are always passed by value C++...

  • Installation Cassandra on Win7

    20 avril 2013 ( #nosql )

    version : Cassandra-1.2.4 1. Download Cassandra binary files from here: http://cassandra.apache.org/download/ 2. Extract Cassandra source files. e.g. to D:\cassandra 3. Set environment variables. (Go to System Properties -> Tab Advanced -> button Environment...

  • linux 基础 grep

    24 mai 2014 ( #linux )

    在工作中,最常用的指令是less和grep用来查看日志信息。 Linux系统中grep命令是一种强大的文本搜索工具,它能使用正则表达式搜索文本,并把匹 配的行打印出来。grep全称是Global Regular Expression Print,表示全局正则表达式版本,它的使用权限是所有用户。 grep的工作方式是这样的,它在一个或多个文件中搜索字符串模板。如果模板包括空格,则必须被引用,模板后的所有字符串被看作文件名。搜索的结果被送到标准输出,不影响原文件内容。 grep可用于shell脚本,因为grep通过返回一个状态值来说明搜索的状态,如果模板搜索成功,则返回0,如果搜索不成功,则返回1,如果搜索的文件不存在,则返回2。我们利用这些返回值就可进行一些自动化的文本处理工作。...

  • GET / POST 区别

    21 mars 2015 ( #webservice )

    在rest service中, 有get、post两种请求模式。有时候可以达到同样的效果。但是背后却有区别。 1. 表达: GET /blog/?name1=value1&name2=value2 HTTP/1.1 Host: XXXX.com POST /blog/ HTTP/1.1 Host: XXXX.com name1=value1&name2=value2 2. GET的好处 GET requests can be cached GET requests can remain in the...

<< < 1 2 3 > >>
Publicité