Sunday, 22 June 2025

War between Iran and israel

 Today as at 8.40pm dt. 22.06.2025, America's latest fighter aeroplanes attacked on Iran's nuclear reactors on three different places. Iran also reply with drone attacks on Tel Aviv, nearly 23 Israeli killed during that attack. America warned to stop war, otherwise more attacks will be made on Iran. 

Sunday, 30 June 2024

Freelancing in Pakistan 

Freelancing in Pakistan has been growing rapidly in recent years, driven by a combination of a young, tech-savvy population and increasing internet penetration. Here's an overview of the nature of work and the share of freelancing in Pakistan:

Nature of Work

  1. IT and Software Development: A significant portion of Pakistani freelancers are involved in IT services, including software development, web development, app development, and cybersecurity.
  2. Content Writing and Digital Marketing: Content creation, SEO, social media management, and other digital marketing services are also popular fields.
  3. Graphic Design and Multimedia: Many freelancers work in graphic design, video editing, animation, and other multimedia services.
  4. Virtual Assistance and Customer Support: Offering administrative support, customer service, and other virtual assistant services is another common area.
  5. Education and Tutoring: Online tutoring and educational content creation have seen growth, especially with the rise of e-learning platforms.
  6. Financial and Legal Services: Accounting, bookkeeping, financial consulting, and legal services are also offered by freelancers.

Share of Freelancing

  • Market Size: Pakistan is among the top countries contributing to the global freelancing market. According to various reports, Pakistan is often ranked in the top 5 freelancing nations worldwide.
  • Earnings: Freelancers in Pakistan collectively earn millions of dollars annually. The country has seen a significant rise in freelance earnings, with platforms like Upwork and Fiverr being popular among Pakistani freelancers.
  • Demographics: The majority of freelancers in Pakistan are young, with a large proportion being under 30. The rise in freelancing has been driven by the youth's increasing interest in technology and online work opportunities.

Platforms and Payment

  • Popular Platforms: Upwork, Fiverr, Freelancer.com, and PeoplePerHour are some of the most popular platforms among Pakistani freelancers.
  • Payment Methods: Freelancers often use Payoneer, PayPal (via intermediaries or friends), and direct bank transfers to receive payments.

Challenges

  • Payment Processing: One of the significant challenges for Pakistani freelancers is receiving international payments, as PayPal is not available in Pakistan.
  • Internet Connectivity: Although improving, internet connectivity issues can sometimes hamper work efficiency.
  • Market Competition: The global nature of freelancing means Pakistani freelancers often compete with professionals from around the world, sometimes driving down rates.

Government and Institutional Support

  • Initiatives: The Pakistani government has initiated various programs to support freelancers, including the "DigiSkills" training program, which aims to provide digital skills to the youth.
  • Regulatory Environment: Efforts are being made to improve the regulatory environment to support freelancing and remote work.

Overall, freelancing in Pakistan is a rapidly evolving sector with significant potential for growth. The combination of a young population, increasing digital literacy, and government support suggests that the future of freelancing in Pakistan is promising.


Regards

Mustafa Dogar

Sunday, 30 April 2023

Pakistan current situation

 Pakistan is a country located in South Asia with a population of over 220 million people. In recent years, Pakistan has faced a number of significant challenges, both domestically and internationally. Here is an essay on the current scenario in Pakistan:


Pakistan is currently facing a number of economic, political, and social challenges that are impacting the country's stability and growth. One of the most pressing issues facing Pakistan is the economic situation. The country has been struggling with high inflation, a large budget deficit, and a declining currency. These economic challenges have led to increased poverty, unemployment, and inequality, which have further exacerbated the country's social and political problems.


Another major challenge facing Pakistan is political instability. Pakistan has a history of political turmoil, with frequent changes in government, allegations of corruption, and challenges to democratic processes. In recent years, there have been protests and demonstrations calling for political and social change. Additionally, the country has faced tensions with neighboring countries such as India, which have impacted regional stability and security.


In addition to these challenges, Pakistan is also grappling with social issues such as gender inequality, religious extremism, and social discrimination. Despite efforts to improve the situation, women and minorities continue to face discrimination and marginalization in many areas of society. Religious extremism and terrorism have also been a major issue in Pakistan, with violent incidents and attacks on civilians and security forces occurring with some frequency.


Despite these challenges, Pakistan has made some progress in recent years. The government has implemented reforms to address some of the economic issues, and there have been some improvements in areas such as education and health. The country has also made progress in combatting terrorism and religious extremism, with increased efforts to target terrorist groups and improve security measures.


