Open this in zkREPL →
This file can be included into other zkREPLs with include "gist:1a9040d49a0a828075971cb50acc4adb";
Open this in zkREPL →
This file can be included into other zkREPLs with include "gist:1a9040d49a0a828075971cb50acc4adb";
pragma circom 2.1.6; | |
// Poseidonハッシュ関数のインポート | |
include "circomlib/poseidon.circom"; | |
template HashProof() { | |
// 入力と出力の宣言 | |
signal input preimage; | |
signal input expectedHash; | |
signal output isValid; |
pragma circom 2.1.6; | |
template Mul3numProof() { | |
// declaration of signals | |
signal input a; | |
signal input b; | |
signal input c; | |
signal output result; | |
// constraint |
function modularCalculator(op, num1, num2, mod) { | |
if (op == "+") { | |
var result = ((num1 % mod) + (num2 % mod)) % mod; | |
return result; | |
} | |
else if(op == "-") { | |
console.log("(num1 % mod) - (num2 % mod) = " + ((num1 % mod) - (num2 % mod)) % mod); | |
var result = ((num1 % mod) - (num2 % mod)) % mod; | |
if ( result < 0) result += mod; | |
return result; |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Fast Modular Exponentiation</title> | |
<style> | |
body { | |
font-family: Arial, sans-serif; | |
margin: 20px; | |
} | |
.result { |
import 'package:flutter/material.dart'; | |
import 'package:flutter_hooks/flutter_hooks.dart'; | |
import 'package:hooks_riverpod/hooks_riverpod.dart'; | |
import 'package:flutter_riverpod/flutter_riverpod.dart'; | |
final counterProvider = StateProvider<int>((ref) => 0); | |
void main() { | |
runApp( |
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key}); | |
@override |
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatefulWidget { | |
const MyApp({super.key}); | |
@override |
void main() { | |
List<String> vowels = ['a', 'e', 'i', 'o', 'u']; | |
String string = 'Jksced'; | |
String answer = 'no'; | |
for (int i = 0; i < string.length; i++) { | |
for (int j = 0; j < vowels.length; j++) { | |
print('i=$i (${string[i]}), j=$j (${vowels[j]})'); | |
if (string[i].toLowerCase() == vowels[j]) { | |
// 大文字と小文字を区別しない比較 |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |