Just finished reading ch23 in the excellent 'Beautiful Code' http://oreilly.com/catalog/9780596510046
on Distributed Programming with MapReduce. I understand that MapReduce is a programming system designed for large-scale data processing problems, but I have a hard time getting my head around the basic examples given and how I might apply them in real world situations.
Can someone give a simple example of MapReduce implemented using either java, javascript or actionscript?
In java if I am looping over the keySet() of a HashMap, how do I (inside the loop), get the numerical index of that key?
Basically, as I loop through the map, I want to be able to get 0,1,2...I figure this would be cleaner than declaring an int and incrementing with each iteration.
Thanks.
I am building a web application, in Java, where i want the whole screenshot of the webpage, if i give the URL of the webpage as input.
The basic idea i have is to capture the display buffer of the rendering component..I have no idea of how to do it..
plz help..
Hi
I need a good fast, reliable (open source would be a plus) tool for Java for tracking Maintainability index and simliar code metrics to show the customer the progress of working on refactoring issues.
What would be your suggestion to apply?
How can I assign this string in a Java String?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
thanks
What is the best was to retrieve a file from a server using SFTP (as opposed to FTPS) using Java?
I'll leave the particular definition of best up to you but in my mind it should include free :)
Hi guys, i'm working on GUI in java and got stuck with move the object.
Please visit this youtube video i made a short demo for you guys to see what i was trying to do. I'm so new to the GUI thing as i've never been taught of doing GUI.
Here is the link: http://www.youtube.com/watch?v=up1LV5r-NSg
What is the correct way of knowing operating system language (locale) from java code?
I have tried
Locale.getDefault()
System.getProperties("user.language")
etc.
but they are not correct nothing actually displays the "System Locale" which is available by the command "systeminfo" in windows.
Please help.
hi , i am new to web programming in java , i want to know how to use web api such as google api ,
facebook api in my code
so i need to know how to begin and what i need to do that .
thanks
hi,
when I write a new text file in Java, I get these characters at the beginning of the file:
¨Ìt
This is the code:
public static void writeMAP(String filename, Object object) throws IOException {
ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(filename));
oos.writeObject(object);
oos.close();
}
thanks
In my web application i want to implement the OpenId just like stackoverflow.com have to login to its web-site.
In details you find while login to stackoverflow.com
So when if one choose google then it allow the uses to log in through google account.
Please tell me how to implement it in java web application in details. Is there any single api for login through different website like(yahoo,google,facebook,etc)
Thanks
Hi,
I am creating one application in java using swing.In that i have an array of String, I try to use html marquee tag to scroll all the strings one by one from top to bottom.But the marquee tag doesn't support in the panel. How can i acheive it.Can any one suggest me?
Thanks in advance
Java loads the resources as they are needed. This make my tiny small desktop application to be very slow when opening a window.
How can I do to load all the resources when starting the app? Is something related to classloaders?
Hi,
I have a Windows Server that recives mail. These mail contains only 1 single CSV file. I want my server to automatically take the attachment from any incoming mail and send to a java program locally installed. Is there anyone who can give me directions on any programs that fix this or do I need to create some kind of windows service?
Thankful for any help!
I have database with oracle number type. Could there any possible issues with using java Double when updating table with numeric column. Should i switch BigDecimal or Double is approriate type.
As I fas as I know, BigDecimal is used when arbitrary precision required, when deal with prices for example.
Consider simple API updatePrice(Double d) Should i persist double as is or BigDecimal.valueOf(d) is preferable ?
Hi, I have an ASCII String, with HTML entities, like:
à
¨
ç
I need this String to be without those entities and convert them into UTF-8 chars.
Is there any easy way, in java to do that?
Where:
Clazz.method("aà","UTF-8")
returns "aà"
or something like that?
I want to add days to a date to get a new date in Java. How to achieve it using the Calender class.
Calender dom = new GregorianCalender(d, m y);
is the instance of my date of manufacture and I want to reach to date of expiry adding some 100 days to the current date and store it in doe but unable to do that.
Any help would be appreciable.
Today I was browsing through some question on this site and I found mention of enum being used in singleton pattern and that there are some thread safety benefits to such solution.
I never used enums and I have been programing in java for more than couple a years now. And apparently they changed a lot and now they even do full blown support of OOP within them selfs.
Now why and what for should I used enum in day to day programing?
Hi all
i have created a java application which uses data from its config folder and , it also uses third party jar files those are located in lib folder, could anyone tell me how to create jar file for this project with the content stored in config file and lib folder.
i tried creating jar using eclipse export functionality. when i run this jar file, it says it can not find the third party libraries that i have used for this project and configuration file.
thanks in advance for any help
In my program I generate classes dynamically but when I try:
Class service = Class.forName("com.MyClass");
I recieve java.lang.ClassNotFoundException
If I run one more time the program (in Eclipse), then it is working.
Does anybody see the problem
Given a list of potential class names:
1. Alaska
.
.
.
50. Wyoming
Is there a tool that will create empty java class files for each with supplied parameters?
I'm thinking of something like the "New...Class" dialog in Eclipse, only on steriods. :-)
Thanks in advance,
Kyle
I'm looking for a Java ORM that works from database reflection - I need to just point it at a DB, and start being able to walk through the entire set of tables, etc.
Ideas?
The examples for JNI i've seen map Java native methods to implementation by C++ global functions. Is there a way to set the native methods implementation to be the member functions of a C++ object instead?