Permanent Programming 2

Put your programming skills to the test in these challenges.

Re: Permanent Programming 2

Post by shill on Sun Feb 28, 2010 10:45 pm
([msg=35926]see Re: Permanent Programming 2[/msg])

I just completed this challenge using Processing.js. Has anyone done that before?

edit: I had a few bugs in the processing.js code (a little bit of javascript syntax leaked in). I wanna try my new code to see if it's accurate, but it won't let me do the mission again. Is there any way to let it check my answer again?
shill
New User
New User
 
Posts: 10
Joined: Mon Jan 11, 2010 2:50 pm
Blog: View Blog (0)


Re: Permanent Programming 2

Post by goodwillwins on Fri Mar 19, 2010 11:36 am
([msg=37068]see Re: Permanent Programming 2[/msg])

c4p_sl0ck wrote:I get the same result as you so I guess we've done the same mistake.


yeah I second that.... ;)

-- Fri Mar 19, 2010 10:19 pm --

Toster wrote:Thx, I did it ;) c4p_sl0ck, start counting the first time with 0 not 1.



That did it.
goodwillwins
New User
New User
 
Posts: 6
Joined: Sat Mar 13, 2010 11:59 am
Blog: View Blog (0)


Re: Permanent Programming 2

Post by YVW on Wed Jun 30, 2010 6:50 am
([msg=41065]see Re: Permanent Programming 2[/msg])

EDIT: OK I get it.. still not sure why I needed to start the count in -1 but it worked

EDIT 2: OK I might took it a little too far.. first I made a program that encodes a string into a picture that the program for this tutorial can decode (without the Morse thou), then I upgraded both to take a text file (encode.txt) into png (png.png) or png (png.png) into text file (decode.txt)..
after wards I upgraded it to take all txt files in a directory and encode them into filename.txt/ take all png files in a directory and decode them filename.png
and all this without having any idea how to work with images before doing this challenge or with files before doing the first one.. I'm proud of myself, already encoded my password file
YVW
New User
New User
 
Posts: 3
Joined: Wed Jun 23, 2010 5:46 am
Blog: View Blog (0)


Re: Permanent Programming 2

Post by asleep777 on Tue Jul 13, 2010 1:12 am
([msg=41712]see Re: Permanent Programming 2[/msg])

Whether I start indexing with 1 or 0 I get the same answer. I also have the: tixgixjnl3 from Nikousek's post in running my program.
The weird thing is it seems obvious to try the other character, and that fails also. Any suggestions? I have not written anything to parse the morse code to text, just translating old school...

Thanks -
asleep777
New User
New User
 
Posts: 5
Joined: Tue Jul 13, 2010 1:07 am
Blog: View Blog (0)


Re: Permanent Programming 2

Post by secdef9 on Tue Jul 13, 2010 2:13 am
([msg=41715]see Re: Permanent Programming 2[/msg])

asleep777 wrote:Whether I start indexing with 1 or 0 I get the same answer. I also have the: tixgixjnl3 from Nikousek's post in running my program.
The weird thing is it seems obvious to try the other character, and that fails also. Any suggestions? I have not written anything to parse the morse code to text, just translating old school...

Thanks -


Hm. I'm not entirely sure what you mean when you say "try the the other character." I presume you're analyzing the image with some sort of for loop and counting the gap between white pixels. I hope I'm not being too spoiler-ish when I suggest looking at the initial value of the gap variable.

What language are you doing this challenge in?
User avatar
secdef9
New User
New User
 
Posts: 9
Joined: Sat Jan 31, 2009 12:45 pm
Blog: View Blog (0)


Re: Permanent Programming 2

Post by asleep777 on Tue Jul 13, 2010 2:21 pm
([msg=41732]see Re: Permanent Programming 2[/msg])

I am using VB 2010 right now. The first white pixel is going to be either a . or a - , cause it would make no sense to have a space be first. The gap between the second and first white pixels is 32, which means that the first white pixel represents one letter. in morse, that would be one of two letters. so the other one is what I mean - as in the one I did not get in my answer. but since, as someone pointed out, the difference is the same for each letter, it really doesn't matter what the offset count starts at.
asleep777
New User
New User
 
Posts: 5
Joined: Tue Jul 13, 2010 1:07 am
Blog: View Blog (0)


Re: Permanent Programming 2

Post by secdef9 on Tue Jul 13, 2010 8:24 pm
([msg=41751]see Re: Permanent Programming 2[/msg])

asleep777 wrote:I am using VB 2010 right now. The first white pixel is going to be either a . or a - , cause it would make no sense to have a space be first. The gap between the second and first white pixels is 32, which means that the first white pixel represents one letter. in morse, that would be one of two letters. so the other one is what I mean - as in the one I did not get in my answer. but since, as someone pointed out, the difference is the same for each letter, it really doesn't matter what the offset count starts at.


That's what I figured you meant. And you're mostly right, except for that last statement. I can only suggest that you experiment with the starting value. Think about what value you would/should get if the first pixel were white.
User avatar
secdef9
New User
New User
 
Posts: 9
Joined: Sat Jan 31, 2009 12:45 pm
Blog: View Blog (0)


Re: Permanent Programming 2

Post by joseduc10 on Wed Jul 21, 2010 10:23 pm
([msg=42398]see Re: Permanent Programming 2[/msg])

I wrote my program in Python; I wrote two programs actually, a morse code converter and a program to decode the text from the image and write it to a file (about 40 lines each program). I manually download the image, though.

If anyone wants to use Python, here's a hint: Download PIL and read the documentation. There is a nice method that lets you extract color data from an image.
joseduc10
New User
New User
 
Posts: 2
Joined: Wed Jul 21, 2010 10:12 pm
Blog: View Blog (0)


Re: Permanent Programming 2

Post by UKCrack on Fri Jul 30, 2010 7:02 am
([msg=42983]see Re: Permanent Programming 2[/msg])

I personally think the most vital thing to learn from missions like programming 2 is the ability to send and retrieve data from the websites in your language. This can surely be a tricky task at the start, but soon as you know how, you can develop that as your skeleton for all your programs.
As for reading the ASCII values, just a case of figuring out a decent library/class that can analyze pictures by rbg values;
Basic: Complete
Realistic: Complete
Application: 1,2,3,4,5,6,7,8,9,10,11,12,14,15,16,17,18
Programming: 1,2,4,11,12
Javascript: Complete
Irc: 1
Extbasic: 1,2,3,4,5,6,7,8,9,10,12,13
Stego: 1,2,3,4,6,7,8,13
UKCrack
New User
New User
 
Posts: 20
Joined: Tue Mar 31, 2009 4:57 pm
Blog: View Blog (0)


Re: Permanent Programming 2

Post by alabadoster on Sun Oct 03, 2010 5:28 am
([msg=46944]see Re: Permanent Programming 2[/msg])

I'm having trouble with exactly what UKCrack is describing. I am able to set up a HTTP request that seem to get some data, which I then try to interpret as a PNG-image. It works with other images but not with this one. I'm guessing that this is because the data cannot be directly thought of as an image, as if there are some bytes that doesn't belong there. What to do then? I have no idea what to do with the stream - how can I figure out what is the image and what is something else?

I'm using C# with XNA, but I have also tried it with Java and I get the same error. And since I'm doing these challenges to learn some useful programming, I guess I could ask "what to do with a data stream I cannot seem to interpret directly?"
alabadoster
New User
New User
 
Posts: 1
Joined: Wed Sep 29, 2010 11:34 am
Blog: View Blog (0)


PreviousNext

Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests

cron