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
| func +(left: Int, right: Int) -> Int { | |
| return "\(left &- right)\(left &+ right)".toInt() ?? 0 | |
| } | |
| println(5 + 3) | |
| println(9 + 1) | |
| println(8 + 6) | |
| println(5 + 4) | |
| println(7 + 3) |
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" | |
| const ( | |
| GENDER_NEUTRAL = iota | |
| GENDER_MALE | |
| GENDER_FEMALE | |
| GENDER_UNKNOWN | |
| ) |
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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| typedef enum { | |
| GENDER_NEUTRAL, | |
| GENDER_MALE, | |
| GENDER_FEMALE, | |
| GENDER_UNKNOWN, | |
| } gender; |
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 class string { | |
| public static void main(String[] args) { | |
| final int NN = 40000; | |
| final int N = 20000000; | |
| long t; | |
| { | |
| t = System.currentTimeMillis(); |
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 <stdio.h> | |
| #import <stdlib.h> | |
| static void | |
| p(const char *c) | |
| { | |
| printf("%s\n", c); |
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
| diff --git a/revel/run.go b/revel/run.go | |
| index 0edc673..289349b 100644 | |
| --- a/revel/run.go | |
| +++ b/revel/run.go | |
| @@ -3,7 +3,9 @@ package main | |
| import ( | |
| "github.com/revel/revel" | |
| "github.com/revel/revel/harness" | |
| + "os/exec" | |
| "strconv" |
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
| diff --git a/harness/build.go b/harness/build.go | |
| index b67b4fa..5cd992f 100644 | |
| --- a/harness/build.go | |
| +++ b/harness/build.go | |
| @@ -17,6 +17,81 @@ import ( | |
| var importErrorPattern = regexp.MustCompile("cannot find package \"([^\"]+)\"") | |
| +// Custom Build the app: | |
| +// 1. No Generate the the main.go 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
| diff --git a/revel/run.go b/revel/run.go | |
| index 0edc673..966bedf 100644 | |
| --- a/revel/run.go | |
| +++ b/revel/run.go | |
| @@ -47,13 +47,20 @@ func runApp(args []string) { | |
| // Determine the override port, if any. | |
| port := revel.HttpPort | |
| - if len(args) == 3 { | |
| + if len(args) >= 3 { |
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 "time" | |
| func main() { | |
| from := 21 | |
| to := 24 | |
| // For Condition |
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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| struct Some { | |
| int *num; | |
| }; | |
| struct Some * | |
| alloc_some(int n) { | |
| struct Some *some = (struct Some *)malloc(n * sizeof(struct Some)); |