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
package com.example; | |
import java.lang.reflect.InvocationHandler; | |
import java.lang.reflect.InvocationTargetException; | |
import java.lang.reflect.Method; | |
import java.lang.reflect.Proxy; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; |
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
/** | |
* Copyright 2017, Google, Inc. | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, |
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
.text-area { | |
-fx-background-insets: 0; | |
-fx-background-color: transparent, white, transparent, white; | |
-fx-background-radius: 0, 0, 0, 0; | |
-fx-box-border: none; | |
-fx-focus-color: -fx-control-inner-background; | |
-fx-faint-focus-color: -fx-control-inner-background; | |
-fx-text-box-border: -fx-control-inner-background; | |
-fx-border-width: -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
import SwiftUI | |
let identifiers = NSLocale.availableLocaleIdentifiers | |
let locale = NSLocale(localeIdentifier: "en_US") | |
let currencyFormatter = NumberFormatter() | |
currencyFormatter.numberStyle = .currency | |
currencyFormatter.usesGroupingSeparator = true | |
currencyFormatter.maximumFractionDigits = 2 |
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
// | |
// HomeController.swift | |
// PokeMath | |
// | |
// Created by Ondrej Kvasnovsky on 11/19/16. | |
// Copyright © 2016 Ondrej Kvasnovsky. All rights reserved. | |
// | |
import Foundation | |
import UIKit |
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
isProdEnv = function () { | |
if (process.env.ROOT_URL == "http://localhost:3000") { | |
return false; | |
} else { | |
return true; | |
} | |
} | |
Accounts.loginServiceConfiguration.remove({ | |
service: 'google' |
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
Template.welcomePage.events({ | |
'click #send-email-button': function () { | |
var email = { | |
to: 'xyz@failtracker.com', | |
from: 'abc@failtracker.com', | |
replyTo: 'abct@failtracker.com', | |
subject: "test email", | |
text: "hello lover boy" | |
}; | |
Meteor.call('sendEmail', this.userId, email); |
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
JSON format: | |
[ | |
"AND", | |
["GE", ["column", "Price"], 10], | |
["EQ", ["column", "Product"], "iPhone"], | |
["NOT", | |
[ | |
"OR", | |
["GE", ["column", "Discount"], 1000], |
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 { HttpError as HE } from 'routing-controllers'; | |
export class HttpError extends HE { | |
constructor(httpCode: number, message?: string, readonly data?: any) { | |
super(httpCode, message); | |
Object.setPrototypeOf(this, HttpError.prototype); | |
} | |
toJSON() { |
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 cosineSimilarity(a: number[], b: number[]) { | |
let dotProduct = 0; | |
let magnitudeA = 0; | |
let magnitudeB = 0; | |
for (let i = 0; i < a.length; i++) { | |
dotProduct += (a[i] * b[i]); | |
magnitudeA += (a[i] * a[i]); | |
magnitudeB += (b[i] * b[i]); | |
} | |
magnitudeA = Math.sqrt(magnitudeA); |
NewerOlder