Coder Baba
2.41K subscribers
1.01K photos
23 videos
722 files
723 links
Everything about programming for beginners.
1 and only official telegram channel of CODERBABA India.

Content:
.NET Developer,
Programming (ASP. NET, VB. NET, C#, SQL Server),
& Projects
follow me https://linktr.ee/coderbaba
*Programming
*Coding
*Note
Download Telegram
Dev., [3/16/2021 9:45 AM]
JavaScript Engine
JavaScript engine in the browser interprets, compiles and executes JavaScript code which is in a web page. It does memory management, JIT compilation, type system etc

Dev., [3/16/2021 9:45 AM]
Advantages of JavaScript
• JavaScript is easy to learn.
• It executes on client's browser, so eliminates server side processing.
• It executes on any OS.
• JavaScript can be used with any type of web page e.g. PHP, ASP.NET, Perl etc.
• Performance of web page increases due to client side execution.
• JavaScript code can be minified to decrease loading time from server.

Dev., [3/16/2021 9:46 AM]
JavaScript Variable

A JavaScript variable is simply a name of storage location. Variable means anything that can vary. variables hold the data value and it can be changed anytime.
JavaScript uses reserved keyword var to declare a variable. A variable must have a unique name. You can assign a value to a variable using equal to (=) operator when you declare it or before using it.
var one = 1; // variable stores numeric value

var two = 'two'; // variable stores string value

var three; // declared a variable without assigning a value



Declare Variables:
var one ;
var two ;


Variable Declaration and Initialization :
Var Number= 'two';
Var age= 20 ;
Var name;
Name= ” Rahul ”;

Or
Var Name =” Rakesh”;

Dev., [3/16/2021 9:46 AM]
JavaScript Identifiers:
All JavaScript variables must be identified with unique names.
These unique names are called identifiers.
dentifiers can be short names (like x and y) or more descriptive names (age, sum, totalVolume).
1. Name must start with a letter (a to z or A to Z), underscore( _ ), or dollar( $ ) sign.
2. After first letter we can use digits (0 to 9), for example value1.
3. JavaScript variables are case sensitive, for example x and X are different variables.
4. Names are case sensitive (y and Y are different variables)
5. Reserved words (like JavaScript keywords) cannot be used as names
Example:
Correct JavaScript variables
1. var x = 10;
2. var _value="sonoo";

Incorrect JavaScript variables
1. var 123=30;
2. var *aa=320;

Dev., [3/16/2021 9:46 AM]
JavaScript local variable
A JavaScript local variable is declared inside block or function. It is accessible within the function or block only. For example:
<script>
function abc(){
var x=10;//local variable
}

</script>

Or

<script>
If(10<13){
var y=20;//JavaScript local variable
}
</script>

JavaScript global variable
A JavaScript global variable is declared outside the function or declared with window object. It can be accessed from any function.
example:
<script>
var data=200;//gloabal variable
function a(){
document.writeln(data);
}
function b(){
document.writeln(data);
}
a();//calling JavaScript function
b();
</script>

Javascript Data Types


Data type indicates characteristics of data. It tells the compiler whether the data value is numeric, alphabetic, date etc., so that it can perform the appropriate operation.

There are two types of data types in JavaScript.
1. Primitive data type
2. Non-primitive (reference) data type
What are Primitive Data Types in JavaScript?:
These are the predefined or built in types of data that are supported by the programming language by default. JavaScript mainly supports the following types of primitive data types.

• Boolean: logical entity having values as true or false.
• Numbers: Represents numeric values and can store integers and decimals.
• Strings: Represent a sequence of characters such as “Hello World.” Strings can store in single quotes or double-quotes.
• Undefined: A variable that has an unassigned value will have an undefined default value.
a variable without a value, has the value undefined. The type is also undefined
• Null: In JavaScript, null means”nothing.” It is something that doesn’t exist.
JavaScript non-primitive data types
The programming language does not predefine these data types, but instead, the programmer creates it. Additionally, the composite data types come into existence when the grouping of multiple values happens. Few of the JavaScript supported composite DataTypes are:
• Object: It is an instance of a class that accesses the data and members encapsulated in the class.
• Arrays: It is a group of similar kinds of values.

Dev., [3/27/2021 10:20 AM]
Prefix increment (++A):
If you use the ++ operator as a prefix like: ++A, the value of 'A' is incremented by 1; then it returns the New incremented value.

Example 1:
var A=2;
document.write(++A);
output:
3

-----------------------------
Postfix Increment (A++):
If you use the ++ operator as a postfix like: A++, the original value of A is returned first; then A is incremented by 1.
Example :

B=2;

doucument.write(B++);
output: 2

Note: here B++ return old value which is 2 and then after printing 2 it will increment value of B by 1

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

some examople:

Ex: 1

var a=10;
++a; increment value of a by 1
document.write(a);

document.write("<br>");
document.write(++a); //increment the value of a by 1 then display output

----------------------
output
11
12

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

ex:2

var num=5;
var result= (++num) + (++num) + (++num);
document.write(result);



------------------------
ex:3

var a=4;
document.write(++a); //increment the value of a by 1 then display output
document.write("<br>");
document.write(a++);// display output then increment the value of a by 1

output:
5
5

Dev., [4/2/2021 10:47 AM]
Question :1
What is switch statement and define its rules and explain with Example.

Ans:

A switch statement allows a variable to be tested for equality against a list of values. Each value is called a case, and the variable being switched on is checked for each switch case.

Syntax:
----------------------------------


switch(expression) {

case expression :
statement1;
break; /* optional */

case expression :
statement2;
break; /* optional */

/* you can have any number of case statements */
default : /* Optional */
statement3;
}

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

The following rules apply to a switch statement :−



1-: You can have any number of case statements within a switch. Each case is followed by the value to be compared to and a colon.

2-: The expression for a case must be the same data type as the variable in the switch.

3-: When the variable being switched on is equal to a case, the statements following that case will execute until a break statement is reached.

4-: When a break statement is reached, the switch terminates, and the flow of control jumps to the next line following the switch statement.

5-: Not every case needs to contain a break. If no break appears, the flow of control will fall through to subsequent cases until a break is reached.

6-: A switch statement can have an optional default case, which must appear at the end of the switch. The default case can be used for performing a task when none of the cases is true. No break is needed in the default case.


-----------
Example:

<script>

var grade = 'B';

switch(grade) {
case 'A' :
alert("Excellent!\n" );
break;
case 'B' :
case 'C' :
alert("Well done\n" );
break;
case 'D' :
alert("You passed\n" );
break;
case 'F' :
alert("Better try again\n" );
break;
default :
alert("Invalid grade\n" );
}

</script>
👍1
What is Operators in python:
Operators are special symbols in Python that carry out arithmetic or logical computation is called operator.


Type of Operators;
1-Arithmetic operators ( + - * / % )
2-Assignment operators ( = == += -= *= /+ )
3-Comparison operators/Relational (> < <= >= != ==)
4-Logical operators (and, or, not )
5-Identity operators (is , is not)
6-Membership operators (in, not in)
7-Bitwise operators
📚 Master ASP.NET C# Web Development: Create a Library Management System

Embark on an immersive journey into ASP.NET C# web application development with our comprehensive tutorial on building a sophisticated Library Management System. 🌐💻

In this step-by-step course, you'll delve into the intricacies of creating a robust library system from scratch. Whether you're a seasoned developer or a newcomer to programming, this course caters to all skill levels, providing clear and concise guidance at every stage of the development process.

What you'll learn:

Fundamentals of ASP.NET C#: Gain a solid understanding of ASP.NET framework and C# programming language.
Web Application Development: Learn how to develop dynamic and interactive web applications using ASP.NET.
Database Integration with SQL Server: Implement seamless database management using SQL Server for efficient data handling.
Functionalities of a Library Management System: Design and implement features such as book management, user authentication, borrowing, and more.
Best Practices in Web Development: Acquire industry-standard techniques and best practices for developing scalable web applications.
Join this course and unlock the secrets of building a sophisticated Library Management System using ASP.NET C#. Empower yourself with practical skills that are highly sought-after in the tech industry. Let's create, innovate, and bring your web development aspirations to life! 🚀📖

Enroll now and become a proficient ASP.NET C# developer! #ASPNETCSharp #WebDevelopment #LibraryManagementSystem #OnlineCourse
https://youtube.com/playlist?list=PLMoluEXvWXK7iAOcTw4AndY-ZwIOKlKZP&si=fLByRSN7gTHwAzBe
The Software Engineer s Guidebook.pdf
52 MB
📚 Title: The Software Engineer's Guidebook (2023)
C# The Ultimate Beginner's Guide.pdf
1.5 MB
C# The Beginner's Ultimate Guide
📊 Unveiling Financial Analysis: Definition, Types, Examples, and Benefits 📊

Are you intrigued by the world of financial analysis?

🤔 Let's dive into the fundamentals and explore how this critical skill can drive informed decisions and business success. 💼💰

🔍 Definition of Financial Analysis:

Financial analysis is the meticulous examination of a company's financial data to assess its performance, health, and viability.

It involves dissecting financial statements, ratios, and metrics to derive meaningful insights. 📈🔢

📈 Types of Financial Analysis:

1. Vertical Analysis:

Comparing line items within a single financial statement to understand their proportion.

2. Horizontal Analysis:

Evaluating financial data over different periods to spot trends and changes.

3. Ratio Analysis:

Calculating various ratios (e.g., liquidity, profitability) to assess a company's financial health.

4. Comparative Analysis:

Benchmarking a company's performance against competitors or industry standards.

5. Trend Analysis:

Identifying patterns and predicting future performance based on historical data.

📊 Examples of Financial Analysis:

1. Profitability Analysis:

Calculating profit margins and returns on investment to gauge a company's profitability.

2. Liquidity Analysis:

Assessing a company's ability to meet short-term obligations through ratios like the current ratio.

3. Debt Analysis:

Evaluating a company's leverage by analyzing debt-to-equity ratios and interest coverage.

4. Market Share Analysis:

Understanding a company's position in the market by examining its market share trends.

🌟 Benefits of Financial Analysis:

1. Informed Decision-Making:

Financial analysis provides insights that guide strategic decisions at all levels.

2. Risk Management:

Identifying risks early allows companies to develop effective mitigation strategies.

3. Resource Allocation:

Optimize resource allocation by understanding which areas contribute the most to profitability.

4. Investor Confidence:

Transparent financial analysis builds trust and confidence among investors.

5. Performance Improvement:

Uncover inefficiencies and areas for improvement through data-driven analysis.

Embrace the power of financial analysis to transform data into actionable insights.

📊💡 Whether you're a financial professional or an aspiring entrepreneur, mastering this skill is a game-changer.

Ready to explore this dynamic realm? Let's connect and learn together! 🚀📚

hashtag#FinancialAnalysis hashtag#DataDrivenInsights
👇👇👇👇
👩‍💻 👩‍💻 Garbage Collector. What is this and how it works
————————————————
We are continuing the previous post about managed and unmanaged resources, value and reference types and now we are about to dive into Garbage Collector.

🟢 What is it used for? 🟢
Garbage collector is used for collecting and deleting objects that are not used anymore. So there will be a free memory to use.

🟢 How does it work? 🟢
When we create objects, the objects themselves are instantiated and created in the Heap but the reference to them is stored in the Stack. When we create objects they get the their own Generation, at the instantiating they get the Generation 0. After some business logic and after completing some code blocks, the Stack gets cleared and some references to the objects in the Heap may be deleted, it means that that objects are not used anymore. When there is a need of additional memory and there is no free memory to use the Garbage Collector gets to work. It checks what objects are not used anymore, if it sees that there is no references to the specific objects in the Heap it deletes that object. If it sees that there are still objects that are used it levels up their generation by one point. There are 3 generations at all: 0, 1, 2. The higher the generation the lesser possibility that that object will not be deleted. When Garbage Collector works it checks object from the youngest generations to the oldest. But if there need of a big amount it checks the object of the oldest generations first.

🟢 Can you manage the Garbage Collection by yourself? 🟢
Yes, you can. But most of the time you will not need it as .NET manages all resources by itself. But there is still possibility of doing this via static class GC.

Its methods:
GC.Collect() - makes the garbage collection process be done. There are overloaded versions of this method like: GC.Collect(int generation) - collects garbage from the lowest generation to the user gave as parameter. GC.Collect(int generation, GCCollectionMode mode) where generation parameter is the same as in the previous method and mode is the mode that we want to garbage collection process to be done, its values are: Default (default value for this enumeration - Forced), Forced (makes the GC work immediately), Optimized - lets the GC decide if it is a good moment for making garbage collection.

GC.AddMemoryPressure() - tells CLR that there was allocating a big amount of memory and it should be considered while making garbage collection. In pair with it the method called GC.RemoveMemoryPressure() is used - it tells CLR that early allocated memory was released and it should be not considered during the garbage collection process.

GC.GetGeneration(object value) - gets the generation of object that was passed as a parameter.

GC.GetTotalMemory() - return the memory in bytes that is currently occupied the managed heap.

There are other methods that you may check on your own.
————————————————
This is how Garbage Collector works under the hood. This may be useful during the interviews and working with big amount of memory when there is need of managing resources by yourself. Always remember that it not a best practice to use it but if you need it, you are welcome. Remember to revise this topic sometimes as this question is frequently asked during the interviews on the Junior .NET Developer.