Steven Rodeo

Ranch Hand
+ Follow
since Mar 06, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
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 Steven Rodeo


Apologies if this question has been beaten to submission :-). I saw few online articles suggesting that the subString (method of String Class) returns a String backed by the same char[] array that the original String is built on ?.

Honestly, I was looking at the internal implementation of String (jdk7) and seems like this is not the case ?.

Thanks Much!
_SM.
7 years ago
This is going to throw a NullPointerException ?. I see this from the javadocs



  • Except that the action is performed atomically.

    Specified by: putIfAbsent in interface ConcurrentMap<K,V>

    Parameters:
    key - key with which the specified value is to be associated.
    value - value to be associated with the specified key.

    Returns:
    previous value associated with specified key, or null if there was no mapping for key.

    Throws:
    NullPointerException - if the specified key or value is null.


  • HI folks,

    Apologies, if this is trivial.

    I am implementing a cache.

    The KEY being a "String" and the VALUE being an List. I wrote this code to this effect.

    Is this function thread safe ?. For instance what happens if another thread comes by and deletes a given mapping for a key.



    Thanks Much
    -SM


    Hi Folks,

    Please let me know how to achieve this. I have a controller named BuddyController.groovy:



    Where SomeBean is a Simple Data Bean in another package :



    -- SM
    8 years ago

    Thank you soo much!. that works great.

    I have a follow up question, what's wrong with this code ?





    9 years ago

    I don't know how to do that, I tried but doesn't work for me. I mean the same button with different functionalities
    9 years ago
    Basically I have two buttons X and Y, all I want to do is, if the value is true I would like to show ButtonX / if false I want to show ButtonY

    9 years ago

    I have the following code snippet, here I am able to change the label of the button based on the Data Grid's Column value. I am unable to think of a way where I can add two completely different buttons, based on Data Grid's value. Any help will be greatly appreciated.

    _SM



    9 years ago
    Hi folks,

    I have a deployment, where I have a RestFul Web Service (war) and a Flex UI (war) on the same Tom Cat Server.

    I can access the flex UI

    http://10.10.10.10:8080/configuration-ui/

    I can also access the RestFul web service

    http://10.10.10.10:8080/restendpoint/

    So bottom line is that every thing is working fine.

    The Problem:

    When I try accessing the RestFul Web Service from the Flex UI. It says Internal Server Error. What's the issue ?. BTW, I am trying to access the RESTful web service from the Flex UI
    by using the ip. Should work right ?.

    BTW : Is it okay to deploy both the Flex UI and the RESTful Web Service wars on the same tom cat container ?.

    _SM
    9 years ago

    HI Gurus,

    We have a REST ful web service and we want to provide a Flex UI. I have been thinking of using the HTTPService, but seems like it can handle only POST and GET.

    Please advice me any alternatives / pros / cons.

    Also did any one use the http://code.google.com/p/resthttpservice/ any thoughts ?.

    Thanks a million!!
    --
    _SM
    9 years ago

    NO I mean the setting in the Semaphore constructor ( boolean true )
    Thanks a bunch for the replies. Will setting the fairness to true help in any way ?.

    Gurus,

    We are designing a consumer / producer model, where I have one producer and 9 consumers. Is there any way by using Sempahore implementation in Java 6, where I can wake up a specific thread instead of waking up the other 8 threads.

    Basically the requirement comes from the fact that the producer only has data relevant to a specific thread; waking up other threads will be a huge performance bottle neck.

    Please advice.

    -- Thanks Much
    SM.