Install ImageMagick for image conversion:
brew install imagemagick
Install tesseract for OCR:
brew install tesseract --all-languages
Or install without --all-languages and install them manually as needed.
| Class Main { | |
| public void bfs() | |
| { | |
| // BFS uses Queue data structure | |
| Queue queue = new LinkedList(); | |
| queue.add(this.rootNode); | |
| printNode(this.rootNode); | |
| rootNode.visited = true; | |
| while(!queue.isEmpty()) { | |
| Node node = (Node)queue.remove(); |
| public class RetrierTest { | |
| private static int count = 0; | |
| @Rule public RetryRule rule = new RetryRule(); | |
| @Test | |
| @Retry | |
| public void failsFirst() throws Exception { | |
| count++; | |
| assertEquals(2, count); |
| // MarkupBuilder is a lot cleaner way of generating valid xml/html markup | |
| // than writing tags as string and forgetting to close one ;) | |
| def writer = new StringWriter() // html is written here by markup builder | |
| def markup = new groovy.xml.MarkupBuilder(writer) // the builder | |
| markup.html{ | |
| table { | |
| tr { | |
| td(class:"row", "hello world!") |
Install ImageMagick for image conversion:
brew install imagemagick
Install tesseract for OCR:
brew install tesseract --all-languages
Or install without --all-languages and install them manually as needed.
| // more information here: http://blog.tomtasche.at/2012/10/use-built-in-feedback-mechanism-on.html | |
| try { | |
| int i = 3 / 0; | |
| } catch (Exception e) { | |
| ApplicationErrorReport report = new ApplicationErrorReport(); | |
| report.packageName = report.processName = getApplication() | |
| .getPackageName(); | |
| report.time = System.currentTimeMillis(); | |
| report.type = ApplicationErrorReport.TYPE_CRASH; |
| artifacts { | |
| archives file: 'A.jar', name: 'A', type: 'jar' | |
| archives file: 'B.jar', name: 'B', type: 'jar' | |
| } | |
| uploadArchives { | |
| repositories { | |
| mavenDeployer { | |
| configuration = configurations.deployerJars | |
| repository(url: "dav:https://myRepo.com/release/") { |
| apply plugin: 'java' | |
| configurations.all { | |
| resolutionStrategy { | |
| eachDependency { DependencyResolveDetails details -> | |
| //specifying a fixed version for all libraries with 'org.gradle' group | |
| if (details.requested.group == 'org.springframework') { | |
| details.useVersion "$springVersion" | |
| } | |
| } |
| /* | |
| Approach similar to approach for Common ancestor for BST. Keep going down on one side(right or left) if both the nodes | |
| are in the same side(right or left), else the current node is the lowest common ancestor*/ | |
| public Tree commonAncestor(Node root, Node p, Node q) { | |
| // 1st check if p and q, both belong to the left of the current root node, if yes then recurse on the left side | |
| if (covers(root.left, p) && covers(root.left, q)) // check out the covers subroutine, can be used elsewhere too! | |
| return commonAncestor(root.left, p, q); | |
| // else, check if both p and q are children of right side of the root, if yes, then recurse on the right side | |
| if (covers(root.right, p) && covers(root.right, q)) |
| source 'https://rubygems.org' | |
| gem 'asciidoctor' | |
| gem 'guard-asciidoc', :github => 'asciidoctor/guard-asciidoc' | |
| gem 'guard-livereload' | |
| gem 'rb-inotify', '~> 0.9.0' |
| --- | |
| language: objective-c | |
| before_script: | |
| - ./scripts/travis/add-key.sh | |
| after_script: | |
| - ./scripts/travis/remove-key.sh | |
| after_success: | |
| - ./scripts/travis/testflight.sh | |
| env: | |
| global: |