RUBY
internal_grids.outlet_ares_line_boundary_pluscodes.to_json
JS
coord_json = "[]"
grids = JSON.parse(coord_json);
grids.forEach(grid => {
const child_process = require('child_process'); | |
const axios = require('axios'); | |
const redis = require('redis'); | |
const client = redis.createClient({ host: '127.0.0.1', port: 6379 }); | |
const stats = { | |
category: [], | |
menu: [], | |
cart: [], |
(() => { | |
const GRID_SIZE = 31; | |
const instructions = [ | |
{ | |
moveX: -Math.floor(GRID_SIZE / 2), | |
moveY: -Math.floor(GRID_SIZE / 2), | |
}, | |
]; | |
for (let x=0; x<GRID_SIZE - 1; x++) { |
function calc(value) { | |
const args = [value]; | |
const recursiveCalc = function(value) { | |
if (args.length < 2) { | |
args.push(value); | |
} | |
return recursiveCalc; | |
} | |
recursiveCalc.__proto__.add = () => args[0] + args[1] | |
recursiveCalc.__proto__.substract = () => args[0] - args[1] |
RUBY
internal_grids.outlet_ares_line_boundary_pluscodes.to_json
JS
coord_json = "[]"
grids = JSON.parse(coord_json);
grids.forEach(grid => {
import { ..., ErrorHandler } from '@angular/core'; | |
import * as SentryNode from '@sentry/node'; // server SDK, should not load on browser | |
import { ErrorLogger } from './error-logger'; | |
... | |
providers: [ | |
... | |
{ provide: ErrorHandler, useFactory: ErrorLogger.initWith(SentryNode) } | |
] |
import { ..., ErrorHandler } from '@angular/core'; | |
import * as SentryBrowser from '@sentry/browser'; // browser SDK | |
import { ErrorLogger } from './error-logger'; | |
... | |
providers: [ | |
... | |
{ provide: ErrorHandler, useFactory: ErrorLogger.initWith(SentryBrowser) } | |
] |
import { ErrorHandler } from '@angular/core'; | |
import { environment } from '../environments/environment'; | |
export class ErrorLogger implements ErrorHandler { | |
static initWith(sentry: any) { | |
return () => new ErrorLogger(sentry); | |
} | |
constructor(private sentry: any) { |
{ | |
"app":{ | |
"name":"Spectrum [TEST]", | |
"audio_enabled":true, | |
"show_powered_by":true, | |
"active_admins":[ | |
{ | |
"id":"2310387", | |
"first_name":"Raghav", | |
"last_name":"Garg", |
import React, { Component } from 'react'; | |
import { Route, Switch } from 'react-router-dom' | |
// import pages | |
import Container from './Container'; | |
import Greetings from './Greetings'; | |
import Customers from './Customers'; | |
class App extends Component { |
// template for wrapping html | |
import WebpackHash from '../../public/webpack-hash'; | |
export default function(html) { | |
return ` | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> |