This file contains 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
/** | |
* Generate AST from query, please check the test cases to find the correct | |
* input and output for this. | |
*/ | |
exports.generateASTFromQuery = async (req, res) => { | |
try { | |
let qrys_prefix = prefixExpr(req.query.$filter.match(/[a-zA-Z_]+|[0-9]+|[(]+|[)]/g)) | |
let qry_json = createJson(qrys_prefix) | |
return res.json(qry_json) |
This file contains 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 special | |
import ( | |
"fmt" | |
"strconv" | |
) | |
// Special Type: int as Integer | |
type Integer int |
This file contains 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
module.exports = { | |
env: { | |
browser: true, | |
es2021: true, | |
}, | |
extends: [ | |
'plugin:react/recommended', | |
'airbnb', | |
], | |
parserOptions: { |
This file contains 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" | |
"math/rand" | |
"time" | |
) | |
func main() { | |
exit := false |
This file contains 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
request, err := http.NewRequest("GET", baseUrl+"/user", nil) | |
if err != nil { | |
return data, err | |
} | |
request.Header.Set("Content-Type", "application/x-www-form-urlencoded") | |
q := request.URL.Query() | |
q.Add("id", ID) | |
request.URL.RawQuery = q.Encode() |
This file contains 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
param := url.Values{} | |
params.Set("id", ID) | |
payload := bytes.NewBufferString(params.Encode()) | |
request, err := http.NewRequest("POST", baseUrl+"/user", payload) | |
if err != nil { | |
return data, err | |
} | |
request.Header.Set("Content-Type", "application/x-www-form-urlencoded") |
This file contains 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 ResponseFormatter struct { | |
Status int32 `json:"status"` | |
Message string `json:"message"` | |
Data interface{} `json:"data"` | |
} |
This file contains 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
version: "3.1" | |
services: | |
mongo: | |
image: mongo:5.0.6 | |
restart: always | |
ports: | |
- 27017:27017 | |
environment: | |
MONGO_INITDB_ROOT_USERNAME: root |
This file contains 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
version: '3.4' | |
services: | |
postgres: | |
image: postgres:14-alpine | |
environment: | |
POSTGRES_USER: root | |
POSTGRES_PASSWORD: root | |
restart: always | |
volumes: |
This file contains 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
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatefulWidget { | |
@override | |
State<MyApp> createState() => _MyAppState(); | |
} |
OlderNewer