Microsoft Office – Theme Change Event via VSTO Add-In

Microsoft Office doesn’t have a theme change event in their VSTO API, so in order to detect the theme change, we need to monitor the registry key “UI […]

By |

AngularJS – ng-repeat and Radio Buttons

I recently had this problem where I had to select an item from a table. Nothing much, but I avoided buttons for this task and instead used a radio […]

By |

How to set forHTTPHeaderField in iOS?

Using web services is a very common part of development for any iOS developer who is building a dynamic iOS application. Sometimes you may be doing everything correct, but […]

By |

Hosting a WCF service

To be able to consume a WCF service, it needs to be hosted.

There are multiple options to host a WCF service, and all of them comes with various advantages […]

By |

WWDC’16

Q:When is WWDC?

Siri: WWDC will take place from June 13 through June 17, 2016 in San Francisco.

Yes, The next WWDC is here. Apple Worldwide Developers Conference […]

By |

HTML5 web app VS native mobile app VS hybrid mobile app

In this blog we will look into the differences between native, mobile and hybrid mobile applications.

We will start by looking into native mobile apps, which are the […]

By |

Reachability

The Reachability class can be used to check the network connectivity of an iOS device. It uses the System Configuration framework to monitor the network state of […]

By |

Material Shadows with Inkscape!

Are you into Material Design these days? Are you fighting to inherit all the technical spec defined by Google and trying to create a mock up of […]

By |

expdp as sysdba

Here is the simple command to run expdp (data pump export) as sysdba.

expdp \"/as sysdba\" parfile=exp_user.par

By |

Oracle – AWR, ASH and ADDM reports for RAC

Following are the scripts that can be executed as sysdba in order to get the AWR, ASH and ADDM reports on Oracle RAC:

SQL script for getting AWR Report on […]

By |

openstack learning resources

Interested in learning more about openstack? following are some useful learning resources on openstack.
Thank you, Tyler Britten for sharing this information.

DevStack:
http://docs.openstack.org/developer/devstack/

Fuel with Virtualbox:
https://docs.mirantis.com/openstack/fuel/fuel-6.1/virtualbox.html

TryStack
http://trystack.org/

Join the Foundation:
https://www.openstack.org/join/register/?membership-type=foundation

Build your first OpenStack App:
https://www.openstack.org/summit/vancouver-2015/summit-videos/presentation/build-and-operate-your-first-openstack-application

By |

Preventing ssh session timeout using putty

For users who use putty.exe to connect to ssh can use the following setting in Putty to keep the session live.

Putty -> Change Settings -> Connection

Oracle Database consistent backup using expdp

Use the following procedure to take the consistent backup using expdp (oracle’s datapump export utility)

Stop application activity(transactions) against database.  This will ensure you that you don’t loose any transactions […]

By |

Setting Oracle Database User Password Not to Expire

password2.svg-rect4624-891

Here are the steps to set the password not to expire for the  Oracle database user. Here we are assuming that the user has been assigned with the default profile:

SQL> alter profile default limit password_life_time unlimited;

Profile altered.

[…]

By |

Oracle Tablespace/Data File Creation Time

password2.svg-rect8407-926

Ever wondered how to find out when the oracle database tablespace or data file was created?The following data dictionary synonym […]

By |

AngularJS learning resources

Here are the links that I compiled that can be useful to others who are interested in learning AngularJS.

https://docs.angularjs.org/tutorial

https://egghead.io/articles/new-to-angularjs-start-learning-here

https://thinkster.io/angulartutorial/mean-stack-tutorial/

https://www.udemy.com/angularjs-jumpstart/?couponCode=codewithdan

http://weblogs.asp.net/dwahlin/learning-angularjs-by-example-the-customer-manager-application

http://www.toptal.com/angular-js/a-step-by-step-guide-to-your-first-angularjs-app

http://joelhooks.com/blog/2013/08/03/learn-angularjs-in-a-weekend/

By |

Unix One Liner to Search and Replace a String in Multiple Files

Below is the unix oneliner to search and replace string in all files with extension .txt:

perl -pi -e "s/<search string >/<replace string >/g" *.txt

Example to search and replace string […]

By |

Oracle Tablespace Utilization by Schema Name

Oracle tablespace utilization script.

By |

Ssh Login Password Prompt Too Slow

Recently, I experienced an issue with ssh authentication – password prompt taking too long on one of the linux servers.  After some research on internet, I found the solution […]

By |

Linux One Liner to Kill Multiple Process

Here is the linux one liner to kill multiple process using grep,awk:


ps -aef | grep < process name > |grep -v grep|awk '{print $2}' |xargs kill -9 $2

Here is […]

By |

Generating User Script from Oracle Database

generating the create user script from the data dictionary.

By |

Removing Linux Bash ShellShocker Malware

Removing Linux Malware possibly caused from Bash Shell Shocker attack.

By |

Hadoop on Android

Android and Hadoop are two technologies to talk about. These individual technologies solve many real time problems.

“How about combining them ?” is a question for people interested in future development of technology.

[…]

By |

Import data from Oracle Database to HDFS using Sqoop

Sqoop is a command-line interface application for transferring data between relational databases and Hadoop. Sqoop Helps in efficiently transferring bulk data between Hadoop and the Oracle database.

[…]

By |

Using Counters in MapReduce to Track Bad Records

The MapReduce framework provides Counters as an efficient mechanism for tracking the occurrences of global events within the map and reduces the phases of jobs. For example, a typical MapReduce job will kick off several mapper instances, one for each block of the input data, all running the same code. These instances are part of the same job, but run independent of one another. Counters allow a developer to track aggregated events from all of those separate instances. A more concrete use of Counters can be found in the MapReduce framework itself. Each MapReduce job defines several standard Counters. The output of these Counters can be found in the job details of the Job Tracker web UI.

