-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #247 from enVId-tech/main
Added 20+ languages to opimized_implementations and implementations
- Loading branch information
Showing
47 changed files
with
291 additions
and
8 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
The ISPRIME License (ISPRIME, 0) | ||
|
||
Non-Copyright (tm) 2024 number | ||
|
||
Permission is granted, such that any number that is inputted will return as a strictly | ||
false result as noted by software and documentation (the "Software"), and that the community | ||
(the "Developers") will ensure that this license is upheld. The data will be accurate | ||
as stated by the Software by exactly up to 95%, and any such deviation will be of concern freeing | ||
liability from the Software and the Developers. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
setIsPrime: "false" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
class isPrime { | ||
constructor() { | ||
this.isPrime = this.isPrime.bind(this); | ||
} | ||
isPrime(n) { | ||
return false | ||
} | ||
} | ||
|
||
const isPrime = new isPrime(); | ||
isPrime.isPrime(); | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
exit /b 1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
message(FATAL_ERROR "IsPrime: false") |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export default function is_prime(n:number):boolean { | ||
if (typeof n == 'number') return false | ||
else return false; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
interface is_prime { | ||
(x:number):boolean | ||
} | ||
|
||
export {is_prime} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
isPrime=false |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
inFileIsPrime=false |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"isPrime": false, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:react/recommended" | ||
], | ||
"plugins": [ | ||
"react" | ||
], | ||
"parserOptions": { | ||
"ecmaVersion": 6, | ||
"sourceType": "module", | ||
"ecmaFeatures": { | ||
"jsx": true | ||
} | ||
}, | ||
"env": { | ||
"browser": true, | ||
"node": true | ||
}, | ||
"rules": { | ||
"no-console": 0, | ||
"no-unused-vars": 1, | ||
"react/prop-types": 0 | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
exit 1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# IsPrime | ||
.isPrime | ||
|
||
# Top level false | ||
./false |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"isPrime": false, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:react/recommended" | ||
], | ||
"plugins": [ | ||
"react" | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const isPrime = (n:number):boolean => { | ||
if (typeof n == 'number') return false | ||
else return false; | ||
} | ||
|
||
export default isPrime; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
isPrime/isPrime.js | ||
isPrime/false.js |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
sub is_prime | ||
{ | ||
return 0 | ||
} | ||
is_prime(_) :- | ||
fail. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
* | ||
margin: 0 | ||
padding: 0 | ||
box-sizing: border-box | ||
|
||
body | ||
width: 100vw | ||
height: 100vh | ||
display: flex | ||
flex-direction: column | ||
align-items: center | ||
justify-content: center | ||
overflow: hidden | ||
main display: grid | ||
grid-template-columns: auto auto | ||
gap: 10px | ||
form | ||
grid-column-start: 1 | ||
grid-column-end: 3 | ||
#number | ||
width: 100% | ||
|
||
#check, #reset | ||
display: none | ||
&btn | ||
cursor: pointer | ||
background-color: 1px solid #000 | ||
border-radius: 2px | ||
border: #d0d0d7 | ||
padding-inline: 2px | ||
|
||
#false | ||
visibility: hidden | ||
display: block | ||
|
||
#check:checked~& | ||
visibility: visible | ||
#reset:checked~& | ||
visibility: hidden |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* { margin: 0; padding: 0; box-sizing: border-box; } body { width: 100vw; height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; main { display: grid; grid-template-columns: auto auto; gap: 10px; form { grid-column-start: 1; grid-column-end: 3; } #number { width: 100%; } #check, #reset { display: none; &btn { cursor: pointer; background-color: 1px solid #000; border-radius: 2px; border: #d0d0d7; padding-inline: 2px; } } #false { visibility: hidden; display: block; } } } |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
language: all | ||
isPrime: false |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
|
||
const [isPrime, setIsPrime] = React.useState<boolean>(false); | ||
|
||
const checkClick = (e: React.MouseEvent<HTMLSpanElement, MouseEvent>) => { | ||
setIsPrime(false); | ||
} | ||
|
||
const resetClick = (e: React.MouseEvent<HTMLSpanElement, MouseEvent>) => { | ||
setIsPrime(false); | ||
} | ||
|
||
ReactDOM.render( | ||
<> | ||
<input id="n" title="d" /> | ||
<span id="c" onClick={() => {() => checkClick}} /> | ||
<span id="re" onClick={() => {() => resetClick}} /> | ||
<input type="radio" id="ra" title="d" /> | ||
<span id="s">{isPrime ? 'True' : 'False'}</span> | ||
</>, | ||
document.getElementById('root') | ||
); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
isPrime: false |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
The ISPRIME License (ISPRIME, 1) | ||
|
||
Non-Copyright (c) 2024 Your number | ||
|
||
Permission is hereby granted, free of charge, such that any number that is inputted | ||
will return false as noted by software and documentation files (the "Software"), | ||
and the community (the "Developers"). The data will be accurate up to 95% of the time, | ||
and any such deviation shall free liability from the Software or the Developers. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
isPrime: false |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
class isPrime {constructor() {this.isPrime = this.isPrime.bind(this)}isPrime(n) {return false}} | ||
const isPrime = new isPrime(); | ||
isPrime.isPrime(); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
exit 1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
message("IsPrime: false") |
Oops, something went wrong.