Sign Up

welcome

Already have an account? Sign In

Sign In

welcome

Sign Up
Login with Google

Don't have account, Sign Up Here
Sign In Sign Up

letsrectify

letsrectify
  • Home
  • About Us
  • Contact Us
  • Jobs
Ask a Question
  • My Questions

Latest Questions

Jaskaran Singh
Asked: 01-04-22

How to cleanup useEffect hook in react.js ?

  • 4

Cleanup UseEffect Hook

 

useEffect( () => {

   //Api function Calling

   let unAmounted = false;

   if (!unAmounted) {

      getOrderCategory();

    }    

       //Hook Clean Up    

       return () => {      

             unAmounted = true;

       };

  }, []);

Latest Questions

Jaskaran Singh
Asked: 01-04-22

How calculate Sum (Total) of DataTables Column using Footer Callback ?

  • 2

Through the use of the header and footer callback manipulation functions provided by DataTables (headerCallback and footerCallback), it is possible to perform some powerful and useful data manipulation functions, such as summarising data in the table.

The example below shows a footer callback being used to total the data for a column (both the visible and the hidden data) using the column().data() API method and column().footer() for writing the value into the footer.

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

$(document).ready(function() {

    $('#example').DataTable( {

        "footerCallback": function ( row, data, start, end, display ) {

            var api = this.api();

            // Remove the formatting to get integer data for summation

            var intVal = function ( i ) {

                return typeof i === 'string' ?

                    i.replace(/[\$,]/g, '')*1 :

                    typeof i === 'number' ?

                        i : 0;

            };

            // Total over all pages

            total = api

                .column( 4 )

                .data()

                .reduce( function (a, b) {

                    return intVal(a) + intVal(b);

                }, 0 );

            // Total over this page

            pageTotal = api

                .column( 4, { page: 'current'} )

                .data()

                .reduce( function (a, b) {

                    return intVal(a) + intVal(b);

                }, 0 );

            // Update footer

            $( api.column( 4 ).footer() ).html(

                '$'+pageTotal +' ( $'+ total +' total)'

            );

        }

    } );

} );

Latest Questions

Jaskaran Singh
Asked: 02-04-22

How to assure password quality in php ?

  • 3

Try following script ➡️➡

      $errors = array();

      if (strlen($pass) < 8 || strlen($pass) > 16) {

          $errors[] = "Password should be min 8 characters and max 16 characters";

      }

      if (!preg_match("/\d/", $pass)) {

          $errors[] = "Password should contain at least one digit";

      }

      if (!preg_match("/[A-Z]/", $pass)) {

          $errors[] = "Password should contain at least one Capital Letter";

      }

      if (!preg_match("/[a-z]/", $pass)) {

          $errors[] = "Password should contain at least one small Letter";

      }

      if (!preg_match("/\W/", $pass)) {

          $errors[] = "Password should contain at least one special character";

      }

      if (preg_match("/\s/", $pass)) {

          $errors[] = "Password should not contain any white space";

      }


 

      if ($errors) {

          foreach ($errors as $error) {

              echo "<div class='alert alert-danger'>".$error."</div>";

          }

        $error = 1;

      } else {

        $error = 0;

      }

Latest Questions

Jaskaran Singh
Asked: 05-04-22

How maintain code and make it clean and efficient as a developer ?

  • 3

5 Ways to Keep Your Code Clean and Efficient as a Developer

As a developer, it is important to keep your code clean and organized. This will help make your code more efficient and easier to read and understand. In this blog post, we will discuss five ways that you can keep your code clean and organized. We will also provide some tips on how to stay productive while coding!

 

COMMENTS

One way to keep your code clean is by using comments. Comments are a great way to add clarity to your code and to make sure that you and others can understand what your code is doing. When adding comments, be sure to add them in a clear and concise manner.

INDENTATION

Another way to keep your code clean is by using proper indentation. Indentation helps to make your code more readable and easier to understand. Be sure to use consistent indentation throughout your code.

NAMING CONVENTIONS

Another way to keep your code clean is by using proper naming conventions. When naming classes, variables, and methods, be sure to use clear and descriptive names. This will help make your code more readable and easier to understand. If you have a class as “fb”, and months down the line you are reviewing your code, it’ll be very difficult to figure out what “fb” is for. especially if you have 20,000 lines of code. A better solution would be, “footer-bottom”.

