A simple linear regression model that describes the relationship between two variables x and y can be expressed by the following equation. y= α + βx+ ε If we choose the parameters α and β in the simple linear regression model so as to minimize the sum of squares of the error term ϵ, we will have the […]
In my current project, I happen to work on Windows again (sadly). But there is no point in beating the bush, when you know you have to get the job done anyway. I preferred to embrace constraints and take it up as a challenge.I started exploring options and if you are in similar situation, you may want to follow below steps.Before I proceed, let me share my system configuration:Lenovo latest seriesRAM 8GHard Disk 120GIntel processor 64 bit Crucial part: No admin level accessVMware Player + Ubuntu did not work for meI downloaded and installed VMware Player: http://www.vmware.com/products/playerI picked up Ubuntu 14.04.2 a 64-bit OS: http://www.ubuntu.com/download/desktopThen I got error in installation: SMBus base address uninitialized - upgrade BIOS or use force_addr=0xaddrSince I had no admin level access, I give up here on VMware + UbuntuVirtualBox + Ubuntu worked for me:1. Download VirtualBox x86 version (not amd64)Installation is simple, step-by-step through wizard.2. Download Ubuntu 32-bit3. Create Virtual Machine using UbuntuI just took step-by-step, screenshot, if this helps to someone. Select 'Ubuntu-downloaded-image4. 'Install' rather than 'Try Ubuntu'Now, when setup a new Virtual Machine, Boot from the downloaded Ubuntu 32-bitSelect 'Install' option, which might take extra 10-15 mins but it's worth it. 'Try Ubuntu' will not save anything installed once you log out, I burnt my hands there :( 5. When prompted, select 'Erase data and create partition' since, it's only doing everything in VirtualBox and no harm to your system's configuration.6. Once Ubuntu is installed, you will see 4x3 screen, which is very small for development work. Let's change it.I followed: http://askubuntu.com/a/451879/398044Simply run on terminal:sudo apt-get install virtualbox-guest-dkms \virtualbox-guest-utils virtualbox-guest-x11Then in VirtualBox Settings select 'InsertGuest Addition CD image' Once this is done, restart system.7. Slowness of VirtualBox + UbuntuI noticed the Ubuntu Virtual Machine was very slow, so I enabled 3-D acceleration8. Share folder bi-directional between Windows and VirtualBox's Ubuntu systemRun below command to fix permission denied on 'shared' directory in Ubuntu:adduser xxxxxxx vboxsf 9. That's it!If you are in similar situation, give these steps a try and add more if some steps do not work here.
Deleting duplicate records is very common requirement therefore multiple options are available to delete duplicate records. However this article provides the solution to delete the duplicate records using single statement.Delete from <TABLE_NAME> where <ID> not in ( select max(<ID>) from TABLE_NAME> group by <DUPLICATE_COLUMN>) For example:Employee table EmpId EmpFullName EmpSalary EmpTitle 1 Sumit Bajaj 5000 Dev 2 Amit 10000 SDev 3 Sumit Bajaj 5000 Dev 4 Priyanka 50000 Mgr 5 Umesh 10000 SDev 6 Umesh 10000 SDev 7 Amit 10000 SDev 8 Geetika 5000 Dev where few records are duplicate and need to be removed.For this table, delete query would be Delete from Employee where EmpId not in (select max(EmpId) from Employee group by EmpFullName)After executing this query you will left with only unique records as shown below. EmpId EmpFullName EmpSalary EmpTitle 3 Sumit Bajaj 5000 Dev 4 Priyanka 50000 Mgr 6 Umesh 10000 SDev 7 Amit 10000 SDev 8 Geetika 5000 Dev Thanks for reading and hope this article helped.
While Docker containers can themselves be run as daemons, I really want my applications to run as monitored services inside (or outside) Docker. This gives me the peace of mind that if the container is running, my app would be running and it is being monitored active ...