Saturday, October 29, 2022

JavaScript Functions as JavaScript Variables

In Javascript instead of declaring and executing a function in two different steps.
for example
step 1 - 
function add(a,b){return a+b;}
step 2-
add(3,4);
result 7

Javascript provides an approach to declare and execute the function immediately. Which is known as IIFE(Immediately Invoked Function Expression)

Example:
(
function add(x,y){
alert(x+y);
})();

Introduction To Mobile And Mobile Programming.

Introduction to mobile programming.


Direct View Storage Tube (DVST).

It is a technique that 

Birthday Cake Candles Problem(Hacker Rank)

 You are in charge of the cake for a child's birthday. You have decided the cake will have one candle for each year of their total age. They will only be able to blow out the tallest of the candles. Count how many candles are tallest.

Example

The maximum height candles are  units high. There are  of them, so return .


SOLUTION:

    public static int birthdayCakeCandles(List<int> candles)
    {
       int max = candles.Max();
       int result = candles.Count(x=>x==max);
       return result;
    }

Description
  1. Find the tallest candle.
  2. Count the number of tallest candles using linq.
  3. return result.


methods available in Dapper

  Dapper is a micro ORM library for .NET and .NET Core applications that allows you to execute SQL queries and map the results to objects. D...