Search Results

Search found 18 results on 1 pages for 'hguser'.

Page 1/1 | 1 

  • setup the git server in centos6.4 [on hold]

    - by hguser
    We have a server which using centos6.4. Now we want to make this server as the backup and the cvs server. We have ten user in our team. So I created ten accounts accordingly, then they can backup files to their own home directory using ftp. However I do not know how to setup the cvs, we preferred to use git. We want to implement this: Everyone can create git repositories in his home directory with read/write access using his account. Is this possible?

    Read the article

  • how to set up a git repository which can be accessed by network in ubuntu 12.10

    - by hguser
    Now we want to set up a private git repository in the ubuntu 12.10,then other developments can access it through the local network. Now I just can create a repository use git init,for example: cd myproject git init Which will create .git directory,but I do not know how to access it thougth network like: git://192.168.1.1/myproject/.git Any idea? BTW,I have tried: git init --bare which will give me a error: git add error : "fatal : malloc, out of memory"

    Read the article

  • how to parse a Date string to java.Date

    - by hguser
    Hi: I have a date string and I wang to parse it to normal date use the java Date API,the following is my code: public static void main(String[] args) { String date="2010-10-02T12:23:23Z"; String pattern="yyyy-MM-ddThh:mm:ssZ"; SimpleDateFormat sdf=new SimpleDateFormat(pattern); try { Date d=sdf.parse(date); System.out.println(d.getYear()); } catch (ParseException e) { // TODO Auto-generated catch block e.printStackTrace(); } } However I got a exception:java.lang.IllegalArgumentException: Illegal pattern character 'T' So I wonder if i have to split the string and parse it manually? BTW, I have tried to add a single quote character on either side of the T: String pattern="yyyy-MM-dd'T'hh:mm:ssZ"; It also does not work.

    Read the article

  • differences between dependencymanagement and dependencies of maven

    - by hguser
    Hi: What is the differences between dependencymanagement and dependencies? I have seen the docs at apache maven web site.However I got nothing. It seems that a dependency defined under the DependencyManagement can be used in its child modules without sepcify the version.For example: A parent project(Pro-par) define a dependency under the dependencyManagement: <dependencyManagement> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8</version> </dependency> </dependencies> </dependencyManagement> Then at the child of Pro-par, I can use the junit : <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> </dependency> </dependencies> However I wonder if it is necessary to define the junit at the parent pom? Why not define it directly at the needed module?

    Read the article

  • data format encoding and etc

    - by hguser
    Hi: I Suddenly found that I have no idea about the concept of data format and the encoding. For exmpale, what is the differences about the ascii/binary/base64/text-xml ? For a real case, I am working with a web service whose parameter I have to define,however one of the parameter should be ascii,another is binary and the last is netcdf. So,how to define it? ALso I wonder the ascii needed parameter can be a .txt or .dat ?

    Read the article

  • when to use the abstract factory pattern?

    - by hguser
    Hi: I want to know when we need to use the abstract factory pattern. Here is an example,I want to know if it is necessary. The UML THe above is the abstract factory pattern, it is recommended by my classmate. THe following is myown implemention. I do not think it is necessary to use the pattern. And the following is some core codes: package net; import java.io.IOException; import java.util.HashMap; import java.util.Map; import java.util.Properties; public class Test { public static void main(String[] args) throws IOException, InstantiationException, IllegalAccessException, ClassNotFoundException { DaoRepository dr=new DaoRepository(); AbstractDao dao=dr.findDao("sql"); dao.insert(); } } class DaoRepository { Map<String, AbstractDao> daoMap=new HashMap<String, AbstractDao>(); public DaoRepository () throws IOException, InstantiationException, IllegalAccessException, ClassNotFoundException { Properties p=new Properties(); p.load(DaoRepository.class.getResourceAsStream("Test.properties")); initDaos(p); } public void initDaos(Properties p) throws InstantiationException, IllegalAccessException, ClassNotFoundException { String[] daoarray=p.getProperty("dao").split(","); for(String dao:daoarray) { AbstractDao ad=(AbstractDao)Class.forName(dao).newInstance(); daoMap.put(ad.getID(),ad); } } public AbstractDao findDao(String id) {return daoMap.get(id);} } abstract class AbstractDao { public abstract String getID(); public abstract void insert(); public abstract void update(); } class SqlDao extends AbstractDao { public SqlDao() {} public String getID() {return "sql";} public void insert() {System.out.println("sql insert");} public void update() {System.out.println("sql update");} } class AccessDao extends AbstractDao { public AccessDao() {} public String getID() {return "access";} public void insert() {System.out.println("access insert");} public void update() {System.out.println("access update");} } And the content of the Test.properties is just one line: dao=net.SqlDao,net.SqlDao So any ont can tell me if this suitation is necessary?

    Read the article

  • using the starUml, the align problem

    - by hguser
    I am using the StarUml to draw some component dialog,however I found that it is to difficult to make a straight line straight enough. As shown in this image: the example image,see the interface "query" In visio, when I want to draw a Horizontal straight line,I can use the "Shift" key in my keybordl,how to do it in StarUml?

    Read the article

  • send message to a web service according to its schema

    - by hguser
    Hi: When I request a web servcie,it give me a response which show me the required parameters and its schema,for example: the response of the web service for the descriptin of the parameter Then I start to organize the next requset according to the parameter,for the parameter "bandWith" I set it as the following: <InputParameter parameterID="bandWidth"> <value> <commonData> <swe:Category> <swe:quality> <swe:Text> <swe:value>low</swe:value> </swe:Text> </swe:quality> </swe:Category> </commonData> </value> </InputParameter> However I got a exception : error information Also I tried the following format,things does not chage: <InputParameter parameterID="bandWidth"> <value> <commonData> <swe:Category> <swe:value>low</swe:value> </swe:Category> </commonData> </value> </InputParameter> So, I wonder how do define the parameter to match the format it defined? The schema can be found there: The schema

    Read the article

  • Servlet xxx is not available

    - by hguser
    In the web.xml of my web app I have configed the server as following: The web.xml However when I request this servlet ,I got a error which tells me "Servlet SOS is not available",but I am sure this servlet do exist in the WEB-INFO/lib/sos.jar. And I have seen the initialization work under the servelt from the logs. I wonder why can not tomcat find the sevlet?

    Read the article

  • use hg to synchronize my project between my two computer

    - by hguser
    Hi: I have two computer : the desktop in my company and the portable computer in my home. Now I want to use the hg to synchronize the project between them using a "USB removable disk". So I wonder how to implement it? THe pro in my desktop is : D:\work\mypro. I use the following command to init it: hg init Then I connect to the USB disk whose volume label is "H",and get a clone using: cd H: hg init hg clone D:\work\mypro mypro-usb ANd in my portable computer I use: cd D: hg clone H:\mypro-usb mypro-home However I do not know how to do if I modify some files(remove or add and modify) in the mypro-home,how to make the mypro-usb changed synchronizely,also I want the mypro in my desktop synchronizely. How to do it?

    Read the article

  • parser the xml and build a ui for user

    - by hguser
    Hi: Now I have to handle some xml in my java swing application. I have to build a swing ui according to the special schema ,then user can fill some values.After user completed,I will collect the information,validate the value and then build a xml file. For building xml file I can use the xmlbeans,however how to parse the schema and build a swing ui? Since the schema is rather complex. A schema can be found here: example schema I have to parser this schema,for the LiteralInputType ,a JTextArea should be built. However there are other types "complexType" and etc.. These types may not occur at the sametime. Some times only the LiteralInputType is needed,somethimes the ComplexType is needed,also maybe all of them are needed. So, how to implement it? Anyone can help me?

    Read the article

  • spring mvc nested model validation

    - by hguser
    I have two models : User,Project public class Project{ private int id; @NotEmpty(message="Project Name can not be empty") private String name; private User manager; private User operator; //getter/setter omitted } public class User{ private int id; private String name; //omit other properties and getter/setter } Now, when I create a new Project, I will submit the following parameters to ProjectController: projects?name=jhon&manager.id=1&operator.id=2... Then I will create a new Project object and insert it to db. However I have to validate the id of the manager and operator is valid,that's to say I will validate that if there is matched id in the user table. So I want to know how to implement this kind of validation?

    Read the article

  • What is the difference between Unidirectional and Bidirectional associations?

    - by hguser
    Hi: What is the difference between Unidirectional and Bidirectional associations? Since the table generated in the db are all the same,so the only difference I found is that each side of the bidiretional assocations will have a refer to the other,and the unidirectional not. /////////// This is a Unidirectional association public class User { private int id; private String name; @ManyToOne @JoinColumn( name = "groupId") private Group group; } public class Group { private int id; private String name; } ////////////// The Bidirectional association public class User { private int id; private String name; @ManyToOne @JoinColumn( name = "groupId") private Group group; } public class Group { private int id; private String name; @OneToMany(mappedBy="group") private List<User> users; } The difference is wheather the group hold a refer of the user. So I wonder if this is the only difference? which is recommended?

    Read the article

  • how to get transform a local image to a web accessable image

    - by hguser
    Hi: Generally,if we want to display a image in the web page,we give the uri of the image resource like: http://host:port/image/xxx.jpg. Now,there are some images in my file system,and I save its absolute path in the db. Like this; id name address image 1 xxxx xxxx C:/images/xxx.jpg Now if the entity is retrived,its image should be displayed in the page. How to make it? What I thought is copy the image under the web server dir,then build its url,then the page can render it. But I wonder if this is a good idea? Is there any other way?

    Read the article

  • any ways saving user information without db

    - by hguser
    Hi: I have a application which require login,but the number of user who use the application is no more than 40. And In the application,I get some data from the sql server database where I juse have read permission,also I can not create a table in the db for user validate. ALso I do not think it is a good idea to create a user table in other database on another machine.(for example,I can create a user table in the mysql another machine,but is it desireable just for user validating)? Now I just save the user info in a .properties file,any other good idea? BTW,the programe language used in my application is java.

    Read the article

  • how to transfer a time which was zero at year of 0000(maybe) to java.util.Date

    - by hguser
    I have a gps time in the database,and when I do some query,I have to use the java.util.Date,however I found that I do not know how to change the gps time to java.util.Date. Here is a example: The readable time === The GPS time 2010-11-15 13:10:00 === 634254192000000000 2010-11-15 14:10:00 === 634254228000000000 The period of the two date is "36000000000",,obviously it stands for one hour,so I think the unit of the gps time in the db must be nanosecond. 1 hour =3600 seconds= 3600*1000 milliseconds == 3600*1000*10000 nanoseconds Then I try to convert the gps time: Take the " 634254228000000000" as example,it stands for("2010-11-15 14:10:00"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ssZ"); Date d = new Date(63425422800000L); System.out.println(sdf.format(d)); The result is 3979-11-15 13:00:00+0000. Of course it is wrong,then I try to calculate : 63425422800000/3600000/24/365=2011.xxx So it seems that the gps time here is not calcuated from Epoch(1970-01-01 00:00:00+0000). It maybe something like (0001-01-01 00:00:00+0000). Then I try to use the following method: Date date_0=sdf.parse("0001-01-01 00:00:00+0000"); Date d = new Date(63425422800000L); System.out.println(sdf.format(d.getTime() + date_0.getTime())); The result is: 2010-11-13 13:00:00+0000. :( Now I am confusing about how to calculate this gps time. Any suggestion?

    Read the article

  • Can git switch branch without the modification

    - by hguser
    I have a project which have completed the basic models(at master), then I commit them. Then I create two branchs user and product using: git checkout -b user git checkout -b product git checkout user Then I add the codes in the user branch, but I found that I have to make some changes for the basic models. Then I switch to master: git checkout master But I found that the modification I made in the user branch is visible in the working directory now. How to avoid this? Since the change to master and modification will be frequency.

    Read the article

  • Mercurial push error - hook failed

    - by raychenon
    I committed some changesets. Now I want to push them to remote repository. I get this error during push pushing to http://hguser:***@z2xeu:1337/hg/cms searching for changes 1 changesets found remote: adding changesets remote: adding manifests remote: adding file changes remote: added 1 changesets with 2 changes to 2 files remote: Attempt to commit or push text file(s) using CRLF line endings remote: in 700e14d32918: src/main/webapp/WEB-INF/jsp/search.jsp remote: remote: To prevent this mistake in your local repository, remote: add to Mercurial.ini or .hg/hgrc: remote: remote: [hooks] remote: pretxncommit.crlf = python:hgext.win32text.forbidcrlf remote: remote: and also consider adding: remote: remote: [extensions] remote: hgext.win32text = remote: [encode] remote: ** = cleverencode: remote: [decode] remote: ** = cleverdecode: remote: transaction abort! remote: rollback completed remote: abort: pretxnchangegroup.crlf hook failed [command returned code 1 Wed Jan 12 11:14:55 2011] To prevent this, I wrote in the .hg/hgrc file ( there is no Mercurial.ini ) [hooks] pretxncommit.crlf = python:hgext.win32text.forbidcrlf pretxnchangegroup.crlf = python:hgext.win32text.forbidcrlf [extensions] hgext.win32text = But I still get the same error as above. I'm pretty sure pretxnchangegroup.crlf is involved in this, maybe a python file ? I use only unicode characters in files committed

    Read the article

1