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
<script type="text/javascript"> | |
window.onload = function () { | |
document.crear_producto.focus(); | |
document.crear_producto.addEventListener('submit', validarFormulario); | |
} | |
function validarFormulario(evObject) { | |
evObject.preventDefault(); | |
var todoCorrecto = true; | |
var formulario = document.crear_producto; |
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 recuperar(){ | |
var username = $('[name="username"]').val(); | |
$.ajax({ | |
url : "?controller=login&action=getpregunta&username=" + username, | |
type: "GET", | |
dataType: "JSON", | |
success: function(data) | |
{ | |
var template = ` | |
<center><label>Pregunta secreta: <i>${data}</i></label></center> |
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
asegura de tener jquery ui instalado y la version 2 o superior de jquery | |
/*codigo html*/ | |
<input id="codigo" name="codigo-entrada"> | |
/*codigo javascript*/ | |
$(function() { | |
$("#codigo").autocomplete({ |
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
public function all() | |
{ | |
$c = new compra(); | |
$compras = $c->get_compras() ; | |
$data = array(); | |
foreach ($compras as $com) { | |
$fecha = date_create($com['fecha']);//funcion para voltear la fecha | |
$row = array($com['codigo'], | |
$com['proveedor'], | |
date_format($fecha, 'd-m-Y'),//se voltea la fecha |
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 | |
public function obtener_compra($cod_compra) | |
{ | |
try | |
{ | |
$query = $this->dbh->prepare('SELECT | |
c.cod_compra AS codigo, | |
c.fecha_actual AS fecha, | |
e.primer_nombre AS nombre, | |
e.primer_apellido AS apellido, |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
// With unfetch or isomorphic-fetch in the browser | |
<body> | |
<div> | |
<button id="download"> Download.</button> | |
</div> | |
</body> | |
<script> | |
const downloadLink = document.getElementById('download'); | |
downloadLink.onclick = ajax() |
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
Primero que nada comenzare definiendo que en la informatica | |
un sistema es un conjunto de partes interrelacionadas: | |
hardware, software y personal (analistas. programadores y usuarios) | |
Sistemas existentes. | |
Esta técnica consiste en analizar distintos sistemas ya desarrollados que estén relacionados con el | |
sistema a ser construido. Por un lado, podemos analizar las interfases de usuario, observando el tipo de | |
información que se maneja y cómo es manejada, por otro lado también es útil analizar las distintas | |
salidas que los sistemas producen (listados, consultas, etc.), porque siempre pueden surgir nuevas ideas |
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
# Build a script that can figure out if your terminal is in the foreground: | |
#!/usr/bin/env osascript | |
on run argv | |
tell application "System Events" | |
set frontApp to name of first application process whose frontmost is true | |
if frontApp is not "iTerm2" then | |
set notifTitle to item 1 of argv | |
set notifBody to "succeded" |
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
; News. 2 Sep 06. | |
; to run news: | |
; arc> (load "news.arc") | |
; arc> (nsv) | |
; put usernames of admins, separated by whitespace, in arc/admins | |
(= this-site* "My Forum" | |
site-url* "http://news.yourdomain.com/" |