Wednesday, November 4, 2026

Convert 1.25x speed spent hours convert into normal (1x) speed spent hours

If I run a video with 1.25x or 125% speed till 1 hour 26 minuts, then normal hours will be ?

 

1 hours 26 minuts convert into hours

Total 60 + 26 minuts = 86 minuts

Into hours 86/60 = 1.433 hours

Speed up with 1.25x or 125%

               1.43 * 1.25 = 1.78 hours

Convert into normal minuts

               1.78 * 60 = 107.25 minuts or 1 hour 47.25 minuts

Monday, October 12, 2026

When web application with sql server connection using sql client, working in visual studio but not working in localhost as in iis

Error: 

The EXECUTE permission was denied on the object 'StoredProcedureTest1', database 'testDb1', schema 'dbo'. 

ClientConnectionId:c48bf98e-e0ca-40f5-8ee9-8cd15b238d8a

Error Number:229,State:5,Class:14



"ConnectionStrings": { 

  "DefaultConnection": "Server=xyzServer;Database=testDb1;User Id=sa;Password=abcd..;Trusted_Connection=True;MultipleActiveResultSets=true;TrustServerCertificate=True;"  

}


Solution:

if sql server connection is Windows authentication then use Trusted_Connection=True

if sql server connection is SQL Server authentication then use Trusted_Connection=False

Monday, June 29, 2026

Raw Insert query in EF8 or Entity Framwork 8

 


        public async Task<object> InsertRack(Rack RackInsert)

        {

            try

            {


                sql = " insert into Rack_Mas(Rac_Code, Rac_Name, Sort, com_code,Edate,Eu_Id) output inserted.* values(";

                sql += " (select 'RAC'+convert(nvarchar(50),(isnull(max(convert(numeric(18),substring(Rac_Code,4,15))),0)+1)) from Rack_Mas)";

                sql += " ,@p0 ";

                sql += " ,@p1 ";

                sql += " ,@p2";

                sql += " ,@p3";

                sql += " ,@p4";

                sql += " )";


                var data = _context.Database.SqlQueryRaw<Rack>(sql,

                    RackInsert.Rac_Name,

                    RackInsert.Sort,

                    "COM1",

                    DateTime.UtcNow.ToString("dd-MMM-yyyy HH:mm:ss.fff"),

                    "user1"

                    ).AsEnumerable().FirstOrDefault();


                return data;

            }

            catch (Exception)

            {

                throw;

            }

        }

Monday, August 8, 2022

get and post api in node js

 //http://localhost:3009/test1?id=100

app.get("/test1", (req, res) => {

  try {

    var request = new sqlClient.Request();

    const id = req.query.id;

    if (id) {

      //request.query("select uid,edate,email from login with(nolock) where uid="+id,

      request.query(`exec temp_login @uid=`+id+`,`,

        function (err, recordset) {

          if (err) {

            console.log(err);

            res.status(400).send({ success: false, data: err });

          } else {

            res.status(200).send({

              success: true,

              data: recordset

            }); 

          }

        }

      );

    } else {

      res

        .status(400)

        .send({ success: false, data: "please send id in params" });

    }

  } catch (e) {

    res.status(400).send({ success: false, data: e });

  }

});




//Post

app.post("/test2", async (req, res) => {

  try {

    let pool = await sql.connect(config);

    var request = new sql.Request(pool);

    request.input("uid", req.body.id);

    request.output("nor", "");

    request.output("result", "");

    let e = await request.execute(`temp_login`);

    res.status(200).send({

      success: true,

      data: e,

    });

  } catch (e) {

    console.log(e);

    res.status(400).send({ success: false, data: e });

  }

});

Tuesday, May 31, 2022

Check display status in javascript

        

<script>

var sbtn = document.getElementById("closebtn");

            

            if (sbtn.style.display == "none") {

                setTimeout(closeSuccess, 3000);

            } else {

                setTimeout(closeError, 3000);

            }


</script>

Friday, May 6, 2022

Modifiers Differences in c#

 







Private Modifier :- Private member can access its own/self class.

Protected Modifier :- 1. Protected member can access its own/self class, 2.  can access with inheritance in self project/assembly, 3. can access with inheritance in another project/assembly  

Internal Modifier :- 1. Internal member can access its own/self class, 2. can access with inheritance in self project/assembly, 3. can access with an instance/object in self project, 4.


Convert 1.25x speed spent hours convert into normal (1x) speed spent hours

If I run a video with 1.25x or 125% speed till 1 hour 26 minuts, then normal hours will be ?   1 hours 26 minuts convert into hours Total 60...