String split in excel

Mar 16th, 2016

As there is no split function in excel, you can create a UDF to gain the same functionality as available in languages such as Java, PHP, etc

Create a module and add a function as below:

Function STR_SPLIT(str, sep, n) As String
Dim V() As String
V = Split(str, sep)
STR_SPLIT = V(n - 1)
End Function

 

Let’s say you have “lalitmehta.com” in A1 cell.

On A2 cell you can set it as “=STR_SPLIT(A1, ".", 1)” to get “lalitmehta”

On A3 cell you can set it as “=STR_SPLIT(A1, ".", 2)” to get “com”

Tags:

wget alternative in Windows

May 4th, 2015

In case you need to download a file from URL, something similar to wget, you can use Powershell in Windows:

Invoke-WebRequest -OutFile sample.pdf http://mywebsite.com/sample.pdf

Tags:

Windows 8.1 – PC Settings does not open

Mar 16th, 2015

In case you are using Windows 8.1 and are not able to open PC Settings, try to do the following:

Launch command prompt window and enter the following command

powershell -ExecutionPolicy Unrestricted Add-AppxPackage -DisableDevelopmentMode -Register $Env:SystemRoot\ImmersiveControlPanel\AppxManifest.xml

Tags:

‘Microsoft.ACE.OLEDB.12.0’ provider is not registered on the local machine error

Sep 18th, 2014

If you are using a 64-bit OS, please follow the steps below:

  1. Install Microsoft Access Database Engine 2010 Redistributable from here.
  2. Restart (just in case) your machine and see if that works for you.
  3. If not, you also need to install 2007 Office System Driver: Data Connectivity Components from here.
  4. Restart your machine and the error should go away.
Tags:

How to remove href value while printing webpage

Sep 2nd, 2014

This is usually caused due to Bootstrap.  Bootstrap CSS file has:

@media print {
a[href]:after {
content: " (" attr(href) ")";
}
}

Just remove it from there, or override it in your own print stylesheet:

@media print {
a[href]:after {
content: none !important;
}
}

Tags:

Shutdown/Restart windows using command-line through RDP

Jul 16th, 2014

For shutting down…

C:\Windows\System32\shutdown.exe -s -t 20 -c "Bye" -f -d p:0:0

For rebooting…

C:\Windows\System32\shutdown.exe -r -t 20 -c "Restarting" -f -d p:0:0

Tags:

Defects Severity and Defects Priority

Apr 25th, 2014

Found a very good article that explains the difference very clearly. Below is the copy for your reference

 

Defect Severity

Defect Severity signifies degree of impact the defect has on the development or operation of a component application being tested. It is the extent to which the defect can affect the software. The severity type is defined by the Software Tester based on the written test cases and functionality.

Defect Severity may range from Low to Critical

Critical – this defect is causing system failure. Nothing can proceed further. It may also be called as a show stopper

Major – highly severe defect, is causing the system to collapse, however few parts of the system are still usable, and/or there are a few workarounds for using the system in the collapsed state too

Medium – is causing some undesirable behavior, however system / feature is still usable to a high degree

Low – is more of a cosmetic issue. No serious impedance to system functionality is noted

 

Defect Priority

 

Defect priority signifies the level of urgency of fixing the bug. In other words Priority means how fast/ how soon it has to be fixed. Though priority may be initially set by the Software Tester, it is usually finalized by the Project/Product Manager

Defect Priority may range from Low to Urgent

Urgent: Must to be fixed before any other high, medium or low defect should be fixed. Must be fixed in the next build.

High: Must be fixed in any of the upcoming builds but should be included in the release.

Medium: should take precedence over low priority defects and may be fixed after the release / in the next release.

Low: Fixing can be deferred until all other priority defects are fixed. It may or may not be fixed at all.

 

Differences between Defect Severity and Defect Priority

Severity Priority
Severity is associated with standards/functionality. Priority is associated with scheduling.
Severity refers to the seriousness of the bug on the functionality of the product. Higher effect on the functionality will lead to assignment of higher severity to the bug. Priority refers to how soon the bug should be fixed.
Generally, the Quality Assurance Engineer decides the severity level. Priority to fix a bug is decided in consultation with the client/manager.

 

