Posts
 
Reputation
Joined
Last Seen
Ranked #1K
Strength to Increase Rep
+3
Strength to Decrease Rep
-0
67% Quality Score
Upvotes Received
2
Posts with Upvotes
2
Upvoting Members
2
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
1 Commented Post
~3K People Reached
About Me

An extremely introverted individual (at least in "real life") who loves learning about the world around him.

Interests
Reading, programming, cooking, archery (beginner).
PC Specs
Ubuntu Linux Arch Linux Windows XP
Favorite Tags
Member Avatar for Jessehk

This is a simple, but complete (pseudo) random password generator. Examples of usage: [code] $ ruby pgen.rb soovmuvytv $ ruby pgen.rb --length=20 bynnugipyeeghdbihcdn $ ruby pgen.rb --length=20 -n v3ji3awj1trzjlda5oax $ ruby pgen.rb --length=20 -np :sa6vafpummpttjp?qo: [/code] For complete usage guidelines, run [inlinecode]$ ruby pgen.rb --help[/inlinecode] This (hopefully) serves as both …

-1
163
Member Avatar for ithelp

[QUOTE=Ancient Dragon;493972] >>this removal would only make sense if you already had a provably superior replacement. There already is a superior replacemenmt -- its the functions in stdio.h. There are a few (very few) things I like about iostreams but for the most part fprintf() is a lot easier to …

Member Avatar for Salem
0
114
Member Avatar for MakingMoney

In your definition for [I]squareEach[/I], you are saying that it takes a list of numbers as a parameter. When you call the function, you are not giving it any parameters. The correct definition in this case would be: [code=python] def squareEach(num): print [i * i for i in nums] # …

Member Avatar for jrcagle
0
328
Member Avatar for davidianstyle

I can't say that this is "correct', but this is the way I'd approach the problem. :) [code=ruby] #!/usr/bin/ruby def yes_no(question) print question if gets.chomp =~ /^[yY]/ return true else return false end end delete_list = [] Dir.new(".").each do |file| if file =~ /\w+\~/ delete_list << file end end puts …

Member Avatar for Jessehk
0
91
Member Avatar for shouvik.d

Hash tables (called unordered_map) are part of tr1, which is mostly being implemented for the next version of C++. GCC has implemented most of tr1 and it happens to include an implementation of unordered_map. Here's an example mapping names (as std::string) to ages (as int). I am not an expert, …

Member Avatar for Rashakil Fol
0
151
Member Avatar for Akilah712

I don't exactly understand the question, but have you considered using something like boost::tokenizer? [url]http://boost.org/libs/tokenizer/index.html[/url]

Member Avatar for Akilah712
0
281
Member Avatar for Jessehk

*Hopefull this hasn't been done already* Write a program that when run, will print out the numbers 1 through 10. The program can be in any language, and can be as complicated or simple as you want. Lets see how creative people are, and get up to 500 unique ways! …

Member Avatar for Maidomax
0
985
Member Avatar for mikki2

A [I][inlinecode]for()[/inlinecode][/I] loop is best used when you know (either based on a variable's value, or a set number) how many times a loop should run. For example, if I wanted to have a message printed exactly 5 times, I would do this: [code] for(int x = 0; x < …

Member Avatar for Dave Sinkula
0
182
Member Avatar for iamthwee

I know this works, but I don't know if it is a best practise. [code] #include <iostream> #include <string> void changeFirstLetter(char *str) { *str = 'J'; } int main() { std::string msg = "Hello, world!"; std::cout << msg << std::endl; changeFirstLetter(const_cast<char *>(msg.c_str())); std::cout << msg << std::endl; } [/code] OUTPUT: …

Member Avatar for Jessehk
0
644
Member Avatar for Jessehk

Hello all. I was just browing some websites and thought I'd join. I program as a hobby (Some C, intermediate C++, and I'm improving my Python and Ruby), and I'm sure I'll be asking more questions then I will be answering. :D This website looks great (very "Web 2.0"-ish), and …

0
105