This file contains 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
public class GenerateAllPermutation { | |
public static void main(String... arg) { | |
Scanner scanner = new Scanner(System.in); | |
String sequence = scanner.nextLine(); | |
generatePermutation("", sequence); | |
} | |
private static void generatePermutation(String prefix, String sequence) { |
This file contains 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
public class GeneratePermutation2Strings { | |
public static void main(String... arg) { | |
Scanner scanner = new Scanner(System.in); | |
String s1 = scanner.nextLine(); | |
String s2 = scanner.nextLine(); | |
generateSequence("", s1, s2); | |
} |
This file contains 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
public class EuclidAlgo { | |
public static void main(String ...arg) { | |
Scanner scanner = new Scanner(System.in); | |
int m = scanner.nextInt(); | |
int n = scanner.nextInt(); | |
System.out.println("GCD: "+ gcd(m, n)); | |
} |
This file contains 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
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:orientation="vertical" > | |
<LinearLayout | |
android:layout_alignParentTop="true" | |
android:id="@+id/mapfragment" | |
android:layout_width="match_parent" | |
android:layout_height="300dp" |
This file contains 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.vectordirection; | |
import java.util.HashMap; | |
import java.util.Iterator; | |
import java.util.Map; | |
import java.util.concurrent.Semaphore; | |
import java.util.concurrent.TimeUnit; | |
/** | |
* Created by adarshpandey on 1/12/15. |
This file contains 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.vectordirection; | |
/** | |
* Created by adarshpandey on 1/12/15. | |
*/ | |
public interface CacheableItem<Key> { | |
Key getKey(); | |
} |
This file contains 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.verctordirection.test; | |
import com.vectordirection.LRUCache; | |
import org.junit.Test; | |
/** | |
* Created by adarshpandey on 1/13/15. | |
*/ | |
public class CachingTest { |
This file contains 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.verctordirection.test; | |
import com.vectordirection.CacheableItem; | |
/** | |
* Created by adarshpandey on 1/13/15. | |
*/ | |
public class Store implements CacheableItem<Integer> { | |
private Integer key; |
This file contains 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
syntax = "proto3"; | |
option java_multiple_files = true; | |
package com.gonuclei.grpc; | |
option java_package = "com.gonuclei.grpc"; | |
message HelloRequest { | |
string first_name = 1; | |
string lastName = 2; | |
} |