First download this and extract it followed by getting inside.
Follow this
bin/kafka-topics.sh --create --topic quickstart-matin --bootstrap-server localhost:19092
apiVersion: kubedb.com/v1alpha2 | |
kind: Postgres | |
metadata: | |
name: pg-tls-15-3-new | |
namespace: poc | |
spec: | |
version: "15.3" | |
replicas: 1 | |
configSecret: | |
name: user-conf |
# this configure file is only for envoy-filter-example repo | |
admin: | |
access_log_path: ./loglog.log | |
address: | |
socket_address: | |
address: 127.0.0.1 | |
port_value: 0 | |
static_resources: | |
clusters: | |
name: cluster_0 |
Please see here
Fortunately the docs for Bazel with CPP are organized in here: https://bazel.build/docs/bazel-and-cpp
WORKSPACE
file is created.BUILD
is located per package.stage3/
├── lib
│ ├── BUILD
│ ├── hello-time.cc
│ └── hello-time.h
├── main
I have a grpc server running at 0.0.0.0:50051. I'll show how you can use grpcurl
to test it.
Before that, install grpcurl
(mybe using go).
user@matin ~/o/g/examples ((v1.55.1))> grpcurl -plaintext localhost:50051 list
grpc.health.v1.Health
grpc.reflection.v1alpha.ServerReflection
helloworld.Greeter
/* | |
here case1 is always true before case2 (i.e. 1st call of help -> case1 is true, 2nd call of help -> case2 true). | |
So, in the 2nd call, case2 is true where we're using exp, ctinfoPrev, saddr_m what have been initialized before in case1. | |
Note: these structures are allocated in module init function which is called when the module is loaded | |
*/ | |
union nf_inet_addr *saddr_m; | |
struct sk_buff* skbPrev; | |
enum ip_conntrack_info ctinfoPrev; | |
struct nf_conntrack_expect *exp; |
// https://leetcode.com/problems/implement-trie-prefix-tree/description/ | |
class TNode{ | |
public: | |
bool isWord; | |
map< char, TNode* > child; | |
TNode() { | |
isWord = false; | |
} | |
}; |
string removeDuplicates(string toCleanUp) { | |
std:stack< char > str_stack; | |
for(char x : toCleanUp) { | |
if( !str_stack.empty() && x == str_stack.top() ) str_stack.pop(); | |
else str_stack.push( x ); | |
} | |
string res; | |
res.reserve(str_stack.size()); // reserve the space so that the concatenation speeds up. |
#include <stdio.h> | |
int main() | |
{ | |
FILE *fp; | |
FILE* fout; | |
int numfruits=12; | |
char myFruits[numfruits][256]; | |
char myFruitsReversed[numfruits][256]; |