Examples:

Let us assume a scenario where “Login” button is labeled as “Logen”:

The priority and severity for different situations may be expressed as:-

·         For GUI testing: it is high priority and low severity

·         For UI testing: it is high priority and high severity

·         For functional testing: it is low priority and low severity

·         For cosmetic testing: it is low priority and high severity

 

Low Severity, Low Priority

Suppose an application (web) is made up of 20 pages. On one of the pages out of the 20 which is visited very infrequently, there is a sentence with a grammatical error. Now, even though it’s a mistake on this expensive website, users can understand its meaning without any difficulty. This bug may go unnoticed to the eyes of many and won’t affect any functionality or the credibility of the company.

 

Low Severity, High Priority

·         While developing a site for Pepsi, by mistake a logo sign of coke is embedded. This does not affect functionality in any way but has high priority to be fixed.

·         Any typo mistakes or glaring spelling mistakes on home page.

 

High Severity, Low Priority

·         Incase application works perfectly for 50000 sessions but beings to crash after higher number of sessions. This problem needs to be fixed but not immediately.

·         Any report generation not getting completed 100% – Means missing Title, Title Columns but having proper data enlisted. We could have this fixed in the next build but missing report columns is a High Severity defect.

 

High Severity, High Priority

·         Now assume a windows-based application, a word-processor let’s say. As you open any file to be viewed it in, it crashes. Now, you can only create new files but as you open them, the word-processor crashes. This completely eliminates the usability of that word-processor as you can’t come back and edit your work on it, and also affects one of the major functionalities of the application. Thus, it’s a severe bug and should be fixed immediately.

·         Let’s say, as soon as the user clicks login button on Gmail site, some junk data is displayed on a blank page. Users can access the gmail.com website, but are not able to login successfully and no relevant error message is displayed. This is a severe bug and needs topmost priority.

Tags:

.gitignore not ignoring files

Nov 26th, 2013

I wanted to ignore log/development.log file in my git repository and the first thing which came to my mind was to add it to .gitignore file. So I added the following to my .gitignore file

/log/*.log

This did not help. Why? After a little pondering and googling, I figured out that once a file is part of the git repository, you cannot ignore that file simply by adding to .gitignore.

Solution:

  1. Commit any/all outstanding code commits to the git repository
  2. git rm --cached log/development.log
    This removed this file (log/development.log) from the index.
  3. git add .
    Add the file to the repository
  4. git commit -m "ignore the log/development.log file"
    Commit the file

This should do the task 🙂

 

Tags:

Share Linux home directory using samba

Nov 7th, 2013

Let’s say you are logged in on your linux environment as “lalit”

Edit /etc/samba/smb.conf and add the following at the end of the file

[MyHomes]
comment = Lalit's Linux Box
path = /home/lalit
browseable = yes
guest ok = no
read only = no
create mask = 0755
directory mask = 0755

This will create a share of /home/lalit as “MyHomes”

Next, you need to create a user and assign him a password

smbpasswd -a lalit

Note: the name should match the linux user you are logging in with. In example above, I am logged in to Linux as user “lalit” and I have create a samba user also matching “lalit”

Tags:

CentOS on VirtualBox does not show eth0

Nov 1st, 2013

For some reason when I started my CentOS VirtualBox, I was unable to connect to eth0. When I tried

ifup eth0
I get “Device eth0 does not seem to be present, delaying initialization”

The fix for this issue is to do the following:

  1. Remove the kernel’s networking interface rules file so that it can be regenerated
    # rm -f /etc/udev/rules.d/70-persistent-net.rules
  2. Restart the VM
    # reboot
  3. UPDATE your interface configuration file
    # vim /etc/sysconfig/networking/devices/ifcfg-eth0
    Remove the MACADDR entry or update it to the new MACADDR for the interface (listed in this file: /etc/udev/rules.d/70-persistent-net.rules).
  4. Remove the UUID entry
  5. Save and exit the file
  6. Restart the networking service
    # service network restart
Tags: