main.cf:
smtpd_recipient_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_non_fqdn_hostname,
reject_non_fqdn_sender,
reject_non_fqdn_recipient,
| // Import all | |
| import Rx from "rxjs/Rx"; | |
| Rx.Observable | |
| .interval(200) | |
| .take(9) | |
| .map(x => x + "!!!") | |
| .bufferCount(2) | |
| .subscribe(::console.log); |
| apply plugin: 'com.android.library' | |
| apply plugin: 'com.jfrog.artifactory' | |
| apply plugin: 'maven-publish' | |
| def packageName = 'codeinputlib' | |
| def libraryVersion = '1.0.0' | |
| buildscript { | |
| repositories { | |
| jcenter() |
| import React from 'react'; | |
| import axios from 'axios'; | |
| import Rx from 'rxjs'; | |
| export default class App extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| scores: [] | |
| }; |
| // sending to sender-client only | |
| socket.emit('message', "this is a test"); | |
| // sending to all clients, include sender | |
| io.emit('message', "this is a test"); | |
| // sending to all clients except sender | |
| socket.broadcast.emit('message', "this is a test"); | |
| // sending to all clients in 'game' room(channel) except sender |
| var amqp = require('amqplib/callback_api'); | |
| // if the connection is closed or fails to be established at all, we will reconnect | |
| var amqpConn = null; | |
| function start() { | |
| amqp.connect(process.env.CLOUDAMQP_URL + "?heartbeat=60", function(err, conn) { | |
| if (err) { | |
| console.error("[AMQP]", err.message); | |
| return setTimeout(start, 1000); | |
| } |
| // takes a {} object and returns a FormData object | |
| var objectToFormData = function(obj, form, namespace) { | |
| var fd = form || new FormData(); | |
| var formKey; | |
| for(var property in obj) { | |
| if(obj.hasOwnProperty(property)) { | |
| if(namespace) { |
| package com.mma.fingerprint; | |
| import java.sql.Connection; | |
| import java.sql.DriverManager; | |
| import java.sql.PreparedStatement; | |
| import java.sql.ResultSet; | |
| import java.sql.SQLException; | |
| import java.util.EnumMap; | |
| import java.util.concurrent.LinkedBlockingQueue; |
| #!/usr/bin/env python | |
| # encoding: utf-8 | |
| """ | |
| utc_to_local.py | |
| Example of converting UTC to local time using python-dateutil. | |
| https://pypi.python.org/pypi/python-dateutil | |
| """ | |
| from datetime import datetime |