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
| 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 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
| 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
| 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
| 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
| 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
| (function () { | |
| "use strict"; | |
| var nav = WinJS.Navigation; | |
| function goOfflineMode() { | |
| ShowErrorPopup(); | |
| nav.navigate("/pages/bookmark/landingBookmark.html", null); | |
| } | |
| function ShowErrorPopup() { |
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"; | |
| var localstorage; | |
| var bookmarks = []; | |
| function saveBookmarksToStorage() { | |
| localstorage["bookmarks"] = JSON.stringify(bookmarks); | |
| } |
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"; | |
| var localstorage; | |
| var bookmarks = []; | |
| function saveBookmarksToStorage() { | |
| localstorage["bookmarks"] = JSON.stringify(bookmarks); | |
| } |