Saturday, March 4, 2023

Python command not working in command prompt

In Windows 7 python start command in command prompt is
c:\>python3
but in Windows 10 python start command in command prompt is

  C:\>py
  Python 3.6.3 (v3.6.3:2c5fed8, Oct 3 2017, 17:26:49) [MSC v.1900 
  32 bit (Intel)] on win32 Type "help", "copyright", "credits" or 
  "license" for more information.
  >>> C:\>py --version Python 3.6.3
  C:\>
But in Windows 10 python3 syntax not work also not given any error. 
Django start command also uses py instead of python3.

But in Windows 11 after the installation path is not added, 
sometimes we need to add using Environment Variable in the 
User variable section.


 d:\>py manage.py runserver 
Check others answer and this answer in the stackoverflow on this link Python command not working in command prompt

Wednesday, March 1, 2023

The Tomcat 9 server cannot started because one or more of the ports are invalid

The server cannot started because one or more of the ports are invalid Only Modify the server ports "Tomcat Admin Port" default value from hyphen (-) to zero(0) it's working fine.

More Details

SQL Date Format

This query will return date and time required fields.

 SELECT ENTRY_DATE ,

  CONVERT(varchar,ENTRY_DATE,100) DateTime,

  CONVERT(varchar,ENTRY_DATE,10) Date ,

  CONVERT(varchar,ENTRY_DATE,108) Time ,

  substring(CONVERT(varchar,ENTRY_DATE,106),1,2) Day,

  substring(CONVERT(varchar,ENTRY_DATE,106),4,3) CMonth,

  substring(CONVERT(varchar,ENTRY_DATE,105),4,2) NMonth,

  substring(CONVERT(varchar,ENTRY_DATE,106),8,4) Year,

  left(right(CONVERT(varchar,ENTRY_DATE,100),7),2) Hours_12,

  substring(CONVERT(varchar,ENTRY_DATE,108),1,2) Hours_24,

  substring(CONVERT(varchar,ENTRY_DATE,108),4,2) Minutes,

  substring(CONVERT(varchar,ENTRY_DATE,108),7,2) Second,

  right(CONVERT(varchar,ENTRY_DATE,100),2) AM_PM from DCR_AUTO_INSERT_LOG

Tuesday, March 30, 2021

SQL Server Service Start Error

Workaround Problem and Solution

 1. Error: 

"The request failed or the service did not respond in a timely fashion.

    Consult the event log or other applicable error logs for details."

Script Level Upgrade for Database ‘master’ Failed Because Upgrade Step

2. Solution for this . Use command to start SQL Service

Whenever script failure issue we are using trace flag 902.

NET START MSSQL$SQLEXPRESS /T902

EXEC sys.sp_configure N'query governor cost limit', N'0'
GO
RECONFIGURE WITH OVERRIDE
GO



When restoring database it is showing below error.

'5 (Access is denied.)' error during restoring database

Check Log On As with Local System.


Wednesday, March 17, 2021

#1 Pencil Art

Pencil Art

Pencil Art

Types of pencil for drawing

  1. H(Hard)
    1. softer to hardness
    2. 9H,8H,7H,6H,5H,4H,3H,2H,H
  2. B(Black)
    1. softer to hardness
    2. B,2B,3B,4B,5B,6B,7B,8B, 9B
  3. HB(Hard Black)
    1. HB
Follow the below blog for more details regarding penchil art.

Pencils.com