LANGUAGE CONSISTENCY

Using proper coding conventions is also important to keep your code clean. When coding, be sure to follow the conventions that are set forth by the programming language that you are using. This will help make your code more consistent and easier to read.

GROUPING

Finally, it is important to keep your code well organized. When organizing your code, be sure to group similar classes and methods together. This will help make your code more readable and easier to navigate.

By following these tips, you can help keep your code clean, organized, and efficient. So take some time to review your code and make sure that it is up to par! You will be glad that you did!

What other tips do you have for keeping your code clean and efficient? Share them with me in the comments below!

Happy coding! 🙂

Latest Questions

Jaskaran Singh
Asked: 14-06-22

Any tips for programmers ?

  • 4

24 tips for beginner programmers

  • Be patient. you won’t learn quickly. it will take time.
  • Listen to all the advice, but don’t follow all the advice
  • Try to ignore too much enthusiasm (hype) and too much negativity as well (e.g. “PHP is shit” - not true)
  • When doing tutorials, type the code. Don’t do copy/paste. Subtle but big difference. The code will be yours
  • You learn by doing, not by watching other people do. Find a problem, even a simple one. Use code to create a solution. Create tons of little websites/apps.
  • Start by understanding the problem. Once you understand the problem, coding is the easy part.
  • Simple is better than overly complex. Don’t write code for a future that might never exist. Simple code working now is better than complex code that might work for a future scenario. Don’t be afraid that it looks too simple and not enough “engineered”
  • Work on little projects that are interesting to you. Work on lots of projects. Quantity and spending tons of hours exposing yourself to different things is brute-forcing learning
  • Find a way to stay consistent. For example every day at 6AM you spend 1 hour learning programming. Make it a habit.
  • Don’t wait until you check all the boxes in a job ad to apply. You never know. Also, make tons of applications because you might not find the best company for you right at the first try.
  • Skills apply across different programming languages
  • You never finish learning. you have to always stay up to date to avoid becoming obsolete
  • Learn from different sources
  • Don’t focus too much on tools
  • Don’t think you need a degree and that you won’t become a developer without a degree.
  • Everyone makes mistakes. Mistakes are part of the learning process.
  • It’s ok to use Google for every little problem you have, searching for a solution. Programmers share every problem and solution online, and if they didn’t, everyone would be challenged by the same issues. Instead, they share the solutions so you can go on with your day
  • Motivation and curiosity are the best tools in your arsenal
  • Find a community. It’s more fun with peers.
  • We have many different languages. Different people like different languages. Also, different languages let you do different things. If Python does not stick into your head, maybe JavaScript will. And vice-versa.
  • When recreating projects you see on YouTube or in a course, always try to add your own unique spin and features to it. Make it your own. This can be a project you then use as portfolio and show to prospective employers.
  • Practice using a rubber duck. Get a plastic duck or perhaps your cat or anything near your desk. When you hit a problem, explain the problem to the duck. Many times the problem resolves itself.
  • Walks or showers work wonders to fix problems. And sleep.
  • Have fun!

Latest Questions

Jaskaran Singh
Asked: 10-09-23

How can I become an AI developer?

  • 14

To become an AI developer, you can follow the roadmap below:

 

1. Master programming languages: Start by learning programming languages commonly used in AI development, such as Python and R. These languages have extensive libraries and frameworks for AI and machine learning.

 

2. Understand mathematics and statistics: Gain a solid understanding of mathematics and statistics, as they form the foundation of AI algorithms. Topics like linear algebra, calculus, probability, and statistics are essential.

 

3. Learn machine learning: Familiarize yourself with machine learning concepts and algorithms. Understand supervised and unsupervised learning, regression, classification, clustering, and neural networks.

 

4. Explore deep learning: Deep learning is a subset of machine learning that focuses on neural networks. Learn about convolutional neural networks (CNNs), recurrent neural networks (RNNs), and deep learning frameworks like TensorFlow and PyTorch.

 

5. *Study natural language processing (NLP)*: NLP is a branch of AI that deals with the interaction between computers and human language. Learn about techniques like sentiment analysis, text classification, and language generation.

 

