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
homeNewsQuery.getNews() | |
.then(function (news) { | |
// mostrar noticias | |
}, function (error) { | |
Offline.goOfflineMode(); | |
}); |
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
filename = ask_open_file | |
Shoes.app(:title => "Fotoyop", | |
:width => 800, | |
:height => 600, | |
:resize => true) do | |
stack do | |
title(filename) | |
para | |
@img = image(filename) | |
para |
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
Shoes.setup do | |
gem "chunky_png" | |
end | |
require "chunky_png" | |
Shoes.app(:title => "Fotoyop", :width => 800, :height => 600, :resize => true) do | |
stack do | |
title("fotoyop") | |
button("cargar imagen") do |
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 insertArticle(article) { | |
var client = getMobileServiceClient(); | |
var item = { text: article.title, img: article.backgroundImage }; | |
client.getTable("MostViewed").insert(item); | |
} | |
function getMobileServiceClient() { | |
var client = new Microsoft.WindowsAzure.MobileServices.MobileServiceClient( | |
"https://myMobileServicesApp.azure-mobile.net/", | |
"myMobileServicesAppIdhKXrnRFpwu70" |
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 subscribeToPushNotification() { | |
var channelOperation = Windows.Networking.PushNotifications | |
.PushNotificationChannelManager | |
.createPushNotificationChannelForApplicationAsync() | |
.then(function (newChannel) { | |
channel = newChannel; | |
// Insert the new channel URI into the Channel table. | |
var client = getMobileServiceClient(); | |
var channelTable = client.getTable('Channel'); |
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
Shoes.setup do | |
gem "chunky_png" | |
end | |
require "chunky_png" | |
Shoes.app(:title => "Fotos copadas", :width => 800, :height => 600, :resize => true) do | |
stack do | |
title("Fotos copadas") | |
button("Load") do |
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 () { | |
"use strict"; | |
function parseBenefit(text) { | |
var type = "otro"; | |
var value = ""; | |
if (text != "") { | |
var numberPattern = /\d+/g; | |
var result = text.match(numberPattern); |
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
#include <DCMotor.h> | |
DCMotor motor0(M0_EN, M0_D0, M0_D1); | |
DCMotor motor1(M1_EN, M1_D0, M1_D1); | |
void setup() | |
{ | |
} | |
void loop() |
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
module.exports = function(grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
mochacli: { | |
options: { | |
reporter: 'nyan', | |
bail: true | |
}, |
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
describe('a listener', function(){ | |
describe('without nothing', function(){ | |
it('does nothing', function(){ | |
var userRepo = new UserRepo([]); | |
var listener = new listenerModule.Listener(userRepo); | |
listener.start(); | |
}); | |
}); |