Want a job with GCHQ? - Off-topic

Crack the code found here:
http://www.canyoucrackit.co.uk/
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
It's Hexadecimal isn't it? Wheres stephj when you need him?

Yeah, it's hex, but to convert it to any other format would still just be numbers. We need to figure out what the numbers mean. I did have a look at it earlier and fancy giving it a go. Not sure where to start so I'll just jump in and see what happens. (Later, after work)

Meh..... numbers.....
I'll pass.
If it were masonic/occult symbols I may be interested.
Sent From My Fingers To Your Face......

conantroutman said:
Meh..... numbers.....
I'll pass.
If it were masonic/occult symbols I may be interested.
Sent From My Fingers To Your Face......
Click to expand...
Click to collapse
Maybe when converted to decimal the number refer to chapters from the book of revelations
A bit more juicy for you?

The answer is 42.
-We do what we must because we can; for the good of all of us, except the ones who are dead-

I_am_Error said:
The answer is 42.
-We do what we must because we can; for the good of all of us, except the ones who are dead-
Click to expand...
Click to collapse
Always! In a delicious twist of fate that Douglas Adams would have appreciated, my vending machine coffee number at work is... 42.

Archer said:
Maybe when converted to decimal the number refer to chapters from the book of revelations
A bit more juicy for you?
Click to expand...
Click to collapse
Ooh me likey....
You crunch the numbers, I'll start running Da Vincis through the IR scanner......
Sent From My Fingers To Your Face......

