This week's book giveaways are in the Scala and Android forums.
We're giving away four copies each of Machine Learning Systems: Designs that scale and Xamarin in Action: Creating native cross-platform mobile apps and have the authors on-line!
See this thread and this one for details.
Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!

caleb momanyi

Ranch Hand
+ Follow
since Jun 17, 2012
caleb likes ...
Firefox Browser Java Netbeans IDE
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
2
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by caleb momanyi

if I have a web application with a table user and user_images. theres a one to many relationship where a user can have many images. the images are stored in a folder on the file system and the images table in the database only stores image name, date, width and height.
a customer can select one of his many images as a profile photo.

1) how should I assign image names for easier retrieval.

2) should I store the profile photos in a different folder?

I am creating a Java EE Web Application that I intend to deploy in glassfish server
5 years ago
to scale an image without distorting its aspect ratio so that i can dispay it in a divide which has fixed height and width. But i managed to do that by not specifying the width and height in the img tag and in my css
[CODE]
myImgDiv img{
max-width: 100%;
max-height: 100%;
}
[CODE
] it works.
5 years ago
JSP
Hello ranchers I need to compare the height to the width of an img. How can i accomplish this using JSTL? Or simply how can i get the width and height of an image using JSTL?
5 years ago
JSP
this are my reasons why i don't like the new design.

1) i just like how wide the current page is making code snippets easy to view.
2) less webgraphics = faster page load => happy users
3) simplicity is what makes this site great please don't take that away from us.
5 years ago
hello guys can somebody please help me understand why dividing two BigDecimals in JSTL throws


i have checked both values and i know they are both not equal to zero.

The only thing holding me back from throwing the computer out the window is the fact that i have solved the same problem before and it had something to do with setting round_mode but i can't remember how i did it.

in my jsp this is what i have


i am sure both totalA and totalB are not null or zero
5 years ago
JSP
ok false alarm there wasn't a problem. i needed to restart the server before using json. sorry
5 years ago
JSP
hi all,
I am getting this error when i run servlet


my servlet do post method which I am invoking looks like this


why am i getting this error while i have all the imports correct and added the json-rpc-1.0.jar into the project?
5 years ago
JSP
I set comet support in http-listener through the browser administration console but on shutting down and restarting the server or running it in debug mode results in disabled comet support. how can I make this setting permanent?
5 years ago
if possible please point me to a tutorial that I can use to create my first android project
5 years ago
thank you for your response sir. my problem is how to stop it from returning the whole page.

most of the examples I am seeing only explain the client side methods of handling the the response but not so well explanation for server side.
What's up fellow ranchers. pretty rough day out in the fields for for me. I have started learning jquery and am trying to get a string from the server but when
i do alert(response) i find that the response is the whole jsp page from the server. how can i get just the string only. i have heard of JSON and if any one of you can
help me get started will be very thankful.

get method in servlet



jquery



the query above returns an int which is the price of the magazine.
what i need is to get the whole Entity Magazine.
I'm using Glassfish Server v3.1, Java EE 6 and persistence provider eclipselink
in addition to all that has been said. you should also try to use a debugger with break points in your code, you can find out what variable is null at the point of executive to throw the exception
5 years ago
JSP