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
/*If you are using jQuery, you can get the size of the window or the document using jQuery methods:*/ | |
$(window).height(); // returns height of browser viewport | |
$(document).height(); // returns height of HTML document (same as pageHeight in screenshot) | |
$(window).width(); // returns width of browser viewport | |
$(document).width(); // returns width of HTML document (same as pageWidth in screenshot) | |
/*For screen size you can use the screen object in the following way:*/ | |
screen.height; | |
screen.width; |
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
INSTALL: | |
npm install -g cordova ionic | |
UNINSTALL: | |
npm uninstall -g ionic npm cache clean | |
START PROJECT: | |
ionic start --v2 myApp blank|tabs|sidemenu|tutorial | |
RUN IN LAB MODE |
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
<?php | |
function getDowJones() | |
{ | |
$rawData = file_get_contents("http://chartapi.finance.yahoo.com/instrument/1.0/%5Edji/chartdata;type=quote;range=1d/csv/"); | |
$data = explode("\n", trim($rawData)); | |
$csvData = $data[count($data)-1]; | |
$arrayDJI = explode(",", $csvData); | |
return number_format((float)$arrayDJI[4], 2, ',', ''); |
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
<?php | |
function getCotizaciones($monedas = true) | |
{ | |
$url = 'http://www.bcu.gub.uy/_layouts/BCU.Cotizaciones/handler/CotizacionesHandler.ashx?op=getcotizaciones'; | |
$data = ""; | |
$last_date_found = false; | |
$diff = 1; | |
$cotizaciones = array(); | |
$codigosAceptados = array("USD", "EURO", "CHF", "GBP", "ARS", "BRL", "JPY", "U.I."); |
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
<?php | |
error_reporting(E_ALL); | |
ini_set('display_errors', 1); |