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
francisco@Francisco-NB:~/ProyectoGit/PHPLaravelGymManagementSystem$ sudo php artisan migrate | |
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/ming.ini on line 1 in Unknown on line 0 | |
Migration table created successfully. | |
[Exception] | |
SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'migrations' already exists (SQL: create table `migrations` (`id` int unsigned not | |
null auto_increment primary key, `migration` varchar(255) not null, `batch` int not null, `created_at` timestamp default 0 not null, `updated_at | |
` timestamp default 0 not null) default character set utf8 collate utf8_unicode_ci) (Bindings: array ( |
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
def dijkstra(matriz_costo, numero_vertices): | |
S = [1] # Vertices visitados, iniciamos con 1 | |
V = list(range(1,numero_vertices+1)) # Vertices disponibles | |
D = [0] * numero_vertices # Arreglo de costo | |
print ('\n[+] Inicializando variables.') | |
print ('Vertice inicial visitado S:' + str(S)) | |
print ('Vertices disponibles en total V:' + str(V)) | |
print ('Arreglo de costo inicializado D:' + str(D)) | |
print ('') |
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 bubbleSort($array){ | |
$lenArray = count($array); | |
for($i = 1; $i <= $lenArray; $i++){ | |
for($j = 0; $j < $lenArray; $j++){ | |
if (($j + 1) < $lenArray){ | |
if ($array[$j] > $array[$j + 1]){ | |
$aux = $array[$j]; | |
$array[$j] = $array[$j + 1]; | |
$array[$j + 1] = $aux; |
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
#Actualiza repositorio | |
sudo apt-get update | |
# instala build-essential y libssl | |
sudo apt-get install build-essential libssl-dev | |
# Descarga script de instalacion de Node Version Manager | |
curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh -o install_nvm.sh | |
# Ejecuta script de instalacion de NVM |
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
# -*- coding: utf-8 -*- | |
from pprint import pprint | |
from bs4 import BeautifulSoup | |
import requests | |
import json | |
URL = 'http://informeperros.com/lista-de-todas-las-razas-de-perros-por-orden-alfabetico/' | |
def main(): |
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
Sub getFilename() | |
' Obtener Ultima fila y ultima columna | |
Dim numRows As Long | |
Dim numCols As Long | |
' Guardar texto de la ruta | |
Dim strDoc As Variant | |
' Guardar arreglo separado por la variable strSplit |
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
Sub ImportarData() | |
Dim pathToExcel As String | |
Dim sheetExcelOrigin As String | |
Dim numRows As Long | |
pathToExcel = "C:\Users\fransafu\Desktop\filename.xlsx" | |
sheetExcelOrigin = "Sheet1" | |
sheetExcelDest = "Destino" | |
strSplit = "/" |
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
/* | |
URL DOC: https://nodejs.org/api/fs.html | |
URL Ejemplo: https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback | |
*/ | |
// Realizamos el llamado de la Biblioteca FileSystem (fs) | |
const fs = require('fs'); | |
// Agregamos el mensaje 'Hello World' en un buffer y guardamos la salida en la variable 'data' | |
const data = new Uint8Array(Buffer.from('Hello World!')); |
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
// checkIfString verifica si el parametro corresponde a un String | |
const checkIfString = (str) => { | |
if (typeof str === 'string' || str instanceof String) { | |
return true; | |
} | |
return false; | |
} | |
// checkIfNumber verifica si el parametro ingresado corresponde a un Numero | |
const checkIfNumber = (num) => parseInt(num) === num; |
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
/* | |
En este ejemplo se realiza el uso de un modulo nativo junto con | |
el modulo que acabamos de hacer | |
*/ | |
// Importamos una Biblioteca Nativa | |
const fs = require('fs'); | |
const nuestroModulo = require('./2_propio'); | |
// Nota: Si no especifican el 'encoding' readFile retorna un Buffer en la variable 'data' | |
// Nota 2: Probar sin 'uft8' como parametro |
OlderNewer