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 express = require("express"); | |
const app = express(); | |
const TigerGraphCred = require("./config.js"); | |
const fetch = require("node-fetch"); | |
app.get("/profile/:id", async(req, res)=>{ | |
const person = req.params.id; | |
const reqUrl = TigerGraphCred.queryUrl + `RP_getProfile?person=${person}`; | |
const response = await fetch(reqUrl, { | |
headers:{ |
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 TigerGraphCred = { | |
token: "TOKEN", | |
secret: "blank1231", | |
queryUrl: "https://https://blank-test.i.tgcloud.io:9000/query/" | |
} | |
module.exports = TigerGraphCred; |
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 express = require("express"); | |
const app = express(); | |
const config = require("./config"); | |
app.use(express.json()); | |
/* | |
All the parameters to the endpoints below will simply be passed as a object in the body. | |
This is easily customizable. |
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
import fetch from "node-fetch"; | |
const url = "http://localhost:5000/" | |
function getComments(commentIds){ | |
let requestUrl = url + "comments"; | |
let response = await fetch(requestUrl, | |
{ | |
body: JSON.stringify( |
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 localProperties = new Properties() | |
def localPropertiesFile = rootProject.file('local.properties') | |
if (localPropertiesFile.exists()) { | |
localPropertiesFile.withReader('UTF-8') { reader -> | |
localProperties.load(reader) | |
} | |
} | |
def flutterRoot = localProperties.getProperty('flutter.sdk') | |
if (flutterRoot == null) { |
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
import 'package:firebase_ml_vision/firebase_ml_vision.dart'; | |
import "package:flutter/material.dart"; | |
import "package:camera/camera.dart"; | |
import "package:permission_handler/permission_handler.dart"; | |
class ReaderScreen extends StatelessWidget { | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar( | |
title: Text("Scan Codes"), |
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
import 'package:flutter/material.dart'; | |
import 'package:mlkit_qrscanner/reader.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
// This widget is the root of your application. | |
@override |
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
Future<void> setupCamera() async { | |
try{ | |
List<CameraDescription> cameras = await availableCameras(); | |
_camera = CameraController(cameras[0], ResolutionPreset.low); | |
await _camera.initialize(); | |
if(mounted){ | |
setState(() { | |
_isCameraInitialized = true; | |
}); | |
_camera.startImageStream(runOnFrame); |
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
Widget getCameraDisplay(){ | |
double width = MediaQuery.of(context).size.width; | |
double height = MediaQuery.of(context).size.height; | |
if(_isCameraInitialized){ | |
return Container( | |
height: height * 0.75, | |
width: width * 0.9, | |
child: CameraPreview(_camera) | |
); |
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
gHost=localhost | |
gHostUriType=https | |
gAdminUserName=BLANK | |
gAdminPassword=BLANK | |
gUserName=BLANK | |
gPassword=BLANK | |
gGraphName=MyGraph | |
gCertPath=cert.txt | |
gClientVersion=v2_6_0 | |
gSecret=NotMySecret |