Flattener is a utility to flatten an array of arbitrarily nested arrays of integers into a flat array of integers.
To run the project, just create a folder and put the file flattener.js
, test.js
and package.json
inside.
package main | |
import ( | |
"context" | |
"flag" | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"os/signal" |
package main | |
import ( | |
"os" | |
"fmt" | |
"errors" | |
"strings" | |
"net/http" | |
"encoding/json" | |
"github.com/aws/aws-lambda-go/lambda" |
import boto3 | |
import os | |
import json | |
############################################################## | |
###################### Check context ######################### | |
############################################################## | |
def check_context(event): | |
if event["context"] in contexts.keys(): |
#!/bin/bash | |
set -o errtrace -o nounset -o pipefail -o errexit | |
echo "hello world" |
## convert HTML POST data or HTTP GET query string to JSON | |
## get the raw post data from the AWS built-in variable and give it a nicer name | |
#if ($context.httpMethod == "POST") | |
#set($rawAPIData = $input.path('$')) | |
#elseif ($context.httpMethod == "GET") | |
#set($rawAPIData = $input.params().querystring) | |
#set($rawAPIData = $rawAPIData.toString()) | |
#set($rawAPIDataLength = $rawAPIData.length() - 1) | |
#set($rawAPIData = $rawAPIData.substring(1, $rawAPIDataLength)) |
version: "3" | |
services: | |
proxy: | |
container_name: proxy | |
restart: always | |
image: debian:jessie | |
privileged: true | |
ports: | |
- "80:80" | |
networks: |
I hereby claim:
To claim this, I am signing this object:
... | |
func f1(x int) (int, string) { | |
return x + 1, fmt.Sprintf("%d+1", x) | |
} | |
func f2(x int) (int, string) { |
... | |
x := 0 | |
log := "Ops: " | |
res, log1 := f1(x) | |
log += log1 + "; " | |
res, log2 := f2(res) | |
log += log2 + "; " |