Win a copy of Learning Regular Expressions this week in the General Computing forum!

sam liya

Ranch Hand
+ Follow
since Nov 25, 2008
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by sam liya

I need to know what is the difference below ween below two print statement?

1)System.out::println( mostly i saw with  foreach statement in java 1.8)
2) System.out.println
1 month ago
I added echo command in both files. Then i open new terminal it shows both echo commands. first shows the etc echo command and then shows the other echo commands. that means bashrc in the etc folder runs 1st.
4 months ago
I found that there are two kind of bashrc files in the linux folder stucture. one is located in etc/bashrc. Other one is located in Home/username/.bashrc.

1) What is the difference purpose of these two files ?
2) are both using for setting envirnment variables?
4 months ago
I have updated java in root/.bashrc file as below

So when i login as root user and type echo $JAVA_HOME it shows the java home value. But when i login as any other user it shows empty value. So that means .bashrc file related to user wise. is it true ?
4 months ago
I installed redhar server version.
when i create a user , i found that it has both .bashrc and .kshrc files under below path


that means for each user creation it will put bash shell and korn shell.what is the reason for this ?
4 months ago
thanks Henry, Campbell  and Tim. I just need to finalized below thing.
there are three file .profiles, .bash_profile  and .bashrc . As for my knowledge below is the details of these iles.

1)  .profiles          =  set system wide environmental variables. Executed only for interactive shell. read by many shells
2)  .bash_profile   =  is executed for both interactive and non-interactive shells .
3)  .bashrc           = . only for bash

i need to if we set up same envirment vriable in both .profile and .bashrc what will happen. For example as below
in .profiles    JAVA_HOME = java 1.6
in .bashrc    JAVA_HOME  = java 1.7          

so what JAVA_HOME will take when we open a ssh?

4 months ago
Thanks henry, anyway in redhat which file contain the JAVA_HOME details?
i check in the .bashrc file. it is empty. is there any other place that we can update JAVA_HOME variable?
4 months ago
I have installed redhat 6.6 server version.It default comes with openjdk. I have install java 1.8. So how to update the JAVA_HOME to 1.8 ?

I tried checking .bashrc file in the root folder, there is no JAVA_HOME setting now.

below are the details when i try to use "java -version"

java version "1.6"
OpenJDK Runtime Environment
OpenJDK 64-Bit Server VM (build xxxxxxxxx, mixed mode)
4 months ago
I have developed a Android application, when i try to run this it gives me below error.I tried to clean and buit again,but still same.

5 months ago
Yes, I have a JSON column which is not supported by default. Below is the model class for that.

6 months ago
This is yaml file DB details

6 months ago
I am unable to connect to my local Database. below is the error i am getting. i used correct username and password.

6 months ago
I found that Postgress Db has json column implemented. Why relational Db need a json column?
actually i need to get the value from each callback. for example i have a list which contain 10 items. So that means there will be 10 call backs. So each call back i need to access the list and get relevant  value. For example for the 1st iteration  i need to get 1st value of list, but when callback comes the i value of iteration may changed to different value. So how do i know 1st iteration callback comes which items to get from the list?
9 months ago
I am calling Rest API using AsyncRestTemplate inside a loop. Once callback returns i need to access main thread values. But the issue is i am calling AsyncRestTemplate inside a loop as below .

inside callback i need t oaccess list values. but issue is since this runs  inside a loop when callback comes loop may in a different iteration. So how can i access the same values when i am calling exchange methos ?
10 months ago