Skip to content

Instantly share code, notes, and snippets.

View B-PRAVEEN's full-sized avatar
💭
I may be slow to respond.

B Praveen B-PRAVEEN

💭
I may be slow to respond.
  • New Delhi
View GitHub Profile
@B-PRAVEEN
B-PRAVEEN / citystategeo.js
Created September 13, 2018 21:19 — forked from danasilver/citystategeo.js
Get only city and state from Google Maps API Reverse Geocoder
if (window.navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function (position) {
var lat = position.coords.latitude,
lng = position.coords.longitude,
latlng = new google.maps.LatLng(lat, lng),
geocoder = new google.maps.Geocoder();
geocoder.geocode({'latLng': latlng}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
if (results[1]) {
for (var i = 0; i < results.length; i++) {
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
private ngZone: NgZone
this.ngZone.run( () => {
this.testVariable += '-bar';
});
declare var bulmaQuickview: any;
async function processArray(array) {
for (const item of array) {
await delayedLog(item);
}
console.log('Done!');
}
<ul>
<li *ngFor="let item of items; let i = index" [attr.data-index]="i">
{{item}}
</li>
</ul>
ng new myvis --style=scss --routing
{
"database": {
"rules": "database.rules.json"
},
"hosting": {
"public": "build/default/public",
"rewrites": [
{
"source": "/fns/**",
"function": "fns"
var functions = require('firebase-functions');
var express = require('express');
var app = express();
var router = express.Router();
router.post('/register', registerFunction);
router.post('/verify', verifyFunction);
app.use('/fns', router);
var found = datasetarr.find(o => o.accountID === receiptlist[i].accountID && o.subtype === ritemlist[k].type)
if (found === undefined){
//do computation
}