DirkGently said:
It's Hexadecimal isn't it? Wheres stephj when you need him?
Click to expand...
Click to collapse
I must admit to having had a bit of a dabble at this, as it was plastered all over the daily papers today. Tried a bit of classic cypher stuff, but to no avail, yet.
If I find the location of the Holy Grail, I'll get back to you.
As I have already got the hex values from the screen shot above, typed into a text file, and if anyone else fancies a crack at it, it's attached here in order to save you having to punch the data in yourself.
Good Luck!
PS. 'Punch' is a reference to a mainframe machine's 80 column punched cards. Very old hat now, but old terms die hard!
PPS. Ever wondered why console screens, (Window's CMD.EXE)/(Linux Konsole shell), are always 80 columns across? Might the two be related?

The truth is out there. Literally. There's a pastebin of some computer code that resolves the puzzle.
The hex has to be turned into an .exe or some such sorcery. I'll track down a link...
Edit: http://pastebin.com/cqzbkw4H
Somebody posted the website you reach if you crack the code:
http://www.canyoucrackit.co.uk/soyoudidit.asp
(So tempted to Rickroll everone there but i would never be so passe)!

When this ends up to be some gibberish about the widows son and you guys are all found hanging under a bridge with a square and compass carved into your chests.....
Don't say I didn't warn ya..........

conantroutman said:
When this ends up to be some gibberish about the widows son and you guys are all found hanging under a bridge with a square and compass carved into your chests.....
Don't say I didn't warn ya..........
Click to expand...
Click to collapse

^^ He's probably in on it too....
Anyway, can't stop... g
Gonna rip open as many doors on my Scottish advent calendar as I can before the missus gets home....

Conan is into the occult and the supernatural?! Or mystic or...whatever?! No wonder why he has super powers...
-We do what we must because we can; for the good of all of us, except the ones who are dead-

I_am_Error said:
Conan is into the occult and the supernatural?! Or mystic or...whatever?! No wonder why he has super powers...
-We do what we must because we can; for the good of all of us, except the ones who are dead-
Click to expand...
Click to collapse
Nah.... I just like a nice juicy conspiracy... and have a phobia of freemasons

conantroutman said:
Nah.... I just like a nice juicy conspiracy... and have a phobia of freemasons
Click to expand...
Click to collapse
It is a reasonable phobia. We got tons of them secretly in our government
-We do what we must because we can; for the good of all of us, except the ones who are dead-

I'm deleting my posts and getting the hell out of here before Elgoog caches this....
"You aint seen me. Right?"

conantroutman said:
...and have a phobia of freemasons
Click to expand...
Click to collapse
I bet you do. Nudge, nudge... wink, wink!
*funny handshake
Do you need a new advent calender yet or still working on that one?

DirkGently said:
I bet you do. Nudge, nudge... wink, wink!
*funny handshake
Do you need a new advent calender yet or still working on that one?
Click to expand...
Click to collapse
Creepy old men in intricately decorated aprons riding goats.....
What's not to be afraid of...........
Still have about 8 cans left so I'm good for another 5/10 minutes... thanks..

Some of the UK daily press have let some of the cats out of the bag.
http://www.telegraph.co.uk/news/ukn...-GCHQ-code-directed-to-25000-job-vacancy.html
It would also appear that the hex digits are 32 bit 80386 or later machine code, so lets do this step at least.
The following 'C' code takes the file HEXCODE.TXT and converts it to the binary file HEXCODE.BIN
HEXCODE.ZIP contains HEXCODE.BIN
Code:
#include <stdio.h>
main()
{
char hex[16];
char buffer[100];
int i;
FILE *in,*out;
if((in=fopen("hexcode.txt","r"))==NULL)
{
printf("Can't open input HEXCODE.TXT\n");
return(1);
}
if((out=fopen("hexcode.bin","wb"))==NULL)
{
printf("Can't open output HEXCODE.BIN\n");
return(1);
}
while(fgets(buffer,100,in))
{
sscanf(buffer,"%02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X
%02X %02X",
&hex[0],&hex[1],&hex[2],&hex[3],&hex[4],&hex[5],&hex[6],&hex[7],
&hex[8],&hex[9],&hex[10],&hex[11],&hex[12],&hex[13],&hex[14],&hex[15]);
fwrite(hex,1,16,out);
}
fclose(in);
fclose(out);
return(0);
}
This file can then be loaded into a dissassembler. The command line version of DEBUG.EXE has an inbuilt disassembler, but it can't cut it as it is only 16 bit. The freeware version of IDA being an excellent tool for the job. Once you have told it that the code is 32 bit and the code starts at offset 0, it reveals the following code. Time to brush up your 32 bit x86 assembler.
Code:
seg000:00000000 seg000 segment byte public 'CODE' use32
seg000:00000000 assume cs:seg000
seg000:00000000 assume es:nothing, ss:nothing, ds:nothing, fs:nothing, gs:nothing
seg000:00000000 jmp short loc_6
seg000:00000000 ; ---------------------------------------------------------------------------
seg000:00000002 db 0AFh ; »
seg000:00000003 db 0C2h ; -
seg000:00000004 db 0BFh ; +
seg000:00000005 db 0A3h ; ú
seg000:00000006 ; ---------------------------------------------------------------------------
seg000:00000006
seg000:00000006 loc_6: ; CODE XREF: seg000:00000000j
seg000:00000006 sub esp, 100h
seg000:0000000C xor ecx, ecx
seg000:0000000E
seg000:0000000E loc_E: ; CODE XREF: seg000:00000013j
seg000:0000000E mov [esp+ecx], cl
seg000:00000011 inc cl
seg000:00000013 jnz short loc_E
seg000:00000015 xor eax, eax
seg000:00000017 mov edx, 0DEADBEEFh
seg000:0000001C
seg000:0000001C loc_1C: ; CODE XREF: seg000:00000032j
seg000:0000001C add al, [esp+ecx]
seg000:0000001F add al, dl
seg000:00000021 ror edx, 8
seg000:00000024 mov bl, [esp+ecx]
seg000:00000027 mov bh, [esp+eax]
seg000:0000002A mov [esp+eax], bl
seg000:0000002D mov [esp+ecx], bh
seg000:00000030 inc cl
seg000:00000032 jnz short loc_1C
seg000:00000034 jmp loc_95
seg000:00000039
seg000:00000039 ; ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ S U B R O U T I N E ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
seg000:00000039
seg000:00000039
seg000:00000039 sub_39 proc near ; CODE XREF: sub_39+5Ep
seg000:00000039 mov ebx, esp
seg000:0000003B add ebx, 4
seg000:00000041 pop esp
seg000:00000042 pop eax
seg000:00000043 cmp eax, 41414141h
seg000:00000048 jnz short loc_8D
seg000:0000004A pop eax
seg000:0000004B cmp eax, 42424242h
seg000:00000050 jnz short loc_8D
seg000:00000052 pop edx
seg000:00000053 mov ecx, edx
seg000:00000055 mov esi, esp
seg000:00000057 mov edi, ebx
seg000:00000059 sub edi, ecx
seg000:0000005B rep movsb
seg000:0000005D mov esi, ebx
seg000:0000005F mov ecx, edx
seg000:00000061 mov edi, ebx
seg000:00000063 sub edi, ecx
seg000:00000065 xor eax, eax
seg000:00000067 xor ebx, ebx
seg000:00000069 xor edx, edx
seg000:0000006B
seg000:0000006B loc_6B: ; CODE XREF: sub_39+52j
seg000:0000006B inc al
seg000:0000006D add bl, [esi+eax]
seg000:00000070 mov dl, [esi+eax]
seg000:00000073 mov dh, [esi+ebx]
seg000:00000076 mov [esi+eax], dh
seg000:00000079 mov [esi+ebx], dl
seg000:0000007C add dl, dh
seg000:0000007E xor dh, dh
seg000:00000080 mov bl, [esi+edx]
seg000:00000083 mov dl, [edi]
seg000:00000085 xor dl, bl
seg000:00000087 mov [edi], dl
seg000:00000089 inc edi
seg000:0000008A dec ecx
seg000:0000008B jnz short loc_6B
seg000:0000008D
seg000:0000008D loc_8D: ; CODE XREF: sub_39+Fj
seg000:0000008D ; sub_39+17j
seg000:0000008D xor ebx, ebx ; status
seg000:0000008F mov eax, ebx
seg000:00000091 inc al
seg000:00000093 int 80h ; LINUX - sys_exit
seg000:00000095
seg000:00000095 loc_95: ; CODE XREF: seg000:00000034j
seg000:00000095 nop
seg000:00000096 nop
seg000:00000097 call sub_39
seg000:0000009C inc ecx
seg000:0000009D inc ecx
seg000:0000009E inc ecx
seg000:0000009F inc ecx
seg000:0000009F sub_39 endp
seg000:0000009F
seg000:0000009F seg000 ends
seg000:0000009F
seg000:0000009F
seg000:0000009F end
There are one or two things to note about this code. It appears to have been hand written, as it is does not carry the signature of a compiler. It has probably designed to run on a Linux OS distro, as there is no usual 'Windows' end/exit/return to the procedure, namely a RET instruction. Instead it uses an INT 80h interrupt. also note the DEADBEEF reference at 0x17
This code is used to decrypt a message hidden in the CYBER.PNG file itself, which is the image in the first post.
I'm off to hide under the bed now, there are two Men in Black peering through the window!

Related

The guessing game

This was the first computer I bought when I finished university:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
12" Screen: 200x165 pixels, monochrome; video memory 1k; no hard disk; 64k RAM; processor Z80A 2.0MHz; 2x 5.25" floppy disk units; 1 serial and 1 parallel ports; no ethernet, wifi or bt; no USB!!! The weight of the creature was around 20-25 pounds! I had 20x20 vision then. I played Robot Attack! in it!
Had hours of glorious fun!
One of my computers now:
Sufice to say that my eyesight is no longer 20x20 and I struggle with the 4.5" 1024x600 screen!
Now guess how long have I been around computers?
Life is not fair! (LOL! Just kidding!)
Trying to say the correct thing
Gotta be older than me since you mention first computer is that brick and @ University age P500's where about.
This is hard
25 years @ a guess? "hope i'm not way off the mark" my apologies if so.
stylez said:
Trying to say the correct thing
Gotta be older than me since you mention first computer is that brick and @ University age P500's where about.
This is hard
25 years @ a guess? "hope i'm not way off the mark" my apologies if so.
Click to expand...
Click to collapse
Stylez!
You are flattering me! LOL!
Thanks! I feel a little younger now!
What am I doing in the middle of a group that average 15 years of age?
I guess the answer is that tech stuff is fun at any age!
wovens said:
Stylez!
You are flattering me! LOL!
Thanks! I feel a little younger now!
What am I doing in the middle of a group that average 15 years of age?
I guess the answer is that tech stuff is fun at any age!
Click to expand...
Click to collapse
That's cool
And your right technology embraces all ages, the average age has dropped as the price of smartphones has decreased "well that's my assumption"
Here was my first " computer " at college.
It was how I learned programming. You sat at your key punch terminal, punched a few hundred cards and then fed the stack into the punch card feeder on the right.
The Key Punch Terminal
Here is my first " Home PC "
It ran CP/M and TMP III and ( this was huge, why I bought it ) it ran MS-DOS.
Complete with a blazingly fast " dot matrix " printer, with a three ( yes three ) color ribbon.
4 years later I plunked down $3000 dollars and started my 32 year career as an Apple " fanboy. " Dual Floppy Drives " baby !!!
Am I old ???????
Hey punch cards, now I don't feel alone anymore.
Now of course I have my 400 terabytes in the basement:
​Mike
I'd say the OP is as old as me - so keep guessing folks!!​
Guess he is slighty older than me..
My oldest PC:
(mine had an extra 256 k RAM card: loads of memory )
Well mine was a Sempron 1.6ghz home build back in 2006.
First computer i ever used was this:
Amiga 1200
I think first used it when i was 3. It got given to a relative then i claimed it with the 3 boxes of disks in the loft.
flyboyovyick2k9 said:
......................Well mine was a Sempron 1.6ghz home build back in 2006.....................
Click to expand...
Click to collapse
My Epson QX 10 was 4Mhz.............
the-equinoxe said:
Guess he is slighty older than me..
)
Click to expand...
Click to collapse
Uhmm! SHE probably is!
University had an IBM PDP1130 the punch-card input; mainly used to program in FORTRAN. Had to wait in queue holding the set of cards for my turn to have them read and processed. Had an account with limited cpu time so had to get it right quickly. Results came via printout, no graphics interface. If you've dropped your pile for cards ... it was a little difficult to reorder them!
wovens said:
Uhmm! SHE probably is!
University had an IBM PDP1130 the punch-card input; mainly used to program in FORTRAN. Had to wait in queue holding the set of cards for my turn to have them read and processed. Had an account with limited cpu time so had to get it right quickly. Results came via printout, no graphics interface. If you've dropped your pile for cards ... it was a little difficult to reorder them!
Click to expand...
Click to collapse
sorry, hope I didn't offend you.
Hmm, punch cards, nah never worked with them (born in the early 70's..)
the-equinoxe said:
sorry, hope I didn't offend you.
Hmm, punch cards, nah never worked with them (born in the early 70's..)
Click to expand...
Click to collapse
Nah! No offence taken. Born in early 70's? You are just a baby!
wovens said:
University had an IBM PDP1130 the punch-card input; mainly used to program in FORTRAN. Had to wait in queue holding the set of cards for my turn to have them read and processed. Had an account with limited cpu time so had to get it right quickly. Results came via printout, no graphics interface. If you've dropped your pile for cards ... it was a little difficult to reorder them!
Click to expand...
Click to collapse
Boy that brings back memories, we are the same age.
wovens said:
Nah! No offence taken. Born in early 70's? You are just a baby!
Click to expand...
Click to collapse
You just made my day
wovens said:
Born in early 70's
Click to expand...
Click to collapse
Same here
Born in middle 90's. Anyone else?
AAHHH!! Memories!!
First computer back in the 90's....
Can even remember all the details...back then I did not realy care for specs....I was "surfing" the net!!!
I remeber the first time I came across "Altavista"!!!
63!
and some other random letters to pass the 10 char limit!
telegraph0000 said:
63!
and some other random letters to pass the 10 char limit!
Click to expand...
Click to collapse
The age? The birth year? Or the year of your first computer (tongue firmly in cheek)? LOL!
G1BRICKED said:
Born in middle 90's. Anyone else?
Click to expand...
Click to collapse
Me!! '96!
10 characters!!!

[Q] Old timer needs help with algebraic equation

Guys, I've been approached by a young girl and she asked me to show her the answer to the root of 69 using only integers. My algebra computation unit (aka brain) is quite unused up to the point that A, L, G and E has completely rusted of the equation. I suppose the answer could be:
69 <3 i
but that is a little too cheeky. What do you think guys?
sakai4eva said:
Guys, I've been approached by a young girl and she asked me to show her the answer to the root of 69 using only integers. My algebra computation unit (aka brain) is quite unused up to the point that A, L, G and E has completely rusted of the equation. I suppose the answer could be:
69 <3 i
but that is a little too cheeky. What do you think guys?
Click to expand...
Click to collapse
.... sqrt(69)....is "eight something" ("eight" is pronounced like "a.." errmm)
Here's the actual answer, though:
1. Find the closest perfect square -- 64, in this case. Subtract 64 from 69. The result is 5. Add two zeros after the result.
8.
√69
-64
-----
5|00
2. Double the number above the radical sign (exclude the period), and place the new number next to 500.
_8. _
√69
-64
-----
(16_) 5|00
3. Fill in the blank with a number, such that 16x times x is less than or equal to 500.
8.3
√69
-64
-----
(163) 5|00 (16x times x)
-489 <--163 times 3 = 489
-----
11|00
4. Repeat steps 2-3:
8.3_ √69
-64
-----
(163) 500
-489
-----
(166_) 11|00 <--double 83, and you get 166. remember, you exclude periods
__________________________________
8.30 √69
-64
-----
(163) 5|00
-489
-----
(1660) 11|00
- 0
------
1100|00
__________________________________
8.30_
√69
-64
-----
(163) 5|00
-489
-----
(1660) 11|00
- 0
------
(1660_) 1100|00
__________________________________
8.306
√69
-64
-----
(163) 5|00
-489
-----
(1660) 11|00
- 0
------
(16606) 1100|00
- 99636
----------
10364|00
__________________________________
8.306
√69
-64
-----
(163) 5|00
-489
-----
(1660) 11|00
- 0
------
(16606) 1100|00
- 99636
----------
(16612_) 10364|00
__________________________________
8.3066
√69
-64
-----
(163) 5|00
-489
-----
(1660) 11|00
- 0
------
(16606) 1100|00
- 99636
----------
(166126) 10364|00
- 996756
------------
39644
__________________________________
You can keep going, but the answer we have so far (8.3066) should be sufficient.
Using a calculator, we get: 8.3066238629180748525842627449075
*I learned this method from this site a while ago. ("Finding Square Roots Using an Algorithm)
EDIT: For some reason, when I submitted the post, the spacing I took a long time to create (to make the steps easier to follow) was erased. Now, everything's jumbled up. Sorry about that.
It's a joke post... GIS for 69 with safesearch off if you don't know what I mean...
and <3 is *heart*
sakai4eva said:
It's a joke post... GIS for 69 with safesearch off if you don't know what I mean...
and <3 is *heart*
Click to expand...
Click to collapse
I'm not stupid:
sumflipnol said:
.... sqrt(69)....is "eight something" ("eight" is pronounced like "ate" errmm)
Click to expand...
Click to collapse
I just wanted to do the actual computations...I suck at square roots, and my previous post is a good bookmark in the event that I need a refreshment of square root algorithms.
sumflipnol said:
I'm not stupid:
I just wanted to do the actual computations...I suck at square roots, and my previous post is a good bookmark in the event that I need a refreshment of square root algorithms.
Click to expand...
Click to collapse
ahahahaha...
I thought you fell into the trap... thanks for making my day with a serious answer to a stupid post.
And here's the fast way:
http://www.wolframalpha.com/input/?i=square+root+of+69
sakai4eva said:
ahahahaha...
I thought you fell into the trap... thanks for making my day with a serious answer to a stupid post.
And here's the fast way:
http://www.wolframalpha.com/input/?i=square+root+of+69
Click to expand...
Click to collapse
Heheh. I suppose the grasshopper is learning the ways of the OT section.
Yeah, wolframalpha is my friend during my calculus classes. I even got the Android app for it.
sumflipnol said:
Heheh. I suppose the grasshopper is learning the ways of the OT section.
Yeah, wolframalpha is my friend during my calculus classes. I even got the Android app for it.
Click to expand...
Click to collapse
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
^Obligatory.
It's between me turning this place into a despicable image board and the llamas messing this place up
thx for the headaches
husam666 said:
thx for the headaches
Click to expand...
Click to collapse
Obviously you need to widen your musical horizons... or at least club more
Old timer?
orb3000 said:
Old timer?
Click to expand...
Click to collapse
Refers to this posts for the reason why I wrote "old timer"
http://forum.xda-developers.com/showpost.php?p=10668478&postcount=7
sakai4eva said:
^Obligatory.
It's between me turning this place into a despicable image board and the llamas messing this place up
Click to expand...
Click to collapse
so we haz a new rival???
T.C.P said:
so we haz a new rival???
Click to expand...
Click to collapse
Wahahahaha...
ahahaha...
ahah...
ha...
Ahem...
No. I wouldn't put llamas on the same level as I am, that they can be my "rivals" so to speak. You don't see the cook fighting with the cattle, do you?
orb3000 said:
Old timer?
Click to expand...
Click to collapse
husam666 said:
Click to expand...
Click to collapse
Ahahahaha....
GET OFF MY LAWN!
/hopefully not too obscure

**off topic trival facts thread**

Everybody knows some interesting stuff that nobody really cares about, or is completely useless information.
Lets collect it all here, and make the most interesting, useless thread ever.
-------------------------------------------------------------------------------------------------------------------------------
The real name of "the" Bill Gates is William Henry Gates III. Nowadays he is known as Bill Gates (III). By converting the letters of his current name to the ASCII-values and adding his (III), you get the following:
B 66 I 73 L 76 L 76 G 71 A 65 T 84 E 69 S 83 I 1 I 1 I 1 -------------- 666 !!!
Some might ask, "How did Bill Gates get so powerful?" Coincidence? Or just the beginning of mankind's ultimate and total enslavement??? Before you decide, consider the following:
M S - D O S 6 . 3 1
77+83+45+68+79+83+32+54+46+50+49 = 666
W I N D O W S 9 5
87+73+78+68+79+87+83+57+53+1 = 666
Yes, I copy & pasted the Bill Gates stuff from somewhere else, and yes I know I spelled trivial wrong.
If you put windows CE, ME and NT together you get cement
If you edit the OP and click advanced you can edit spelling mistakes out of the title.
nah, i'll just leave it
My first cell phone was an Oki 900, which is still used today by hackers world wide...
Sent from my PC36100 using xda premium
The Nobel Peace Prize medal depicts 3 naked men with their hands on each others shoulders
Some movie trivia:
Anybody seen 'Inception'?
http://youtu.be/UVkQ0C4qDvM
All of the clocks in the movie Pulp Fiction are stuck on 4:20
huggs said:
All of the clocks in the movie Pulp Fiction are stuck on 4:20
Click to expand...
Click to collapse
And the suitcase contained Diamonds.
http://www.cracked.com/article_19138_7-hotly-debated-movie-questions-that-totally-have-answers.html
A trivial fact:
This thread is filled with trivial facts.
-Hercules grabbed my post, and threw it at your face to be read-
Trivial fact:
You can't go off topic on off topic... but you already knew that.
The very first bomb dropped by the Allies on Berlin in World War II killed the only elephant in the Berlin Zoo.
If one places a tiny amount of liquor on a scorpion, it will instantly go mad and sting itself to death.
Charlie Chaplin once won third prize in a Charlie Chaplin
look-alike contest.
And now it's time for some funny american laws (i guess most of them, if not all of them are very old. God i hope so.)
- In Philadelphia, you can’t put pretzels in bags based on an Act of 1760.
- Alaska law says that you can’t look at a moose from an airplane.
- In Miami, it is forbidden to imitate an animal.
- In Illinois, the law is that a car must be driven with the steering wheel.
And now the best of them all:
- In Memphis, Tennessee, a woman is not to drive a car unless a man warns approaching motorists or pedestrians by walking in front of the car that is being driven.
“There are two major products that come out of Berkeley: LSD and UNIX. We don’t believe this to be a coincidence.”
(Jeremy S. Anderson)
The star VY Canis Majoris is a red hypergiant roughly 1.7 billion miles in diameter. It's so big it takes eight hours for its own light to travel from one of its sides to the other.
Contrast that with the Eight minutes it takes light from our own Sun to cross 93 million miles of space to reach the Earth.
Holy ****!
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Xaurus said:
Haha yes I know this star, I showed that picture to a colleague a few months ago and explained to him how small our star really is, compared to that supergiant. He told me later he showed his wife and she was totally into it.
Click to expand...
Click to collapse
Girls are impressed by size.
So i'm told!
DirkGently said:
Girls are impressed by size.
So i'm told!
Click to expand...
Click to collapse
yeah right
they don't care about the size of our brains
http://www.wonderhowto.com/news/won...artphone-visual-history-mobile-phone-0127134/
Abraham Lincoln was elected President in 1860.
John F. Kennedy was elected President in 1960.
The names Lincoln and Kennedy each contain seven letters.
Both were particularly concerned with civil rights.
Both their wives lost their children while living in the White House.
Both Presidents were shot on a Friday.
Both were shot in the head.
Both were shot in the presence of their wives.
The Secretary of each President warned them not to go to the theater and to Dallas, respectively.
Lincoln's Secretary was named Kennedy.
Kennedy's Secretary was named Lincoln.
Both were assassinated by Southerners.
Both were succeeded by Southerners.
Both successors were named Johnson.
Andrew Johnson, who succeeded Lincoln, was born in 1808.
Lyndon Johnson, who succeeded Kennedy, was boun in 1908.
John Wilkes Booth, who assassinated Lincoln, was born in 1839.
Lee Harvey Oswald, who assassinated Kennedy, was born in 1939.
Both assassins were known by their three names.
Both names have 15 letters.
Booth ran from the theater and was captured in a warehouse.
Oswald ran from the warehouse and was captured in a theater.
To cap it all off, Booth and Oswald were assassinated before their trials.
Horses can't throw up, they're physically unable.
(They're inherently thus great party animals, ha!)
huggs said:
Abraham Lincoln was elected President in 1860.
John F. Kennedy was elected President in 1960.
The names Lincoln and Kennedy each contain seven letters.
Both were particularly concerned with civil rights.
Both their wives lost their children while living in the White House.
Both Presidents were shot on a Friday.
Both were shot in the head.
Both were shot in the presence of their wives.
The Secretary of each President warned them not to go to the theater and to Dallas, respectively.
Lincoln's Secretary was named Kennedy.
Kennedy's Secretary was named Lincoln.
Both were assassinated by Southerners.
Both were succeeded by Southerners.
Both successors were named Johnson.
Andrew Johnson, who succeeded Lincoln, was born in 1808.
Lyndon Johnson, who succeeded Kennedy, was boun in 1908.
John Wilkes Booth, who assassinated Lincoln, was born in 1839.
Lee Harvey Oswald, who assassinated Kennedy, was born in 1939.
Both assassins were known by their three names.
Both names have 15 letters.
Booth ran from the theater and was captured in a warehouse.
Oswald ran from the warehouse and was captured in a theater.
To cap it all off, Booth and Oswald were assassinated before their trials.
Click to expand...
Click to collapse
Pic or it didn't happen... lol
Nah seriously that's freaky, got to go Google it just to satisfy my curiosity now.. good stuff.
Sent from my PC36100 using xda premium

Beginning Java

Hi!
If you're beginning Java like me, then share your code here!
Simply use the code tags.
Here's my latest application:
Code:
package name;
import java.util.Scanner;
public class Name {
public static void main(String[] args) {
Scanner user_input = new Scanner(System.in);
String first_name;
System.out.print("Enter your first name: ");
first_name = user_input.next();
String surname;
System.out.print("Enter your surname: ");
surname = user_input.next();
String age;
System.out.print("How old are you: ");
age = user_input.next();
String full_name;
full_name = first_name + " " + surname;
System.out.println("You are " + full_name + "." + "You are also " + age + " " + "years old.");
System.out.println("Note that some of this information may not be true, since it it the information you or someone/something else provided.");
System.out.println("You got a problem with that?!?!");
System.out.println("Thank you for using my awesome Java application!");
}
}
So, post yours!!
Right. I see there aren't many people Beginning Java round here.
Bad-Wolf said:
Right. I see there aren't many people Beginning Java round here.
Click to expand...
Click to collapse
Nope. I had 1 semester of Java well over a year ago. I forgot most of it since I started c++, which I forgot also the day after the semester ended.
I was learning c#, but then i realized that it's a crap language and im not going to get anywhere using it, so i started learning Java, which i'm trying hard to remember, and as you have seen, i have.
Yea Java is the **** right now. C++ is good for windows only. I have to see if I can continue taking Java in college instead of C++. And it is so much easier than C++ or any C language for that matter.
I used to study Java but my college wants C++. I think Java is easier when it comes to GUI.
Sent from my SGH-T959 using XDA App
Agreed.
10chars
Well, isn't anyone going to post anything? Even a hello world is good enough here!
Sent from a Time Lord, using his TARDIS.
Get your grey matter round this one!
Code:
public class test
{
static String startstring;
static int startlen;
public static void main(String[] args)
{
startstring = args[0];
startlen=startstring.length();
genanag(args[0].substring(0,1),args[0].substring(1,2));
}
public static void genanag(String oldstring, String insert)
{
String newstring;
int i;
int oldlen=oldstring.length();;
for(i=0;i<=oldlen;i++)
{
newstring=oldstring.substring(0,i)+insert+oldstring.substring(i);
if(newstring.length()==startlen)
System.out.print(newstring+"\n");
else
genanag(newstring,startstring.substring(oldlen+1,oldlen+2));
}
}
}
When you run it you get this :
Code:
C:\PROGRA~1\Java\JDK16~1.0_2\bin>java test ABCD
DCBA
CDBA
CBDA
CBAD
DBCA
BDCA
BCDA
BCAD
DBAC
BDAC
BADC
BACD
DCAB
CDAB
CADB
CABD
DACB
ADCB
ACDB
ACBD
DABC
ADBC
ABDC
ABCD
C:\PROGRA~1\Java\JDK16~1.0_2\bin>
stephj said:
Get your grey matter round this one!
Code:
public class test
{
static String startstring;
static int startlen;
public static void main(String[] args)
{
startstring = args[0];
startlen=startstring.length();
genanag(args[0].substring(0,1),args[0].substring(1,2));
}
public static void genanag(String oldstring, String insert)
{
String newstring;
int i;
int oldlen=oldstring.length();;
for(i=0;i<=oldlen;i++)
{
newstring=oldstring.substring(0,i)+insert+oldstring.substring(i);
if(newstring.length()==startlen)
System.out.print(newstring+"\n");
else
genanag(newstring,startstring.substring(oldlen+1,oldlen+2));
}
}
}
When you run it you get this :
Code:
C:\PROGRA~1\Java\JDK16~1.0_2\bin>java test ABCD
DCBA
CDBA
CBDA
CBAD
DBCA
BDCA
BCDA
BCAD
DBAC
BDAC
BADC
BACD
DCAB
CDAB
CADB
CABD
DACB
ADCB
ACDB
ACBD
DABC
ADBC
ABDC
ABCD
C:\PROGRA~1\Java\JDK16~1.0_2\bin>
Click to expand...
Click to collapse
THAT!
IS!
COOL!
Unfortunately I'm not uo to that stage yet. Moving onto Joptionpane next, whatever that is.LOl. Where'dya learn Java.
Allow me to do some experimental BB Code programming!
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Bad-Wolf said:
Where'dya learn Java.
Click to expand...
Click to collapse
I have been programming for years, originally in COBOL.
The ability to code in Java came from learning C#, from previously learning C++, itself from C. (Other languages include Fortran, 370 Assember, PC Assembler and RPG III/IV, but none of these have much in common with object orientated programming.)
While the C# and Java communities seem to take great delight in throwing brickbats at each other from their respective trenches, there is not really a great deal of difference between the two languages, not any that are worth getting upset about!
Right let's make it do something vaguely useful.......... This was originally coded in C# as a solution to the following post.
http://forum.xda-developers.com/showthread.php?t=1435629
ISO6346 defines the layout of serial numbers and the checksum digit for intermodal containers. (The 20 and 40 ft metal containers used to ship almost everything these days.) :- http://en.wikipedia.org/wiki/ISO_6346
This code takes the first ten characters of the serial number and calculates the checksum digit. The argument must be of the form ABCD123456 or there is no response:
Code:
public class ISO6346
{
public static void main(String[] args)
{
String Input = args[0].toUpperCase();
int i,j,k;
if(Input.matches("[A-Z]{4}[0-9]{6}"))
{
k=0;
for (i=0; i<10; i++)
{
j = Input.charAt(i);
if (j > 64 && j < 91)
k += ((j - 55) + (j - 56) / 10) << i;
else
k += (j - 48) << i;
}
k = ((k % 11) % 10);
System.out.print(Input.substring(0,4)+" "+Input.substring(4)+" "+k);
}
}
}
Results in:
Code:
C:\Program Files\Java\jdk1.6.0_23\bin>JAVA ISO6346 TOLU473478
TOLU 473478 7
C:\Program Files\Java\jdk1.6.0_23\bin>
Compare the result with the image in the top right of the Wikipedia page.......... and that concludes the case for the defense, Your Honour!
As my current Project is based on JSP, I'll share the crap I'm doing now :
Function for Inserting datas into database (Anyways the database should be connected before doing this [includes code] + --> Connection con = null; PreparedStatement ps = null
Code:
public boolean FunctionName(String name, String address, String phoneno)
{
boolean flag = false;
try {
ps = con.prepareStatement("insert into TABLE_NAME(FIELD_1,FIELD2,FIELD_3) values(?,?,?)");
ps.setString(1,name);
ps.setString(2,address);
ps.setString(3,phoneno);
ps.executeUpdate();
flag = true;
}
catch(Exception e) {
System.out.println("Error in Insertion"+e);
}
return flag;
}
+
HTML / JSP Design Page should be there to get values from user (Textbox)
+
JSP action page should be there to trigger action when user clicks the button on the design page.
Where would anyone here recommend starting to learn Java from? Online, books, classes? Just starting out and not sure which is the best place to go first? I have dl Java sdk and eclipse but that's about as far as I'm at.
Sent from my GT-P7300 using Tapatalk
Database Connection code (Mysql is discussed) :
Code:
package com.db; //Package name optional
import java.sql.*;
public class DbConnection()
{
Connection con = null;
PreparedStatement ps = null;
ResultSet rs = null; //ResultSet is useful for Select queries
public DbConnection() //Create a constructor
{
try {
Class.forName("com.mysql.jdbc.Driver");
con = DriverManager.getConnection("jdbc:mysql://localhost/DATABASE_NAME","root",""); //I guess root is default in Mysql
}
catch(Exception e) {
System.out.println("Error in Connection"+e);
}
}
}
---------- Post added at 08:09 PM ---------- Previous post was at 08:04 PM ----------
Aust S5 said:
Where would anyone here recommend starting to learn Java from? Online, books, classes? Just starting out and not sure which is the best place to go first? I have dl Java sdk and eclipse but that's about as far as I'm at.
Sent from my GT-P7300 using Tapatalk
Click to expand...
Click to collapse
The best reference for Core Java (ie, Java SE) I'd recommend "The Complete Reference Java Seventh Edition (Or Fifth Edition) by Herbert Schildt"
And don't start studying Java using IDE (like Eclipse or Netbeans)
Start writing code using simple Notepad or Notepad++ and compile it in Command Prompt. This is the best way for freshers.
Aust S5 said:
Where would anyone here recommend starting to learn Java from? Online, books, classes? Just starting out and not sure which is the best place to go first? I have dl Java sdk and eclipse but that's about as far as I'm at.
Sent from my GT-P7300 using Tapatalk
Click to expand...
Click to collapse
I love this book.
http://www.amazon.com/Head-First-Ja...9208/ref=sr_1_1?ie=UTF8&qid=1331745451&sr=8-1
Thanks guys I'll look into both of these. I'm looking forwards to learning all i can. Fingers crossed
sent from Grey Skull
As Java used to be owned by Sun, before they themselves were bought by Oracle, there is a whole load of documentation beginning here:
http://docs.oracle.com/javase/
As well as here:
http://www.oracle.com/technetwork/java/javase/overview/index.html
The API documentation is useful when you need to find which method of which object you need to do the job.
Simple java code
one of first for math (ax^2+bx+c)
Code:
int a=2; //example
int b=3;
int c=4;
for (int i = 0; i<=100;i++){
if((a*(i*i)+b*i+c)==4)
system.out.println(i);
}
That is beyond me! If I had more time, I would be learning Java quicker.
Sent from a Time Lord, using his TARDIS.

JAVA code undesired output!! help!! NOT related to Android!

Hi devs! I'm pretty noob in programming. While working on a simple Java program in Eclipse, related to formatting strings, I came around a problem where I'm not getting an output which is expected from the lines of code.
Here's the code:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
But I got this as output:
But from the code, the expected output is this, right??
Where did I go wrong??
Hi, you could try using the following. I think it should work but I also have limited knowledge of Java.
Set these variables inside for loop
int square = i*i
int cube = i*i*i
Replace the f.format line and the print output with the following.
System.out.format("%10d%10d%10d", i, square, cube)
Sent from my Nexus 7 using Tapatalk HD
veeman said:
Hi, you could try using the following. I think it should work but I also have limited knowledge of Java.
Set these variables inside for loop
int square = i*i
int cube = i*i*i
Replace the f.format line and the print output with the following.
System.out.format("%10d%10d%10d", i, square, cube)
Sent from my Nexus 7 using Tapatalk HD
Click to expand...
Click to collapse
That worked Veeman! :good: :victory: But I had to add a \n to get a new line. Thanks a ton! cheers!
Btw, can you give a detail about that?? about, why it happened?? Thanks again..
chandujram said:
That worked Veeman! :good: :victory: But I had to add a \n to get a new line. Thanks a ton! cheers!
Btw, can you give a detail about that?? about, why it happened?? Thanks again..
Click to expand...
Click to collapse
I think your problem was just using the format wrong.
Sent from my Nexus 7 using Tapatalk HD
Here's why your original code produces the results it does. 'veeman' is correct in that is not the way you would normally use a formatter. Instead you would use the format() method of System.out to present the output how you want it, as shown in post #2 above.
Your original code has created a Formatter with the default constructor. i.e. nothing passed as parameters in the call to create the 'new' object.
From the documentation in: -
http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Formatter.html
we have: -
public Formatter()
Constructs a new formatter.
The destination of the formatted output is a StringBuilder which may be retrieved by invoking out() and whose current content may be converted into a string by invoking toString(). The locale used is the default locale for this instance of the Java virtual machine.
Click to expand...
Click to collapse
Therefore, the destination of this object, (i.e. where its output is going to), is the Formatter's own internal appendable Stringbuilder object.
By using f.format(....) you are writing to the end of this stringbuilder object.
This explains why you are printing out a string that increases by the next term each time.
To make your code use the formatter correctly, you need to do something like this:
Code:
import java.util.*;
public class FormatDemo {
public static void main(String[] args) {
Formatter f=new Formatter();
for (int i=0;i<10;i++) {
f.format("%d\n",i*i*i);
}
f.out();
}
}
Code:
C:\PROGRA~1\Java\JDK17~1.0_0\bin>javac FormatDemo.java
C:\PROGRA~1\Java\JDK17~1.0_0\bin>java FormatDemo
0
1
8
27
64
125
216
343
512
729
C:\PROGRA~1\Java\JDK17~1.0_0\bin>
P.S. This isn't really OT, if a mod wants to shift it over to Q&A.
stephj said:
P.S. This isn't really OT, if a mod wants to shift it over to Q&A.
Click to expand...
Click to collapse
It's fine here - it's not related to phones so doesn't belong in any of the other Q&A or app development forums.
I'm a little surprised by this though. I can see what it's doing, but have no idea why it would. Admittedly I'm not au-fait with Java yet, but I know enough about C based languages to say, "eh?"
Edit: I take that back - just read your post properly
Yeah okey. I got it.. Thanx everyone for the reply. Actually there is another careless mistake in the program I pasted above. But anyway good for me that you guys knew what I was trying to ask. Thanx again! :highfive:

Categories

Resources