Skip to content

Instantly share code, notes, and snippets.

View priyankahdp's full-sized avatar
💭
Everything changes, nothing remains without change

Priyanka Kulathilaka priyankahdp

💭
Everything changes, nothing remains without change
View GitHub Profile
@priyankahdp
priyankahdp / MySessionListener.java
Created June 17, 2014 08:36
JSF Page Redirect Issue
package **.******.***.***.util;
import java.util.Date;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;
public class MySessionListener implements HttpSessionListener {
@priyankahdp
priyankahdp / form.xhtml
Created June 24, 2014 05:35
collapsibleDataTable Expand Issue
....
<script>
function richTreeCollapse(){
$('[id$=sbtbl]').each(function(n){this.rf.component.collapse();});
}
</script>
<div style="text-align: center">
<a4j:commandButton id="btnCopEdit" value="Edit" execute="@form" disabled="#{corporateManagementController.enableAdd}"
oncomplete="if(#{!facesContext.validationFailed}) {#{rich:component('infoPopup')}.show();};richTreeCollapse()"
/*
* Copyright (c) 1996-2001
* Logica Mobile Networks Limited
* All rights reserved.
*
* This software is distributed under Logica Open Source License Version 1.0
* ("Licence Agreement"). You shall use it and distribute only in accordance
* with the terms of the License Agreement.
*
*/
package org.smpp.client;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.Properties;
import java.util.StringTokenizer;
@priyankahdp
priyankahdp / RSAEncDecDemo.java
Last active January 26, 2017 12:40
RSA Encryption Decryption Class Demo
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.math.BigInteger;
import java.security.KeyFactory;
import java.security.KeyPair;
@priyankahdp
priyankahdp / KARMA
Created August 3, 2017 12:45
KARMA
කර්මය යනු කුමක්ද ?
කර්මය යනු කිසිවෙකු විමසුවොත් දිය හැකි පිළිතුර වන්නේ “චේතනාව” කියාය. එසේ නම් කර්මය යනු “චේතනාව” ය. නැතිනම් “සිතිවිල්ල” ය. චෛතසික හෙවත් සිතිවිලි 52 ක් අභිධර්මයේ දක්වයි. එයින් එක් චෛතසිකයක් වී ඇත්තේ චේතනා චෛතසිකයයි. කෙසේ වෙතත් චේතනාව පමනක් කර්මය නොවේ. කර්මයක් වීමට නම් චේතනාවක් සහිතව සිදුවුවක් තිබිය යුතුය. චේතනාවක් සහිතව සිතෙන් කයෙන් වචනයෙන් සිදුවන ක්‍රීයා කර්ම ලෙස පැවසීම මේ අනුව ඉතා නිවැරදී.
ඇවදීම, වැඩකිරීම, නිදීම, සිටීම ආදී ක්‍රියා කර්ම ලෙස පෘතක්ජනයා සිතයි. එහෙත් කර්මය යනු ඒවා නොව, කුසල අකුසල චේතනා කර්ම ලෙස බුදු දහමේ දැක්වෙයි. සිතෙන් කයෙන් වචනයෙන් යම් කිසි ක්‍රියාවක් කරන විට අප සිත තුල පහළ වන චේතනාව කර්මය නම් වේ.
“චේතනාහං භික්ඛවේ කම්මං වදාමි
චේතයිත්වා කම්මං කරෝති
කායේන වාචාය මනසා” යන්නෙහි අර්තය එයයි .
මේ අනුව කර්මය යනු කෙනෙකුගේ ඉබේ සිදු වන දේ නොව කෙනෙකු සිතින් සිතා නැත්නම් සචේතනිකව කරන ක්‍රියාවන් කර්මය ලෙස සැලකිය හැකි බව පෙනෙයි.
කර්මය කොටස් දෙකකි.
1. කුසල කර්ම
2. අකුසල කර්ම
@priyankahdp
priyankahdp / ApplicationRest.java
Created November 7, 2017 06:00
Test Invoke point
/**
* Copyright (c) 2016, WSO2.Telco Inc. (http://www.wso2telco.com) All Rights Reserved.
*
* WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@priyankahdp
priyankahdp / PriyanDemo.java
Created August 15, 2018 11:37
EncodeORDecode
package com.priyan.demo;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.net.URLEncoder;
import org.apache.commons.codec.binary.Base64;
public class PriyanDemo {
<?xml version="1.0"?>
<soap:Envelope>
<soap:Header>
...
</soap:Header>
<soap:Body>
...
<soap:Fault>
...
@priyankahdp
priyankahdp / WeatherService.wsdl
Last active March 12, 2022 19:48
SAMPLE WSDL
<?xml version="1.0" encoding="UTF-8"?>
<!-- ====================ROOT-BEGIN===========================-->
<definitions name ="WeatherWebService">
<!-- ====================ROOT-END===========================-->
<!-- ====================ABSTRACT-PART-BEGIN===========================-->
<message name="WeatherService_getWeather">
<part name="City" type="xsd:string"/> <!-- REQUEST PARAMETERS(s) -->
</message>