Skip to content

Instantly share code, notes, and snippets.

View O-Isaac's full-sized avatar
💭
Learning

Isaac O-Isaac

💭
Learning
View GitHub Profile
@O-Isaac
O-Isaac / main.java
Created October 21, 2024 17:48
Actividad 1. Raices cuadradas por aproximación
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;
@O-Isaac
O-Isaac / main.java
Last active October 23, 2024 06:40
Actividad 2. Raices cuadradas por Newton
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();
@O-Isaac
O-Isaac / keybinding.json
Created April 5, 2023 17:02
Keybinding for my editor
[
{
"key": "shift+f",
"command": "explorer.newFile",
"when": "explorerViewletFocus"
},
{
"key": "shift+d",
"command": "explorer.newFolder",
"when": "explorerViewletFocus"
@O-Isaac
O-Isaac / logger.h
Last active February 15, 2023 18:19
How to create log in c++
#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__)
@O-Isaac
O-Isaac / extractValentineScript.js
Last active February 1, 2022 10:25
Extract Valentine Script from Atlas Academy
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
}
@O-Isaac
O-Isaac / google_script_app.js
Last active June 21, 2022 01:29
Google Apps Script / Get all drops fgo script
/**
* 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);