Sunday, January 29, 2023

Remove both duplicate and original value from Excel or Google sheet

=if(countif(A:A,A1)=1,0,1)


There is a zero or a one in Columns C for each value in Columns A. A zero means that a value from Columns A is not repeating in the data range and should be kept. A one means that there are duplicate values and that row should be deleted. Then filter the rows having One in column C, Select and Delete.

Saturday, January 21, 2023

How to Extend Swap Space using Swap file in Linux

dd if=/dev/zero of=/swap_file bs=1G count=1

sudo fallocate -l 1G /swap_file

chmod 600 /swap_file

mkswap /swap_file

echo "swap_file swap swap defaults 0 0" >> /etc/fstab 
or 
vi /etc/fstab/swap_file swap swap defaults 0 0

swapon /swap_file

Error binding socket to :::25, status = EADDRINUSE (Solved)

Centos 
$ yum install net-tools 

Fedora: 
$ sudo dnf install net-tools 

Debian, Ubuntu: 
$ sudo apt install net-tools

netstat -tulpn

netstat -tulpn | grep -w 2500

Result: tcp     0         0 0.0.0.0:2500             0.0.0.0:*

kill 942

Friday, January 20, 2023

Install PMTA Management Console

yum install ntp (if not installed)
=======================
Install PMTAMC
=======================

Upload pmconsole1.5r19 to path /root/PMTA/ and run below commands

cd /root/PMTA/pmconsole1.5r19

rpm -ivh PowerMTA-MC-infrastructure-1.5r19-201906071449.x86_64.rpm

rpm -ivh PowerMTA-MC-1.5r19-201906071449.x86_64.rpm

service pmtamc stop

rm -rf /opt/pmtamc/glassfish/glassfish/domains/domain1/applications/pmtamc/WEB-INF/classes/com/port25/webui/security/Lak.class

cd /root/PMTA/pmconsole1.5r19/opt/pmtamc/glassfish/domains/domain1/applications/j2ee-modules/pmtamc/WEB-INF/classes/com/port25/webui/security

cp Lak.class /opt/pmtamc/glassfish/glassfish/domains/domain1/applications/pmtamc/WEB-INF/classes/com/port25/webui/security

rm -rf /opt/pmtamc/glassfish/glassfish/wars/pmtamc.war

cd /root/PMTA/pmconsole1.5r19/opt/pmtamc/glassfish/wars

cp pmtamc.war /opt/pmtamc/glassfish/glassfish/wars

cd /root/PMTA/pmconsole1.5r19

cp license /etc/pmtamc

service pmtamc start

open ports  (8181 8282 4848 3700 7676 8686)

++++++++++++++++++++++++++++

Register PMTA in PMTAMC

++++++++++++++++++++++++++++

http://examplepmtamc.com:{PORT}/pmtamc/nodemanagement/

PowerMTA Node Registration: Accept new PowerMTAs

pmta register --label={Name} --pmtamc-port={PORT} {HOST}

example

pmta register --label=softo --webmon-port=19000 --pmtamc-port=8181 157.245.221.117

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


 

Join Multiple table with subquery

SELECT DISTINCT

    e.card_id,

    e.photo_link,

    c.full_name,

    c.mobile_no,

    c.email,

    c.image_path,

    s.institute_name,

    p.profession_name,

    p.institute_name AS company, 

    i.village_road_present,

    i.post_office_present,

    i.thana_upazila_present,

    i.district_present,

    i.blood_group

FROM EVENT

    e

JOIN(

    SELECT DISTINCT

        id,

        full_name,

        mobile_no,

        email,

        image_path

    FROM

        cualumni

    WHERE

        softdeleted = 'No'

) AS c

ON

    c.id = e.user_id

JOIN(

    SELECT DISTINCT

        user_id,

        institute_name

    FROM

        education

    WHERE

        user_id IS NOT NULL

) AS s

ON

    s.user_id = e.user_id

JOIN(

    SELECT DISTINCT

        user_id,

        profession_name,

        institute_name

    FROM

        profession

    WHERE

        user_id IS NOT NULL

) AS P

ON

    P.user_id = e.user_id

JOIN(

    SELECT DISTINCT

        *

    FROM

        personal_info

    WHERE

        user_id IS NOT NULL

) AS i

ON

    i.user_id = e.user_id

Tuesday, January 3, 2023

Get file path and set hyperlink funtion in Excel

 =CONCATENATE("file://",LEFT(CELL("filename",F2),FIND("[",CELL("filename",F2))-1),F2)

=HYPERLINK($G$2,F2)

Tuesday, December 20, 2022

Remove Autodesk software from Mac

 

Uninstall products using the Remove utility

For some products, you can run the Remove ProductName utility in the Finder > Go > Applications > Autodesk folder. The Remove utility uninstalls both the application file and residual files.

  1. Locate the Remove <product name> utility in Finder > Go > Applications > Autodesk.
  2. Double-click Remove <product name> to uninstall a product, where product name is, for example, AutoCAD or AutoCAD LT.

If the Remove utility isn’t available for your software, follow the steps in the next section.

Uninstall products manually

  1. Uninstall all Autodesk programs by right-clicking the program icon and choosing Move To Trash.
  2. Open a Finder window and navigate to the root of the local hard drive and delete the following folders:
    • /Library/Autodesk
    • /Library/Application Support/Autodesk
    • /Users/[username]/Adlm
    • /Users/[username]/Library/Application Support/Autodesk 
      Note: The Library folder is usually hidden. To show it, click the Go menu in the Finder and hold down the Option key.
    • /Users/username/.flexlmrc
    • /Library/Frameworks/Adlm.framework/
    • /Applications/Autodesk/Adlm
  3. Navigate to the folder /Library/Preferences/Flexnet Publisher/FLEXnet and delete the files with the adskflex prefix.
  4. Find and delete the folder /Library/Application Support/Flexnet Publisher
  5. Important:  Don’t delete this folder if you’re running Adobe products on your Mac. Adobe products also use FlexNet. Deleting this folder can cause problems if the Adobe products are still installed. 

How to get Ranking of the Students in Excel using RANK Function

=RANK(number,ref,[order]) To rank in descending order, we will use the formula =RANK(B2,($C$5:$C$10),0) If we want unique ranks, we can use...