Tuesday, June 26, 2018

Git Gui: Move a file from the Staged Changes area back to the Unstaged Changes list

After you saved your changes, you launch the Git Gui to commit your changes to the version control system.


You click the Stage Changed button to move the files from the Unstaged Changes to the Staged Changes (Will Commit) area.


Now, you noticed that there is a file you don't want to commit to the version control system. To move it back to the Unstaged Changes area, select the file in the Staged Changes area, click on the Commit in the top menu and select Unstage From Commit.


-----------------------------------------------------------------------------------------------------------------

                        


If you have ever asked yourself these questions, this is the book for you. What is the meaning of life? Why do people suffer? What is in control of my life? Why is life the way it is? How can I stop suffering and be happy? How can I have a successful life? How can I have a life I like to have? How can I be the person I like to be? How can I be wiser and smarter? How can I have good and harmonious relations with others? Why do people meditate to achieve enlightenment? What is the true meaning of spiritual practice? Why all beings are one? Read the book free here.


Sunday, June 17, 2018

How to delete a youtube playlist

1. Login to your youtube account and click on the playlist you want to delete.


2. Click on the Edit at the bottom right of the screen.


3. Click at the menu icon appearing as three vertically-aligned dots and select Delete playlist.


4. Click the "Yes, delete it" button.


-----------------------------------------------------------------------------------------------------------------

                        


If you have ever asked yourself these questions, this is the book for you. What is the meaning of life? Why do people suffer? What is in control of my life? Why is life the way it is? How can I stop suffering and be happy? How can I have a successful life? How can I have a life I like to have? How can I be the person I like to be? How can I be wiser and smarter? How can I have good and harmonious relations with others? Why do people meditate to achieve enlightenment? What is the true meaning of spiritual practice? Why all beings are one? Read the book free here.

Thursday, June 14, 2018

[Solved] How to automatically play YouTube video repeatedly

A. Use YouTube Loop option

The simplest way is to play the YouTube video in a modern web browser, while it is playing, right-click on the video and select Loop.



If you don't see the Loop option or the above method failed to loop, you can try the methods below.

B. Redirect the video to a repeatedly playing website

1. Open the YouTube video that you want to play repeatedly


2. Change the URL from
https://www.youtube.com/watch?v=A3yCcXgbKrE
to
youtuberepeat.com/watch?v=A3yCcXgbKrE
Then
press Enter
3. It will redirect you to the website below where you can play it repeatedly


If you use the Chrome browser, you can add a repeat button to your chrome tool bar by clicking the "Add to Chrome" located at the top-right corner of this website:

https://chrome.google.com/webstore/detail/listen-on-repeat-youtube/pgjcgpbffennccofdpganblbjiglnbip?hl=en

And acknowledge the warning message. Once you open the YouTube video you want to play repeatedly, click the repeat button located right next to the address bar, shown in the picture below denoted by the red arrow, it will automatically redirect you to the repeatedly playing website.

C. Create a playlist containing only this video

1. Open your YouTube video, click the Add to button at the bottom of the video and select Create new playlist.


2. Enter a name for the playlist. choose if you want the playlist to be public or private, then click Create.
3. Open the playlist by click the icon of three stacked horizontal lines denoted by the red arrow in the picture below and select the name of playlist you have just created in step 2.


4. Click the Play all button to play the video.
5. Click the Repleat playlist icon indicated by the red arrow in the picture below to play the video repleatly.


-----------------------------------------------------------------------------------------------------------------

                        


If you have ever asked yourself these questions, this is the book for you. What is the meaning of life? Why do people suffer? What is in control of my life? Why is life the way it is? How can I stop suffering and be happy? How can I have a successful life? How can I have a life I like to have? How can I be the person I like to be? How can I be wiser and smarter? How can I have good and harmonious relations with others? Why do people meditate to achieve enlightenment? What is the true meaning of spiritual practice? Why all beings are one? Read the book free here. 

Wednesday, June 13, 2018

java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection hostname

You got the following error when you run your program

java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection
        at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:673)
        at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:715)
        at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:385)
        at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:30)
        at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:564)
        at java.sql.DriverManager.getConnection(DriverManager.java:664)
        at java.sql.DriverManager.getConnection(DriverManager.java:247)
        ...
Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection
        at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:445)
        at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:464)
        at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:594)
        at oracle.net.ns.NSProtocol.connect(NSProtocol.java:229)
        at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1360)
        at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:486)
        ... 9 more
Caused by: java.net.ConnectException: Connection refused (Connection refused)
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:589)
        at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:162)
        at oracle.net.nt.ConnOption.connect(ConnOption.java:133)
        at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:411)
        ... 14 more


