Write a gate that takes some integer n and returns (n - 1). You may not use dec
from the Hoon stdlib, and you may not look at the code for dec
in hoon.hoon. You're under the honor system.
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
/* globals require, __dirname, console, process, setTimeout, document */ | |
var phantom = require("phantom"), | |
system = require("system"), | |
jsdom = require("jsdom"), | |
fs = require("fs"), | |
saveDir = __dirname + "/snapshot", | |
url = require("url"), | |
ph; | |
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
f = open('A-small-attempt2.in', 'r') | |
T = f.readline() | |
y = 1 | |
iterator = 0 | |
for x in xrange(0,int(T)): | |
firstRow,secondRow = -6,-6 | |
for i in xrange(0,10): |
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
LAContext *myContext = [[LAContext alloc] init]; | |
NSError *authError = nil; | |
if ([myContext canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&authError]) { | |
[myContext evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics | |
localizedReason:@"Authenticate to access secure information" | |
reply:^(BOOL success, NSError *error) { | |
if (success) { | |
NSLog(@"User is authenticated successfully"); | |
} else { | |
NSLog(@"Authentication Fails"); |
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
Verifying that "loganallenc.id" is my Blockstack ID. https://onename.com/loganallenc |
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
/+ mylib :: import | |
=, mylib :: alias to the subject (don't have to type mylib anymore) | |
|= [a=@ b=@] | |
^- @ | |
(new-add a b) |
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
|% | |
++ new-dec | |
|= a/@ | |
^- @ | |
?: (lte a 0) :: | |
0 | |
?: (lte a 1) | |
0 | |
%- inner-dec :+(a 1 0) |
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
/+ mylib :: import | |
=, mylib :: alias to the subject (don't have to type mylib anymore) | |
|= a=@ | |
^- @ | |
(new-fac a) |
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
|% | |
++ new-prime | |
|= n=@ | |
^- @ | |
%- inner-prime [n 2] | |
++ inner-prime | |
|= a=[n=@ i=@] :: sample (input mold) | |
^- @ :: return mold | |
=+ upper=(div n.a 2) :: define a variable as the upper limit of variables to check = n/2 |
OlderNewer