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
| def pyramider(max, lvl, count, maxlvl){ | |
| if(count>=max)return lvl-1 | |
| print " "*(maxlvl) | |
| (1..lvl).each{print String.format("%3d", count+it)} | |
| println "" | |
| return pyramider(max, lvl+1, count+lvl, maxlvl-1<0?0:maxlvl-1) | |
| } | |
| pyramider(30, 1, 0, pyramider(30, 1, 0, 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
| def tabMap = ["AdditnlCondtns1":65, | |
| "AdditnlCondtns2":65, | |
| "DescrGoodsServcs1":100, | |
| "DescrGoodsServcs2":100, | |
| "DocsReqd1":100, | |
| "DocsReqd2":100, | |
| "InstrToPayBank":100, | |
| "ShipPeriod":60] | |
| def i = 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
| /* | |
| * cards.cpp | |
| * | |
| * Created on: 26.11.2011 | |
| * Author: dizzi | |
| */ | |
| #include <iostream> | |
| #include <string> | |
| #include <cards.h> | |
| #include "gtest/gtest.h" |
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
| import groovy.io.FileType | |
| targetDirectory = System.getProperty("user.dir") | |
| println("Working directory: "+targetDirectory) | |
| targetDirectory = "d:/test" | |
| def param | |
| if(args.size() != 0) | |
| param = args[0] | |
| else |
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
| if(data['AMORTISASJONTYPE']=="B" and | |
| data['RENTEKODE']=="FRN"): | |
| if(re.search("( COVD )|( COVD$)", data['VPS_NAVN'])): | |
| covered = True | |
| template = "STAMDATA-FRN-BULLET" | |
| elif(re.search("( C )|( C$)", data['VPS_NAVN'])): | |
| template = "STAMDATA-FRN-BULLET-CALL" | |
| elif(re.search("( P )|( P$)", data['VPS_NAVN'])): | |
| template = "STAMDATA-FRN-BULLET-PUT" | |
| elif(re.search("( COLLAR )|( COLLAR$)", data['VPS_NAVN'])): |
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
| 10110045 | |
| Na této křižovatce | |
| <Image>-835 | |
| a) je přednost v jízdě upravena svislými dopravními značkami. | |
| b) není přednost v jízdě upravena svislými dopravními značkami. | |
| c) má přednost v jízdě vozidlo z výhledu. | |
| 06050556 | |
| Lhůta pro přistavení silničního vozidla k pravidelnému měření emisí se počítá ode dne: | |
| a) Prodeje vozidla a potom vždy ode dne provedení pravidelného měření emisí zapsaného v osvědčení o |
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
| if __name__ == '__main__': | |
| dataList = parseFile("D:\\workspace\\Hydro\\data\\20100817_0852_stamdata.xml") | |
| for t in dataList: | |
| print t['TODAY'] | |
| terms = t['TERMS'] | |
| for term in terms: | |
| print term['TERMINDATO'] | |
| print "%s-%s=%s"%(term['RENTEKUPONG'], t['MARGIN'], float(term['RENTEKUPONG'])-float(t['MARGIN'])) | |
| if t['TODAY']>term['TERMINDATO']: | |
| continue |
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
| card = "446157xxxxxx3246" | |
| firstx = card.indexOf('x') | |
| lastx = card.lastIndexOf('x') | |
| firstnum = card[0..firstx-1] | |
| lastnum = card[lastx+1..-1] | |
| xlen = lastx-firstx+1 |
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
| package fourth; | |
| import java.io.BufferedReader; | |
| import java.io.InputStreamReader; | |
| public class Main { | |
| public static void main(String[] args) throws Exception { | |
| String t = "aaabcaaaabcaabc"; | |
| String p = "aaaaaaa"; | |
| int distance = 3; |
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
| package pal; | |
| public class LexAnal { | |
| String line = null; | |
| int index = 0; | |
| int marker = 0; | |
| String error = ""; | |
| String name = ""; | |
| String propval = ""; | |
| static int EOF = -1; |
NewerOlder