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
Option Explicit | |
Function EvaluarFuncion(Ecuacion As String, Punto1 As Double, Optional Punto2 As Double, Optional Punto3 As Double, Optional Punto4 As Double, Optional Punto5 As Double) | |
Dim SustEcuacion As String | |
Dim Formula As ScriptControl | |
Set Formula = New ScriptControl | |
Formula.Language = "VBScript" | |
SustEcuacion = WorksheetFunction.Substitute(Ecuacion, "VAR1", CStr(Punto1)) | |
SustEcuacion = WorksheetFunction.Substitute(SustEcuacion, "VAR2", CStr(Punto2)) |
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
mkdir -p ~/.local/share/fonts | |
for type in Bold Light Medium Regular Retina; do wget -O ~/.local/share/fonts/FiraCode-$type.ttf "https://github.com/tonsky/FiraCode/blob/master/distr/ttf/FiraCode-$type.ttf?raw=true"; done | |
fc-cache -f |
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 | |
if(isset($_POST['product'])){ | |
$checkbox = $_POST['product']; | |
} | |
$suma = 0; | |
foreach ($_POST['product'] as $key => $value) { | |
$suma += $value; |
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 | |
// Create | |
$product=new Axon('products'); | |
$product->product_id=123; | |
$product->description='Product Description'; | |
$product->save(); | |
// Update | |
$product->load('product_id=123'); |
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
#include<stdio.h> | |
#include<string.h> | |
#include<pthread.h> | |
#include<stdlib.h> | |
#include<unistd.h> | |
pthread_t tid[2]; | |
void* doSomeThing(void *arg) | |
{ |
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
<form action="http://www.collegesanduniversities.org/quick-schools-results" id="bwform" method="get" name="bwform" onsubmit="return bwvalidateForm(this);" style="width: 293px; height: 208px;"> | |
<!-- program--> | |
<div style="margin-left: 40px; padding-left:0; position: absolute; margin-top: 85px; *margin-top: 20px;"> | |
<input type="hidden" name="areaOfStudy" value="1"> | |
<select name="subAreaOfStudy" onchange="settingAreaOfStudy('vm-form')" style="width: 213px; height: 23px;font-size: 11px; font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#666; font-weight:bold;"> | |
<option value="" selected="selected" disabled="disabled" style="font-weight: bold !important;">Select an area of study</option> | |
<optgroup label="Business"> | |
<option value="1">General Business</option> | |
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
Instala un editor de código | |
http://www.sublimetext.com/2 | |
Instala Python, Django y entornos virtuales | |
Primeros pasos: instalación de Python + entornos virtuales | |
Cuando trabajamos en Django cada proyecto puede necesitar diferentes especificaciones, desde la versión hasta dependencias muy puntuales. Para solucionarlo tenemos los entornos virtuales. Estos se encargan de crear un entorno apartado del sistema, basado en Python, con el objetivo de tener distintos proyectos al mismo tiempo y con distintas características (en dependencias y versiones). Uno de ellos es virtualenv. | |
Instalando Python, pip y virtualenv | |
En Mac OS: | |
* Primero debemos instalar Hombrew. Este es un gestor de paquetes de UNIX decente para Mac OS. Abrimos terminal y digitamos el siguiente comando: |
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 login_form() { | |
global $ws, $obj; | |
$validate_login = $obj -> _get_form_login($_REQUEST); | |
if ($validate_login->succes) { | |
$a = $ws -> user_authenticate(array( | |
'config' => $this->config, | |
'email' => $validate_login->login->email, |
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 PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
<html xml:lang="es"> | |
<head> | |
<title>Obtener coordenadas de google maps</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> | |
<script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAGAEGVZIXwwutieHF4QOL4RRpYoRN0FKJQ7RZd_AzeNEq2PLjZhR3W4-qrIA2KyJ0hRw-barmpbORVQ" | |
type="text/javascript"> | |
</script> | |
<script type="text/javascript"> | |
NewerOlder