කොමෙන්ට්ස් දැමීම සම්බන්ධවයි.
ඔබගේ අදහස් ඉතා ගෞරව පුර්වකව අගය කරමි.
කරුණාකර කෙලින්ම හෝ ව්යංගයෙන් (උදාහරණ ලෙස මුලට හෝ අගට තරු ලකුණු සතිතව) නරක වචන (කුණුහරුප) යෙදීමෙන්වලකින්න
Sunday, June 29, 2014
Friday, June 27, 2014
අප්පච්චිට කාර් එකක්
අපි ඔක්කොටම කලින් වාහන තිබ්බේ අප්පච්චිට. දැන් අප්පච්චිට හැර අනිත් ඔක්කොටම කාර් තියනවා. එක හින්ද කාර් එකක් අරන් දෙන්න හිතුව. අද රිසර්ව් කරා. සති දෙකකින් විතර හම්බ වෙයි.
Wednesday, June 25, 2014
Monday, June 23, 2014
සේතුගේ තුන්වෙනි බර්ත් ඩේ එක.
උදේම ගිහින් කොහුවල ළමා නිවාසෙට දානෙ දුන්න. එන ගමන් මොන්ටියට අරන් යන්න ඕඩර් කරපු කේක් එක අරගෙන බබාව මොන්ටියට දැම්ම. මොන්ටියේ ටීචර් බබාල ඔක්කොම එක්ක කේක් එකක් කපල තිබුන. බබා එක්ක එන්න ගිහින් අනිත් කේක් එකක් අරගෙන අව.
සමන්මලී ගේ අම්ම අවේ ඊයේ. අම්ම අප්පච්චි සුමුදු දෙව් දවල් වෙනකොට අව.මැණිකෙලා, සමන්මලී අය්ය ගේ ගෙදර අය, ඇල්පිටියේ ඔක්කොම, ලග ගෙවල් දෙකේ අය, ගාල්ලේ චමිලලා තමයි අවේ. ඔක්කොම 30ක් විතර.
අපි ඔක්කොටම හෙම්බිරිස්සාව. චූටි බබාට ගොඩක් අමාරු උන. එක හින්ද අම්ම මේ ටිකේම ඉදල 27 උදේ යන්න ගිය.
අපි ඔක්කොටම හෙම්බිරිස්සාව. චූටි බබාට ගොඩක් අමාරු උන. එක හින්ද අම්ම මේ ටිකේම ඉදල 27 උදේ යන්න ගිය.
Thursday, June 12, 2014
අපි අයෙත් නුවරඑළි ගිය.
පොසොන් පෝය නිවාඩුවත් එක්ක දිග නිවාඩුවක් හම්බ උන. නුවරඑළි යන්න තීරණය උන.
මම, සමන්මලී, සේතු, අශ්වින්, සමන්මලී අම්ම්, අම්ම, අප්පච්චි, සුමුදු, දෙව්, මැණිකේ දිලාන්, දිලාන් අම්ම, දිලාන් නංගි තමයි ගියේ. මල්ලි ලංකාවේ නැ. ගිය පාරනම් මිනිහත් හිටිය. සමන්මලී මල්ලි එනවා කියල අවේ න. මිනිහට හොද පාඩමක් උගන්නවන්.
12 උදේම අප්පච්චිලා අපේ ගෙදර අව. රනුකගේ වාහනේ. අපිත් ගෙන මනිකෙලත් අරගෙන පිටත් උන. නුවර එලියට ගිය එත් දවසම වහිනවා. සණස හොලිඩේ වල නතර උනේ. හොදමත් න නරකමත් න. පහුවද පාර්ක් එකට ගිහිය. තරුණ අය හයි ස්පීඩ් බෝට් එක්ස්පිරියන්ස් එකකුත් ගත්ත. පස්සේ අදිශ්ම් බලල උඩවලව යන්න පිටත් උන. ගූගල් මැප් හින්ද මෙලෝ යකෙක් යන්නේ නැති පාරක තමි උඩවලව අවේ.
උඩවලව ආවත් මට හොලිඩේ බන්ග්ලෝ එකේ නො එක න. email බලන්න විදිහක් න සිග්නල් න. අප්පච්චි බයිනවා පලු යන්න. අමාරුවෙන් නො එක හොයා ගත්ත. ඩී ඔලිෆාන්ට්, බංගලෝ එක. හොද තැන. එකේම කූක් කෙනෙක් ඉන්න හින්ද ඕනේ ඕනේ විදිහට කෑම .
පහුවද උදේම සෆාරි. සෆාරි වලට බය තරම කිව්වොත් සමහරු හිටියේ සීට් යට.
දවල්ට කෑ ම කල, එන්න පිටත් උන. ඩී නංගිගේ යාලුවෙක් ගෙදරින් වැරදීමක් හන්බ උණු ඩිනර් එකත් අරගෙන, සමන්මලිගේ අම්මත් බස්සගෙන. රබුටනුත් කාල කඩාගෙන එන්න කෙස්බවට අව. අප්පච්චි පරක්කුයි කියා කියා එතැනින්ම ගිය. මම මනිකෙලව බැස්සුවා.
Wednesday, May 21, 2014
බයි කෑම සහ මරණය
බබාට කෑම කවමින් .
අත්තම්මා : බයි ගොඩක් කන්න ඕනේ බබා. එතකොට ඉක්මනට ලොකු වෙනවා
පසු දිනක කෑම කවමින්.
බබා : අත්තම්ම මැරෙනවද?
අත්තම්ම : ඔව් බබා ලොකු උනාම අත්තම්ම මැරෙනවා.
බබා : එතකොට කිරි අම්ම
අත්තම්ම : ඔව් කිරි අම්මත් මැරෙනවා
බබා : ඥාන ඇන්ටි
අත්තම්ම : ඔව් අපි ඔක්කොම මැරෙනවා. බබා ලොකු උනාම අපි මැරෙනවා.
බබා : එහෙනම් මම බයි කන්නේ නෑ
Saturday, May 10, 2014
බර්ත් ඩේ එකට වෙසක් කුඩු
මම සව් කොල ගෙන කාරයට ගොඩ උනෙමි.
බබා : මේ මොනවද මේ.
අම්ම (සමන්මලී ) : මේ අර වෙසක් කුඩු අලවන්න කොළ
බබ: ඒ මොකටද
අම්ම: ලදී වෙසක් පෝය එනවා. අපේ බුදු හාමුදුරුවෝ ඉපදුනේ, බුදු උනේ, පරිනිවන් පෑවේ වෙසක් පෝය දවසක්. ඔයා ඉපදෙන එක දන්නවනේ. බර්ත් ඩේ එක. බුදු වෙනවා කියන්නේ සාදු වගේ සිවුරක් ගෙන බණ කියන එකට. ප්රිනිවන් පනවා කියන්නේ මැරෙන එකට. (බබාට තේරෙන විදිහට සමන්මලී තෙමගුල පැහැදිලි කළා). ඉතින් එක හින්ද අපි පන්සල් යනවා, තෝරන් තියනවා. දන්සැල් දෙනවා.. ඔක්කොම ගෙවල් වල වෙසක් කුඩු එල්ලනවා.
බබා : මගේ බර්ත් ඩේ එකත් ලගදි එනවනේ. එකටත් වෙසක් කුඩු එල්ලයි.
Saturday, May 3, 2014
Java Permutations and Combinations
Java Permutations and Combinations
/**
*
* @author Chaminda Amarasinghe>
*/
public final class CollectionUtils {
public static List> getCombinations(int r, T... items) {
Assert.that("r should be like this r >0 and r <= items.size", r > 0, r <= items.length);
final List> out = new ArrayList>();
T[] choose = (T[]) Array.newInstance(items[0].getClass(), r);
generateCombinations(items, r, choose, 0, out);
return out;
}
public static List> getCombinations(int r, List items) {
Assert.that("r should be like this r >0 and r <= items.size", r > 0, r <= items.size());
final List> out = new ArrayList>();
T[] choose = (T[]) Array.newInstance(items.get(0).getClass(), r);
T[] itemsArray = (T[]) Array.newInstance(items.get(0).getClass(), items.size());
for (int i = 0; i < items.size(); i++) {
itemsArray[i] = items.get(i);
}
generateCombinations(itemsArray, r, choose, 0, out);
return out;
}
private static void generateCombinations(T[] items, int r, T[] choose, int iStartIndex, List> out) {
if (r <= 0) {
out.add(new ArrayList(Arrays.asList(choose)));
return;
}
for (int i = iStartIndex; i < items.length - r + 1; i++) {
choose[choose.length - r] = items[i];
generateCombinations(items, r - 1, choose, i + 1, out);
}
}
public static List> getPermutations(final T... items) {
return getPermutations(Arrays.asList(items));
}
public static List> getPermutations(final List items) {
final ArrayList> arrayList = new ArrayList>();
permute(items, 0, arrayList);
return arrayList;
}
private static void permute(java.util.List arr, int k, List> out) {
for (int i = k; i < arr.size(); i++) {
java.util.Collections.swap(arr, i, k);
permute(arr, k + 1, out);
java.util.Collections.swap(arr, k, i);
}
if (k == arr.size() - 1) {
out.add(new ArrayList(arr));
}
}
}
Unit Testing
/**
* Test of asMap method, of class CollectionUtils.
*/
@Test
public void testCombinationsInt() {
// expected combinations {{10, 20}, {10, 30}, {20, 30}}
List> combinations = CollectionUtils.getCombinations(2, 10, 20, 30);
// test we have correct number of combinations
assertEquals(3, combinations.size());
// test we have the correct no of items in the a combination items in nCr term that is r, in here that is 2
assertEquals(2, combinations.get(0).size());
// test first item of given combination
assertEquals(10, (int) (combinations.get(0).get(0)));
assertEquals(20, (int) (combinations.get(0).get(1)));
// test second item of given combination
assertEquals(10, (int) (combinations.get(1).get(0)));
assertEquals(30, (int) (combinations.get(1).get(1)));
// test third item of given combination
assertEquals(20, (int) (combinations.get(2).get(0)));
assertEquals(30, (int) (combinations.get(2).get(1)));
System.out.println("combinations " + combinations);
}
@Test
public void testCombinationsString() {
// expected combinations {{"A", "B"}, {"A", "C"}, {"B", "C"}}
List> combinations = CollectionUtils.getCombinations(2, "A", "B", "C");
// test we have correct number of combinations
assertEquals(3, combinations.size());
// test we have the correct no of items in the a combination items in nCr term that is r, in here that is 2
assertEquals(2, combinations.get(0).size());
// test first item of given combination
assertEquals("A", combinations.get(0).get(0));
assertEquals("B", combinations.get(0).get(1));
// test second item of given combination
assertEquals("A", combinations.get(1).get(0));
assertEquals("C", combinations.get(1).get(1));
// test third item of given combination
assertEquals("B", combinations.get(2).get(0));
assertEquals("C", combinations.get(2).get(1));
System.out.println("combinations " + combinations);
}
@Test
public void testCombinationsCustomTypes() {
class SampleModel {
String name;
}
SampleModel s1 = new SampleModel();
SampleModel s2 = new SampleModel();
SampleModel s3 = new SampleModel();
// expected combinations {{s1, s2}, {s1, s3}, {s2, s3}}
List> combinations = CollectionUtils.getCombinations(2, s1, s2, s3);
// test we have correct number of combinations
assertEquals(3, combinations.size());
// test we have the correct no of items in the a combination items in nCr term that is r, in here that is 2
assertEquals(2, combinations.get(0).size());
// test first item of given combination
assertEquals(s1, combinations.get(0).get(0));
assertEquals(s2, combinations.get(0).get(1));
// test second item of given combination
assertEquals(s1, combinations.get(1).get(0));
assertEquals(s3, combinations.get(1).get(1));
// test third item of given combination
assertEquals(s2, combinations.get(2).get(0));
assertEquals(s3, combinations.get(2).get(1));
System.out.println("combinations " + combinations);
}
@Test(expected = StBetRuntimeException.class)
public void testCombinationsRisGreaterThanN() {
// r > n
CollectionUtils.getCombinations(10, 1, 2, 3);
}
@Test(expected = StBetRuntimeException.class)
public void testCombinationsRis0() {
// r = 0
CollectionUtils.getCombinations(0, 1, 2, 3);
}
@Test(expected = StBetRuntimeException.class)
public void testCombinationsRisLessThan0() {
// r < 0
CollectionUtils.getCombinations(-10, 1, 2, 3);
}
@Test
public void testCombinations4C2() {
// expected combinations {{10, 20}, {10, 30}, {20, 30}}
List> combinations = CollectionUtils.getCombinations(3, 10, 20, 30, 40);
System.out.println("combinations " + combinations);
// test we have correct number of combinations
assertEquals(4, combinations.size());
// test we have the correct no of items in the a combination items in nCr term that is r, in here that is 2
assertEquals(3, combinations.get(0).size());
assertEquals(10, (int) (combinations.get(0).get(0)));
assertEquals(20, (int) (combinations.get(0).get(1)));
assertEquals(30, (int) (combinations.get(0).get(2)));
assertEquals(10, (int) (combinations.get(1).get(0)));
assertEquals(20, (int) (combinations.get(1).get(1)));
assertEquals(40, (int) (combinations.get(1).get(2)));
assertEquals(10, (int) (combinations.get(2).get(0)));
assertEquals(30, (int) (combinations.get(2).get(1)));
assertEquals(40, (int) (combinations.get(2).get(2)));
assertEquals(20, (int) (combinations.get(3).get(0)));
assertEquals(30, (int) (combinations.get(3).get(1)));
assertEquals(40, (int) (combinations.get(3).get(2)));
}
@Test
public void testPermutationsStringUsingList() {
List listOfItem = new ArrayList(CollectionUtils.asList("A", "B", "C"));
// expected Permutations ABC, ACB, BAC, BCA, CAB, CBA
List> permutations = CollectionUtils.getPermutations(listOfItem);
// test we have correct number of combinations
assertEquals(6, permutations.size());
// test we have the correct no of items in the a combination items in nCr term that is r, in here that is 2
assertEquals(3, permutations.get(0).size());
// test first item of given combination
assertEquals("A", permutations.get(0).get(0));
assertEquals("B", permutations.get(0).get(1));
assertEquals("C", permutations.get(0).get(2));
// test second item of given combination
assertEquals("A", permutations.get(1).get(0));
assertEquals("C", permutations.get(1).get(1));
assertEquals("B", permutations.get(1).get(2));
// test third item of given combination
assertEquals("B", permutations.get(2).get(0));
assertEquals("A", permutations.get(2).get(1));
assertEquals("C", permutations.get(2).get(2));
assertEquals("B", permutations.get(3).get(0));
assertEquals("C", permutations.get(3).get(1));
assertEquals("A", permutations.get(3).get(2));
assertEquals("C", permutations.get(4).get(0));
assertEquals("B", permutations.get(4).get(1));
assertEquals("A", permutations.get(4).get(2));
assertEquals("C", permutations.get(5).get(0));
assertEquals("A", permutations.get(5).get(1));
assertEquals("B", permutations.get(5).get(2));
System.out.println("permutations " + permutations);
}
@Test
public void testPermutationsString() {
// expected Permutations ABC, ACB, BAC, BCA, CAB, CBA
List> permutations = CollectionUtils.getPermutations("A", "B", "C");
// test we have correct number of combinations
assertEquals(6, permutations.size());
// test we have the correct no of items in the a combination items in nCr term that is r, in here that is 2
assertEquals(3, permutations.get(0).size());
// test first item of given combination
assertEquals("A", permutations.get(0).get(0));
assertEquals("B", permutations.get(0).get(1));
assertEquals("C", permutations.get(0).get(2));
// test second item of given combination
assertEquals("A", permutations.get(1).get(0));
assertEquals("C", permutations.get(1).get(1));
assertEquals("B", permutations.get(1).get(2));
// test third item of given combination
assertEquals("B", permutations.get(2).get(0));
assertEquals("A", permutations.get(2).get(1));
assertEquals("C", permutations.get(2).get(2));
assertEquals("B", permutations.get(3).get(0));
assertEquals("C", permutations.get(3).get(1));
assertEquals("A", permutations.get(3).get(2));
assertEquals("C", permutations.get(4).get(0));
assertEquals("B", permutations.get(4).get(1));
assertEquals("A", permutations.get(4).get(2));
assertEquals("C", permutations.get(5).get(0));
assertEquals("A", permutations.get(5).get(1));
assertEquals("B", permutations.get(5).get(2));
System.out.println("permutations " + permutations);
}
Labels:
තාක්ෂණික
Thursday, April 24, 2014
මල්ලි
බබා අපි මේ මල්ලි දීල කඩේ මාමගේ මල්ලි ගම්මුද. මෙයා චූටියි නේ.
නෑ මෙයත් ටික දවසකින් ලොකු වෙනවා.
එහෙනම් අපි දෙන්නම එක්ක යමු. මල්ලි ලොකු උනාට පස්සේ හා පැටියව දෙන්න පුළුවන්නේ.
එපා.. මට අම්මගේ බඩෙන් අපු මල්ලිව ඕනේ.
Tuesday, April 22, 2014
කේක් දෙකක්
අදට 35 යි . කේක් දෙකක්ම එකට තියල කපන්න උන. සමන්මලිගෙන් එකක් .මැණිකේ, දිලාන්, දිලාන් නංගි එකක් ගෙනත්.
රැට කෑම red balloons
Subscribe to:
Posts (Atom)
