Skip to content

Instantly share code, notes, and snippets.

View kaneshin's full-sized avatar
💡

Shintaro Kaneko kaneshin

💡
View GitHub Profile
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)
package main
import "fmt"
const (
GENDER_NEUTRAL = iota
GENDER_MALE
GENDER_FEMALE
GENDER_UNKNOWN
)
@kaneshin
kaneshin / main.c
Last active August 29, 2015 14:18
#include <stdio.h>
#include <stdlib.h>
typedef enum {
GENDER_NEUTRAL,
GENDER_MALE,
GENDER_FEMALE,
GENDER_UNKNOWN,
} gender;
public class string {
public static void main(String[] args) {
final int NN = 40000;
final int N = 20000000;
long t;
{
t = System.currentTimeMillis();
package main
/*
#import <stdio.h>
#import <stdlib.h>
static void
p(const char *c)
{
printf("%s\n", c);
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"
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.
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 {
package main
import "fmt"
import "time"
func main() {
from := 21
to := 24
// For Condition
#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));