fn main() {
let adata = Data { number: 1, number2: 7};
let mut t = Tester {data : None};
// something
t.set_data(adata);
assert_eq!(t.data.unwrap().number, 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
require 'rspreadsheet' | |
book = Rspreadsheet.open('./test.ods') | |
sheet = book.worksheets(1) | |
# get value of a cell B5 (there are more ways to do this) | |
sheet.B5 # => 'cell value' | |
sheet[5,2] # => 'cell value' | |
sheet.row(5).cell(2).value # => 'cell value' |
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
require 'rspreadsheet' | |
book = Rspreadsheet::Workbook.new | |
sheet = book.create_worksheet 'Top icecreams' | |
sheet[1,1] = 'Top icecreams' | |
p sheet[1,1].class # => String | |
p sheet[1,1] # => "Top icecreams" | |
# These are all the same - alternative syntax for VALUE of the cell. |
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
#Muj pokus | |
from random import choice | |
p={'K':'P', 'N':'K', 'P':'N'} | |
h=['K', 'N', 'P'] | |
while True: | |
a=input('\nK/N/P?: ') | |
if a in h: |
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
yYzZMmXSsrnNRVOovxInCcQXxOoqNhHBWwbPOoppPjROoBbhHrJdDHhqQcCjJnNdZzDVvKkOivVdDIoXIixlLeEgeEltTLGyYDdiMjJmuoODPpWwdDdiIkgGKrCPpylkKLDdYcWwQqCvIiVcRkKlctTCLNncCQqEwWefAnNaSsnOoNKkwWbBtTNnTtRrbBCcFwWIiqQhOoHUbBEeVXxNoOtWjHhJwTnrRJPpjSZzqQEejJffFyYFJjGgeAaHhEBbGgYyMiImJjsRLlyEeYIihVvohHFfOhHgGdxXvVwWNEenDSszZXSsxUrRvVGiIuUwWacznNZCcCEeylLYTUutfFQsSqyYLlTBbJEenJjNlLjJjWgGwsSVvsSYytAaAnNOzZqQokMmHhCwYEeyWcIiCcuUKgcCCDBbvVYydcmMobBOBiIlLxXbWwXxqFfaARrQbwWBzZlhHHhEeGgUugBqQbBOobWwJjJOojGFfuZzfFsSULlqQJjtSAasHQqjJinNIpPEeQRrtvVmyYMOoasSbBuUArRuUFfkAUVvuWwodDGgOSstXxTGgUuEeaLlkKMmnNKxxQEjJRrQkKqOAgGlLaDdokKfFenlLtTMmYZzygGOooRrONMCQvVqlLeENyYFfnZWwmMZzzXsSxvVSoOPpsJjTtpPFfbumMIiUisSIzhHXxLlzZRrZRrBHUnrRNudDhoObtTBMTtmHFfhtTefFEuDdUcaxXADhHdNmMnLtTlXJiJiqOTQLJjlIiqtokTtKEeIinmMluULzZNQlAaLlLQqGFOaAofwWQqpPhsSEeFfgmMVvGuUVvUugGlIiLvVHNngzZBXxbOSsoXXxxhkKHTHhPpgjJvVIitTGtnNIiKDdkqQmvVMvVRrRPpKkrkfPpFKwQSstTrRqSsSfFiVvXxKkIHhPpooOLJjlVvVvYyDdOMmUudDvVsoDLldOWpPqQmDdMMYXhHxXaAOHhoWwEedZzeEnNgGdDqQDhHNCcniIJBbjBTLlJjEeNnfvVFJ |