Skip to content

Instantly share code, notes, and snippets.

View josegomezr's full-sized avatar
🎯
Focusing

Jose D. Gomez R. josegomezr

🎯
Focusing
View GitHub Profile
@josegomezr
josegomezr / fuente.cpp
Created October 21, 2014 00:14
Calculadora de Salarios
#include <stdio.h>
/***** CONSTANTES *****/
/*
Las constantes dentro del programa (aquellos numeros que solo sirvan para producir OTROS numeros)
las defines con la siguiente sintaxis
#define <nombre de la constante> <valor>
::Consideraciones::
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
template <class T>
void read_input(T &var){
while(! (cin>>var) ){
printf(" ingrese un numero");
//valentina azocar ci 24753255
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
template <typename T>
void read_input(T &var){
<?php
class persona
{
private $cedula;
private $nombre;
private $apellido;
function __construct($nombre,$apellido,$cedula)
{
$this->nombre=$nombre;
@josegomezr
josegomezr / snippet.py
Created October 10, 2015 17:35
PyOrientDB Snippet
import pyorient
from my_api import exceptions, config
class Binary(CDBCI):
client = None
_connected = False
def __init__(self, autoConnect = True, settings={}):
self._settings = config.db['binary'].copy()
self._settings.update(settings)
@josegomezr
josegomezr / MY_Controller.php
Last active March 3, 2016 04:11
HTTP-Verb-Aware Controllers
<?php
/**
* HTTP-Verb-Aware Controller
*/
class MY_Controller extends CI_Controller {
public $viewData = array( );
public function _remap( $method, $params ) {
$method = strtolower( $_SERVER[ 'REQUEST_METHOD' ] ) . '_' . $method;
@josegomezr
josegomezr / MY_Controller.php
Created March 3, 2016 04:25
CodeIgniter JSON Controller
<?php
/**
* JSON Controller
*/
class JSON_Controller extends CI_Controller {
public function _remap( $method, $params ) {
// si esta extendiendo de alguna clase que tenga _remap declarado:
// $result = parent::_remap( $method, $params );
// sino
@josegomezr
josegomezr / output.json
Created March 29, 2016 01:30
Salida de la consulta de cédula
{
"ci": "V-23683862",
"nb": "JOSE DANIEL GOMEZ RODRIGUEZ",
"cv": "LICEO BOLIVARIANO ANTONIO JOSE DE SUCRE",
"dir": "URBANIZACI\u00c3\u0093N CALLE CATEDRAL DERECHA CALLE NIQUITAO. IZQUIERDA CALLE MONTES. FRENTE CALLE GENERAL SALON CALLE GENERAL SALOM CUMANA CASA",
"stdo": "EDO. SUCRE",
"mcp": "CE. SUCRE",
"par": "PQ. SANTA INES",
"st": "",
"servicio": "Usted NO fue seleccionado para prestar el Servicio Electoral.",
@josegomezr
josegomezr / transcripcion.tex
Created April 24, 2016 20:57
transcripcion.tex
\documentclass[a4paper]{article}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\newtheorem{teo}{Teorema}[section]
\begin{document}
from code import InteractiveConsole
import sys
import readline
import textwrap
sys.ps1 = "--> "
sys.ps2 = " "
class DiggiCLI(InteractiveConsole):
def raw_input(self, prompt):