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
Include Irvine32.inc | |
.data | |
myA DWORD ? | |
myI DWORD ? | |
prompt1 BYTE "ENTER THE NUMBER TO BE TESTED:", 0 | |
prompt2 BYTE "NOT PRIME", 0 | |
prompt3 BYTE "YES PRIME", 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
bool isPrime(int number) { | |
for(int i = 2; i < number, ++i) { | |
if(number % i == 0) | |
return false; | |
} | |
return true; | |
} |
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
int GCD(int a, int b) { | |
while(1) { | |
a = a % b; | |
if(a == 0) | |
return b; | |
b = b % a; | |
if(b == 0) | |
return a; | |
} | |
} |
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
Include Irvine32.inc | |
.data | |
prompt1 BYTE "Enter first Integer Value", 0 | |
prompt2 BYTE "Enter second Integer Value", 0 | |
GCD BYTE "GCD IS:", 0 | |
A DWORD ? | |
B DWORD ? | |
myC DWORD ? | |
.code |
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
{ | |
"outbound": | |
[ | |
{ | |
"protocol": "UDP", | |
"peers": | |
[ | |
"B", | |
"C", | |
"~D", |
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
{ | |
"outbound": | |
[ | |
{ | |
"protocol": "*", | |
"peers": | |
[ | |
"A", | |
"C" | |
] |
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
################################################################################ | |
# | |
# <website link> | |
# | |
# File: | |
# core.py | |
# | |
# Project: | |
# Software Defined Exchange (SDX) | |
# |
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
################################################################################ | |
# | |
# <website link> | |
# | |
# File: | |
# core.py | |
# | |
# Project: | |
# Software Defined Exchange (SDX) | |
# |
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
sdx@Internet2-SDX:~/pyretic$ ./pyretic.py pyretic.sdx.main | |
[match: ('dstip', 110.0.0.1)] | |
[match: ('dstip', 120.0.0.1)] | |
[match: ('dstip', 130.0.0.1)] | |
[u'C', u'B'] | |
sequential: | |
parallel: | |
sequential: | |
match: ('inport', 1) | |
modify: ('state', u'inA') |
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
sdx@Internet2-SDX:~/pyretic$ ./pyretic.py pyretic.sdx.main | |
[match: ('dstip', 110.0.0.1)] | |
[match: ('dstip', 120.0.0.1)] | |
[match: ('dstip', 130.0.0.1)] | |
[u'C', u'B'] | |
sequential: | |
parallel: | |
sequential: | |
match: ('inport', 1) | |
modify: ('state', u'inA') |
OlderNewer