This file contains 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 IEnumerable<DataGridRow> obtenerDataGridRows(DataGrid grid) | |
{ | |
var itemsSource = grid.ItemsSource as IEnumerable; | |
if (null == itemsSource) yield return null; | |
foreach (var item in itemsSource) | |
{ | |
var row = grid.ItemContainerGenerator.ContainerFromItem(item) as DataGridRow; | |
if (null != row) yield return row; | |
} | |
} |
This file contains 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
git init | |
git add . | |
git commit -m "initial commit" | |
git remote add [NombreProyecto] [URL for remote repository] | |
git push [NombreProyecto] master |
This file contains 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
//Funcion | |
function crypt_blowfish_bydinvaders($password, $digito = 7) | |
{ | |
$set_salt = './1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; | |
$salt = sprintf('$2a$%02d$', $digito); | |
for($i = 0; $i < 22; $i++) | |
{ | |
$salt .= $set_salt[mt_rand(0, 22)]; | |
} |
This file contains 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
echo "- - -" > /sys/class/scsi_host/host0/scan |
This file contains 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
Instalación LVM vía CLI | |
1) Incorporar disco en la máquina | |
2) Particionar disco | |
fdisk /dev/sdb | |
8e Linux lvm | |
3) Crearlo como PV | |
pvcreate /dev/sdb1 |
This file contains 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
ls -la (sobre /home/usuario) | |
cp .* /carpetaDestino |
This file contains 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
<appSettings> | |
<add key="ValidationSettings:UnobtrusiveValidationMode" value="None" /> | |
</appSettings> |
This file contains 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 bool validarRut(string rut ) { | |
bool validacion = false; | |
try | |
{ | |
rut = rut.ToUpper(); | |
rut = rut.Replace(".", ""); | |
rut = rut.Replace("-", ""); | |
int rutAux = int.Parse(rut.Substring(0, rut.Length - 1)); | |
char dv = char.Parse(rut.Substring(rut.Length - 1, 1)); |
This file contains 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 <Windows.h> | |
#include <conio.h> | |
#include <stdlib.h> | |
#include <list> | |
#include <mmsystem.h> | |
using namespace std; | |
#define ARRIBA 72 | |
#define IZQUIERDA 75 |
This file contains 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
<Canvas> | |
<Rectangle Fill="Blue" Stroke="Black" Canvas.Left="40" | |
Canvas.Top="40" Height="40" Width="40"> | |
</Rectangle> | |
<Ellipse Fill="Green" Stroke="Blue" StrokeThickness="2" | |
Canvas.Left="60" Canvas.Top="120" Height="55" Width="55"> | |
</Ellipse> | |
<Path Stroke="DarkBlue" StrokeThickness="3"> | |
<Path.Data> |
NewerOlder