Akil Kumar

Ranch Hand
+ Follow
since Jun 08, 2009
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Akil Kumar

Can someone please answer to this question? It is is urgent.

Thanks
6 years ago
Hi,

I have to create a web application in Java. A relational database will be used to store the information. A user interface will be developed which will contain 3 to 4 pages. Can this web application built using servlets , JSP, Tomcat and MySQL? Or Should I use Struts 2 framework to develop this application? Please help me understand the differences between these two route. Also can we install Struts 2 on mac OS X?

Thanks
6 years ago
If I use the map view then I need to choose the target as google API's instead of android while running the application. But for my application I need the target AVD as android. My question is how can I display map with the target set to android?

Thanks,
6 years ago
Hello,

I have a dashboard for my android application. All the activities related to the dashboard feature extend from one base activity class. I have several features within the dashboard. GPS/ Maps is one of them. If user clicks maps I would like to display map with current latitude and longitude. In order to implement map it needs to extend the MapActivity class. In this case the GPS / Maps is already extending the base activity class. Since Java does not support multiple inheritance, how should handle this case? Can anybody provide some help? Or is there any other way to use maps in the application?

Thanks,
6 years ago

James Sabre wrote:

Akil Kumar wrote:
How can I index multiple columns of variable length while reading a CSV file? Let's say I have col A, col B, col C and so on. I want to create a 2D array with col A & B then col A & C then col A & D and so on. Moreover can any of the columns contain empty cells in between? Please help me how to achieve this?



I don't see where creating a transpose matrix comes into this and don't fully understand the requirement but it seems to me you need to use the Facade pattern. Having created your 2 D array from the CSV file you then define a class along the lines of


which defines a mapping between the cols of the original and the desired and an access method to do the conversion.

It is trivial to add methods to return the number of rows and the number of columns. It is trivial to modify the getElement() method to handle non-existent rows or columns.

You then us this as


then use the access getElement() method to access the sudo matrix.





Hello,

Thank you for the response. I apologize for not being clear. I have attached the excel sheet for your reference. I still did not get the answer for my question. Forget about the transpose matrix for now. Can you explain what is a facade pattern? Why do I have to use that pattern?

Thanks,
6 years ago

Jesper de Jong wrote:Ofcourse that is possible. So, you want to write a program that does this? What code have you written yourself, and where exactly did you get stuck?



Hello,

How can I index multiple columns of variable length while reading a CSV file? Let's say I have col A, col B, col C and so on. I want to create a 2D array with col A & B then col A & C then col A & D and so on. Moreover can any of the columns contain empty cells in between? Please help me how to achieve this?

Thanks,
6 years ago
Thank you for the response. I have a spread sheet where in I have multiple columns of data. I am exporting that spread sheet to a CSV file and reading it from the client side. I want to keep the first column as is and transpose matrix the rest of the columns.

Ideally I would like to create a two dimensional array out of it and index through multiple columns for each row of data. I have attached the spread sheet also for the reference. I have the following code to read the CSV file.



6 years ago
Hello,

Is it possible to read a CSV file with multiple columns and do a transpose matrix on it?

Thanks,
6 years ago

Philip Grove wrote:Reading multiple files regardless of format is perfectly doable, you just have to make sure not to overwrite "old" data when reading new files.

Using StringTokenizer is strongly discouraged, it's a legacy class retained for compatability reasons. Look into the split() methods of String or the java.util.regex package. While regular expressions might be difficult at first, and more so in Java as they don't use the standard POSIX syntax, it's a very powerful tool.

If you want a object doing the splitting, then look at the Scanner class of the java.util package, it does support having a String as a source.



Hello,

Thanks for the reply. I have the following code to read the CSV file. Can you explain what you are saying with some code sample? Do you want loop through all files?
My delimiter in this case is space " ".

String strFile = "C:/Users/Data.csv";

BufferedReader br = new BufferedReader(new FileReader(strFile));
String strLine = "";
StringTokenizer st = null;
int lineNumber = 0;
int numbers[][] = new int[120][2];

//pretend you're looping through lines in a file here
while((strLine = br.readLine()) != null)
{
lineNumber++;

//break space separated line using " "
st = new StringTokenizer(strLine, " ");

while(st.hasMoreTokens())
{
//display echo values
int data1 = Integer.parseInt(st.nextToken());
numbers[lineNumber][0] = data1;

int data2 = Integer.parseInt(st.nextToken());
numbers[lineNumber][1] = data2;

System.out.println("Data1=" + data1 + " Data2=" + data2);

}

}
6 years ago
Hello,

I have data in a CSV (Comma separated value) file and I read that text file from the client in Java. The purpose behind this is to create a mock dataset for the client. Is it possible to read multiple CSV files and update the client with different data sets? Right now I use buffered reader and file reader to read the file and String Tokenizer to read the individual tokens within the file. Can anyone tell if the above scenario is possible? Please.

Thanks,
6 years ago
Hello,

Has anyone created a dashboard or a welcoming screen in android application? For example twitter, Facebook, ever note and many other applications has a dashboard screen. What can be the icon size for each individual icons within that screen? The android icon guidelines at the developer site does not provide any specific details for this screen.
Please give me some input.

Thanks
7 years ago
Hi all,

I have implemented a slider in android by using the seek bar component. But with seek bar there is only one thumb the user will be able to set one value at a time. So the min value will always be 0 and max value will be based on the position of the scrubber. I was set 2 values with one control like a dual thumb slider. I came across the yahoo interface library dual range slider. Can anyone give some idea on how to achieve the same in Android? Please let me know.

Thanks
7 years ago
Hi,

I want to create a graphical icon as notification in the status bar that appears at the top of the screen. After I connect to the server I need some sort of indication to the user that they are connected to the server. Is setting the notification only option for this case or any other option is available? I want the icon to appear across the various screens of the app. Can anyone share their view?

Thanks
7 years ago
Hi,

I need to create a slider control similar to the one in the link. Can anyone please guide me in defining the attributes in xml?

http://developer.att.com/developer/forward.jsp?passedItemId=5300044

How should I approach creating this custom component?

Thanks
7 years ago
Hi,

Has anyone implemented a slider control in android? I looked at the seek bar but I want the scale to change on the screen depending on the movement of slider control. Are the seek bar and slider control same? Can anyone share some ideas regarding this?

Thanks
7 years ago