Codespaces is a product from GitHub that allows users to use a hosted version of VS Code to edit their GitHub repositories online.

- GitHub Staff
- @[email protected]
- in/aeisenberg
This file contains hidden or 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
import java.util.Collection; | |
public class Ambiguity { | |
public void foo(CriteriaBuilder builder) { | |
// change Object -> Number (or any other type) and it compiles | |
Expression<Object> objectExpression = null; | |
Expression<Collection<Object>> collectionOfObjectExpression = null; | |
builder.isNotMember(objectExpression, collectionOfObjectExpression); | |
} |
This file contains hidden or 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
#! /bin/sh -e | |
server=gerrit.example.com # change to your own server | |
username=$1 | |
project=$2 | |
url=ssh://${username}@${server}:29418/${project} | |
git clone ${url} | |
cd ${project} | |
git config gerrit.createchangeid true | |
git config remote.origin.url ${url} | |
git config remote.origin.push HEAD:refs/for/master |
This file contains hidden or 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
/** | |
* This function implements the Sieve of Eratosthenes. | |
* https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes | |
* | |
* @param {number} lastNumber The upper bound of the number to check | |
* @return {number[]} An array of prime numbers less than lastNumber | |
*/ | |
function sieve(lastNumber = 1000) { | |
// Create an array and fill it with true | |
// Important! the array's length is one more than lastNumber so that |
OlderNewer