Skip to content

Instantly share code, notes, and snippets.

View nvhbk16k53's full-sized avatar

Nguyen Van Hiep nvhbk16k53

View GitHub Profile
func newOrderInfo(cardType string, value int64, quantity int) string {
orderInfo := []map[string]interface{}{
{
"type": cardType,
"value": strconv.FormatInt(value, 10),
"quantity": quantity,
},
}
orderData, err := json.Marshal(orderInfo)
if err != nil {

PokerTH API References

Initialize a session

Input: InitMessage

Output: on success return InitAckMessage or AuthServerChallengeMessage, on error return ErrorMessage with properly reason.

Description

@nvhbk16k53
nvhbk16k53 / karger.c
Last active August 29, 2015 14:15
New karger min cut
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <ctype.h>
#define NROWS 200
#define NCOLS 100
#define NELEMS(x) ((sizeof(x))/(sizeof(x[0])))
struct edge {
@nvhbk16k53
nvhbk16k53 / karger_min_cut.c
Created February 10, 2015 08:40
Karger Min Cut
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <ctype.h>
#define NROWS 200
#define NCOLS 100
int a[NROWS][NCOLS], v[NROWS], n, m;
@nvhbk16k53
nvhbk16k53 / elasticsearch_cluster.yaml
Created April 7, 2014 03:33
Autoscale Elasticsearch Cluster
heat_template_version: 2014-03-29
description: >
Template create single instance stack to deploy elasticsearch
parameters:
flavor:
description: Instance flavor
label: Instance Type
type: string