git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| case class GridCell(x: Int, y: Int) | |
| def exist(board: Array[Array[Char]], word: String): Boolean = { | |
| val deltaVector = List((0, -1), (0, 1), (1, 0), (-1, 0)) | |
| def inBounds(cell: GridCell) = cell.x >= 0 && cell.x < board.length && cell.y >= 0 && cell.y < board(0).length | |
| def dfs(word: List[Char], currentCell: GridCell, visited: List[GridCell]): Boolean = { | |
| word match { |
| def newTempFile() = new File(IoTmpDir, "JavaTestTmp-"+random.nextLong()) | |
| /* | |
| * Tries 10 times to find a nonexistent file. | |
| * Uses Streams to lazily go through a range, generating a fresh | |
| * file each time. | |
| */ | |
| val dir = Stream.range(1,10) | |
| .map { newTempFile() } | |
| .find(!_.exists) |
| import java.awt.Color | |
| import java.io.File | |
| import java.io.IOException | |
| import org.gephi.data.attributes.api.AttributeColumn | |
| import org.gephi.data.attributes.api.AttributeController | |
| import org.gephi.data.attributes.api.AttributeModel | |
| import org.gephi.filters.api.FilterController | |
| import org.gephi.filters.api.Query | |
| import org.gephi.filters.api.Range | |
| import org.gephi.filters.plugin.graph.DegreeRangeBuilder.DegreeRangeFilter |
| function keepTrying(otherArgs, promise) { | |
| promise = promise||new Promise(); | |
| // try doing the important thing | |
| if(success) { | |
| promise.resolve(result); | |
| } else { | |
| setTimeout(function() { | |
| keepTrying(otherArgs, promise); |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |