Vishal Srivastav

Ranch Hand
+ Follow
since Nov 29, 2008
Vishal likes ...
Java Tomcat Server Ubuntu
Curious coder of NodeJS and Java EE. Trying hands on Neo4J, an awesome graph database. Having working knowledge of various AWS services such as EC2, S3, Beanstalk, IAM, VPC and RDS. Love coffee and finding new places to eat every time
Hyderabad
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
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by Vishal Srivastav

Jeanne Boyarsky wrote:This week, we're delighted to have Dawn & David Griffiths helping to answer questions about the new book Head First Android Development

The promotion starts Tuesday, October 10th, 2017 and will end on Friday, October 13th, 2017.

We'll be selecting four random posters in this forum to win a free copy of the book provided by the publisher, O'Reilly.


Image from Amazon

Please see the Book Promotion page to ensure your best chances at winning!

Posts in this welcome thread are not eligible for the drawing, and should be reserved for welcoming the author. Questions posted in this topic are subject to removal.




Wow, great to know that there is a head first book for android. Hope that it's as good as the Head First Java one. Congrats and welcome
3 months ago
I tried installing and setting up xuggler in ubutnu 12.04 LTS but I am not able to set up the LD_LIBRARY_PATH.

I performed all the steps provided on xuggler build website: http://www.xuggle.com/xuggler/build but all in vain.

I had setup the paths needed in /etc/environment section as follows -


and restarted the system.

I am facing problem in these areas -

In Setting up your Environment section, it has been told to set up a path known as: LD_LIBRARY_PATH=$XUGGLE_HOME/lib:$LD_LIBRARY_PATH. When I did the following: echo $XUGGLE_HOME, I am getting output as /usr/local/xuggle, but when I say echo $LD_LIBRARY_PATH, I get a blank line.

/usr/local/xuggle/lib folder actually does not exists even after successful built. Then why set the LD_LIBRARY_PATH as $XUGGLE_HOME/lib:... ?? Instead I found lib in /usr/local/xuggle/dist/stage/i686-pc-linux-gnu/usr/local/lib.

I also found on at some places that ubuntu does not takes LD_LIBRARY_PATH in /etc/environment, instead it takes it from /etc/ld.so.conf.d/. So I tried setting the above path here and then do sudo ldconfig, but again no success.

I also followed this link: http://linux.101hacks.com/unix/ldconfig/, but still not successful.

Where am I making a mistake? When I try using xuggler in my Java EE Project, I get following error:


Can anyone help me? I can provide more accurate information if needed. Thanks in advance.
5 years ago
Hi Pals,

I have cleared SCJP and SCWCD in 2009 and now I am planning to get more certification. I love to do Java certification and also focus in Java and Java EE development. But I am not able to decide for which exam I should go in EJB or Web Services or Enterprise Architect. What are the benefits separately for each the exams? Means, which is being more prevalent in present times.

Is EJB getting enough into the market?

Some of these confusions and questions are there in my mind which I am not able to figure out completely.

Can anyone of you help and put a clear picture on this?
Hi Friends,

I am creating a Java EE client where I need to make a call to a node (js) server to get the response. So I made a single class through which requests are made to node server.
Everytime I get a response, I need to send back the response code and the response itself. So I thought of creating a String array which would contain the response code and the response.

Here is my class:



But I am not convinced by creating too much string objects which would cause performance issues. So I thought of creating a Map<Integer, String> which would send back the response code and the response.



But again, creating a map with integer and checking everytime the response code creates overhead of boxing and unboxing of Integer object, which again could result in performance.



Which one should I use? Or is there any better alternative out of it?
5 years ago
Hi Friends,

I am trying to use apache shiro into my project as I have to create a role based mechanism into my project. I created a demo project with following configurations...

I created following files into my project -
index.jsp



login.jsp



success.jsp

denied.jsp

logout.jsp

showUser.jsp

My shiro.ini configuration is as follows -



I am using a servlet LoginTestServlet.java to dispatch to login.jsp page or success.jsp after authentication is successful/unsuccessful -



I am using TOMCAT 6.0.

My problem is -
1. Whenever I am trying to enter credentials at login.jsp page, its automatically taking me to the respective page for the credentials I enter. Ex., if I try to enter ROLE_MEMBER credentials after clicking for success.jsp, its taking me to success.jsp page. But if I try to enter ROLE_ADMIN after clicking for same success.jsp, its automatically taking me to secret.jsp as per the servlet code written instead of going to denied.jsp.
2. How to make a generic code without writing a separate servlet for each resource to show login success or denied page?

Also, is there any way to create custom permissions in shiro for every resource? If yes, then how. If there is any link to this, I would be grateful to you.

Thanks all.
Hi Friends,

I want to change the Incoming Call Screen and want to modify it according to my requirement. I saw other some applications doing it, even read there source code by converting there apks into source files, but all I found is that they are using some internal private API to do so.

Can anyone help me out with this??
6 years ago
My Greetings to everyone here...

I have developed a free-hand drawing application which is going to be a part of our project in our Company. I am facing an issue while trying to get an Image out of the SurfaceView I have used.

Its not like that the Image is not being written, but the Image which is written to sdcard is totally black. No drawing which was drawn onto the SurfaceView area just before saving is coming.

I have used getDrawingCache() on SurfaceView object but all in vain.

Can someone please help me out of it.

Thanks in advance.
7 years ago
I have used Linkify. Not a success till now. Got the hyperlink when used autoLink attribute in XML layout, but link is not being created when manually a type of hyperlink text is written. I am trying for it.

And I agree with the fact that it will really be annoying for the user to create this thing in EditText.

Thanks for your help. Will reply back when successful
7 years ago

Lester Burnham wrote:An EditText implies that the user is editing the text; having some words as active links at that moment would be a hindrance to editing. Think about what would happen if a user clicked a word that was an active link - how would he edit it?

Editing (using an EditText) and display (using a TextView) should be separate activities (in the non-Android sense of the word).



I agree with this. But the thing is, in the same version of application being developed on iPad, it is successfully done. Going with the same concept, even in MS Word, this is easily done. Whenever a any such text is written, it automatically changes to a hyperlink!!!

I have been trying it today but have not been able to do it. It is the requirement of the application...
7 years ago
Hi Friends,

We can use a TextView for adding hyperlinks to it by various methods, like using the attribute autoLink, or by using setMovementMethod().

Can we do the same using and EditText widget? I am trying to create a notepad, in which if any such text entered, like url, email, number or something similar, we should get a hyperlink to click on it and open the browser.

Please help.

Thanks All.
7 years ago
The problem is, even after reducing the size of the image to 1/3, the same error is coming.

When I am using the application to click the pic in LANDSCAPE mode, then no error is coming, and what I saw is automatically Image captured has size in KBs. In the sama application, when I am converting the same byte[] to write an image, that Image is at least of size 3.5+ MB.

Decreasing the size of the image to 1/3rd of original is not solving the matter.

Please help.
7 years ago
Wow!!! You might be feeling great.... Congooo....
7 years ago
Hi friends,

I am developing an application into which I had to capture an image from the camera and send that Image to a web-service for authentication in the form of byte[]. I got stuck with the camera orientation problem as the preview was coming only in landscape mode. Finally when I solved that, I found that the Image captured comes rotated anti-clockwise when clicked in Portrait mode.

So I thought to capture the image, rotate it, and reconvert it to byte[]. But finally when I am trying to convert the Image, I am getting an OutOfMemoryError, Bitmap exceeds VM budget.

Could you please help me to get out of this? How can I solve it? I have tried to free as much references as I could.

Here is the code below...


Here is the code of the method streamToBytes()...


I have attached the error message in 2 image files...

Waiting for help pals...

Thank you.

7 years ago
Guys please help. No reply till now.
7 years ago