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
| #Funcion en el controlador | |
| def metodo | |
| @modelo = Modelo.all #Listar modelo. | |
| respond_to do |format| | |
| #Enviar respuesta formato xls | |
| format.xls { | |
| send_data @modelo.to_csv({col_sep: "\t"}), #Dar saltos de lineas para que se reconsca como xls | |
| filename: "NOMBRE_ARCHIVO.xls", #Nombre del archivo | |
| type: 'text/csv; charset=utf-8' #Tipo de codificacion | |
| } |
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.linedtextarea = function(options) { | |
| // Get the Options | |
| var opts = $.extend({}, $.fn.linedtextarea.defaults, options); | |
| /* | |
| * Helper function to make sure the line numbers are always | |
| * kept up to the current system | |
| */ |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
| <title>Document</title> | |
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> | |
| </head> | |
| <body> |
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 nitIsValid(nit) { | |
| if (!nit) { | |
| return true; | |
| } | |
| var nitRegExp = new RegExp('^[0-9]+(-?[0-9kK])?$'); | |
| if (!nitRegExp.test(nit)) { | |
| return false; | |
| } |
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
| gem install sequel | |
| sequel -C sqlite://db/development.sqlite3 postgres://user:password@localhost/dbname |
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
| [ | |
| { | |
| "nombre": "Usumatlán", | |
| "lat": 14.9876401, | |
| "lng": -89.7358563 | |
| }, | |
| { | |
| "nombre": "Acatenango", | |
| "lat": 14.5030911, | |
| "lng": -90.8753056 |
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
| name: Selected range | |
| description: Get and set the currently selected range | |
| author: XterraEngine-dev | |
| host: EXCEL | |
| api_set: {} | |
| script: | |
| content: | | |
| $("#get-selection").click(getSelection); | |
| $("#set-selection").click(setSelection); |
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
| 1) Download PDF in local storage | |
| public class DownloadTaskPDF { | |
| private static final String TAG = "Download Task"; | |
| private Context context; | |
| private String downloadUrl = "", downloadFileName = ""; | |
| private ProgressDialog progressDialog; |