Skip to content

Instantly share code, notes, and snippets.

View arunma's full-sized avatar

Argon arunma

  • Singapore
View GitHub Profile
@arunma
arunma / git-cheatsheet
Last active April 21, 2018 09:39 — forked from TomyJaya/git-cheatsheet.md
git-cheatsheet
# Cloning a remote repository (SSH)
git clone <user@server:path/to/repo.git>
e.g. git clone git@github.com:TomyJaya/git-real.git
# Cloning a remote repository (https)
git clone <URL>
e.g. git clone https://github.com/TomyJaya/git-real.git
# Checking the Status of Your Files
git status
@arunma
arunma / MonadsTesting.scala
Last active August 29, 2015 14:15
Monads Example - for comprehensions
object MonadsTesting {
println("http://stackoverflow.com/questions/14598990/confused-with-the-for-comprehension-to-flatmap-map-transformation")
//> http://stackoverflow.com/questions/14598990/confused-with-the-for-comprehens
//| ion-to-flatmap-map-transformation
val some=Some ("hello") //> some : Some[String] = Some(hello)
some.flatMap(str=>Some(str+"x")) //> res0: Option[String] = Some(hellox)
@arunma
arunma / results.xml
Created November 19, 2013 09:14
Results for query http://localhost:8983/solr/collection1/select?q=activityNameSearch%3Aincoming&wt=xml&indent=true&facet=true&facet.field=activityNameFacet
<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">1</int>
<lst name="params">
<str name="facet">true</str>
<str name="indent">true</str>
<str name="q">activityNameSearch:incoming</str>
@arunma
arunma / schema.xml
Created November 19, 2013 09:13
Schema - check out, commaDelimited and search_field_type types and two other columns activityNameFacet & activityNameSearch
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses 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
@arunma
arunma / activity.xml
Created November 19, 2013 09:11
activity.xml - Data
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses 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
@arunma
arunma / QuickSortDualPivot.java
Created June 14, 2013 10:56
QuickSortDualPivot
package basics.sorting.quick;
import static basics.shuffle.KnuthShuffle.shuffle;
import static basics.sorting.utils.SortUtils.exchange;
import static basics.sorting.utils.SortUtils.less;
public class QuickSortDualPivot {
public void sort (int[] input){
//input=shuffle(input);
@arunma
arunma / QuickSort3WayTest.java
Created June 5, 2013 13:52
QuickSort3WayTest
package com.sorting.quick._3way;
import static com.sorting.insert.SortUtils.arrayToString;
import org.junit.Test;
public class QuickSort3WayTest {
@Test
public void testQuickSort() {
@arunma
arunma / QuickSort3Way.java
Last active December 18, 2015 02:49
QuickSort3Way
package basics.sorting.quick;
import static basics.shuffle.KnuthShuffle.shuffle;
import static basics.sorting.utils.SortUtils.exchange;
import static basics.sorting.utils.SortUtils.less;
public class QuickSort3Way {
public void sort (int[] input){
@arunma
arunma / QuickSortTest.java
Created May 31, 2013 12:20
Quick Sort Test
package com.sorting.quick;
import static com.sorting.insert.SortUtils.arrayToString;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
public class QuickSortTest {
@Test
@arunma
arunma / QuickSortBasic.java
Last active December 17, 2015 22:49
Quick Sort Basic
package basics.sorting.quick;
import static basics.sorting.utils.SortUtils.exchange;
import static basics.sorting.utils.SortUtils.less;
import basics.shuffle.KnuthShuffle;
public class QuickSortBasic {
public void sort (int[] input){