Check the followings are correct:

1. the database URL
2. the database port
3. username and password are correct and granted the privilege for the operation
4. the host name is correct in the listener.ora and tnsnames.ora files. They are located at $ORACLE_HOME/netowrk/admin.
5. Check if the listener is running using the command: lsnrctl START

-----------------------------------------------------------------------------------------------------------------

                        


If you have ever asked yourself these questions, this is the book for you. What is the meaning of life? Why do people suffer? What is in control of my life? Why is life the way it is? How can I stop suffering and be happy? How can I have a successful life? How can I have a life I like to have? How can I be the person I like to be? How can I be wiser and smarter? How can I have good and harmonious relations with others? Why do people meditate to achieve enlightenment? What is the true meaning of spiritual practice? Why all beings are one? Read the book free here. 

How to start the Oracle listener and check if it is running on linux?

To start the Oracle listener:

1. Login and go to the Oracle home
   
         cd $ORACLE_HOME or cd oracle_home_directory


2. Run the command: lsnrctl START or $ORACLE_HOME/bin/lsnrctl START

$> lsnrctl STARTLSNRCTL for Linux: Version 12.1.0.2.0 - Production on 13-JUN-2018 11:02:11
Copyright (c) 1991, 2014, Oracle.  All rights reserved.
Starting /12c/app/oracle/product/12.1.0/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 12.1.0.2.0 - ProductionSystem parameter file is /12c/app/oracle/product/12.1.0/db_1/network/admin/listener.oraLog messages written to /12c/app/oracle/diag/tnslsnr/myserver_jxs/listener/alert/log.xmlListening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=196.223.1.2)(PORT=1521)))Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=196.223.1.2)(PORT=1521)))STATUS of the LISTENER------------------------Alias                     LISTENERVersion                   TNSLSNR for Linux: Version 12.1.0.2.0 - ProductionStart Date                13-JUN-2018 08:56:06Uptime                    0 days 2 hr. 11 min. 6 secTrace Level               offSecurity                  ON: Local OS AuthenticationSNMP                      OFFListener Parameter File   /12c/app/oracle/product/12.1.0/db_1/network/admin/listener.oraListener Log File         /12c/app/oracle/diag/tnslsnr/myserver_jxs/listener/alert/log.xmlListening Endpoints Summary...  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=myserver_jxs)(PORT=1521)))  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))Services Summary...Service "cs" has 1 instance(s).  Instance "cs", status UNKNOWN, has 1 handler(s) for this service...The command completed successfully

To check if the Oracle listener is running:

1. Repeat step 2 above
$> lsnrctl STARTLSNRCTL for Linux: Version 12.1.0.2.0 - Production on 13-JUN-2018 11:02:11Copyright (c) 1991, 2014, Oracle.  All rights reserved.TNS-01106: Listener using listener name LISTENER has already been started


2. Run: $ORACLE_HOME/bin/tnsping  $ORACLE_SID or tnsping  database_name
$>  tnsping  $ORACLE_SID
TNS Ping Utility for Linux: Version 12.1.0.2.0 - Production on 13-JUN-2018 10:57:52
Copyright (c) 1997, 2014, Oracle.  All rights reserved.
Used parameter files:
/12c/app/oracle/product/12.1.0/db_1/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = cs)))
OK (10 msec)

3. Run  lsnrctl STATUS
$> lsnrctl STATUS
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 13-JUN-2018 11:07:12
Copyright (c) 1991, 2014, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date                13-JUN-2018 08:56:06
Uptime                    0 days 2 hr. 11 min. 6 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /12c/app/oracle/product/12.1.0/db_1/network/admin/listener.ora
Listener Log File         /12c/app/oracle/diag/tnslsnr/myserver_jxs/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=myserver_jxs)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=myserver_jxs)(PORT=5500))(Security=(my_wallet_directory=/12c/app/oracle/admin/cs/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "cs" has 1 instance(s).
  Instance "cs", status READY, has 1 handler(s) for this service...
Service "csXDB" has 1 instance(s).
  Instance "cs", status READY, has 1 handler(s) for this service...
The command completed successfully

-----------------------------------------------------------------------------------------------------------------

                        


If you have ever asked yourself these questions, this is the book for you. What is the meaning of life? Why do people suffer? What is in control of my life? Why is life the way it is? How can I stop suffering and be happy? How can I have a successful life? How can I have a life I like to have? How can I be the person I like to be? How can I be wiser and smarter? How can I have good and harmonious relations with others? Why do people meditate to achieve enlightenment? What is the true meaning of spiritual practice? Why all beings are one? Read the book free here.