6. Gain experience with data handling and preprocessing: Data is crucial in AI development. Learn how to collect, clean, preprocess, and analyze data. Understand data visualization techniques to gain insights from data.

 

7. Work on projects: Apply your knowledge by working on AI projects. Start with small projects and gradually tackle more complex ones. Building projects will help you gain practical experience and showcase your skills.

 

8. Stay updated: AI is a rapidly evolving field. Stay updated with the latest research papers, industry trends, and advancements in AI technologies. Participate in online communities, attend conferences, and follow AI experts and organizations.

 

9. Collaborate and network: Connect with other AI developers and professionals. Collaborate on projects, join AI communities, and participate in hackathons or competitions. Networking can provide valuable learning opportunities and career prospects.

 

10. Continuously learn and improve: AI is a field that requires continuous learning and adaptation. Stay curious, explore new techniques, and keep refining your skills. Embrace a growth mindset and be open to learning from failures and successes.

 

Remember, becoming an AI developer is a journey that requires dedication, practice, and continuous learning. The roadmap provided here is a starting point, and you can tailor it based on your interests and goals. Good luck on your path to becoming an AI developer!

 

📚 Sources

- AI Expert Roadmap 
• https://i.am.ai/roadmap/

- A Clear roadmap to complete learning AI/ML by the end of 2022 ... 
• https://www.reddit.com/r/learnmachinelearning/comments/qlpcl8/a_clear_roadmap_to_complete_learning_aiml_by_the/

- Roadmap to Become an AI Engineer - DataFlair 
• https://data-flair.training/blogs/how-to-become-ai-engineer/

Latest Questions

Jaskaran Singh
Asked: 10-09-23

What does the future hold for the scope of blockchain technology?

Latest Questions

Jaskaran Singh
Asked: 10-09-23

What is the outlook for the development of AI in the future?

Latest Questions

Jaskaran Singh
Asked: 10-09-23

What are the key applications of artificial intelligence (AI) in healthcare?

Latest Questions

Jaskaran Singh
Asked: 10-09-23

How does machine learning differ from traditional programming, and why is it significant in AI development?

Latest Questions

Jaskaran Singh
Asked: 10-09-23

Can you explain the concept of natural language processing (NLP) and its real-world applications?

Latest Questions

Jaskaran Singh
Asked: 10-09-23

What ethical considerations should be taken into account when developing AI systems?

Latest Questions

Jaskaran Singh
Asked: 10-09-23

How can AI be used to enhance customer service and user experience in e-commerce?

Latest Questions

Jaskaran Singh
Asked: 10-09-23

What is reinforcement learning, and how is it used in AI, particularly in robotics?

Latest Questions

Jaskaran Singh
Asked: 10-09-23

What are the potential risks and benefits of autonomous vehicles powered by AI?

Latest Questions

Jaskaran Singh
Asked: 10-09-23

How is AI contributing to the field of finance, including algorithmic trading and fraud detection?

Latest Questions

Jaskaran Singh
Asked: 10-09-23

Can anyone explain the concept of neural networks and their role in deep learning?

Latest Questions

Jaskaran Singh
Asked: 10-09-23

What are the challenges in achieving artificial general intelligence (AGI), and what impact would it have on society?

Latest Questions

Jaskaran Singh
Asked: 10-09-23

How does blockchain technology ensure the security and integrity of digital transactions?

Latest Questions

Jaskaran Singh
Asked: 10-09-23

What are the primary differences between public and private blockchains, and when would you use each?

Latest Questions

Jaskaran Singh
Asked: 10-09-23

How is blockchain being applied in the food industry to improve traceability and safety?

Latest Questions

Jaskaran Singh
Asked: 10-09-23

What are some challenges and obstacles facing the widespread adoption of blockchain in supply chain management?

Latest Questions

Jaskaran Singh
Asked: 10-09-23

How does blockchain enhance data privacy and control in digital identity solutions?

Latest Questions

Jaskaran Singh
Asked: 10-09-23

What are some emerging trends and use cases for blockchain outside of cryptocurrencies?

letsrectify

Categories

  • Technology
  • Food
  • Health
  • Sports
  • Science
  • Politics
  • Marketing

Policies

  • Terms & Conditions
  • Privacy Policy

About Us

  • About Us
  • Contact Us
  • Feedback

© 2025 All Rights Reserved by
Letsrectify.com