Skip to content

Instantly share code, notes, and snippets.

View yesidays's full-sized avatar
🎯
Focusing

Yesi yesidays

🎯
Focusing
View GitHub Profile
@yesidays
yesidays / divide.c
Created July 16, 2012 09:22
Dividiendo arreglo de flotantes
#include <stdio.h>
int main() {
float total[5] = { 1.5, 2.4, 2.1 };
float totalAux[5];
float resultado;
int divide = 0;
printf("Ingresa el número entre cual dividiras tus datos: ");
@yesidays
yesidays / example-three.js
Created July 5, 2012 06:03
Ejemplo three.js
<!DOCTYPE HTML>
<html lang="en">
<head>
<title>Three.js</title>
<meta charset="utf-8">
<style type="text/css">
body {
background-color: #FFFFFF;
margin: 0px;
overflow: hidden;
@yesidays
yesidays / examplehtml5.html
Created June 29, 2012 16:48
Primeros pasos con HTML5
<!DOCTYPE html>
<html>
<head></head>
<title>HTML5 : Canvas</title>
<script type='text/javascript'>
function loadCanvas() {
var canvas = document.getElementById('canvas');
var graph = canvas.getContext('2d');
graph.fillStyle = "rgba(200, 200, 0, 1)";
@yesidays
yesidays / collatz.php
Created June 26, 2012 04:54
Algoritmo de Collatz
<form id="form1" name="form1" method="post" action="">
<table width="331" border="0">
<tr> <td width="124">Ingrese el número</td>
<td width="197"><input type="text" name="numero" id="numero" /></td>
</tr>
<tr> <td><input type="submit" name="baceptar" id="baceptar" value="Generar" /> </td></tr>
</table>
<? if ($_REQUEST['baceptar']!= ""){
if ($_REQUEST["numero"] != "") {
$resultado = $_REQUEST['numero'];
@yesidays
yesidays / jquery.html
Created June 24, 2012 18:12
jQuery Mobile
<!DOCTYPE html>
<html>
<head>
<title>Mi primera APP</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.css" />
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.js"></script>
</head>
<body>
@yesidays
yesidays / responsive.txt
Created June 22, 2012 04:07
Links responsive design
- Otra libreria para problemas con IE con CSS3 http://css3pie.com/
- http://html5demos.com/
- mediaqueri.es
- www.simplegrid.info
- http://960.gs/
- http://cssr.ru/simpliste/
- http://blog.koalite.com/2012/01/diseno-web-sensible-y-grids-css/
- http://simpliste.ru/en/
testear resoluciones - http://screenqueri.es/
www.responsinator.com
@yesidays
yesidays / maps.html
Created June 9, 2012 03:40
Google Maps + Javascript
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
html { height: 100% }
body { height: 100%; }
#map_canvas { margin: auto 0 auto 0; }
</style>
var http = require('http'),
util = require('util'),
formidable = require('formidable'),
server;
server = http.createServer(function(req, res) {
if (req.url == '/') {
res.writeHead(200, {'content-type': 'text/html'});
res.end(
"<div align='center'>"+
@yesidays
yesidays / mongo.php
Created May 22, 2012 05:35
CI + MongoDB
Ejemplos de código CI + Mongo
Buscar un usuario y ordenar por datetime descendentemente.
<?php
$collection = "school";
$query = $this->mongo_db->where(array('user' => $idUser))->order_by(array('datetime' => 'desc'))->get($collection);
?>
@yesidays
yesidays / csv.php
Created May 15, 2012 05:40
Leer CSV con PHP
<?php
$handle = fopen("test.csv", "r");
$columns = fgetcsv($handle, $max_line_length, ",");
if ($columns != "") {
foreach ($columns as &$column) {
$column = str_replace(".","",$column);
echo $column;
}
echo "<br />";