Questions




Answers
1
How does Content Delivery Network works (from web dev point of view)?

I find it simple. Have a CDN edge server near the user, cache the request and when next time he asks for it, give it. But I am pretty sure what I am thinking, although correct, isn't complete and there is something missing.

My book has just included some small benefits of CDN, that's all. But that too isn't given in detail with illustrations(although it is not necessary i feel). Exam questions of mine has asked like how CDN reduces delay in received requested object for 8 marks(3hrs exam, 80 full marks).

The answer to this is literally 1 line ie the definition of CDN. and maybe 2 figures showing how it works with and without CDN. another question asked in the exam is-: how proxy CDN works, explain with example.

I am not sure how the updating of content happens.

Does only 1 proxy server gets updated or do all proxy servers get updated when 1 CDN brings a fresh copy of the web page from the origin server? It is confusing; believe me, the tutorials for this thing are advertisements for various CDNs.

...
Read More
Answers
1
AJAX request confusion

Figure i am talking about-:

https://imgur.com/a/T4viIKF

 

Confusions, "ie" means my interpretation that i am not sure if is correct or not)-:

1) user clicks invoking an event handler.

  i.e when an user event occurs, it makes a javascript call. most likely user event=function call

2) handler's code creates xmlhttprequest object

  i.e that javascript call creates xmlhttprequest in ajax engine.

3) xhr requests file from server

4) server sends the file.

5) NOW I AM CONFUSED.

the terminologies are confusing me. 

like-:

  1. a) xhr fires an event. what does that mean? and why to fire an event? Doesn’t user only fire event? Like clicking,pressing some key etc.
  2. b) you can attach handler function to event. (maybe it is trying to talk about event handler i.e if event->handlerfunction() )..I am not sure. 

handler fxn then processes the data and displays it.

...
Read More
Answers
1
Error Code: 1175 - You are using safe update mode

When I am trying to execute this query in MySQL Workbench 'DELETE FROM Job;', I am getting below error 

Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column. To disable safe mode, toggle the option in Preferences -> SQL Editor and reconnect.

So, how can I resolve this error, why I cannot Execute the simple delete query?

...
Read More
Answers
1
Extract String between two string in C#?

Hello, I want simple and easy solution to extract or get string between two strings in C#, so for example I have string "Hello World, I am .NET developer", I need output as "I am" only.

How can i do it in simple and fast way? Thanks

...
Read More
Answers
1
Missing Startup.cs in .NET 6, how to configure?

Hello, I have started using Visual Studio 2022 and Was trying to create a new ASP.NET Core (.NET 6) project, but when I tried to add new JSON settings in Startup.cs, I wasn't able to found this file? So How can i configure JSON settings or database context details in .NET 6 without startup.cs

...
Read More
Answers
1
More than one DBContext was found - EF Core

I am trying to add new migrations in ASP.NET Core 3 web-api application which has already created database and using code-first approach, so when I trying to add new migrations, after creating Class and adding it in DBContext, getting this error, as shown below

"More than one DbContext was found. Specify which one to use. Use the '-Context' parameter for PowerShell commands and the '--context' parameter for dotnet commands."

...

Read More
Answers
1
A C# code for database replication between two remote machines

I am a C# newbie, I was trying to create a desktop application for merge replication between server and client using sql server. But I don't know how to go about it. 

...
Read More
Answers
1
Visual Studio Code Intellisense (autocomplete) not working

I am trying to use Visual Studio Code instead of Visual Studio for a C# project, but Visual Studio code Intellisense (Autocomplete) suggestion is not working correctly, and doesn't show any suggestions when using Ctrl+Space, shortcut.

What can be the issues? Any suggestions, thanks.

...
Read More
Answers
2
How to convert nvarchar column to datetime in SQL Server?

Hello, I am using nvarchar column to store datetime as string, but I would like to convert this column from nvarchar into datetime in sql server. How can I do it.

Current time format is '2019-01-29 14:55:50'

...
Read More
Answers
1
Getting error "$(..).Datatable is not a function"

When I am trying to add jQuery datatable in my ASP.NET Core project I am getting below error "$(..).DataTable is not a function", here is the error image in Google Chrome console.

datatable-is-not-a-function-min

Although I have added jQuery datatable reference in my code.

...
Read More

Page 1 of 51