Skip to content

Instantly share code, notes, and snippets.

View Ramko9999's full-sized avatar
🎯
Focusing

Ramko9999

🎯
Focusing
View GitHub Profile
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:{
const TigerGraphCred = {
token: "TOKEN",
secret: "blank1231",
queryUrl: "https://https://blank-test.i.tgcloud.io:9000/query/"
}
module.exports = TigerGraphCred;
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.
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(
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) {
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"),
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
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);
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)
);
gHost=localhost
gHostUriType=https
gAdminUserName=BLANK
gAdminPassword=BLANK
gUserName=BLANK
gPassword=BLANK
gGraphName=MyGraph
gCertPath=cert.txt
gClientVersion=v2_6_0
gSecret=NotMySecret