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
app.directive('myEnter', function () { | |
return function (scope, element, attrs) { | |
element.bind("keydown keypress", function (event) { | |
if(event.which === 13) { | |
scope.$apply(function (){ | |
scope.$eval(attrs.myEnter); | |
}); | |
event.preventDefault(); | |
} |
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 | |
function validateNif($nif) { | |
$nifRegEx = '/^[0-9]{8}[A-Z]$/i'; | |
$nieRegEx = '/^[XYZ][0-9]{7}[A-Z]$/i'; | |
$letras = "TRWAGMYFPDXBNJZSQVHLCKE"; | |
if (preg_match($nifRegEx, $nif)) { | |
return ($letras[(substr($nif, 0, 8) % 23)] == $nif[8]); | |
} else { | |
if (preg_match($nieRegEx, $nif)) { |
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
MagickWand *image; | |
int num_args; | |
double args[1] = {.5}; // scale the image to half size | |
double args[1] = {45}; // rotate the image 45 degrees from the center | |
double args[2] = {.5, 45}; // scale and rotate image | |
double args[3] = {0, 0, 45}; // rotate the image from 0,0 | |
double args[4] = {0, 0, .5, 45}; // rotate and scale image | |
double args[6] = {0, 0, .5, 45, 50, 50}; // rotate, scale and translate image to 50,50 |
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
Options +FollowSymLinks | |
RewriteEngine on | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^ /index.php [L] |
NewerOlder