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
| buf, bodyErr := ioutil.ReadAll(r.Body) | |
| if bodyErr != nil { | |
| log.Print("bodyErr ", bodyErr.Error()) | |
| http.Error(w, bodyErr.Error(), http.StatusInternalServerError) | |
| return | |
| } | |
| rdr1 := ioutil.NopCloser(bytes.NewBuffer(buf)) | |
| rdr2 := ioutil.NopCloser(bytes.NewBuffer(buf)) | |
| log.Printf("BODY: %q", rdr1) |
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
| function solution(N, A) { | |
| var M = A.length; // Length of the entry array | |
| var C = []; // Counters | |
| var H = 0; // Highest counter | |
| var PH = 0; // Previously recorded highest counter | |
| for(K = 0; K < N; K++) { // Initialize the array | |
| C[K] = 0; | |
| } | |