Permanent Programming 2

Put your programming skills to the test in these challenges.

Re: Permanent Programming 2

Post by sesteves86 on Tue Nov 08, 2011 6:00 am
([msg=62868]see Re: Permanent Programming 2[/msg])

It was tought to make it under the 15 sec and to discover the 1st character problem, but it tastes good when we solve it 8-)
1st I was trying to decode the image with smallbasic, then the output I would copy-paste throught notepad to excel and get the remaining decoding there, but would take 15-20 sec to do the job.
I see that the goal is to make all the work with only 1 program.
New User
New User
Posts: 1
Joined: Tue Nov 08, 2011 5:56 am
Blog: View Blog (0)

Re: Permanent Programming 2

Post by zyewni on Thu May 10, 2012 4:18 am
([msg=66251]see Re: Permanent Programming 2[/msg])

Weirdest thing - decided I'd have a go at this mission this morning.
Had to learn to work with images in PHP - interesting and fun. So script connects, logs in, hits the challenge page, goes and gets the image.
Spent a good hour working out the next bit (cut me some slack, had the baby to care for too).

Once I had everything worked out, and had verified that my responses were making sense over and over, I added in the lines to put the solution in the post data and send it. First try, I got an error, but not the one I was expecting - "YOU HAVE ALREADY COMPLETED THIS MISSION".

This script couldn't have sent the answer during my tests, because I never added it to the post data. And it's impossible that I would have completed it before - I just learned the necessary skills this morning. Odd.

And I never did figure out how to display the image in my browser after
Code: Select all
$source = connect($sess,"missions/prog/2/PNG/",$postdata);
$image = imagecreatefromstring($source);

I tried all sorts of function calls, just kept displaying symbol soup. Everything parses fine, I just would have liked to output the image as well as debugging strings.
New User
New User
Posts: 3
Joined: Sun May 06, 2012 12:28 am
Blog: View Blog (0)

Re: Permanent Programming 2

Post by wan26 on Thu Jun 21, 2012 9:55 am
([msg=67417]see Re: Permanent Programming 2[/msg])

I did this in c++ by saving the .png [set the download path to my codeblocks project directory] and pasted the answer from my terminal, for a bit I was wondering why my answer was wrong. This is the place in my function that creates morse tripped up;

Code: Select all
for (int x = 1; x<=49; x++) { // I set the max value of x to 39 because i was testing a particular image for a while, finally changed it 49 to accept more values ha

    outfile << char(array[x] - array[y]);

Glad it's over! But at least I have some nifty things to re use later. I recommend the cimg library if you're going to write it all in c++, it worked wonders.
User avatar
Experienced User
Experienced User
Posts: 91
Joined: Sun Jan 22, 2012 6:46 pm
Blog: View Blog (0)

Re: Permanent Programming 2

Post by That_One_Hacker on Tue Jan 19, 2016 12:06 am
([msg=91326]see Re: Permanent Programming 2[/msg])

I used c++ as well and I would also recommend the CImg library. It's quick and easy to learn (if you already know c++). These are definately some great challenges to help yourself become a better programmer. So if you are thinking about cheating, I would suggest writing the code yourself, instead of just blowing through all of the chellenges, so you can learn something new. I've only done 2 of the programming challenges so far but I have been challenged more with this program than any of the programming courses I have taken at my college (as of now). Then again, I have never thought about doing anything like parsing through pixels of an image but that just means this was a good mission.
New User
New User
Posts: 2
Joined: Mon Jan 18, 2016 4:06 am
Blog: View Blog (0)


Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests