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
function sensible_time() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var data = sheet.getActiveRange().getValues(); | |
for (var i = 0; i < data.length; i++) { | |
for (var j = 0; j < data[i].length; j++) { | |
if (data[i][j]) { | |
var range = sheet.getRange(24+i, j+1); | |
time = data[i][j]; | |
var mins = ~~(time / 60); | |
var secs = time % 60; |
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
{ | |
"memory_info": { | |
"sdram_p_volate": 1.23, | |
"sdram_c_volate": 1.2, | |
"used_memory": 150163456, | |
"shared_memory": 0, | |
"total_memory": 459505664, | |
"sdram_i_volate": 1.2, | |
"cached_memory": 100642816, | |
"memory_buffers": 15024128, |
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 run() { | |
dhtSensor.read(); | |
float temperature = dhtSensor.getTemperature(false); | |
int humidity = dhtSensor.getHumidity(); | |
try { | |
String message = "Temperature:" + Float.toString(temperature); | |
String humidityMsg = "Humidity:" + Integer.toString(humidity); | |
mqttClient.publish(1,message.getBytes()); | |
} catch (MqttException e) { | |
e.printStackTrace(); |
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 class Receiver{ | |
final GpioController gpio; | |
final GpioPinDigitalOutput pin; | |
{ | |
gpio = GpioFactory.getInstance(); | |
pin = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_00, "Relay"); | |
} | |
public void run(String message){ | |
System.out.println("Message received "+message); |
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
var Promise = require('bluebird') | |
var fs = require('fs'); | |
Promise.promisifyAll(fs); | |
fs.readFile("bb", function(err, data) { | |
if (err) return next(err); | |
fs.writeFile("bba", data, function() { | |
console.log("File written"); | |
}); | |
}); |
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
/* | |
The objective of this class is to manage localization options in CDM. | |
2 types Use cases:- | |
1) Localize the product based on a configuration | |
2) Localize components based on user preference. | |
Use case 2:- Localize the license file | |
*/ |
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
<div class="header"> | |
<h1>Jaggery intro</h1> | |
<ul ng-repeat="todo in todos"> | |
<li><input type="checkbox" ng-model="todo.status"> <span ng-model="todo.text">{{todo.text}}</span></li> | |
</ul> | |
</div> |
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
<!-- Exact sequence name as below should be there. This name is used inside the API implementation in Synapse --> | |
<sequence xmlns="http://ws.apache.org/ns/synapse" name="_resource_mismatch_handler_"> | |
<log level="full"/> | |
<property name="HTTP_SC" value="404" scope="axis2"></property> | |
<respond/> | |
<drop></drop> | |
</sequence> |
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
module['exports'] = function echoHttp (hook) { | |
var body = hook.params; // This gives all the JSON body parameters in an object. | |
//Using a small security measure ;) | |
if(body.secret != "dgfdg45345jf0248234234"){ | |
hook.res.end("Unauthorized"); | |
return; | |
} | |
var https = require('https'), |
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
var you = {}; | |
var others = []; | |
// If you can keep your head when all about you | |
// Are losing theirs and blaming it on you, | |
if (keepYourHead(you)){ | |
looseTheirHead(others); | |
blame(you); | |
} | |
// If you can trust yourself when all men doubt you, | |
// But make allowance for their doubting too; |