This file contains 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
/** | |
* Predictor for volume from model/6026afde2fb31c391800250b | |
* Predictive model by BigML - Machine Learning Made Easy | |
*/ | |
function predictVolume(weightG) { | |
if (weightG == null) { | |
return 6715.89082; | |
} | |
else if (weightG > 869) { |
This file contains 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
-- This template returns the number of charges and amounts for each card type, by currency | |
-- Note: if you have currencies that do not have cents (e.g. JPY), you should not divide by 100.0 | |
select | |
card_country, | |
count(id) as charge_count, | |
sum(amount)/100.0 as total_amount | |
from charges | |
where captured and card_country in ('AT', 'BE', 'HR', 'BG', 'CY', 'CZ', 'DK', 'EE', 'FI', 'FR', 'DE', 'GR', 'HU', 'IE', | |
'IT', 'LV', 'LT', 'LU', 'MT', 'NL', 'PL', 'PT', 'RO', 'SK', 'SI', 'ES', 'SE', 'GB') | |
group by 1 |
This file contains 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
db.adhocPackages.find().forEach( function(doc) { | |
doc.japanPostCountryRegionCode= new NumberInt(doc.japanPostCountryRegionCode); | |
db.adhocPackages.save(obj); | |
} ) |
This file contains 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
use whiterabbit | |
db.indexes.find(); | |
db.shippingOrders.getIndexes(); | |
db.getCollectionNames().forEach(function(collection) { | |
if (db[collection]) { | |
indexes = db[collection].getIndexes(); | |
var filterIndexes = Object.keys(indexes).filter(function(i) { |
This file contains 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
<template> | |
<html> | |
<head> | |
<link href='https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons' rel="stylesheet"/> | |
<link href="https://unpkg.com/vuetify/dist/vuetify.min.css" rel="stylesheet"/> | |
</head> | |
<body> | |
<div id="app"> | |
<v-app id="inspire" dark> |
This file contains 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 _ = require(`lodash`); | |
const Promise = require(`bluebird`); | |
const path = require(`path`); | |
const slash = require(`slash`); | |
// Implement the Gatsby API “createPages”. This is | |
// called after the Gatsby bootstrap is finished so you have | |
// access to any information necessary to programatically | |
// create pages. | |
exports.createPages = ({ graphql, boundActionCreators }) => { |
This file contains 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
max | |
[20:28] | |
var _ = require(‘lodash’); var ids = []; _.times(5000, () => ids.push(Random.id())); copy(ids.join(‘\n’)); | |
VM2093:1 Uncaught ReferenceError: require is not defined | |
at <anonymous>:1:9 | |
[20:28] | |
maybe it will run in jsfiddle? |
This file contains 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
private void ListenerCallback(IAsyncResult result) | |
{ | |
try | |
{ | |
var context = listener.EndGetContext(result); | |
// Thread.Sleep(1000); | |
Console.WriteLine("{0}: {1}", DateTime.Now, context.Request.Headers); |
This file contains 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
public void PrintPDF(Stream PDFtoPrint, string jobName) | |
{ | |
//Create PdfViewer object | |
PdfViewer viewer = new PdfViewer(); | |
logger.Info("PrintPDF"); | |
//Open input PDF file | |
viewer.BindPdf(PDFtoPrint); | |
// string pdffilename = @"c:\temp\blue.pdf"; |
This file contains 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
感児(1かん2じ) | |
印象(1いん2しょう) | |
すし(1す2し) | |
寿司(1す2し) |
NewerOlder