This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.designpatterns.template; | |
| public class WashineMachineApplication { | |
| public static void main(String[] args) { | |
| WashineMachineProcess wmProcess = new WashineMachineProcessor(); | |
| wmProcess.run(); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.designpatterns.adapter; | |
| public interface AbcAccountsAPI {// This was old API | |
| public String getAccountName(); | |
| public String getDescription(); | |
| public double getDebitAmount(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private double distance(double lat1, double lon1, double lat2, double lon2) { | |
| // Haversine great circle distance approximation, returns meters | |
| double theta = lon1 - lon2; | |
| double dist = Math.sin(deg2rad(lat1)) * Math.sin(deg2rad(lat2)) | |
| + Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) | |
| * Math.cos(deg2rad(theta)); | |
| dist = Math.acos(dist); | |
| dist = rad2deg(dist); | |
| dist = dist * 60; // 60 nautical miles per degree of separation | |
| dist = dist * 1852; // 1852 meters per nautical mile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0"?> | |
| <soap:Envelope> | |
| <soap:Header> | |
| ... | |
| </soap:Header> | |
| <soap:Body> | |
| ... | |
| <soap:Fault> | |
| ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| කර්මය යනු කුමක්ද ? | |
| කර්මය යනු කිසිවෙකු විමසුවොත් දිය හැකි පිළිතුර වන්නේ “චේතනාව” කියාය. එසේ නම් කර්මය යනු “චේතනාව” ය. නැතිනම් “සිතිවිල්ල” ය. චෛතසික හෙවත් සිතිවිලි 52 ක් අභිධර්මයේ දක්වයි. එයින් එක් චෛතසිකයක් වී ඇත්තේ චේතනා චෛතසිකයයි. කෙසේ වෙතත් චේතනාව පමනක් කර්මය නොවේ. කර්මයක් වීමට නම් චේතනාවක් සහිතව සිදුවුවක් තිබිය යුතුය. චේතනාවක් සහිතව සිතෙන් කයෙන් වචනයෙන් සිදුවන ක්රීයා කර්ම ලෙස පැවසීම මේ අනුව ඉතා නිවැරදී. | |
| ඇවදීම, වැඩකිරීම, නිදීම, සිටීම ආදී ක්රියා කර්ම ලෙස පෘතක්ජනයා සිතයි. එහෙත් කර්මය යනු ඒවා නොව, කුසල අකුසල චේතනා කර්ම ලෙස බුදු දහමේ දැක්වෙයි. සිතෙන් කයෙන් වචනයෙන් යම් කිසි ක්රියාවක් කරන විට අප සිත තුල පහළ වන චේතනාව කර්මය නම් වේ. | |
| “චේතනාහං භික්ඛවේ කම්මං වදාමි | |
| චේතයිත්වා කම්මං කරෝති | |
| කායේන වාචාය මනසා” යන්නෙහි අර්තය එයයි . | |
| මේ අනුව කර්මය යනු කෙනෙකුගේ ඉබේ සිදු වන දේ නොව කෙනෙකු සිතින් සිතා නැත්නම් සචේතනිකව කරන ක්රියාවන් කර්මය ලෙස සැලකිය හැකි බව පෙනෙයි. | |
| කර්මය කොටස් දෙකකි. | |
| 1. කුසල කර්ම | |
| 2. අකුසල කර්ම |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; |
NewerOlder