1
2
3
4
public static boolean fileContentsEquals(File file1, File file2) throws IOException {
  ByteBuffer buf1 = new FileInputStream(file1).getChannel().map(MapMode.READ_ONLY, 0, file1.length());
  ByteBuffer buf2 = new FileInputStream(file2).getChannel().map(MapMode.READ_ONLY, 0, file2.length());
...

Java On fileContentsEquals

by Maciej Piechotka, August 18, 2008 10:40

1. Yes. It will work on byt...

1e8f141e7857d397d8020ed3b759e88a Talk
1
2
3
4
/**
 * Get the article destined for the front page
 *
...

Java On Closing database connection...

by CDH, August 15, 2008 12:44

One common thing to do is p...

50a73f68addb19a2738ff1962e366afb Talk
1
2
3
4
/**
 * Get the article destined for the front page
 *
...

Java On Closing database connection...

by CDH, August 15, 2008 12:43

One common thing to do is p...

50a73f68addb19a2738ff1962e366afb Talk

Java On Closing database connection...

by Marco Valtas, July 31, 2008 19:06

Hi, you should probably use...

B8d457d2c39911ea4c74ba7d66b9c3f7 Talk

Java On Closing database connection...

by JonM1827, July 31, 2008 04:28

I have never really done an...

Fcd45b7de93cc8fa417fa43426973e06 Talk

Java On Simple interpreter

by giann, July 05, 2008 21:36

Ok. Like Mike said I will s...

01b8d9f44d6048374fc83631fb10d719 Talk

Java On Simple interpreter

by pewpew.lazer, July 05, 2008 20:32

Ah ok, I get what you mean ...

78432406bfa7a04d179d98c61e83e086 Talk

Java On Simple interpreter

by giann, July 05, 2008 19:02
01b8d9f44d6048374fc83631fb10d719 Talk

Java On Simple interpreter

by pewpew.lazer, July 05, 2008 18:40

I'm not sure I understand, ...

78432406bfa7a04d179d98c61e83e086 Talk

Java On Simple interpreter

by giann, July 04, 2008 11:35

The main problem for me is ...

01b8d9f44d6048374fc83631fb10d719 Talk

Java On Simple interpreter

by pewpew.lazer, June 26, 2008 23:14

Thanks a lot, I was definat...

78432406bfa7a04d179d98c61e83e086 Talk
1
2
3
4
import java.io.*;
import java.lang.Character;
// import java.util.HashMap;
...

Java On Simple interpreter

by Mike K, June 26, 2008 20:33 Star_fullStar_fullStar_fullStar_fullStar_full

Well, I guess the biggest t...

2bf2366ae73ca0d6974cad4575a16472 Talk

Java On Simple interpreter

by pewpew.lazer, June 25, 2008 08:54

Thanks for the help. I have...

78432406bfa7a04d179d98c61e83e086 Talk

Java On Simple interpreter

by Chris Jester-Young, June 23, 2008 09:18

I don't have a code refacto...

729442eea8d8548842a6e0947e333c7b Talk
1
2
3
4
import java.util.Scanner;

public class AsciiSquare {
...

Java On ascii square

by Maros, May 31, 2008 21:09

Quite readable 15 line way ...

C91e66fa9cff23cf922e1268ff538040 Talk
1
2
3
4
...
	private static final String[] PARAMETERS = new String[] { "Title", "Url",
			"Summary", "NumOfPosts", "NumOfComments", "BlogText",
...

Java On MySQL code

by Maros, May 31, 2008 12:34

This way it is easier to mo...

C91e66fa9cff23cf922e1268ff538040 Talk
1
2
3
4
...
	public void writeBlogsToDB(List<Blog> blogs) 
	{
...

Java On MySQL code

by Maros, May 31, 2008 12:11

I don't really know if this...

C91e66fa9cff23cf922e1268ff538040 Talk
1
2
3
4
import java.util.Scanner;

public class AsciiSquare {
...

Java On ascii square

by Daniel Becker, May 24, 2008 14:52

I didn't run any of these t...

Ceb4aa3185c3d298282a96f9fc621fb4 Talk
1
2
3
4
import java.util.Scanner;

public class AsciiSquare {
...

Java On ascii square

by Jeremy Weiskotten, May 21, 2008 19:10

Here's a different approach...

5170ca260dbd2cdfd5a887a4dba7636f Talk
1
2
3
4
import java.util.Scanner;

public class AsciiSquare
...

Java On ascii square

by Xerothermic, May 18, 2008 18:13
Fac9eaaa078726c634ad28a3837a896f Talk
1
2
3
4
	public boolean equals(Object obj)
	{
		if (this == obj)
...

Java On Equals Method

by sdjk, May 10, 2008 10:20

The above code only works w...

Avatar Talk
1
2
3
4
public boolean equals(Object obj)
{
    return obj instanceof Bus && equals((Bus)obj);
...

Java On Equals Method

by asdasd, May 07, 2008 15:08

this is safe, but cleaner, ...

Avatar Talk
1
2
3
4
import java.util.*;
import java.io.File;
import java.util.regex.Pattern;
...

Java On Create a tree out of a coll...

by spoon!, April 14, 2008 02:30
4bd262de5d82a235eeb64f71e4058198 Talk

Java On Equals Method

by techguide, March 08, 2008 20:20

Thanks guys, exactly what I...

Bd667dc3fd7c9af2123e77bcec5d133b Talk
1
i need a code  for calendar such that it stop the server cation on holidays like sunday,2nd saturday,public holidays etc.........

Java On Parse a Calendar object fro...

by ameer basha, March 01, 2008 11:22
5b5988a1457722a90f520df05eacdb4b Talk