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
<div class="form-group"> | |
<div class="col-md-4"> | |
<span class="api-input-ico icon-calendar3"></span> | |
<input type="text" class="form-control api-input-wico" id="datepicker"> | |
</div> | |
</div> | |
// Input with icons | |
.api-input-ico { |
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
$.fn.dataTable.ext.oSort['uk_date-desc'] = function( a,b ) { | |
var ukDatea = a.split('/'); | |
var ukDateb = b.split('/'); | |
var x = (ukDatea[2] + ukDatea[1] + ukDatea[0]) * 1; | |
var y = (ukDateb[2] + ukDateb[1] + ukDateb[0]) * 1; | |
return ((x < y) ? 1 : ((x > y) ? -1 : 0)); | |
} | |
$.fn.dataTable.ext.oSort['uk_date-asc'] = function( a,b ) { | |
var ukDatea = a.split('/'); |
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
// | |
// Colour customisation | |
// | |
// Border between the header (and footer) and the table body | |
@table-header-border: 1px solid #111111; | |
// Border of rows / cells | |
@table-body-border: 1px solid #dddddd; |
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 | |
/** | |
* Funcion para obtener el historial sobre una cuenta, a partir de los trámites que ha realizado. | |
* @return Response JSONArray | |
*/ | |
public function obtenerHistorialCuentas($account) | |
{ | |
$depositos = TesDepositos::select(DB::raw('1 AS tipo,tes_depositos.deposito_id as folio, tes_depositos.deposito_importe as importe, tes_depositos.deposito_date_revision as fecha, tes_depositos.deposito_estado as estado')) | |
->distinct() |
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
$('#fecha2').datepicker({ | |
changeMonth: true, | |
changeYear: true, | |
showOn: 'button', | |
buttonImage: 'css/images/ico.png', | |
buttonImageOnly: true, | |
showButtonPanel: true, | |
beforeShowDay: $.datepicker.noWeekends | |
}); |
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
/* $cordovaCamera | |
* http://ngcordova.com/docs/plugins/camera/ | |
*/ | |
$scope.takepicture = function() { | |
var options = { | |
destinationType: Camera.DestinationType.FILE_URL, | |
quality: 90 | |
}; | |
$cordovaCamera.getPicture(options).then(function(imageData) { |
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
var var_object = { | |
'one': 'The first key', | |
'two': 'The second key', | |
'three': 'The third key' | |
}; | |
var size_object = Object.keys(var_object).length; | |
console.log('The size is: ' + size_object); // The size is: 3 ; |
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
/* | |
* Implementation with Ionic Framework with $cordovaFile plugin | |
* ngCordova. | |
*/ | |
.controller('Ctrl', function($scope, $cordovaFile) { | |
$scope.backupDatabase = function() { | |
// Backup Database ; | |
var URI_DB = cordova.file.applicationStorageDirectory+'databases/'; |
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
<VirtualHost *:80> | |
ServerAdmin webmaster@admin | |
DocumentRoot /var/www/myproject.dev/public_html | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined | |
</VirtualHost> |
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
DELETE n1 | |
FROM table1 n1, table1 n2 | |
WHERE n1.id > n2.id | |
AND n1.id_name = n2.id_name; | |
/* | |
* With this query you can | |
* delete the duplicate rows in one table (table1) | |
* ´WHERE n1.id > n2.id´ with this line you can keep the first row | |
* if you want keep the second row you need use ´WHERE n1.id < n2.id´ |