"Let's create an ES6 class!" you say. "Let's give it a private variable x
."
class Foo {
constructor(x) {
this.x = x;
}
getX() {
public class Loop { | |
public static void main(String[] args) | |
{ | |
Integer total = 500000000; | |
Integer chunk = 50000000; | |
Integer i = 0; |
var spawn = require('child_process').spawn; | |
worker = spawn('node',['worker.js']); | |
worker.stdout.on('data',function(data){ | |
console.log('worker sent:',data.toString()); | |
}); |
Copyright (c) 2015 - Xavier Cambar <@ xcambar_gmail.com> | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in |
/*****************************************************************************/ | |
/* Zero-Dark-Matrix | |
/* Optimized for Chrome Stable Channel v32.0.1700 | |
/* https://github.com/mauricecruz/chrome-devtools-zerodarkmatrix-theme | |
/*************************************************************************/ | |
/********************************************** | |
/* Animations | |
/* ------------------------------------------- | |
/* If you are experiencing performance issues, | |
/* remove the animations section below. |
#/bin/bash -x | |
# | |
# Copyright (c) 2015 Lyndell Rottmann | |
# | |
# Debug mode on/off: (default off) | |
set +x | |
if [[ "$OSTYPE" == "darwin"* ]]; then | |
if [ ! $1 ] |
# BPi restFull-api by @BenyaminSalimi | |
# you can see log of this program in "BPi.log" | |
from flask import Flask,jsonify,send_file | |
import picamera | |
import time | |
import RPi.GPIO as GPIO | |
app = Flask(__name__) |
if (Meteor.isServer) { | |
Meteor.startup(function () { | |
process.env.MAIL_URL = 'smtp://username:password@smtp.sendgrid.net'; | |
Accounts.emailTemplates.siteName = "My Website Name"; | |
Accounts.emailTemplates.from = "My Website Name <noreply@mywebsite.com>"; | |
Accounts.emailTemplates.resetPassword.subject = function(user) { | |
return "How to reset your password for My Website Name"; |
-- building on data from my scenario http://gist.github.com/44489 | |
-- and bayesian rating http://www.thebroth.com/blog/118/bayesian-rating | |
assume we have a products table and we want to sort products based on their rating. | |
With bayesian rating, you get better weighting, so that a single 5 star vote won't show up as "top product" | |
select * from products; | |
mysql> select * from products; | |
+------+--------+---------------+--------------+---------+ | |
| id | name | ratings_count | total_rating | weight | |
/** | |
* Based on @ericprieto code https://github.com/strongloop/loopback/issues/651#issuecomment-140879983 | |
* place this file into common/mixins/disableAllMethods.js | |
* | |
**/ | |
module.exports = function(Model, options) { | |
if(Model && Model.sharedClass) { | |
var methodsToExpose = options.expose || []; |