Tuesday, February 12, 2019

Useful Yum commands

Few useful yum commands

  1. yum list installed - Gives a list of already installed packages
  2. yum history list   - Gives a list yum installs. Note that one can install multiple packages and their dependencies in a single invocation. Example, yum install docker-ce, docker-ce-cli
  3. yum history info   - Gives the details of yum invocation for each of the historical entry above.
  4. /var/log/yum.log - also contains log of yum installs
  5. yum list docker-ce --showduplicates | sort -r  - Shows all the versions that are present for docker and sorts them.

To find difference in packages between installs -

  • Before installation - 

rpm -qa --qf '%{NAME}.%{ARCH}\n' | sort > old-installed-rpms.txt

  • After installation - 

rpm -qa --qf '%{NAME}.%{ARCH}\n' | sort > new-installed-rpms.txt

  • Diff - 
diff old-installed-rpms.txt new-installed-rpms.txt | grep '^<'



Tuesday, March 22, 2016

Remote Interview Tools, Online Java Compilers & Cloud hosted IDE

Very good for Interviews (Basic stuff available for free, advanced features on purchase)
Basic Online Compilers (Free or Ad-supported)
Cloud Hosted IDE (Paid services only)

Tuesday, January 20, 2015

Modify Windows Control Panel Settings from command-line

I recently discovered that many Control Panel settings in windows can be opened from command-line. The article from Microsoft How to run Control Panel tools by typing a command explains.

Windows Command line shortcut to set Environment Variables


In order to invoke the System window and later set the Environment variables, the below command-line could be handy. It will avoid some mouse-clicks :)

C:\windows\system32>control.exe sysdm.cpl,System,3



The above command can also be saved into a bat file and placed conveniently on Windows Desktop.

Tuesday, November 4, 2014

e-Learning related websites (MOOC or similar)

Coursera
Khan Academy
Udacity
edX
Academic Earth
Duo Lingo - Learn languages
MIT Open Courseware
codecademy - coding languages
Learn Street - coding languages
Udemy - Coding, Design etc

New Think Tank - Excellent collection of video tutorials for Java, OOPS, Algorithms, UML etc

