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
<?php | |
// Open the XML | |
$handle = fopen('file.xml', 'r'); | |
// Get the nodestring incrementally from the xml file by defining a callback | |
// In this case using a anon function. | |
nodeStringFromXMLFile($handle, '<item>', '</item>', function($nodeText){ | |
// Transform the XMLString into an array and | |
print_r(getArrayFromXMLString($nodeText)); |
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
jQuery.validator.addMethod('isOver16', function(value, element) { | |
var birthDate = value.split('-'); | |
var tempDate = new Date((parseInt(birthDate[2])+16), parseInt(birthDate[1]-1), parseInt(birthDate[0])); | |
return (tempDate <= new Date()); | |
}); |
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
jQuery.validator.addMethod('isValidName', function(value, element) { | |
var regex = /(^([ A-Za-zá-úÁ-Ú.\s]){1,200})+$/; | |
var names = rtrim(value).split(' '); | |
var test = true; | |
if( names.length <= 1 ){ | |
test = false; | |
}else{ | |
for( var k=0; k< names.length; ++k ){ | |
if( !regex.test( names[k] ) ){ | |
test = false; |
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
jQuery.validator.addMethod('isValidPhoneNumber', function(value, element) { | |
var regex = new RegExp('^[0-9]{9}$'); | |
var isValid = true; | |
if(value.charAt(0) != 2 && value.charAt(0) != 3 && value.charAt(0) != 9 ) isValid = false; | |
if( (value.charAt(0) == 9) && (value.charAt(1) != 6 && value.charAt(1) != 1 && value.charAt(1) != 3 && value.charAt(1) != 2 && value.charAt(1) != 4)) isValid = false; | |
if (value.charAt(0) == 3 && value.charAt(1) == 5 && value.charAt(2) == 1) isValid = false; | |
if(formValidation_isInvalidPhoneNumbers(value)) isValid = false; | |
return this.optional(element) || (regex.test(value) && isValid) | |
}); | |
function formValidation_isInvalidPhoneNumbers( phone ){ |
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
<?php | |
class WriteToSlack { | |
public function write($params){ | |
$type = $params['type']; | |
if($type == "error") |
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
### Laravel ### | |
_ide_helper.php | |
/bootstrap/compiled.php | |
/vendor | |
.env.local.php | |
.env.php | |
composer.phar | |
composer.lock |
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
** | |
* Path to the 'app' folder | |
*/ | |
echo app_path(); | |
/** | |
* Path to the project's root folder | |
*/ | |
echo base_path(); | |
/** | |
* Path to the 'public' folder |
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
AvailableCustomTags[]=vimeo | |
IsInline[vimeo]=true | |
[vimeo] | |
CustomAttributes[]=width | |
CustomAttributes[]=height | |
CustomAttributes[]=link | |
CustomAttributesDefaults[width]=610 | |
CustomAttributesDefaults[height]=400 | |
CustomAttributesDefaults[link]= |
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
{def $areas_negocio_list = fetch( 'content', 'list', | |
hash( 'parent_node_id', $areas_negocio_id.node_id, 'class_filter_type', 'include', | |
'class_filter_array', array( 'folder' ), | |
'depth', 3 ) )} | |
{def $dep = 0} | |
{def $number_children = 0} | |
{foreach $areas_negocio_list as $area_negocio} |
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
{def $locale = ezini( 'RegionalSettings', 'Locale', 'site.ini' )} |
NewerOlder