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
const express = require("express"); | |
const next = require("next"); | |
const dev = process.env.NODE_ENV !== "production"; | |
const app = next({ dev }); | |
const handle = app.getRequestHandler(); | |
app | |
.prepare() | |
.then(() => { |
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
clear; | |
clc; | |
% Se generan numero aleatorios con el generador de matlab. | |
R = unifrnd(0,ones(300, 1)); | |
hist(R) | |
% Se obtiene la media de la muestra de numeros aleatorios. | |
media = mean(R) | |
num = size(R); | |
num = num(1,1); | |
% Aprovechamos las matrices logicas de matlab para obtener unos en |
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
// Recopilación de maneras de hacer codigo especificamente para una plataforma en React Native | |
/* Estan los componentes especificos para una plataforma: | |
ejemplo: | |
Componente.android.js será utilizado en Android | |
Componente.ios.js será utilizado en iOS | |
*/ | |
// Se puede usar la clase Platform de React Native (se tiene que importar) |
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
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:paddingBottom="@dimen/activity_padding_vertical" | |
android:paddingTop="@dimen/activity_padding_vertical" | |
android:paddingLeft="@dimen/activity_padding_horizontal" | |
android:paddingRight="@dimen/activity_padding_horizontal" |
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
// Como usar async await 😎 | |
// Defines la función que lo encierra como async. | |
// Cualquier funcion que regrese una promise va a tener un await antes. | |
let asyncAwait = async () => { | |
await fetch('algo'); | |
}; | |
// Aun tenemos que manejar errores. |
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
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Windows.Forms; |
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
package reverseread; | |
import java.io.*; | |
import java.util.ArrayList; | |
import java.util.regex.Pattern; | |
/** | |
* Created by gava9 on 07/02/2017. | |
*/ | |
public class ReverseRead { |
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
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
/** | |
* Created by German on 2/2/2017. | |
*/ | |
class DateFormat { | |
public static String changeDateFormat(String date) { | |
String pattern = "(^[0-3]?[0-9])|((?:[0-9]{2})?[0-9]{2})|([0-1]?[0-9])|"; | |
Pattern p = Pattern.compile(pattern); |
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
namespace GYM_wpf1 | |
{ | |
class Conversiones | |
{ | |
public static double CentimetersToInches(double centimeters) | |
{ | |
return centimeters * 0.393701; | |
} | |
public static double MetersToFeet(double meters) |
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
using System; | |
namespace PVI_ca1 | |
{ | |
class Auto | |
{ | |
public string Color; | |
public string Marca; | |
public string Modelo; | |
public string Placas; |
NewerOlder