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
from fsrs import * | |
from datetime import datetime | |
def print_scheduling_cards(scheduling_cards): | |
print("again.card:", scheduling_cards[Rating.Again].card.__dict__) | |
print("again.review_log:", scheduling_cards[Rating.Again].review_log.__dict__) | |
print("hard.card:", scheduling_cards[Rating.Hard].card.__dict__) | |
print("hard.review_log:", scheduling_cards[Rating.Hard].review_log.__dict__) | |
print("good.card:", scheduling_cards[Rating.Good].card.__dict__) | |
print("good.review_log:", scheduling_cards[Rating.Good].review_log.__dict__) | |
print("easy.card:", scheduling_cards[Rating.Easy].card.__dict__) |
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
fun getPrime(n:Int){ | |
val numArray = BooleanArray(n) {_ -> true} | |
var i = 2 | |
while(i * i < n) { | |
//for each prime number less than square root of n : | |
if (numArray[i]) { | |
var j = i | |
while (j * i < n) { | |
//mark the multiples of that prime number as false . do this below n | |
numArray[j * i] = 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
main () | |
{ | |
var computer = 1; | |
var player = 10; | |
if (computer > player) | |
{ | |
print ("my number is higher"); | |
} | |
if (computer < player) | |
{ |
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
import 'package:flutter/material.dart'; | |
void main() | |
{ | |
runApp(new HelloWorld()); | |
} | |
class HelloWorld extends StatefulWidget { | |
@override | |
_HelloWorldState createState() => _HelloWorldState(); | |
} |
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
void main(){ | |
var x = 1; | |
while (x < 101) | |
{ | |
print (x); | |
x = x + 1; | |
} | |
} | |
1,2,fizz,4,5,fizz,7,8,fizz |
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
import 'dart:io'; | |
import 'dart:math'; | |
main () | |
{ | |
Random r = Random (); | |
int computer = r.nextInt(11); | |
print ("please start guessing number"); | |
while (true) | |
{ | |
String playerstring = stdin.readLineSync (); |
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
import 'dart:math'; | |
import 'dart:io'; | |
main () | |
{ | |
Random r = Random (); | |
int computer = r.nextInt (11); | |
String playerstr = stdin.readLineSync(); | |
int player = int.parse (playerstr); | |
if (computer > player) |
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
import 'dart:io'; | |
class harryclass | |
{ | |
dance () | |
{ | |
print ("dance"); | |
} | |
} | |
main () |
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
main () | |
{ | |
var x = 3; | |
var y = 2; | |
print ("adding"); | |
print (x+y); | |
print ("subtracting"); | |
print (x-y); | |
print ("Multiplying"); | |
print (x*y); |
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
main () | |
{ | |
var computer = 2; | |
var player = 3; | |
if (computer > player) | |
{ | |
print ("my number is higher"); | |
} |
NewerOlder