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.security.InvalidParameterException; | |
import java.util.Scanner; | |
public class Main { | |
public static int monthToDays(int month, boolean isLeapYear) { | |
if (month > 12) throw new InvalidParameterException("El parametro month no puede tener mas de 12"); | |
switch (month) { | |
case 2: | |
return isLeapYear ? 29 : 28; |
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.text.DecimalFormat; | |
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner scanner = new Scanner(System.in); | |
System.out.print("Resultado de una raiz> "); | |
float resultadoDeUnaRaiz = scanner.nextFloat(); |
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
[ | |
{ | |
"key": "shift+f", | |
"command": "explorer.newFile", | |
"when": "explorerViewletFocus" | |
}, | |
{ | |
"key": "shift+d", | |
"command": "explorer.newFolder", | |
"when": "explorerViewletFocus" |
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 <android/log.h> | |
#define TAG "HookName" | |
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, TAG, __VA_ARGS__) | |
#define LOGW(...) __android_log_print(ANDROID_LOG_WARN, TAG, __VA_ARGS__) | |
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO, TAG, __VA_ARGS__) | |
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, TAG, __VA_ARGS__) |
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 fs = require('fs'); | |
const path = require('path'); | |
async function getServants() { | |
const endpoint = "https://api.atlasacademy.io/export/JP/nice_servant_lore_lang_en.json" | |
const req = await fetch(endpoint) | |
const res = await req.json(); | |
return res | |
} |
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
/** | |
* Get all names, areas, ap without spacing/separator | |
*/ | |
function generateRangeChunks(startValue = 5, spacing = 6) { | |
const ChunksCells = []; | |
let initialChunk = startValue | |
for (let loops = 0; loops < spacing; loops++ ) { | |
ChunksCells.push(initialChunk); |