[…]

By |

Integrate HIVE with HBase and Query using IMPALA

HBase tables can be integrated with HIVE, so that querying can be done using IMPALA. IMPALA queries are pretty fast and as easy as any standard SQL queries. We shall load transactional data into HBase table integrated with HIVE using ImportTSV method, and then query the corresponding HIVE table from IMPALA.

[…]

By |

How to Configure Replication Factor and Block Size for HDFS?

Hadoop Distributed File System (HDFS) stores files as data blocks and distributes these blocks across the entire cluster. As HDFS was designed to be fault-tolerant and to run on commodity hardware, blocks are replicated a number of times to ensure high data availability. The replication factor is a property that can be set in the HDFS configuration file that will allow you to adjust the global replication factor for the entire cluster. For each block stored in HDFS, there will be n – 1 duplicated blocks distributed across the cluster. For example, if the replication factor was set to 3 (default value in HDFS) there would be one original block and two replicas.

[…]

By |

Loading Customer Data into HBase using a PIG script

There are different ways to load data into HBase tables like:
‘put’ to manually load data records into HBase, ImportTSV and bulk load options.

Alternatively, lets try to load huge customer data file into HBase using Apache PIG.
The data set has the following fields:

[…]

By |

Using MRUnit to Develop and Test MapReduce Jobs

Conceptually, MapReduce jobs are relatively simple. In the map phase, each input record has a function applied to it, resulting in one or more key-value pairs. The reduce phase receives a group of the key-value pairs and performs some function over that group. Testing mappers and reducers should be as easy as testing any other function. A given input will result in an expected output. The complexities arise due to the distributed nature of Hadoop. Hadoop is a large framework with many moving parts. Prior to the release of MRUnit by Cloudera, even the simplest tests running in local mode would have to read from the disk and take several seconds each to set up and run.

[…]

By |

Using FileSystem API to read and write data to HDFS

Reading data from and writing data to Hadoop Distributed File System (HDFS) can be done in a lot of ways. Now let us start by using the FileSystem API to create and write to a file in HDFS, followed by an application to read a file from HDFS and write it back to the local file system.

[…]

By |

33 Frequently used HDFS shell commands

# Open a terminal window to the current working directory.
# /home/training

# 1. Print the Hadoop version
hadoop version

# 2. List the contents of the root directory in HDFS
#
hadoop fs -ls /

# 3. Report the amount of space used and
# available on currently mounted filesystem
#
hadoop fs -df hdfs:/

# 4. Count the number of directories,files and bytes under
# the paths that match the specified file pattern
#
hadoop fs -count hdfs:/

[…]

By |

Computing Moving-Average of Stocks in Hadoop HIVE

General Sense of Moving Average:

Moving Average is a widely used indicator in technical analysis that helps smooth out price action by filtering out the “noise” from random price fluctuations. A moving average (MA) is a trend-following or lagging indicator because it is based on past prices.

[…]

By |

Analyse Hadoop fsimage using the Offline Image Viewer (OIV) Tool

Hadoop fsimage  is an “Image” file and its contents cannot be read easily using normal unix file system tools like cat, more etc. At times, it is very important to read the clear text version of the fsimage which holds the meta data of the file system. You can perform NameSpace Analysis, find out health of your fsimage, and even explore the interesting usage patterns.

[…]

By |

Hadoop MapReduce Streaming Using Bash Script.

MapReduce has a feature known as Hadoop Streaming that gives the flexibility to write code in your favorite language other than Java. You can use Ruby, Perl, Python or even quickly write a MapReduce job using shell script.

[…]

By |

Demystifying MapReduce: Python MR Solution

The following Python code mapper.py will take the text file as input and tokenize it to create a set of <key, value> pairs. The key will be a number reflecting the no. of characters in each word, and the value will be the word itself.

[…]

By |

Fixing the External USB drive Error “Drive not accessible. The parameter is incorrect”

Fixing the external USB drive error "Drive not accessible. The parameter is incorrect"

By |

How to make the Namenode leave Safemode?

How to make the Namenode leave safemode?

By |

Various commands to determine the type of File System drive from Linux Terminal

The following are the various commands to ascertain the type of file system drive in Linux Operating System

#  df –T
# mount
#  cat /etc/fstab
#  fsck -N /dev/sdc1
#  sudo file -s […]

By |

Networking Bandwidth Testing

Networking bandwidth testing

By |

Networking : Whats the VLAN ID?

Networking : Whats the VLAN ID

By |

IPTables – Opening up Multiple Ports – One Liner

#—for all subnets / tcp protocol—#
#iptables -A INPUT -m state --state NEW -m tcp -p tcp -s 192.168.122.0/24 --match multiport --dports 22,25,123,53

#—for subnet – 192.168.122.0/24 / tcp protocol —#
#iptables [...]

By |

Linux – Top Ten Processes with High Memory Usage

Finding top ten process on linux with high memory usage.

By |

Fixing NTP time issue on CentOS 6

Here are the steps that I followed in order to fix the timezone sync issue on Cent OS 6 linux:

[…]

By |

Opening Port on Iptables

By default iptables is the firewall that is enabled on linux systems. It is very simple to open ports without totally disabling the iptables service. Here are simple steps:

iptables [...]

By |

Increasing SSH Timeouts

Here are the steps to increase ssh timeout at the server level on Linux OS:

These steps are performed on CentOS:

Modify the following directives by editing the sshd config file: […]

By |

AWK one liner – Getting Sum of a Column

The following AWK one liner that can be used to get sum of a column in a text file:

Here is the sample of file content:

cat file_size.txt

-rw——- 1 oracle oinstall […]

By |