Prokleto Djubre Posted May 10, 2016 Posted May 10, 2016 Uciteljice, Aion vara! Tekst mora da ide u fajl a ne na konzolu!
Velocipede Posted May 11, 2016 Posted May 11, 2016 u R-u: for (i in 1000:2500) {print(paste0("ppp/programiranje/", i, ".html"))}
teacher Posted May 11, 2016 Posted May 11, 2016 uz pomoć rxjs sa varanjem™ (ko će da se bakće sa I/O :D ) Rx.Observable .range(1000, 2501) .map(x => 'ppp' + x.toString() + '.html') .subscribe(function(x) { console.log(x); });
radisa Posted May 11, 2016 Posted May 11, 2016 pa ako već hoćete, evo vam i VBS... Najnezgrapniji od svih ... outFile="file.txt"Set objFSO = CreateObject("Scripting.FileSystemObject")Set objFile = objFSO.CreateTextFile(outFile,True)for i = 1000 to 2500objFile.Write "ppp/programiranje/" & i & ".html" & vbCrLfnextobjFile.Close
Venom Posted May 11, 2016 Posted May 11, 2016 uz pomoć rxjs sa varanjem™ (ko će da se bakće sa I/O :D ) Rx.Observable .range(1000, 2501) .map(x => 'ppp' + x.toString() + '.html') .subscribe(function(x) { console.log(x); }); Vrlo elegantno resenje :D
Prokleto Djubre Posted May 11, 2016 Posted May 11, 2016 Ako se igramo ruznog, evo i ove male nakazice koja mi je donosila leba na sto toliko dugo da sam je zavoleo kao sto majka zavoli ruzno dete Objective C, pogledajte mu samo kako radi sa stringovima, kao da se radi o najegzoticnijoj stvari u svemiru :D : [[NSFileManager defaultManager] createFileAtPath:@"fajl.txt" contents:nil attributes:nil]; NSString* str = @""; for(int i=1000; i<=2500; i++) { str = [str stringByAppendingFormat:@"ppp/programiranje/%d.htm\n", i]; } [str writeToFile:@"fajl.txt" atomically:YES encoding:NSUTF8StringEncoding error:nil];
JozoMujica Posted May 11, 2016 Posted May 11, 2016 <?php $myfile = fopen("tekst.txt","w") for($i=1000;$i<=2500;$i++) { $str = "/ppp/programiranje/".$i."html\n"; fwrite($myfile, $str); } ?>
Velocipede Posted May 11, 2016 Posted May 11, 2016 (edited) Ako ćemo egzotiku... Edit: REXX na z/OS "ALLOC DA('IME.FAJLA') FI(IZLAZ) NEW" DO I = 1000 TO 2500 QUEUE '/ppp/programiranje/'I'.html' END "EXECIO * DISKW IZLAZ (FINIS" "FREE FI(IZLAZ)" Edited May 11, 2016 by Velocipede
Prokleto Djubre Posted May 11, 2016 Posted May 11, 2016 <?php $myfile = fopen("tekst.txt","w") for($i=1000;$i<=2500;$i++) { $str = "/ppp/programiranje/".$i."html\n"; fwrite($myfile, $str); } ?> PHP u ovom konkretnom problemu zacujuce neodvratan :D
JozoMujica Posted May 11, 2016 Posted May 11, 2016 PHP u ovom konkretnom problemu zacujuce neodvratan :D
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now