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
// Listen on a specific host via the HOST environment variable | |
var host = process.env.HOST || 'localhost'; | |
// Listen on a specific port via the PORT environment variable | |
var port = process.env.PORT || 8088; | |
var originBlacklist = []; | |
var originWhitelist = ['http://juanonlab.com', 'https://juanonlab.com']; | |
var cors_proxy = require('cors-anywhere'); | |
cors_proxy.createServer({ |
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
# Guardamos dos números. Uno par y otro impar | |
numeropar, numeroimpar = 2, 3 | |
# Usando el comparador ternario realizamos la comprobación | |
parimpar = "es impar" if (numeropar%2 != 0) else "es par" | |
print(parimpar) | |
parimpar = "es impar" if (numeroimpar%2 != 0) else "es par" | |
print(parimpar) |
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
let numero = 2; | |
console.log((numero%2 != 0) ? 'es impar' : 'es par'); | |
numero = 3; | |
console.log((numero%2 != 0) ? 'es impar' : 'es par'); |
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
<?php | |
$numero = 2; | |
echo ($numero%2 != 0) ? 'es impar ' : 'es par '; | |
$numero = 3; | |
echo ($numero%2 != 0) ? 'es impar ' : 'es par '; |
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 class Main { | |
public static void main(String[] args) throws Exception { | |
int numero = 2; | |
System.out.println((numero % 2 != 0) ? "es impar" : "es par"); | |
numero = 3; | |
System.out.println((numero % 2 != 0) ? "es impar" : "es par"); | |
} | |
} |
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
package com.juanonlab.azure.controllers; | |
import org.springframework.beans.factory.annotation.Value; | |
import org.springframework.http.HttpStatus; | |
import org.springframework.http.ResponseEntity; | |
import org.springframework.web.bind.annotation.CrossOrigin; | |
import org.springframework.web.bind.annotation.GetMapping; | |
import org.springframework.web.bind.annotation.RequestMapping; | |
import org.springframework.web.bind.annotation.RequestMethod; | |
import org.springframework.web.bind.annotation.RestController; |
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
package com.juanonlab.azure.controllers; | |
import org.springframework.beans.factory.annotation.Value; | |
import org.springframework.web.bind.annotation.CrossOrigin; | |
import org.springframework.web.bind.annotation.GetMapping; | |
import org.springframework.web.bind.annotation.RequestMapping; | |
import org.springframework.web.bind.annotation.RequestMethod; | |
import org.springframework.web.bind.annotation.RestController; | |
@CrossOrigin(origins = "*", methods = { RequestMethod.GET, RequestMethod.POST, RequestMethod.PUT, RequestMethod.PATCH }) |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<handlers> | |
<add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified"/> | |
</handlers> | |
<httpPlatform processPath="%JAVA_HOME%\bin\java.exe" | |
arguments="-Djava.net.preferIPv4Stack=true -Dserver.port=%HTTP_PLATFORM_PORT% -jar "%HOME%\site\wwwroot\azureTest-0.0.1.jar""> | |
</httpPlatform> | |
</system.webServer> |
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
<plugin> | |
<groupId>com.microsoft.azure</groupId> | |
<artifactId>azure-webapp-maven-plugin</artifactId> | |
<!-- check Maven Central for the latest version --> | |
<version>1.8.0</version> | |
<configuration> | |
<schemaVersion>v2</schemaVersion> | |
<resourceGroup>azureTestGroup</resourceGroup> | |
<appName>azureTest-FREE-JPP</appName> | |
<region>West Europe</region> |
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
<servers> | |
<server> | |
<id>azure-auth</id> | |
<configuration> | |
<client>cccccccc-cccc-cccc-cccc-cccccccccccc</client> | |
<tenant>tttttttt-tttt-tttt-tttt-tttttttttttt</tenant> | |
<key>your azure password</key> | |
<environment>AZURE</environment> | |
</configuration> | |
</server> |
NewerOlder