MOOC List - A collection of MOOC (Massive Open Online Course-
piazza - Learning University collaboration -
Cosmo Learning - Online Videos -
Learn Now Online - Online Videos for Developer, Manager etc (MS .Net, Java, PMP, MS Office etc)


Thursday, September 18, 2014

tar destination directory


tar by default extract's to the current directory, if that needs to be changed, it can be done by using below -

[rakesh@host2] tar zxvf source.tar -C /your/dest/dir/to/extract

Graphic display in Linux


In Oracle Linux Virtual Box VM, by default the graphic output is disabled. Login as root (su) and edit the file /etc/inittab as shown below

Subsequently from the command prompt run startx to start the graphic display.

It's possible that despite the above changes, errors like below may occur


[bea@vin2 Desktop]$ java -jar wls1036_generic.jar 
Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
Unable to instantiate GUI, defaulting to console mode.

Solution:

Login as root and copy and override the .Xauthority from root's home folder to the user's home folder. As a precaution, take a backup of the user's .Xauthority file.


You can check if the graphic display is working or not by running xclock


Monday, November 18, 2013

How to insert a text every x rows in Notepad++?

Google search brought me to How to insert a line break every 5 rows in Excel/Word/Notepad++?

Using the suggested regex from the above source, replace the number 5 with x and replace \n with any text.

For example, to insert a commit; after every 100 lines in a sql script. This would be the regex -

Find       : ((.*\s*\n\s*){100})
Replace : $1commit;\n


Excel: Copy formula to tens of thousands of rows

Check the Quickly Copy Excel Formula Down to achieve it.

Note that it only works if there is data in the adjacent column only. So if the data is on column A and formula to be copied is on column C, then it will NOT work. The formula to be copied has to be on column B.



User names and tablespace names


Select all schema user names
select username from dba_users;


Select all tablespace names
select tablespace_name from dba_tablespaces;


Create a simple tablespace
CREATE TABLESPACE POOL_TS
  DATAFILE 'pool_ts.dat'
  SIZE 20M AUTOEXTEND ON;

Sunday, November 10, 2013

Your Message Wasn’t Delivered Because Of Security Policies

Java Mail API can be used to send emails. For a mail to be sent, at the minimum the following need to present -
  • Mail Server Host and Port [Mandatory]
  • Sender email id [Optional, can be a dummy mail id]
  • Receiver email id [Mandatory]
If the mail server is Microsoft Exchange, there could be a policy that requires sender authentication. It means that sender also needs to be a valid authenticated user. If a dummy mail id is used as sender, then MS Exchange would not let the mail be delivered.

In that event, the following articles explain how that can be disabled.

Note that the above settings need to be performed on the MS Exchange Mail Server. If MS Exchange Mail server cannot be accessed, then a valid sender needs to be used!

Dual label header cell split diagonally

Simple instructions to create Split cell diagonal. The article starts with angled text; scroll down a little bit.

Microsoft Excel - How to create a combination chart of Bar & Line and Secondary axis

Official Microsoft guide to Present your data in a combination chart

By default, there is only one vertical or horizontal axis called the Primary axes. One can Add or remove a secondary axis in a chart should you require it.

Friday, November 1, 2013

Oracle append string to select query


Append in a select statement can be achieved via the || operator.

select 'Mr.' || name from employee e where e.sex = 'M'

select case when e.sex = 'M' then 'Mr.' else 'Ms.' end || name as salutation_name from employee e

Friday, May 31, 2013

Oracle XE 11gR2 installation – “OracleXEService should not be installed already”

A simple guide on how to resolve Oracle XE 11gR2 installation failure. This error occurs when you are trying to install Oracle XE after successful un-install from Windows Control Panel.

Oracle XE 11gR2 installation – “OracleXEService should not be installed already”

Just make sure that Command Prompt is started using "Run as Administrator" 

Friday, May 24, 2013

Eclipse Xquery plugin and editor

XQuery Development Tools Installation  provides simple instructions to install XQDT and Zorba Xquery adapter.

In summary, you need to add the remote site http://download.eclipse.org/webtools/incubator/repository/xquery/milestones/ and install XQDT Core Features .

If your are using Eclipse 3.8 Juno or above, Cannot Install XQDT in Eclipse Error may occur.

Cannot complete the install because one or more required items could not be found.
  Software being installed: XQuery Development Tools Feature 0.8.0.201107251305 (org.eclipse.wst.xquery.feature.feature.group 0.8.0.201107251305)
  Missing requirement: XQDT Core Plug-in 0.8.0.201107251305 (org.eclipse.wst.xquery.core 0.8.0.201107251305) requires 'bundle org.eclipse.dltk.core [3.0.0,4.0.0)' but it could not be found
  Cannot satisfy dependency:
    From: XQuery Development Tools Feature 0.8.0.201107251305 (org.eclipse.wst.xquery.feature.feature.group 0.8.0.201107251305)
To: org.eclipse.wst.xquery.core [0.8.0.201107251305]

In order to overcome this issue, as suggested in the stackoverflow answer, install DLTK 3.0.0 from Eclipse Indigo update site - http://download.eclipse.org/releases/indigo.


You can also consider installing from DLTK Downloads directly any DLTK version that is greater than or equal to 3.0.0 but less than 4.0.0.

Friday, February 10, 2012

Java ClassNotFoundException and NoClassDefFoundError

These responses http://stackoverflow.com/a/3198490/37144 and  http://stackoverflow.com/a/2213496/37144  do not have many up votes but in my opinion they are the best ones.

A very useful tool used for locating class files - JarScan. It has an online version and offline version that can be used for searching local file system. However, the online version's database isn't too big and might not auit everyone'e requirement. For that, one can visit findJar


Play Videos on HP TouchPad

Or Free media player for HP TouchPad.

Before I talk about the free option. Let me just say that by far the best media player on HP TouchPad is available at KalemSoft. It costs $4.99 at the time of this writing.

The best free alternative at the time of this writing is TouchPlayer. All the required instructions to install it are available at the same location.