Friday, January 31, 2014

Software Architecture , software flexibility , extensibility and maintainability

  •  
  • http://www.cs.cmu.edu/~acme/docs/language_overview.html
  • software architecture evaluation

http://www.win.tue.nl/oas/architecting/aimes/papers/Scenario-Based%20SWA%20Evaluation%20Methods.pdf

  • software flexibility , extensibility and maintainability
http://blog.adaptivesoftware.biz/2006/09/big-three-flexibility-extensibility.html

Thursday, January 30, 2014

Learn jQuery

Best site I have found to learn jQuery

http://try.jquery.com/levels/1/challenges/2

Tuesday, January 28, 2014

installing Open source ticketing system (ORTS) in ubuntu

http://www.gnu.org/licenses/agpl-3.0.html 

 --find directory in ubuntu 13

find /path -name "name" -type d
 --lists all installed packages
 dpkg -L <packagename>


Mysql and apache needs to be installed and 
using command sudo apt-get install otrs2

OR
http://www.gnu.org/licenses/agpl-3.0.html

 http://doc.otrs.org/3.0/de/html/manual-installation-of-otrs.html#manual-installation-of-database

1. Preparing the Operating System
2. Installing Perl dependencies
3. Preparing MySQL
4. Updating Apache
5. Installing OTRS

$ cat /etc/passwd
http://www.geoffstratton.com/2013/08/install-otrs-help-desk-ubuntu-12-04/
sudo useradd -r -d /opt/otrs/ -g 'sudo' otrs
http://www.techrepublic.com/blog/tr-dojo/install-the-powerful-otrs-help-desk-ticketing-system/
http://doc.otrs.org/3.3/en/html/

https://help.ubuntu.com/community/OTRS  


System requirements

Hardware
  • Minimum 2 GHz Xeon or comparable CPU, 2 GB RAM, and a 160 GB hard drive
Platforms
  • Red Hat Enterprise Linux (RHEL)
  • SUSE Linux Enterprise Server (SLES)
  • UNIX derivates like OpenBSD or FreeBSD
  • Microsoft Windows
  • Mac OSX
Databases
  • MySQL 4.1 or higher (recommended)
  • Oracle 10g or higher
  • Microsoft SQL Server 2005 or higher
  • PostgreSQL 8.0 or higher
  • DB2 8 or higher
Web server
  • Apache2 + mod_perl2 or higher (recommended)
  • Webserver with CGI support (CGI is not recommended)
  • Microsoft Internet Information Server (IIS) 6 or higher
Perl
  • Perl 5.8.8 or higher (required additional modules)
upgrade
       upgrade is used to install the newest versions of all packages
       currently installed on the system from the sources enumerated in
       /etc/apt/sources.list. Packages currently installed with new
       versions available are retrieved and upgraded; under no
       circumstances are currently installed packages removed, or packages
       not already installed retrieved and installed. New versions of
       currently installed packages that cannot be upgraded without
       changing the install status of another package will be left at
       their current version. An update must be performed first so that
       apt-get knows that new versions of packages are available.

   dist-upgrade
       dist-upgrade in addition to performing the function of upgrade,
       also intelligently handles changing dependencies with new versions
       of packages; apt-get has a "smart" conflict resolution system, and
       it will attempt to upgrade the most important packages at the
       expense of less important ones if necessary. So, dist-upgrade
       command may remove some packages. The /etc/apt/sources.list file
       contains a list of locations from which to retrieve desired package
       files. See also apt_preferences(5) for a mechanism for overriding
       the general settings for individual packages.

Sunday, January 26, 2014

Service Composition Compatibility,Substitutability,Realizability , process algebra


http://ceur-ws.org/Vol-601/EOMAS10_paper3.pdf

A webservice is called compatible if its underlying interacting services is such that each service terminate properly.


http://books.google.de/books?id=oHNrI5vkfZEC&pg=PA127&lpg=PA127&dq=web+service++algebra+choice+operators&source=bl&ots=ErW2_KECEm&sig=qf9Af23ndy1n3EliwwYreoFCj6s&hl=en&sa=X&ei=0x7kUr-aEcGShgeuiIHADA&redir_esc=y#v=onepage&q=web%20service%20%20algebra%20choice%20operators&f=false

Bisimulation relation video

http://www.youtube.com/watch?v=7xpaNpdmozE
http://www.doc.ic.ac.uk/~pg/Concurrency/cc6.pdf


Sending via POST request in android

http://www.wikihow.com/Execute-HTTP-POST-Requests-in-Android
http://www.vogella.com/tutorials/ApacheHttpClient/article.html

http://www.onlymobilepro.com/2013/03/16/submitting-android-form-data-via-post-method/

public void send(View v)
        {
            //get message from message box
            String  msg = msgTextField.getText().toString();
             
            //check whether the msg empty or not
            if(msg.length()>0) {
                HttpClient httpclient = new DefaultHttpClient();
                HttpPost httppost = new HttpPost("http://www.yourdomain.com/serverside-script.php");
                 
                try {
                    List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(2);
                       nameValuePairs.add(new BasicNameValuePair("id", "01"));
                       nameValuePairs.add(new BasicNameValuePair("message", msg));
                       httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
                       httpclient.execute(httppost);
                        msgTextField.setText(""); //reset the message text field
                        Toast.makeText(getBaseContext(),"Sent",Toast.LENGTH_SHORT).show();
                } catch (ClientProtocolException e) {
                    e.printStackTrace();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            } else {
                //display message if text field is empty
                Toast.makeText(getBaseContext(),"All fields are required",Toast.LENGTH_SHORT).show();
            }
        }
         
    }

>>>>Using above method I got an exception that with Fatal error ,cannot execute an activity at line httpclient.execute(..) so I figured other way to do it..Remember following points
-Since http request uses network related connections it should be done in background using AsyncTask and write all your codes inside class extending AsyncTask ..see link below
-code belo worked for me to send Http get request..

http://theopentutorials.com/tutorials/android/http/android-how-to-send-http-get-request-to-servlet-using-httpurlconnection/
sample code to call these functions:
CustomHttpClient task = new CustomHttpClient();
String url = "http://192.168.1.157/gcmserver/register.php?name=abcd&email=a@a.de&regID=" + registrationID;
             task.execute(new String[] { url });
--------------------------------------------
package com.example.helloandroid;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;

import android.os.AsyncTask;

public class CustomHttpClient extends AsyncTask<String,String,String> {

    @Override
    protected String doInBackground(String... urls) {
        String output = null;
        for (String url : urls) {
            output = getOutputFromUrl(url);
        }

        return null;
    }

    private String getOutputFromUrl(String url) {
        StringBuffer output = new StringBuffer("");
        try {
            InputStream stream = getHttpConnection(url);
            BufferedReader buffer = new BufferedReader(
                    new InputStreamReader(stream));
            String s = "";
            while ((s = buffer.readLine()) != null)
                output.append(s);
        } catch (IOException e1) {
            e1.printStackTrace();
        }
        return output.toString();
       
    }
   
    // Makes HttpURLConnection and returns InputStream
    private InputStream getHttpConnection(String urlString)
            throws IOException {
        InputStream stream = null;
        URL url = new URL(urlString);
        URLConnection connection = url.openConnection();

        try {
            HttpURLConnection httpConnection = (HttpURLConnection) connection;
            httpConnection.setRequestMethod("GET");
            httpConnection.connect();

            if (httpConnection.getResponseCode() == HttpURLConnection.HTTP_OK) {
                stream = httpConnection.getInputStream();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
        return stream;
    }
   
}