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
REMIX DEFAULT WORKSPACE | |
Remix default workspace is present when: | |
i. Remix loads for the very first time | |
ii. A new workspace is created | |
iii. There are no files existing in the File Explorer | |
This workspace contains 3 directories: | |
1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name. |
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
val uri = Uri.parse("https://m.uber.com/looking?drop%5B0%5D=%7B%22id%22%3A%22c8a04f89-375e-7cba-9545-b32f554276b4%22%2C%22addressLine1%22%3A%22San%20Francisco%20Marriott%20Marquis%22%2C%22addressLine2%22%3A%22780%20Mission%20St%2C%20San%20Francisco%2C%20California%22%2C%22provider%22%3A%22uber_places%22%2C%22locale%22%3A%22en-US%22%2C%22latitude%22%3A37.785023%2C%22longitude%22%3A-122.40481%7D&pickup=%7B%22label%22%3A%22%22%2C%22addressLine1%22%3A%22Strata%20Apartments%22%2C%22addressLine2%22%3A%22555%20Mission%20Rock%20St%2C%20San%20Francisco%2C%20California%22%2C%22latitude%22%3A37.7728338%2C%22longitude%22%3A-122.3906821%7D&state=i81t62qYnGa2ys8TU5Lb-WIMB8e0hraXu6jQHaJfT_M%3D&vehicle=a1111c8c-c720-46c3-8534-2fcdd730040d") | |
val openURL = Intent(Intent.ACTION_VIEW) | |
openURL.flags = FLAG_ACTIVITY_NEW_TASK | |
openURL.data = uri | |
this.startActivity(openURL) |
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.rahulrav | |
import com.android.tools.lint.detector.api.* | |
import com.intellij.psi.PsiMethod | |
import org.jetbrains.uast.UCallExpression | |
@Suppress("UnstableApiUsage") | |
class LogWtfDetector : Detector(), SourceCodeScanner { | |
override fun getApplicableMethodNames(): List<String>? = |
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
/** | |
* Original question: https://www.codingame.com/ide/16219057b3bfda076f5ea3b1a0eb5fca1fae7eff | |
*/ | |
public class DeadMensShot { | |
public static void main(String args[]) { | |
Scanner in = new Scanner(System.in); | |
int N = in.nextInt(); | |
final Point[] corners = new Point[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
# Xcode | |
## User settings | |
xcuserdata/ | |
## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) | |
*.xcscmblueprint | |
*.xccheckout | |
## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) |
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
/** | |
* Definition for Directed graph. | |
* class DirectedGraphNode { | |
* int label; | |
* ArrayList<DirectedGraphNode> neighbors; | |
* DirectedGraphNode(int x) { label = x; neighbors = new ArrayList<DirectedGraphNode>(); } | |
* }; | |
*/ | |
public class Solution { |
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
class Solution { | |
public List<List<Integer>> subsetsWithDup(int[] nums) { | |
if (nums == null) { | |
return Collections.emptyList(); | |
} else if (nums.length == 0) { | |
return Collections.singletonList(Collections.emptyList()); | |
} | |
Arrays.sort(nums); |
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 Solution { | |
/** | |
* @param nums: A set of numbers. | |
* | |
* @return: A list of lists. All valid subsets. | |
*/ | |
public List<List<Integer>> subsets(int[] nums) { | |
if (nums == null || nums.length == 0) { | |
return Collections.singletonList(Collections.emptyList()); |
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 String findImageUrlForWidthTreeMap(Map<Integer, String> images, int minImageWidth) { | |
if (null != images && images.size() > 0) { | |
final TreeMap<Integer, String> treeMap = new TreeMap<>(imageTreeMapComparator); | |
treeMap.putAll(images); | |
for (final Map.Entry<Integer, String> entry : treeMap.entrySet()) { | |
final int width = entry.getKey(); | |
if (width >= minImageWidth) { | |
return entry.getValue(); | |
} |
NewerOlder