Skip to content

Instantly share code, notes, and snippets.

View raviagarwal7's full-sized avatar

Ravi Agarwal raviagarwal7

  • Uber
  • San Francisco
View GitHub Profile
View gist:8b3e95a0cfd6d0ca26d5c6730743c9c0
for (int index = 0; index < linesInSymbolsFile.size(); index++) {
RDotTxtEntry resource = getResourceAtIndex(linesInSymbolsFile, index);
if (uberRDotTxtIds.isPresent()) {
Preconditions.checkNotNull(finalIds);
if (!finalIds.containsKey(resource)) {
LOG.debug("Cannot find resource '%s' in the uber R.txt.", resource);
continue;
}
resource = resource.copyWithNewIdValue(finalIds.get(resource));
@raviagarwal7
raviagarwal7 / main.cpp
Last active January 21, 2017 06:54
main.cpp
View main.cpp
#include<vector>
#include<stack>
#include<set>
#include<map>
#include<queue>
#include<deque>
#include<string>
#include<iostream>
#include<algorithm>
#include<cstring>
@raviagarwal7
raviagarwal7 / failure.java
Last active July 13, 2016 22:27
Buck Android Robolectric test configuration
View failure.java
android_library(
name = 'src_release',
srcs = glob([
'src/main/java/**/*.java',
]),
...
)
robolectric_test(
name = 'test_release',
@raviagarwal7
raviagarwal7 / Main.java
Created May 30, 2016 02:30
Java Template for Codeforces, Topcoder
View Main.java
import java.io.*;
import java.util.*;
import java.math.*;
public class Main
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
StringTokenizer tokenizer=null;
public static void main(String[] args) throws IOException
View gist:a23e3a5219e28c11b79a892776c67704
#include<vector>
#include<stack>
#include<set>
#include<map>
#include<queue>
#include<deque>
#include<string>
#include<iostream>
#include<algorithm>
#include<cstring>
@raviagarwal7
raviagarwal7 / Solution.java
Last active May 27, 2016 16:32
Codeforces - Taxi (/problemset/problem/158/B)
View Solution.java
import java.io.*;
import java.util.*;
import java.math.*;
public class Solution
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
StringTokenizer tokenizer=null;
public static void main(String[] args) throws IOException