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
| type user struct { | |
| UserId int `json:"userId"` | |
| UserName string `json:"userName"` | |
| FirstName string `json:"firstName"` | |
| LastName string `json:"lasttName"` | |
| } |
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
| (:body | |
| {:userId 123 | |
| :userName "john.doe@example.com" | |
| :firstName "John" | |
| :lastName "Doe" | |
| ...}) |
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
| const newUser = { | |
| userName: "john.doe@example.com", | |
| firstName: "John", | |
| lastName: "Doe", | |
| ... | |
| }; | |
| const request = require('request'); | |
| const options = { | |
| method: 'POST', |
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
| const user = { | |
| userId: 123, | |
| userName: "john.doe@example.com", | |
| firstName: "John", | |
| lastName: "Doe", | |
| ... | |
| }; |
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
| {:user-id 123 | |
| :user-name "john.doe@example.com" | |
| :first-name "John" | |
| :last-name "Doe" | |
| ...} |
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
| (defn hello-world [] | |
| (loop [hello-world "Hello World" | |
| spaces "" | |
| diagonal []] | |
| (if-not (seq hello-world) | |
| (string/join "\n" diagonal) | |
| (recur (rest hello-world) | |
| (str spaces " ") | |
| (conj diagonal (str spaces (first hello-world))))))) |
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
| (defn hello-world [] | |
| (let [lines (map-indexed (fn [index ch] | |
| (str (->> | |
| (repeat " ") | |
| (take index) | |
| (apply str)) ch)) "Hello World")] | |
| (string/join "\n" lines))) |
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
| def hello_world(): | |
| space_counter = 0 | |
| s = "Hello World" | |
| for c in s: | |
| print(" " * space_counter + c) | |
| space_counter += 1 |
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
| (defn hello-world [] | |
| (doseq [[index ch] (map-indexed vector "Hello World")] | |
| (println (->> | |
| (repeat " ") | |
| (take index) | |
| (apply str)) ch))) |
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
| package main | |
| import "fmt" | |
| func main() { | |
| space := "" | |
| for _, c := range "Hello World" { | |
| fmt.Println(space + string(c)) | |
| space += " " | |
| } |
NewerOlder