sequenceDiagram
participant e as engine
participant p as promotion
participant d as pricing-db
p->>e: event: promotion was created
e->>p: grpc: get latest promotion <br/>/discount by ID
p->>e: grpc: latest promotion by ID
This file contains 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 ( | |
"bufio" | |
"errors" | |
"fmt" | |
"log" | |
"os" | |
"strings" |
This file contains 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
UploadActivityExcel | |
UpdateUserProfile | |
UpdateRewards | |
FetchMyProgress | |
GenerateRefreshToken | |
VerifyStudentOTP | |
FetchUserTaskActivity | |
UserFeedback | |
ExcelHandler | |
UserTaskAssessment |
Standard Braking Distance (Geschwindigkeit / 10) * (Geschwindigkeit / 10)
Evasive (Emergency) Braking Distance ((Geschwindigkeit / 10) * (Geschwindigkeit / 10)) / 2
Examples:
This file contains 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
message Account { | |
google.protobuf.Timestamp created_at = 1; | |
int64 created_by = 3; | |
string currency = 21; | |
string contact_phone = 20; | |
} |
This file contains 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
switch field.Name { | |
case "__typename": | |
out.Values[i] = graphql.MarshalString("Query") | |
case "account": | |
field := field | |
out.Concurrently(i, func() (res graphql.Marshaler) { | |
defer func() { | |
if r := recover(); r != nil { | |
ec.Error(ctx, ec.Recover(ctx, r)) | |
} |
This file contains 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
type BlogPost { | |
id: Int! | |
title: String! | |
authors: [Authors!] | |
} | |
type Author { | |
id: Int! | |
name: String! | |
blogPosts: [BlogPost!] |
This file contains 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
var queryType = graphql.NewObject(graphql.ObjectConfig{ | |
Name: "Query", | |
Fields: graphql.Fields{ | |
"account": &graphql.Field{ | |
Resolve: func(p graphql.ResolveParams) (interface{}, error) { | |
return mydb.FindBriefById(p.Args["id"].(int)) | |
}, | |
}, | |
}, | |
}) |
This file contains 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
var queryType = graphql.NewObject(graphql.ObjectConfig{ | |
Name: "Query", | |
Fields: graphql.Fields{ | |
"account": &graphql.Field{ | |
Resolve: func(p graphql.ResolveParams) (interface{}, error) { | |
return mydb.FindBriefById(p.Args["id"].(int)) | |
}, | |
}, | |
}, | |
}) |
This file contains 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 main(String[] args) { | |
int secret = getRandomInt(); | |
System.out.println(secret); | |
if (secret > 0) { | |
System.out.println("Hello"); | |
} else if (secret > 50) { | |
System.out.println("World"); | |
} else { | |
System.out.println("Hello World"); | |
} |
NewerOlder