Thursday, June 20, 2024

How to Rename a Solution and Project in Visual Studio

Renaming the Solution:

1. Close the Solution in Visual Studio

— Before making changes, ensure that the solution is closed in Visual Studio.

2. Rename in File Explorer

— Navigate to your solution directory.

— Locate the `.sln` file and rename it to your desired name.

— Tip: If there are solution user options (`.suo`) file, consider deleting it or renaming it to match the new solution name. Don’t worry; it will be regenerated.

3. Reopen in Visual Studio

— Launch Visual Studio and open the renamed solution file.

Renaming the Project:

1. Rename in Solution Explorer

— Right-click on the project you wish to rename.

— Select “Rename” and type in the new name.

2. Update the Default Namespace (Optional)

— With the project highlighted, open the Properties window (hit `F4`).

— Adjust the “Default Namespace” if you want your new items to adopt this namespace.

3. Rename Project File and Directory in File Explorer

— Go to the directory containing your project.

— Rename the project file (`.csproj` for C# projects).

— Consider renaming the directory of the project to keep things consistent.

4. Re-link the Renamed Project in Visual Studio

— Your project might now be “unavailable” since its path has changed.

— Remove the unavailable project by right-clicking and selecting “Remove”.

— Add it back by right-clicking on the solution (or relevant folder) > “Add” > “Existing Project”. Find your renamed project file and add it.

5. Update Namespaces in Code (Optional)

— To change the namespace in your code:

— Right-click on the project in Solution Explorer.

— Choose “Refactor” > “Rename” to rename the namespace across files.

— Note: Always review the changes and test your project after such a refactor.

6. Rebuild and Test

— After the renaming process, rebuild the solution to ensure everything compiles and runs as expected.

Final Thoughts:

Renaming might seem like a simple task, but it’s essential to follow the steps accurately, especially if you’re using source control. Always commit your changes before renaming to ensure a clean history and easy tracking. Happy coding!

Friday, January 19, 2024

Recursion using CTE in SQL Server

USE [tempdb]

GO

      -- Creating Employee details table

        IF EXISTS(SELECT * FROM SysObjects WHERE name = 'EmpDetails' AND xtype = 'U')

BEGIN

       DROP TABLE [EmpDetails]

END

GO

       CREATE TABLE [EmpDetails]

              (EmpID VARCHAR (10),

               EmpName VARCHAR (20),

               ManagerID VARCHAR(10),

               PRIMARY KEY (EmpID))

GO

       INSERT INTO [EmpDetails] VALUES ('100','ARKA GUPTTA',NULL)

       INSERT INTO [EmpDetails] VALUES ('101','SAIKAT','100')

       INSERT INTO [EmpDetails] VALUES ('102','DEBRAJ','100')

       INSERT INTO [EmpDetails] VALUES ('103','ANIRBAN','100')

       INSERT INTO [EmpDetails] VALUES ('104','SUMAN','101')

       INSERT INTO [EmpDetails] VALUES ('105','SUPRIYO','102')

       INSERT INTO [EmpDetails] VALUES ('106','AMLAN','102')

       INSERT INTO [EmpDetails] VALUES ('107','UTPAL','102')

       INSERT INTO [EmpDetails] VALUES ('108','PONCHU','105')

       INSERT INTO [EmpDetails] VALUES ('109','DEBABRATA','105')

       INSERT INTO [EmpDetails] VALUES ('110','BITTU','107')

GO

       SELECT * FROM [EmpDetails]

GO

       -- Excute the below query to find the Manager of each Employee using Recursive CTE.

WITH

       cteReports (EmpID, EmpName, ManagerID, OrganizationLevel)

AS

(     

       -- Anchor Query

       SELECT A.EmpID, A.EmpName, A.ManagerID, 1

       FROM   dbo.[EmpDetails] A

       WHERE  A.ManagerID IS NULL

        --     Seperator

       UNION ALL

        -- Recursive Query  

       SELECT A.EmpID, A.EmpName, A.ManagerID, R.OrganizationLevel + 1

       FROM   dbo.[EmpDetails] A

              INNER JOIN cteReports R

              ON A.ManagerID = R.EmpID

)

       SELECT EmpID, EmpName, ManagerID,

              (SELECT EmpName FROM [EmpDetails] WHERE EmpID = cteReports.ManagerID) 'ManagerName', OrganizationLevel

       FROM   cteReports

              ORDER BY OrganizationLevel, ManagerID


Friday, September 22, 2023

DRIVER CONDUCTOR 81 COMBINATIONS

D-C 1 2 3 4 5 6 7 8 9
1

★ ★ ★ ★

Fortunes favrourite

★ ★ ★ ★

Best for Navy ( 2 – Representing water , Moon)

★ ★ ★ ½

Best for Occult

★ ★ ★

Politics ( 1 – Sun {King} & 4 - Rahu)

★ ★ ★ ★

Banking & Finance

★ ★ ★ ½

Luxury / Glamour

★ ★ ★

Best for Occult / Education / Research

( ? )

Struggle / Marriage / Police / Politics

★ ★ ★ ★★

Super Successful
Number

2

★ ★ ★ ½

Successful

★ ★

Best for water related work / Navy / Sweets / Colddrink

★ ★ ½

Occult education / Healer / Teacher

★ ½

Struggle / Depression

★ ★ ★

Best for Property / Real state / Finance M.B.A / Banking

★ ★ ½

Best for Sweets ( 2 – Water {Moon} - 6 – Celebration {Venus})

★ ★ ½

Teaching / Occult

( ? )

Struggle / Health issue

Marriage problem

3

★ ★ ★ ½

Occult / Education / Healer / Doctor / Administrative job

★ ★ ½

Water related work / Navy work

★ ★ ★

Best for education / Occult

★ ★

Good for Sales & Marketing

★ ★ ★

Excellent communication, Anchoring, News, Reading, Acting, Teaching, Banking

( ? )

Struggle / Health & Marriage issues

★ ★ ★ ★

Best for education / Occult / Healing and teaching

★ ★

Lawyer, Printing, Sales

★ ★ ★ ★

Education / Occult / Army / Administrative / Doctor

4

★ ★ ★ ½

Politics

★ ★

Depression / Struggle

★ ★ ½

Sales & Marketing / Occult education

★ ½

Best for Law / Struggle

★ ★ ★

Banking / Event managment

★ ★ ★

Media / luxury / Glamour

★ ★ ★ ★

Successful / Best in Occult

Struggle excellent for Law

Struggle / Health / Probems / Surgeries / Accidents

5

★ ★ ★ ★

Successful / Finance / Loan / Property (Balanced Life)

★ ★ ★ ½

Property

★ ★ ★

Communication / Occult

★ ★ ★

Overall successful / Sales & Marketing

★ ★ ★★

Very Successful , Romantic { Note: May Be Lazy }

★ ★ ★ ★ ½

Life is successful

★ ★ ★

Occult & Banking

★ ★ ★

Property

★ ★ ★

Successful

6

★ ★ ★ ½

Media / luxury / Glamour

★ ★

Sweet shop

( - ) ?

Health & Marriage issues.

★ ★ ★

Successful / Media

★ ★ ★ ★ ½

Super Successful

★ ★ ★ ★

Super Succesful in media / Film industry / Tour & Travel

★ ★ ★ ½

Successful, Sports, Romatic

★ ★ ★

Best for Law

★ ★ ★

Successful but Marriage problem. Scandles , Controversies.

7

★ ★ ★

Best in occult

★ ★

Intuitive / Occult

★ ★ ★

Teaching / Healing / Occult

★ ★ ★

Succesful

★ ★ ★

Occult

★ ★ ★ ★

Sports

Disappointment in life / Marriage life in danger

Occult

Teaching / Occult

8

( ? )

Marriage problem & Struggle

( ? )

Health issue / Struggle

★ ★

Law / Printing

Best Law, Sales & marketing, But struggle in life.

★ ★ ★

Real state , Property

★ ★ ★

Best for law

★ ★

Occult

Struggle but good in Sports

Army (Satrun represents physical efforts)

9

★ ★ ★ ★

Successful, Army is best

Struggle , Marriage Problem

★ ★ ½

Occult / Healing

★ ½

Struggle , Surgeries, Health issues

★ ★ ★

Successful

★ ★

Scandles / Controversies

Occult / Teaching

★ ★

Army / Police

(?)

Marriage problem

Friday, May 7, 2021

COMPATIBILITY OF NUMBERS

 

PLANET ALISE FRIENDS NON-FRIENDS NEUTRAL

1

SUN

(SURYA)

KING

9, 2, 5(A)

3, 6, 1(B)

8 –Saturn being Illegitimate child of SUN 4, 7

2

MOON

(CHANDR)

QUEEN

1, 5, 3 (A)

2 (B)

8, 4, 9 7, 6

3

JUPITER

(GURU)

DEV GURU

1, 5, 3, 2

7* (from knowledge perspective)

6

4, 8, 9

7* (from monetary success perspective)

4

URANUS

(RAHU)

ROBINHOOD

7, 1, 5, 6

4*, 8* (for temporary ralationship)

9, 2 

4*, 8* (for permanent ralationship)

3

5

MERCURY

(BUDH)

PRINCE

1, 2, 6(A)

3, 5 (B)

------------ 8, 7, 4, 9

6

VENUS

(SHUKAR)

GURU OF DEVIL'S 1, 7, 5, 6 3 8, 9, 2, 4

7

NEPTUNE

(KETU)

SHADOW 4 , 6 , 1 , 3, 5 ------------ 8, 9, 2, 7

8

SATURN

(SHANI)

JUDGE

5, 3, 6, 7

4*, 8* (for temporary ralationship)

1, 2

4*, 8* (for permanent ralationship)

9

9

MARS

(MANGAL)

COMMANDER 1, 5, 3 4, 2

9, 7

6, 8