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
| <?xml version="1.0" encoding="utf-8"?> | |
| <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:app="http://schemas.android.com/apk/res-auto" | |
| xmlns:tools="http://schemas.android.com/tools" | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent" | |
| tools:context=".MainActivity"> | |
| <WebView | |
| android:id="@+id/webview" |
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 kotlinx.android.synthetic.main.activity_main.webview; | |
| import kotlinx.android.synthetic.main.activity_main.splash; | |
| class MainActivity : Activity() { | |
| private class MyWebViewClient() : WebViewClient() { | |
| override fun onPageFinished(view: WebView?, url: String?) { | |
| super.onPageFinished(view, url) | |
| splash.setVisibility(View.INVISIBLE); // can't call function on this reference |
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 kotlinx.android.synthetic.main.activity_main.webview; | |
| class MainActivity : Activity() { | |
| override fun onCreate(savedInstanceState: Bundle?) { | |
| super.onCreate(savedInstanceState) | |
| setContentView(R.layout.activity_main) | |
| webview.loadUrl("https://example.com") |
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 React, { useEffect, useRef, useState } from "react"; | |
| import "./map.css"; | |
| import moment from "moment"; | |
| import _ from "lodash"; | |
| import { resolvePlugin } from "@babel/core"; | |
| /** | |
| * geofences format | |
| { | |
| geofenceid: 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
| const io = require('socket.io-client'); | |
| let url = 'https://config.intellicar.in/socket.io'; | |
| const sock = io.connect(url); | |
| sock.on('connect', () => { | |
| console.log('connect') | |
| sock.disconnect(); | |
| }); |
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 downloadCSV(content, filename) { | |
| download(content, 'text/csv', filename + '.csv') | |
| } | |
| /** | |
| * @param {string} content - The file content in raw string format | |
| * @param {string} type - The filetype eg. text/plain, application/json, image/svg | |
| * @param {string} filename - The filename with extension | |
| */ | |
| function download(content, type, filename) { |
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
| -- Credentials | |
| SSID = "" | |
| PASSWORD = "" |
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
| [ | |
| { | |
| "name": "Kannur", | |
| "home": true | |
| }, | |
| { | |
| "name": "Payyanur", | |
| "home": true | |
| }, | |
| { |
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
| [{"title":"13.03800000","lat":"13.03800000","lng":"77.56200000","icon":" http://maps.google.com/mapfiles/ms/icons/red.png","description":"<div class=\"panel panel-primary\"> <div class=\"panel-body\"><div> <label>Agency Name : </label><strong> Harish </strong> <br /></div><div> <label>Zone : </label><strong> East </strong> <br /></div><div> <label>Ward : </label><strong> 18 </strong> <br /></div><div> <label>Agency Address : </label><strong> Dollers colony, Near Storm water drain, Hebbal, bengalore-560024 </strong> <br /></div><div> <label>Phone Number : </label><strong> 9901269491 </strong> <br /></div><div> <label>Name of Facility : </label><strong> </strong> <br /></div><div> <label>Capacity : </label><strong> </strong> <br /></div></div></div>"},{"title":"13.04100000","lat":"13.04100000","lng":"77.58200000","icon":" http://maps.google.com/mapfiles/ms/icons/red.png","description":"<div class=\"panel panel-primary\"> <div class=\"panel-body\"><div> <label>Agency Name : </label><strong> Harish </ |
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
| export function duration(ms) { | |
| if(!ms) return 'N/A'; | |
| if(ms < (60 * 1000)) { | |
| let dur = Math.floor(ms / 1000); | |
| if(dur < 2) return 'a second'; | |
| return dur + ' seconds'; | |
| } | |
| if(ms < (60 * 60 * 1000)) { | |
| let minutes = Math.floor(ms / 1000 / 60); | |
| let seconds = Math.floor(ms % (1000 * 60) / 1000); |