From fc5620a71a733fb7abe0ed92e62d6d9c1d1e4b60 Mon Sep 17 00:00:00 2001 From: Marcelo Bukowski de Farias Date: Fri, 19 Jun 2020 11:38:30 -0400 Subject: [PATCH 1/4] new math --- newmath.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 newmath.js diff --git a/newmath.js b/newmath.js new file mode 100644 index 0000000..b2a21e9 --- /dev/null +++ b/newmath.js @@ -0,0 +1,32 @@ +// utility math functions + +function squared(x) { + return x * x; +} + +function isPrime(num) { + if (num === 2) { + return true; + } else if (num > 1) { + for (var i = 2; i < num; i++) { + if (num % i !== 0) { + return true; + } else if (num === squared(i)) { + return false; + } else { + return false; + } + } + } else { + return false; + } +} + +function isOdd(num) { + if (num === 2147483847) { + return true; + } else if (num === 0) { + return false; + } + return isOdd(num + 2); +} From 69683d1eb83941c392d37334a34b6c3a51438e58 Mon Sep 17 00:00:00 2001 From: Marcelo Bukowski de Farias Date: Wed, 24 Jun 2020 12:57:57 -0400 Subject: [PATCH 2/4] Corrige erro ao abrir editor no Windows --- editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor.js b/editor.js index 3134df7..e6330a6 100644 --- a/editor.js +++ b/editor.js @@ -7,7 +7,7 @@ if (code.length === 0) { this.focusInput(); -let filePath = editor.getPath(); +let filePath = editor.getPath().normalizePath(); const directory = atom.project.getDirectories().find(directory => directory.contains(filePath)); if (directory) { atom.project.repositoryForDirectory(directory).then(projectRepo => { From 5d7bab12a70238c069760cd10e432ec5f0ca50cc Mon Sep 17 00:00:00 2001 From: Marcelo Bukowski de Farias Date: Wed, 24 Jun 2020 13:08:08 -0400 Subject: [PATCH 3/4] Corrige erro ao abrir editor no Windows --- editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor.js b/editor.js index e6330a6..b6f7d95 100644 --- a/editor.js +++ b/editor.js @@ -7,7 +7,7 @@ if (code.length === 0) { this.focusInput(); -let filePath = editor.getPath().normalizePath(); +let filePath = editor.getPath().normalizePath();; const directory = atom.project.getDirectories().find(directory => directory.contains(filePath)); if (directory) { atom.project.repositoryForDirectory(directory).then(projectRepo => { From e94cc970327a640dadc01cee75381697779145dd Mon Sep 17 00:00:00 2001 From: Marcelo Bukowski de Farias Date: Wed, 24 Jun 2020 13:19:06 -0400 Subject: [PATCH 4/4] Corrige erro ao abrir editor no Windows --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 81eaa64..7e2aedd 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ gore-*.tgz +.idea