Skip to main content

Posts

Environment Setup in Mac

Type the following command to check the Shell type before creating the profile file $echo $SHELL Based on shell like BASH or ZSH   Go to home folder by ~ and then create the profile .bash_profile or .zprofile

Webinar: Process Driven Spring Applications with Activiti

REST-Ful API Design

Import and Export using OPLOG.RS in MongoDB

Edit mongod.conf  to add replicate set sudo vi /etc/mongod.conf Add this following lines in mongod.conf replication:   replSetName: rs0   oplogSizeMB: 1024 Then restart mongod by "sudo service mongod restart" Check for mongo status if everything is fine sudo service mongod status if everything is OK you get this result otherwise please check/var/log/mongodb/mongod.log for any errors. mongod start/running, process 5806 Now go to Shell prompt and type  >mongo Then type > use  //To change your working DB > rs.initiate() { "info2" : "no configuration explicitly specified -- making one", "me" : "jamesnirmal:27017", "ok" : 1 } Now command prompt will changed to  rs0:PRIMARY> Now type rs0:PRIMARY> use local rs0:PRIMARY> show collections me oplog.rs startup_log system.indexes system.replset MongoRestore: Now go to Normal shell and crea...

Upload File with Form Data in Java

This is simple Java code to upload file with form data  Jar file Used: Apache Http Client   package com.james.util.file.upload; import java.io.File; import java.io.IOException; import org.apache.http.HttpEntity; import org.apache.http.client.ClientProtocolException; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpPost; import org.apache.http.entity.ContentType; import org.apache.http.entity.mime.MultipartEntityBuilder; import org.apache.http.entity.mime.content.FileBody; import org.apache.http.entity.mime.content.StringBody; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.util.EntityUtils; public class FileUpload {             public static void main(String[] args) throws ClientProtocolException, IOException {                  ...
Resetting Panel in Ubuntu joel@joel-desktop:~$ gconftool-2 --shutdown joel@joel-desktop:~$ gconftool --recursive-unset /apps/panel joel@joel-desktop:~$ rm -rf ~/.gconf/apps/panel joel@joel-desktop:~$ pkill gnome-panel joel@joel-desktop:~$

How to Build Ephesoft in Ubuntu

Download Source file from Ephesoft Site using the following URL http://www.ephesoft.com/images/Ephesoft/source-code-release-cummunity.zip Extract to any folder for e.g <home_dir>/source-code-release-community Download Repository bundle from EpheSoft site using the following URL http://www.ephesoft.com/images/Ephesoft/community-repository-maven-dependencies.zip Extract to any folder for example <home_dir>/source-code-release-community/community-repository Now go to maven Installation directory modify settings.xml under MAVEN_HOME/conf by adding these following line <localRepository><home_dir>/source-code-release-community/community-repository</localRepository>. modify pom.xml file under <home_dir>/source-code-release-community/dcma-root/parent comment these Following lines <!-- <repositories> <repository> <snapshots> <updatePolicy>never</updatePolicy> <checksumPolicy>ignore</checksumPolicy...

Configure Alfresco in Ubuntu 10.4 LTS

Pre-Requisition 1. Mysql 2. Image Magic 3. Swftools 4. Open Office 5. Alfresco Community Edition 3.2 To update apt source.list 1. open source.list using vi /etc/apt/sources.list 2. enable all debian url To update Latest apt-get Repository 1. sudo apt-get update To Install 32 Bit Software sudo apt-get install ia32-libs To Install MySql 1. apt-get install mysql-server To Install Sun Jdk 1. aptitude install sun-java6-jdk 2. ./jdk-6u20-linux-x64.bin 3. mv jdk1.6.0_20/ /usr/local/java 4. chmod a+rx -R /usr/local/java 5. open vi /etc/profile 6. export JAVA_HOME=/usr/local/java 7. export PATH=$JAVA_HOME/bin:$PATH 8. export CLASSPATH=.:$CLASSPATH:$JAVA_HOME/lib/tools.jar To install Open Office (If Really Needed) 1. If open office is not installed then please download the Open Office click here 2. mv OOo_3.2.1_Linux_x86-64_install-deb_en-US.tar.gz /opt/ 3. cd /opt/ 4. tar zxvf OOo_3.2.1_Linux_x86-64_install-deb_en-US.tar.gz 5. cd OOO320_m18_native_packed-1_en...

Signing Blackberry application in Different Machine

BlackBerry SignatureTool to register with the Signing Authority 1) Save all 3 .csi files in the same directory (each one will be sent in a separate email message). 2) Start Eclipse. 3) Click on the BlackBerry menu and choose Install Signature Keys. 4) Select one of the 3 .csi files saved in step 1 and click Open. 5) Click "Yes" to create a new key pair file. 6) Type a password for your private key of at least 8 characters, and type it again to confirm. This is your private key password, which protects your private key. Please remember this password as you will be prompted for it each time signing is attempted or a signature key is installed. 7) Move your mouse to generate date for a new private key. 8) In the Registration PIN" field, type the PIN number that you supplied on the signature key order form. 9) In the Private Key password field, type the password created in step 6. 10) Click "Register". 11) Click "Exit". 12) Repeat this ...

Okular - PDF reader for Ubuntu

Okular is a universal document viewer based on KPDF Sample Command james@:~$ sudo apt-get install okular