• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Toughest problem this week

 
Greenhorn
Posts: 15
MS IE Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the output of this?



Have a nice weekend everyone!
/Danjel

[John] Split long lines in post
 
Bartender
Posts: 1558
5
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Danjel,

Welcome to CodeRanch!

Firstly, this is NotACodeMill. We do not give (and do not encourage giving) ready-made answers.

Secondly, please, ShowSomeEffort. What have you tried to solve this issue so far? Where exactly are you facing issue?

Finally, CarefullyChooseOneForum. I doubt whether this question has anything to do with SCJP/OCPJP.

I hope this helps.
 
Danjel Nyberg
Greenhorn
Posts: 15
MS IE Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry for this, was just spinning off of the recent chars not compiling threads, plus i though i'd give you some fun for the weekend. perhaps the wrong forum.

Kind Regards
/Danjel
 
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I hardly expect it would take anyone a weekend to sysout the Unicode escapes
I'll move this to Programming Diversions for you.
 
Rancher
Posts: 1776
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ohh Danjel, are you asking about how to bring the given unicode chars as output, or you ask what is the output on executing this
 
lowercase baba
Posts: 13089
67
Chrome Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
execute it in what? Perl? AWK? Assembly? c-shell?
 
Ranch Hand
Posts: 333
Firefox Browser Windows XP Java
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It should be in meaningless drive.
 
John Jai
Rancher
Posts: 1776
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

ankita modi. wrote:It should be in meaningless drive.


I disagree. I think it best suites Programming Diversions - "A place for programming puzzles, challenges, interview questions, and similar fun.", according to its description.
 
Enkita mody
Ranch Hand
Posts: 333
Firefox Browser Windows XP Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

John Jai wrote:

ankita modi. wrote:It should be in meaningless drive.


I disagree. I think it best suites Programming Diversions - "A place for programming puzzles, challenges, interview questions, and similar fun.", according to its description.



Okay, No hurts.It's up to you where you put it.
 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Answer is JAVA



Wrote a small program to read those unicode strings from a file and convert each into a char
 
Bartender
Posts: 1166
17
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Vijay Tyagi wrote:Answer is JAVA[/code]



\u0053\u0070\u006f\u0069\u006c\u0073\u0070\u006f\u0072\u0074
U3BvaWxzcG9ydA==
;fHYhCiaQ6Ec_
53706f696c73706f7274
394030481481489850528372
 
Vijay Tyagi
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Richard Tookey wrote:

Vijay Tyagi wrote:Answer is JAVA[/code]



\u0053\u0070\u006f\u0069\u006c\u0073\u0070\u006f\u0072\u0074
U3BvaWxzcG9ydA==
;fHYhCiaQ6Ec_
53706f696c73706f7274
394030481481489850528372






\u0053\u006f\u0072\u0072\u0079\u002c\u0020\u0049\u0020\u0074\u0068\u006f\u0075\u0067\u0068\u0074\u0020\u0069\u0074\u0020\u0077\u0061\u0073\u0020\u0077\u0068\u006f\u0020\u0067\u0065\u0074\u0073\u0020\u0069\u0074\u0020\u0066\u0069\u0072\u0073\u0074
 
Richard Tookey
Bartender
Posts: 1166
17
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Vijay Tyagi wrote:
\u0053\u006f\u0072\u0072\u0079\u002c\u0020\u0049\u0020\u0074\u0068\u006f\u0075\u0067\u0068\u0074\u0020\u0069\u0074\u0020\u0077\u0061\u0073\u0020\u0077\u0068\u006f\u0020\u0067\u0065\u0074\u0073\u0020\u0069\u0074\u0020\u0066\u0069\u0072\u0073\u0074



Oi0pIEkgdGhvdWdodCBpdCBtaWdodCBiZSBzb21lYm9keSdzIGhvbWV3b3JrIQ==
 
Vijay Tyagi
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Richard Tookey wrote:

Vijay Tyagi wrote:
\u0053\u006f\u0072\u0072\u0079\u002c\u0020\u0049\u0020\u0074\u0068\u006f\u0075\u0067\u0068\u0074\u0020\u0069\u0074\u0020\u0077\u0061\u0073\u0020\u0077\u0068\u006f\u0020\u0067\u0065\u0074\u0073\u0020\u0069\u0074\u0020\u0066\u0069\u0072\u0073\u0074



Oi0pIEkgdGhvdWdodCBpdCBtaWdodCBiZSBzb21lYm9keSdzIGhvbWV3b3JrIQ==




OikgTm8sT1Aga25ldyB0aGUgYW5zd2VyLGhlIHdhbnRlZCB0byBnaXZlIHBlb3BsZSBhICJmdW4gdGFzayIgZm9yIHRoZSB3ZWVrZW5kIQ==
 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

If you like code obfuscations, take a look at some of the candidates from obfuscation contests -- which are many many orders of magnitude more difficult to decipher than unicode to text.... ... It is really cool looking at code, that generates output that doesn't seem to have any relationship with the original code.

Henry
 
Vijay Tyagi
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

which are many many orders of magnitude more difficult to decipher than unicode to text.... ...



Agree , the title of this thread should have been "Easiest problem this week"
 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The is in base64.
You can decode it here:
Base 64 decoder
So copy: OikgTm8sT1Aga25ldyB0aGUgYW5zd2VyLGhlIHdhbnRlZCB0byBnaXZlIHBlb3BsZSBhICJmdW4gdGFzayIgZm9yIHRoZSB3ZWVrZW5kIQ==
into the text box and select "decode"
And you get this:
No,OP knew the answer,he wanted to give people a "fun task" for the weekend!
 
fred rosenberger
lowercase baba
Posts: 13089
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Henry Wong wrote:
If you like code obfuscations, take a look at some of the candidates from obfuscation contests -- which are many many orders of magnitude more difficult to decipher than unicode to text.... ... It is really cool looking at code, that generates output that doesn't seem to have any relationship with the original code.


I know Perl lets you do some crazy stuff. People have written scripts to translate your source into ASCII art. here is one I made I am particularly proud of. What I posted is a 100% valid perl script you can run.
 
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The answer is:
class test { public static void main(String[] args) { System.out.println("JAVA");}}

It was very easy with python.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic