skip to main |
skip to sidebar
RSS Feeds
Nope. nothing .. just some random thoughts come to my mind ...
Nope. nothing .. just some random thoughts come to my mind ...
11:12 AM | Monday, November 18, 2013
Posted by harshadura
After lots of hard work I was lucky enough to buy my first car last week. I was searching and investigating lots of Cars! (well i m pretty sure i hv checked more than 50 cars engine started and bonnet opened xD) around Colombo area with a great deal of support from one of my uncle who is a a relation and a former Mechanic at Toyota Lanka.
And finally I decided to buy this charming (atleast for me xD) Lancer CK2 comes with the Evo5 bodykit installed to it. :)
Spec: http://specs.cars-directory.net/mitsubishi/lancer/1.5_MX_touring_11872.html
9:54 AM | Monday, November 11, 2013
Posted by harshadura
9:02 PM | Thursday, September 26, 2013
Posted by harshadura
TL;DR Worked as a GSoC intern at OpenMRS and would love to thank all the people involved.
11:29 AM | Tuesday, July 23, 2013
Posted by harshadura
catalina.sh jpda start
export MAVEN_OPTS="-XX:+CMSClassUnloadingEnabled -XX:PermSize=512M
-XX:MaxPermSize=1024M -Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000"
source ~/.bashrc
mvn jetty:run
11:42 AM | Wednesday, July 3, 2013
Posted by harshadura
10:01 AM | Sunday, June 23, 2013
Posted by harshadura
2:52 PM | Saturday, June 22, 2013
Posted by harshadura
SSH into Open-Shift instances:
https://www.openshift.com/blogs/access-your-application-gear-using-ssh-with-putty
How to deploy WAR files inside Open-Shift:
http://whyjava.wordpress.com/2012/11/25/deploy-war-on-tomcat-running-on-openshift/
How to restart Open-Shift without Git pushes:
ctl_app : control your application (start, stop, restart, etc)https://www.openshift.com/kb/kb-e1055-how-to-restart-an-application
5:41 PM | Sunday, June 9, 2013
Posted by harshadura
Whoever getting started to learn Web services - Android app interaction I hope this tutorial may be helpful, You can download the full source from here: https://github.com/harshadura/RDA-Android-ASP.WS-interact/archive/master.zip
Prerequisites:
.NET framework, SQL server 2008, Android device/emulator
How to run.
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Services; using System.Data; using System.Data.Sql; using System.Data.SqlClient; [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class Service : System.Web.Services.WebService { public Service () { //Uncomment the following line if using designed components //InitializeComponent(); } [WebMethod] public String GetEmployeeByID(String id) { DataSet2TableAdapters.EmployeeTableAdapter dt1 = new DataSet2TableAdapters.EmployeeTableAdapter(); String ename = "" + dt1.getEmpByID(id); return ename; } [WebMethod] public Employee[] GetEmployees() { var employees = new List(); try { string connect = @"Data Source=HARSHADURA-AZUS\SQLEXPRESS;Initial Catalog=RDA;Integrated Security=True"; string query = "SELECT eid, ename FROM Employee"; SqlConnection thisConnection = new SqlConnection(connect); thisConnection.Open(); SqlCommand thisCommand = thisConnection.CreateCommand(); thisCommand.CommandText = query; SqlDataReader thisReader = thisCommand.ExecuteReader(); while (thisReader.Read()) { var emp = new Employee(); emp.eid = thisReader["eid"].ToString(); emp.ename = thisReader["ename"].ToString(); employees.Add(emp); } thisReader.Close(); thisConnection.Close(); } catch (SqlException e) { Console.WriteLine(e.Message); } return employees.ToArray(); } }
private SoapObject result = null; private static String SOAP_ACTION = "http://tempuri.org/GetEmployeeByID"; private static String NAMESPACE = "http://tempuri.org/"; private static String METHOD_NAME = "GetEmployeeByID"; private static String URL = "http://192.168.123.100:8080/Service.asmx?WSDL"; public void connectSOAP(String empid) { SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); request.addProperty("id", empid); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( SoapEnvelope.VER11); envelope.dotNet = true; envelope.setOutputSoapObject(request); HttpTransportSE androidHttpTransport = new HttpTransportSE(URL); try { androidHttpTransport.call(SOAP_ACTION, envelope); } catch (Exception e) { e.printStackTrace(); } result = (SoapObject) envelope.bodyIn; }
10:19 AM | Tuesday, May 28, 2013
Posted by harshadura
Google Summer of Code 2013.. I am IN!! Thank god, I have done it for the second time!! #gsoc (නමෝ බුද්ධාය.)
— Harsha Siriwardena (@harshadura) May 27, 2013
9:34 PM | Saturday, May 18, 2013
Posted by harshadura
sudo su
echo 11 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio11/direction
echo 1 > /sys/class/gpio/gpio11/value
echo 0 > /sys/class/gpio/gpio11/value
echo 11 >
/sys/class/gpio/unexport
9:59 PM | Wednesday, May 1, 2013
Posted by harshadura
Finally i was able to blink a LED on my Arduino through an Android app. Well! it was a really glad moment for me. :-D
5:25 PM | Tuesday, April 30, 2013
Posted by harshadura
There are three main families of free software licenses:
> permissive, weak copyleft and strong copyleft.
Permissive licenses (MIT, BSD and Apache in your list) allow use of
your code in proprietary projects without sharing back either their code
or your code, if they modified it.
Weak copyleft licenses (LGPL, MPL in your list) allow use of your
code in proprietary projects, but they should share back your code under
the same license if they modified it.
Strong copyleft licenses (GPL) require that they distribute their own code under the same license (GPL here).
Free and Open Source software doesnt need to be distrbuted for Free
Understand the concept like this: Think of “free speech”, not “free beer” ("Free" means "Freedom" not "Zero Cost")
The word “free” has two legitimate general meanings; it can refer
either to freedom or to price. When we speak of “free software”,
we're talking about freedom, not price. (Think of “free speech”,
not “free beer”.) Specifically, it means that a user is free to run
the program, change the program, and redistribute the program with or
without changes.
References:
10:24 PM | Saturday, April 27, 2013
Posted by harshadura
/* Blink Turns on an LED on for one second, then off for one second, repeatedly. This example code is in the public domain. */ // Pin 13 has an LED connected on most Arduino boards. // give it a name: int led = 13; // the setup routine runs once when you press reset: void setup() { // initialize the digital pin as an output. pinMode(led, OUTPUT); } // the loop routine runs over and over again forever: void loop() { digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(100); // wait for a second digitalWrite(led, LOW); // turn the LED off by making the voltage LOW delay(100); // wait for a second }
11:11 AM | Friday, April 26, 2013
Posted by harshadura
*for DEMO purpose only (not suitable for production)
Amazon EC2 provides Free tire for Micro instances (which is a totally
awesome almost free service), So thats a very cheap way to host Java Web App
and checkout online! However the some biggie web apps seems like little bit
heavier to tolerate on AWS micro instance (with 613MB of RAM) under
default configurations. But there's a workaround to make it happen, by
adding some more swap space (1GB) to Linux system. Follow the
instructions here: https://forums.aws.amazon.com/thread.jspa?messageID=221044
After that do these stuff as well for more safety! (to get rid of: java.lang.OutOfMemoryError: PermGen space issue)
http://www.mkyong.com/tomcat/tomcat-javalangoutofmemoryerror-permgen-space/
7:59 PM | Thursday, April 4, 2013
Posted by harshadura
This Torrent gave me damn damn shit two times! yeah its more than 4GB twice = 8GB gone vain! F*** the uploader!!! After the fucking torrent download you will see a "Readme" file on it. Inside you can see a workout you need to get the actually WinRAR pass!! I hate to say, but it took me more than 2-3 hours to do that survey because of that shitty web site with lot of bugs. Finally i got it! yeah i thought all the mess was over, but its not! when i was giving the pass when the RAR promomt me to provide the pass it says password is incorrect!! ohh shit CORRECT password also incorrect, damn this person who have uploaded this shit!
FAKE >>>> http://games.torrentsnack.com/halo-4-pc/
And finally i seek more Halo4PC torrents, and I got to know the "First things First"
There's nothing called Halo4 for PC its only for Xbox, if someone says Halo4 for PC thats fake, fucking some other shit inside on those downloads, so dont waste your time, if you really want to play Halo 4 you need to take a Xbox! well yes thats all, hope this will help for some one, I thought to writeup this cause I know how pain is to download this kind of big torrent and seeing a crappy output.
Regards,
Harsha
11:01 AM | Tuesday, April 2, 2013
Posted by harshadura
SigLevel
option in /etc/pacman.conf
determines how much trust is required to install a package.SigLevel = PackageRequired >> SigLevel = Never
sudo pacman -S wget sudo wget -P /usr/share/fonts http://sinhala.sourceforge.net/files/lklug.ttfThen Run the following command
fc-cache -fvAnd proceed to the below steps..
si_LK UTF-8Run following program
locale-genImmediately you'll be able to read Sinhala Unicode in your programs (If not You may need to restart the relavent programs. eg: Firefox)
10:39 PM | Tuesday, March 5, 2013
Posted by harshadura
12:29 PM | Tuesday, February 5, 2013
Posted by harshadura
1:42 PM | Sunday, February 3, 2013
Posted by harshadura
mvn clean install -DskipTests
" command to skip the junit test cases. First time you need to build with test cases so you need to use the "mvn clean install
" command.6:36 PM | Sunday, January 13, 2013
Posted by harshadura