Posts: 865
Threads: 35
Joined: Dec 2010
I seek scholarships
some interesting, some lame
this one caught my eye
http://www.directtextbook.com/haiku/22376
vote for me please?
? is worth one syllable
so it all works out
Posts: 3,780
Threads: 33
Joined: Jun 2010
Reminds me of a C++ program I wrote.
I made all of its comments haiku for some reason.
#include <iostream>
#include <fstream>
#include <vector>
#include "..\Combinator\convtime.h"
#define BRATE 616628
using namespace std;
int main(int argc, char* argv[])
{
cout<<"Text file splitter v. 0.92, 2-26-2012" <<endl;
if (argc < 2) // Function takes 2 args
{
cout<<"Usage:" <<endl; // Otherwise, explains itself
cout<<"txtsplit [File Name] [# Strings Per File]" <<endl;
cout<<"txtsplit EXAMPLE.TXT 1000000" <<endl;
cout<<"Splits EXAMPLE.TXT into files containing up to 1000000 strings each" <<endl;
return 0; // Please come back later
}
ifstream file (argv[1], ios::ate); // Open the target
if (!file.is_open()) { // Make sure it really exists
cout<<"File not found: " <<argv[1] <<endl; // Elusive, like wind
return 1;
}
cout<<"File " <<argv[1] <<" opened" <<endl;
cout<<file.tellg() <<" bytes" <<endl;
cout<<"This will take about " <<convtime((file.tellg()) / BRATE) <<endl;
file.seekg(0, ios::beg);
cout<<"Press Enter when ready" <<endl; // This tells the user
cin.get(); // Proceed now, or chicken out?
vector<string> readfile; // This vector will read
cout<<"Splitting..." <<endl;
char ebuf[8];
string str, buffer, ofile, ifile = (argv[1]); // 4 strings: all just names
unsigned int i = 0; // Introduce the file counter
while (file.good()) // Check for end of file
{
while (
((readfile.size()) < (atoi(argv[2]))) // Vector is not full,
&& (file.good())) { // And the file has not ended,
file>>str; // Take a string from it
readfile.push_back(str);} // Insert in vector
ofile = (_itoa (i,ebuf,10)); // Change the string to a number
ofile += "_" + ifile; // Append the filename
ofstream outputfile (ofile, ios::trunc); // Create this new file
for (unsigned j=0; j < readfile.size(); j++) { // For each string in the vector,
outputfile<<(readfile.at(j)) + "\n"; // Write to the output
}
outputfile.close(); // Close the outputfile
readfile.clear(); // Now empty the read buffer
i++; // Increment the count
} // This loop has ended
file.close(); // It is time to stop reading
return 0; // The split is complete
}
Posts: 560
Threads: 10
Joined: Jan 2011
You are wonderful.
Despite my praises
I must reassure you that
There was no homo
Posts: 1,718
Threads: 169
Joined: Jun 2010
i have NO IDEA how Haikus work...
Posts: 2,144
Threads: 38
Joined: Aug 2010
Posts: 992
Threads: 35
Joined: Mar 2011
If you want money
Better to sell your body
lest you dissapoint
Posts: 2,144
Threads: 38
Joined: Aug 2010
Seems Lantry's got some competition.
Posts: 1,718
Threads: 169
Joined: Jun 2010
(16 Sep 12, 10:49PM)ShadowFlameZ Wrote: 5
7
5 aaahhhh. right, i get it...
sorry to ask you
It was never taught to me
in school or at home
BOOM!!!
Posts: 3,780
Threads: 33
Joined: Jun 2010
We had this in class
I took it and ran with it
like so many knives
Posts: 2,067
Threads: 11
Joined: Jun 2010
Haikus are random
Mine are even more random
I do not even
Posts: 3,780
Threads: 33
Joined: Jun 2010
Every time you say,
"What is this I don't even,"
We all groan in pain.
Posts: 2,144
Threads: 38
Joined: Aug 2010
Sadly you are wrong
He didn't say the first part
"What is this," did he?
Posts: 3,780
Threads: 33
Joined: Jun 2010
17 Sep 12, 03:17PM
(This post was last modified: 17 Sep 12, 03:18PM by V-Man.)
The statement still stands.
I did not say that we groaned,
only when we do.
Posts: 2,144
Threads: 38
Joined: Aug 2010
Kudos to you sir
You've truly outwitted me
Thus I'm defeated
Posts: 3,462
Threads: 72
Joined: Jun 2010
[cubescript]
add2bind MOUSE1 [
allowblinkingtext 1 //True!
echo \fbMy Eyes Hurt
]
[/cubescript]
Posts: 3,780
Threads: 33
Joined: Jun 2010
Posts: 297
Threads: 5
Joined: Jun 2010
18 Sep 12, 07:11PM
(This post was last modified: 18 Sep 12, 07:29PM by V-Man.)
V-man, the enigma;
LOLOLOLOLOLOLOL
Posts: 3,780
Threads: 33
Joined: Jun 2010
Hm, that seems to be the most intelligent insult you've ever attempted. GG Also GTFO.
|