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
| Document doc = new Document(); | |
| doc.setFile(url); | |
| BufferredImage image = doc.getPageImage(pageNo, | |
| GraphicsRenderingHints.PRINT, | |
| Page.BOUNDARY_CROPBOX, | |
| 0f, // rotation | |
| 1.0f); // scale | |
| RenderedImage r = image; | |
| ImageIO.write(r, "png", file); |
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
| REM ***** BASIC ***** | |
| sub Main | |
| dim std_id as String | |
| dim std_score as String | |
| rem ---------------------------------------------------------------------- | |
| rem define variables | |
| dim document as object | |
| dim dispatcher as object | |
| rem ---------------------------------------------------------------------- | |
| rem get access to the document |
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
| // Class | |
| class Book { | |
| static hasMany = [:authors => Author] | |
| Author author | |
| String name | |
| String email | |
| static constraints = { |
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
| package main | |
| import "fmt" | |
| import "os" | |
| import "io" | |
| import "encoding/binary" | |
| const ( | |
| ACC_PUBLIC = 0x0001 | |
| ACC_FINAL = 0x0010 |
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
| // | |
| // Actually, its filename is Test.gpp | |
| // | |
| class Test { | |
| static class Expr<T> { | |
| } | |
| static class Bin<T> extends Expr<T> { | |
| Expr<T> op1 |
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
| package org.korat.ast | |
| class SomeNode { | |
| List<Node> data | |
| String getText() { data[0].text } | |
| String getType() { data[0].type } | |
| List<Node> getChild() { data[0].child } |
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
| #!/usr/bin/env gorun | |
| package main | |
| import "fmt" | |
| func g() (a, b int) { | |
| return 1,2 | |
| } |
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
| package main | |
| import "fmt" | |
| func sum(x []int) int { | |
| s := 0 | |
| for _,i := range x { | |
| s += i | |
| } | |
| return s |
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
| #!/usr/bin/env gonrun | |
| package main | |
| import "fmt" | |
| type Cmd struct { | |
| Text string | |
| Key string | |
| Data []byte |
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
| public static void g(char ch, boolean big) { | |
| System.out.printf("g('%c',%s) = ", ch, big); | |
| if (big == true) { | |
| int d = ch - 'A'; | |
| for (int i = 0; i <= 25; i++) { | |
| int k = (d + i) % 26; | |
| System.out.printf("%c", 'A' + k); | |
| } | |
| System.out.println(); | |
| } else { |