Overall, the current scenario in Pakistan is complex and multifaceted. The country is facing a number of significant challenges, but there are also opportunities for progress and growth. Addressing these challenges will require cooperation and collaboration between government, civil society, and other stakeholders, as well as sustained efforts to address issues of inequality, discrimination, and extremism.

Friday, 10 February 2023

Pakistan going to default?

 Open sidebar


Sunday, 10 July 2022

The best car battery

There are three forms of batteries.

1. Liquid battery or hybrid battery

2. Dry battery

3. Water based batteries.

In today the best battery is dry battery having zero maintenance expenses. No need to check water daily because it consist on gel. The water based batteries are not reliable in the sense that water level should be watched daily and also some maintenance of terminals required. Dry battery can be used for years but water based batteries have only 6 months warranty. Although dry battery is costly but it has latest technology and more reliable. So I recommend dry battery. 

Wednesday, 16 June 2021

code generated by software developer

 @param numAnimals 

  @param avgFood 

 

  @return 

 

function calculateFoodOrder(numAnimals, avgFood) {

    if ((Number(numAnimals) >= 0) && (Number(avgFood) >= 0)) {

        return (numAnimals * avgFood);

    } else {

        return -1;

    }

}



 @param week

  @return 

function mostPopularDays(week) {

    if ((week == null) || (week.length==0)) return null;

    var maxTraffic = week[0].traffic; 

    for (var day of week) {

        if (day.traffic > maxTraffic) {

            maxTraffic = day.traffic;

        }

    }


    var dayArr = [];

    var i=0;

    for (var day of week) {

        if (day.traffic == maxTraffic) {

            dayArr[i++] = day.name;

        }

    }

    if (dayArr.length==1) return dayArr[0];

    return dayArr;

}



 @param names 

 @param types 

 @param breeds

  @return  

  

function createAnimalObjects(names, types, breeds) {

    if ((names==null) || (types==null) || (breeds==null)) return [];

    else if ((names.length==types.length) && (names.length==breeds.length) && (names.length!=0)) {

        var arrAnimal = [];

        for (var i=0; i<names.length; i++) {

            arrAnimal[i] = new Animal(names[i], types[i], breeds[i]);

        }

        return arrAnimal;

    } else {

        return [];

    }

}


 

 

function Weekday (name, traffic) {

    this.name = name;

    this.traffic = traffic;

}


 

function Item (name, barcode, sellingPrice, buyingPrice) {

     this.name = name;

     this.barcode = barcode;

     this.sellingPrice = sellingPrice;

     this.buyingPrice = buyingPrice;

}

  

function Animal (name, type, breed) {

    this.name = name;

     this.type = type;

     this.breed = breed;

}



 

function helloworld() {

    return 'hello world!';

}







 


var assert = require("assert");


describe('calculateFoodOrder', ()=> {

  it('calculateFoodOrder should calculate amount of food to order when inputs are positive numbers', () => {

    var test = calculateFoodOrder(10,  3);

    var expected = 30;

    assert(test === expected);

  });

  it('calculateFoodOrder should return -1 when numAnimals < 0', () => {

    var test = calculateFoodOrder(-1,  1);

    var expected = -1;

    assert(test === expected);

  });

  it('calculateFoodOrder should return -1 when numAnimals is non-numeric', () => {

    var test = calculateFoodOrder('dog',  1);

    var expected = -1;

    assert(test === expected);

  });

  it('calculateFoodOrder should return -1 when avgFood < 0', () => {

    var test = calculateFoodOrder(1,  -1);

    var expected = -1;

    assert(test === expected);

  });

  it('calculateFoodOrder should return -1 when avgFood is non-numeric', () => {

    var test = calculateFoodOrder(1,  'dog');

    var expected = -1;

    assert(test === expected);

  });

});


