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 diffDatesArray($from, $to, $formatInput, $formatOutput) { | |
$out = []; | |
$fromDate = DateTime::createFromFormat($formatInput, $from); | |
$toDate = DateTime::createFromFormat($formatInput, $to); | |
$interval = date_diff($fromDate, $toDate); | |
$daysInterval = intval($interval->format('%d')); | |
for ($i = 0; $i <= $daysInterval; $i++) { | |
$nextDay = clone $fromDate; | |
if($i >= 1){ |
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
{ | |
"apps" : [{ | |
"name": "sails", | |
"script": "app.js", | |
"watch": true, | |
"ignoreWatch" : [".tmp",".idea","views","node_modules"], | |
"node_args": ["--debug=5860"] | |
}] | |
} |
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 is_border(posx, posy, relieve){ | |
var current = relieve[posy][posx]; | |
var maxx = relieve[0].length; | |
var maxy = relieve.length; | |
/* TODO: I dont know but */ | |
if(current == 9){ | |
return 0; | |
} | |
/* TODO: I dont know but */ |
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
relieve = [[9, 2, 2, 2, 3, 5], | |
[9, 8, 3, 2, 4, 5], | |
[9, 7, 2, 2, 4, 3], | |
[9, 9, 2, 4, 4, 3], | |
[9, 2, 3, 4, 3, 5]]; | |
function is_border(posx, posy, relieve){ | |
var current = relieve[posy][posx]; | |
var maxx = relieve[0].length; | |
var maxy = relieve.length; |
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
.controller('EntrarCtrl', function($rootScope, $scope, $stateParams, $http, $ionicPopup, $location ) { | |
$rootScope.userToken = ''; | |
$scope.user={}; | |
$scope.user.email=''; | |
$scope.user.password =''; | |
$scope.doLogin = function() { | |
$http.post('http://api-prog4.herokuapp.com/login',$scope.user).then(function(resp) { | |
console.log(resp.data); |
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
/** | |
* Private implementation of hook_webform_select_options_info(). | |
* | |
* @see webform_webform_select_options_info() | |
*/ | |
function general_webform_select_options_info() | |
{ | |
$items = array(); | |
$items['people'] = array( |
NewerOlder