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 ( | |
| "encoding/json" | |
| "log" | |
| "net/http" | |
| ) | |
| type Data struct { | |
| Category string `json:"type"` |
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 ( | |
| "context" | |
| "errors" | |
| "fmt" | |
| "log" | |
| dialogflow "cloud.google.com/go/dialogflow/apiv2" | |
| dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2" |
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
| ........ | |
| // Parse message | |
| m := strings.Split(strings.TrimSpace(ev.Text), " ")[1:] | |
| if len(m) == 0 { | |
| return fmt.Errorf("invalid message %s", m) | |
| } | |
| query := strings.Join(m, " ") | |
| log.Printf("Query : %s", query) |
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 class Invoker implements InvokerIfc { | |
| public Object doit(Integer b) { | |
| return fake(new Something()).target(b); | |
| } | |
| } | |
| public static Class rewrite(Class old)throws IOException,InvalidConstantPoolFormatException{ | |
| HashMap constPatchMap=new HashMap(); | |
| constPatchMap.put("fake","real"); |
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
| MethodHandle other = MethodHandles.findVirtual(Sample.class, "first", void.class, String.class); |
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
| FROM golang | |
| ARG app_env | |
| ENV APP_ENV $app_env | |
| COPY ./app /go/src/github.com/ujjkumsi/docker-go/app | |
| COPY ./best-practices /go/src/github.com/ujjkumsi/docker-go/best-practices | |
| COPY ./models /go/src/github.com/ujjkumsi/docker-go/models | |
| COPY ./dao /go/src/github.com/ujjkumsi/docker-go/dao | |
| COPY ./dao /go/src/github.com/ujjkumsi/docker-go/util |
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
| version: "3" | |
| services: | |
| cassandra-seed: | |
| container_name: cassandra-seed-node | |
| image: cassandra:3.11.0 | |
| ports: | |
| - "9042:9042" # Native transport | |
| - "7199:7199" # JMX | |
| - "9160:9160" # Thrift clients |