describe('mostPopularDays', ()=> {

  it('mostPopularDays should return day with maximal traffic when one day has most traffic', () => {

    var day1 = new Weekday("Sunday", 100);

    var day2 = new Weekday("Monday", 200);

    var day4 = new Weekday("Wednesday", 300);

    var day3 = new Weekday("Tuesday", 150);

    var week = [day1, day2, day3, day4];

    var expected = "Wednesday";

    var test = mostPopularDays(week);

    assert(test === expected);

  });

  it('mostPopularDays should return an array of days when more than one day has most popular traffic',

    () => {

      var day1 = new Weekday("Sunday", 100);

      var day2 = new Weekday("Monday", 300);

      var day4 = new Weekday("Wednesday", 300);

      var day3 = new Weekday("Tuesday", 150);

      var week = [day1, day2, day3, day4];

      var test = mostPopularDays(week);

      assert(test.length == 2);

      assert(test.indexOf("Monday") != -1);

      assert(test.indexOf("Wednesday") != -1);

       

    });

  it('mostPopularDays should return null when input array is empty',

    () => {

      var week = [];

      var test = mostPopularDays(week);

      assert(test === null);

    });

  it('mostPopularDays should return null when input array is null',

    () => {

      var test = mostPopularDays(null);

      assert(test === null);

    });

});



describe('createAnimalObjects', () => {

  it('createAnimalObjects should return an array of one animal object when each array has one value',  () => {

    var animal1 = new Animal("Lola", "Dog", "Golden Retriever");

    var test = createAnimalObjects(["Lola"], ["Dog"], ["Golden Retriever"]);

    assert(test[0].name === animal1.name);

    assert(test[0].type === animal1.type);

    assert(test[0].breed === animal1.breed);

  });

  it('createAnimalObjects should return an array of two animal objects when each array has two values',  () => {

    var animal1 = new Animal("Lola", "Dog", "Golden Retriever");

    var animal2 = new Animal("Sprinkles", "Dog", "Pitbull");

    var test = createAnimalObjects(["Lola", "Sprinkles"], ["Dog", "Dog"], ["Golden Retriever", "Pitbull"]);

    assert(test[0].name === animal1.name);

    assert(test[0].type === animal1.type);

    assert(test[0].breed === animal1.breed);

    assert(test[1].name === animal2.name);

    assert(test[1].type === animal2.type);

    assert(test[1].breed === animal2.breed);

  });

  it('createAnimalObjects should return an empty array when input array lengths are unequal',  () => {

    var animal1 = new Animal("Lola", "Dog", "Golden Retriever");

    var test = createAnimalObjects(["Lola"], ["Dog", "Dog"], ["Golden Retriever"]);

    assert(test.length === 0);

  });

  it('createAnimalObjects should return an empty array when input array lengths are 0',  () => {

    var test = createAnimalObjects([], [], []);

    assert(test.length === 0);

  });

  it('createAnimalObjects should return an empty array when first input is null',  () => {

    var test = createAnimalObjects(null, ["Dog"], ["Beagle"]);

    assert(test.length === 0);

  });

  it('createAnimalObjects should return an empty array when second input is null',  () => {

    var test = createAnimalObjects(["Snoopy"], null, ["Beagle"]);

    assert(test.length === 0);

  });

  it('createAnimalObjects should return an empty array when third input is null',  () => {

    var test = createAnimalObjects(["Snoopy"], ["Dog"], null);

    assert(test.length === 0);

  });

})

Tuesday, 15 June 2021

Coding of most popular days

(Most Popular Days of the Week)

 


  function mostPopularDays(week)

{

    this.name=name;

    this.traffic=traffic;

   var sat = new Weekday('Saturday', 33);

var sun = new Weekday('Sunday', 23);

var mon = new Weekday('Monday',NaN);

var tue = new Weekday('Tuesday', 33);

var wed = new Weekday('Wednesday', 5);

var thu = new Weekday('Thursday', 18);

var fri = new Weekday('Friday', 29);

var week = [sat , sun , mon , tue , wed , thu , fri];


  

   week.sort((a, b) => b.traffic - a.traffic); // sort by descending order

   return week

           .filter(day => day.traffic === week[0].traffic)

           .map(day => day.name);

    

    return week.filter(day=> day.NaN === week [traffic.map(day=> day.name)



    function mostPopularDays(week) {

    if (week && week.length) {

        result = [];

        maxTraffic = 0;

        for (var day of week) {

            var dayTraffic = day.traffic;

            if (dayTraffic > maxTraffic) {

                result = [day.name];

                maxTraffic = dayTraffic;

            } else if (dayTraffic == maxTraffic) {

                result.push(day.name);

            }

        }

        return (result.length > 1) ? result : result[0];

    }

    return null;

}

    

//console.log(mostPopularDays(week)); // [Saturday, Tuesday]

    

War between Iran and israel

 Today as at 8.40pm dt. 22.06.2025, America's latest fighter aeroplanes attacked on Iran's nuclear reactors on three different place...